Package com.stripe.param
Class InvoiceUpdateLinesParams.Line.Builder
java.lang.Object
com.stripe.param.InvoiceUpdateLinesParams.Line.Builder
- Enclosing class:
- InvoiceUpdateLinesParams.Line
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionAdd all elements to `discounts` list.Add all elements to `taxAmounts` list.addAllTaxRate
(List<String> elements) Add all elements to `taxRates` list.Add an element to `discounts` list.Add an element to `taxAmounts` list.addTaxRate
(String element) Add an element to `taxRates` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata
(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata
(String key, String value) Add a key/value pair to `metadata` map.The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice.setDescription
(String description) An arbitrary string which you can attach to the invoice item.setDiscountable
(Boolean discountable) Controls whether discounts apply to this line item.setDiscounts
(EmptyParam discounts) The coupons, promotion codes & existing discounts which apply to the line item.setDiscounts
(List<InvoiceUpdateLinesParams.Line.Discount> discounts) The coupons, promotion codes & existing discounts which apply to the line item.Required. ID of an existing line item on the invoice.setMetadata
(EmptyParam metadata) Set of key-value pairs that you can attach to an object.setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.The period associated with this invoice item.The ID of the price object.Data used to generate a new Price object inline.setQuantity
(Long quantity) Non-negative integer.setTaxAmounts
(EmptyParam taxAmounts) A list of up to 10 tax amounts for this line item.setTaxAmounts
(List<InvoiceUpdateLinesParams.Line.TaxAmount> taxAmounts) A list of up to 10 tax amounts for this line item.setTaxRates
(EmptyParam taxRates) The tax rates which apply to the line item.setTaxRates
(List<String> taxRates) The tax rates which apply to the line item.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setAmount
The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. -
setDescription
An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. -
setDiscountable
Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. -
addDiscount
public InvoiceUpdateLinesParams.Line.Builder addDiscount(InvoiceUpdateLinesParams.Line.Discount element) Add an element to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateLinesParams.Line.discounts
for the field documentation. -
addAllDiscount
public InvoiceUpdateLinesParams.Line.Builder addAllDiscount(List<InvoiceUpdateLinesParams.Line.Discount> elements) Add all elements to `discounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateLinesParams.Line.discounts
for the field documentation. -
setDiscounts
The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. -
setDiscounts
public InvoiceUpdateLinesParams.Line.Builder setDiscounts(List<InvoiceUpdateLinesParams.Line.Discount> discounts) The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. -
putExtraParam
Add a key/value pair to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeInvoiceUpdateLinesParams.Line.extraParams
for the field documentation. -
putAllExtraParam
Add all map key/value pairs to `extraParams` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeInvoiceUpdateLinesParams.Line.extraParams
for the field documentation. -
setId
Required. ID of an existing line item on the invoice. -
putMetadata
Add a key/value pair to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeInvoiceUpdateLinesParams.Line.metadata
for the field documentation. -
putAllMetadata
Add all map key/value pairs to `metadata` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeInvoiceUpdateLinesParams.Line.metadata
for the field documentation. -
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
. For type=subscription line items, the incoming metadata specified on the request is directly used to set this value, in contrast to type=invoiceitem line items, where any existing metadata on the invoice line is merged with the incoming data. -
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. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
. For type=subscription line items, the incoming metadata specified on the request is directly used to set this value, in contrast to type=invoiceitem line items, where any existing metadata on the invoice line is merged with the incoming data. -
setPeriod
The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have Stripe Revenue Recognition enabled, the period will be used to recognize and defer revenue. See the Revenue Recognition documentation for details. -
setPrice
The ID of the price object. One ofprice
orprice_data
is required. -
setPriceData
public InvoiceUpdateLinesParams.Line.Builder setPriceData(InvoiceUpdateLinesParams.Line.PriceData priceData) -
setQuantity
Non-negative integer. The quantity of units for the line item. -
addTaxAmount
public InvoiceUpdateLinesParams.Line.Builder addTaxAmount(InvoiceUpdateLinesParams.Line.TaxAmount element) Add an element to `taxAmounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateLinesParams.Line.taxAmounts
for the field documentation. -
addAllTaxAmount
public InvoiceUpdateLinesParams.Line.Builder addAllTaxAmount(List<InvoiceUpdateLinesParams.Line.TaxAmount> elements) Add all elements to `taxAmounts` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateLinesParams.Line.taxAmounts
for the field documentation. -
setTaxAmounts
A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has tax_rates or if the invoice has default_tax_rates or uses automatic tax. Pass an empty string to remove previously defined tax amounts. -
setTaxAmounts
public InvoiceUpdateLinesParams.Line.Builder setTaxAmounts(List<InvoiceUpdateLinesParams.Line.TaxAmount> taxAmounts) A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has tax_rates or if the invoice has default_tax_rates or uses automatic tax. Pass an empty string to remove previously defined tax amounts. -
addTaxRate
Add an element to `taxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateLinesParams.Line.taxRates
for the field documentation. -
addAllTaxRate
Add all elements to `taxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceUpdateLinesParams.Line.taxRates
for the field documentation. -
setTaxRates
The tax rates which apply to the line item. When set, thedefault_tax_rates
on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. -
setTaxRates
The tax rates which apply to the line item. When set, thedefault_tax_rates
on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates.
-