Package com.stripe.model
Class InvoiceLineItem
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.InvoiceLineItem
- All Implemented Interfaces:
HasId
,MetadataStore<InvoiceLineItem>
,StripeActiveObject
,StripeObjectInterface
Invoice Line Items represent the individual lines within an invoice and only exist within the context of an
invoice.
Each line item is backed by either an invoice item or a subscription item.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
For more details about DiscountAmount, please refer to the API Reference.static class
For more details about Parent, please refer to the API Reference.static class
For more details about Period, please refer to the API Reference.static class
For more details about PretaxCreditAmount, please refer to the API Reference.static class
For more details about Pricing, please refer to the API Reference.static class
For more details about Tax, please refer to the API Reference.Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod
-
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSON, INTERNAL_GSON
Fields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
The amount, in cents (or local equivalent).Three-letter ISO currency code, in lowercase.An arbitrary string attached to the object.If true, discounts will apply to this line item.The amount of discount calculated per discount for this line item.Get expandeddiscounts
.Get IDs of expandablediscounts
object list.getId()
Unique identifier for the object.The ID of the invoice that contains this line item.Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.Set of key-value pairs that you can attach to an object.String representing the object's type.The parent that generated this invoice.Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.The pricing information of the line item.The quantity of the subscription, if the line item is a subscription or a proration.Get ID of expandablesubscription
object.Get expandedsubscription
.getTaxes()
The tax information of the line item.int
hashCode()
void
The amount, in cents (or local equivalent).void
setCurrency
(String currency) Three-letter ISO currency code, in lowercase.void
setDescription
(String description) An arbitrary string attached to the object.void
setDiscountable
(Boolean discountable) If true, discounts will apply to this line item.void
setDiscountAmounts
(List<InvoiceLineItem.DiscountAmount> discountAmounts) The amount of discount calculated per discount for this line item.void
setDiscountObjects
(List<Discount> objs) void
setDiscounts
(List<String> ids) void
Unique identifier for the object.void
setInvoice
(String invoice) The ID of the invoice that contains this line item.void
setLivemode
(Boolean livemode) Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode.void
setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.void
String representing the object's type.void
setParent
(InvoiceLineItem.Parent parent) The parent that generated this invoice.void
setPeriod
(InvoiceLineItem.Period period) void
setPretaxCreditAmounts
(List<InvoiceLineItem.PretaxCreditAmount> pretaxCreditAmounts) Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item.void
setPricing
(InvoiceLineItem.Pricing pricing) The pricing information of the line item.void
setQuantity
(Long quantity) The quantity of the subscription, if the line item is a subscription or a proration.void
setResponseGetter
(StripeResponseGetter responseGetter) Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.void
void
setSubscriptionObject
(Subscription expandableObject) void
setTaxes
(List<InvoiceLineItem.Tax> taxes) The tax information of the line item.update
(InvoiceLineItemUpdateParams params) Updates an invoice’s line item.update
(InvoiceLineItemUpdateParams params, RequestOptions options) Updates an invoice’s line item.Updates an invoice’s line item.update
(Map<String, Object> params, RequestOptions options) Updates an invoice’s line item.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, getGlobalResponseGetter, getResponseGetter, setExpandableFieldId, setGlobalResponseGetter, urlEncode, urlEncodeId
Methods inherited from class com.stripe.model.StripeObject
deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, deserializeStripeObject, equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.stripe.model.StripeActiveObject
trySetResponseGetter
-
Constructor Details
-
InvoiceLineItem
public InvoiceLineItem()
-
-
Method Details
-
getSubscription
Get ID of expandablesubscription
object. -
setSubscription
-
getSubscriptionObject
Get expandedsubscription
. -
setSubscriptionObject
-
getDiscounts
Get IDs of expandablediscounts
object list. -
setDiscounts
-
getDiscountObjects
Get expandeddiscounts
. -
setDiscountObjects
-
update
Updates an invoice’s line item. Some fields, such astax_amounts
, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such asamount
, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.- Specified by:
update
in interfaceMetadataStore<InvoiceLineItem>
- Throws:
StripeException
-
update
public InvoiceLineItem update(Map<String, Object> params, RequestOptions options) throws StripeExceptionUpdates an invoice’s line item. Some fields, such astax_amounts
, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such asamount
, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.- Specified by:
update
in interfaceMetadataStore<InvoiceLineItem>
- Throws:
StripeException
-
update
Updates an invoice’s line item. Some fields, such astax_amounts
, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such asamount
, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.- Throws:
StripeException
-
update
public InvoiceLineItem update(InvoiceLineItemUpdateParams params, RequestOptions options) throws StripeException Updates an invoice’s line item. Some fields, such astax_amounts
, only live on the invoice line item, so they can only be updated through this endpoint. Other fields, such asamount
, live on both the invoice item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. Updating an invoice’s line item is only possible before the invoice is finalized.- Throws:
StripeException
-
setResponseGetter
Description copied from interface:StripeActiveObject
Method is used by the containing object orStripeResponseGetter
implementations to set theStripeResponseGetter
instance used to make further requests.- Specified by:
setResponseGetter
in interfaceStripeActiveObject
- Overrides:
setResponseGetter
in classApiResource
- Parameters:
responseGetter
- theStripeResponseGetter
instance to use for making further requests.
-
getAmount
The amount, in cents (or local equivalent). -
getCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
getDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
getDiscountAmounts
The amount of discount calculated per discount for this line item. -
getDiscountable
If true, discounts will apply to this line item. Always false for prorations. -
getInvoice
The ID of the invoice that contains this line item. -
getLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
line_item
. -
getParent
The parent that generated this invoice. -
getPeriod
-
getPretaxCreditAmounts
Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. -
getPricing
The pricing information of the line item. -
getQuantity
The quantity of the subscription, if the line item is a subscription or a proration. -
getTaxes
The tax information of the line item. -
setAmount
The amount, in cents (or local equivalent). -
setCurrency
Three-letter ISO currency code, in lowercase. Must be a supported currency. -
setDescription
An arbitrary string attached to the object. Often useful for displaying to users. -
setDiscountAmounts
The amount of discount calculated per discount for this line item. -
setDiscountable
If true, discounts will apply to this line item. Always false for prorations. -
setId
Unique identifier for the object. -
setInvoice
The ID of the invoice that contains this line item. -
setLivemode
Has the valuetrue
if the object exists in live mode or the valuefalse
if the object exists in test mode. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items withtype=subscription
,metadata
reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
line_item
. -
setParent
The parent that generated this invoice. -
setPeriod
-
setPretaxCreditAmounts
Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. -
setPricing
The pricing information of the line item. -
setQuantity
The quantity of the subscription, if the line item is a subscription or a proration. -
setTaxes
The tax information of the line item. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
getMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items withtype=subscription
,metadata
reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation.- Specified by:
getMetadata
in interfaceMetadataStore<InvoiceLineItem>
-