Package com.stripe.param
Class InvoiceItemUpdateParams.Builder
java.lang.Object
com.stripe.param.InvoiceItemUpdateParams.Builder
- Enclosing class:
InvoiceItemUpdateParams
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllDiscount
(List<InvoiceItemUpdateParams.Discount> elements) Add all elements to `discounts` list.addAllExpand
(List<String> elements) Add all elements to `expand` list.addAllTaxRate
(List<String> elements) Add all elements to `taxRates` list.Add an element to `discounts` list.Add an element to `expand` 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 %s of the charge to be applied to the upcoming invoice.setDescription
(EmptyParam description) An arbitrary string which you can attach to the invoice item.setDescription
(String description) An arbitrary string which you can attach to the invoice item.setDiscountable
(Boolean discountable) Controls whether discounts apply to this invoice item.setDiscounts
(EmptyParam discounts) The coupons & existing discounts which apply to the invoice item or invoice line item.setDiscounts
(List<InvoiceItemUpdateParams.Discount> discounts) The coupons & existing discounts which apply to the invoice item or invoice line item.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.setPrice
(EmptyParam price) The ID of the price object.The ID of the price object.setPriceData
(InvoiceItemUpdateParams.PriceData priceData) Data used to generate a new Price object inline.setQuantity
(Long quantity) Non-negative integer.setTaxRates
(EmptyParam taxRates) The tax rates which apply to the invoice item.setTaxRates
(List<String> taxRates) The tax rates which apply to the invoice item.setUnitAmount
(Long unitAmount) The integer unit amount in %s of the charge to be applied to the upcoming invoice.setUnitAmountDecimal
(EmptyParam unitAmountDecimal) Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places.setUnitAmountDecimal
(BigDecimal unitAmountDecimal) Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setAmount
The integer amount in %s 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. -
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 invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice 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. SeeInvoiceItemUpdateParams.discounts
for the field documentation. -
addAllDiscount
public InvoiceItemUpdateParams.Builder addAllDiscount(List<InvoiceItemUpdateParams.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. SeeInvoiceItemUpdateParams.discounts
for the field documentation. -
setDiscounts
The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. -
setDiscounts
public InvoiceItemUpdateParams.Builder setDiscounts(List<InvoiceItemUpdateParams.Discount> discounts) The coupons & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. -
addExpand
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceItemUpdateParams.expand
for the field documentation. -
addAllExpand
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeInvoiceItemUpdateParams.expand
for the field documentation. -
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. SeeInvoiceItemUpdateParams.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. SeeInvoiceItemUpdateParams.extraParams
for the field documentation. -
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. SeeInvoiceItemUpdateParams.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. SeeInvoiceItemUpdateParams.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. -
setPrice
The ID of the price object. -
setPrice
The ID of the price object. -
setPriceData
Data used to generate a new Price object inline. -
setQuantity
Non-negative integer. The quantity of units for the invoice item. -
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. SeeInvoiceItemUpdateParams.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. SeeInvoiceItemUpdateParams.taxRates
for the field documentation. -
setTaxRates
The tax rates which apply to the invoice item. When set, thedefault_tax_rates
on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. -
setTaxRates
The tax rates which apply to the invoice item. When set, thedefault_tax_rates
on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. -
setUnitAmount
The integer unit amount in %s of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. -
setUnitAmountDecimal
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places. Only one ofunit_amount
andunit_amount_decimal
can be set. -
setUnitAmountDecimal
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places. Only one ofunit_amount
andunit_amount_decimal
can be set.
-