Package com.stripe.param
Class InvoiceAddLinesParams.Line.Builder
java.lang.Object
com.stripe.param.InvoiceAddLinesParams.Line.Builder
- Enclosing class:
- InvoiceAddLinesParams.Line
-
Constructor Summary
Constructors -
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<InvoiceAddLinesParams.Line.Discount> discounts) The coupons, promotion codes & existing discounts which apply to the line item.setInvoiceItem
(String invoiceItem) ID of an unassigned invoice item to assign to this 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.setPriceData
(InvoiceAddLinesParams.Line.PriceData priceData) 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<InvoiceAddLinesParams.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
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. SeeInvoiceAddLinesParams.Line.discounts
for the field documentation. -
addAllDiscount
public InvoiceAddLinesParams.Line.Builder addAllDiscount(List<InvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.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 InvoiceAddLinesParams.Line.Builder setDiscounts(List<InvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.Line.extraParams
for the field documentation. -
setInvoiceItem
ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. -
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. SeeInvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.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
. -
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
. -
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 InvoiceAddLinesParams.Line.Builder setPriceData(InvoiceAddLinesParams.Line.PriceData priceData) -
setQuantity
Non-negative integer. The quantity of units for the line item. -
addTaxAmount
public InvoiceAddLinesParams.Line.Builder addTaxAmount(InvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.Line.taxAmounts
for the field documentation. -
addAllTaxAmount
public InvoiceAddLinesParams.Line.Builder addAllTaxAmount(List<InvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.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 InvoiceAddLinesParams.Line.Builder setTaxAmounts(List<InvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.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. SeeInvoiceAddLinesParams.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.
-