Package com.stripe.param
Class InvoiceItemUpdateParams.Builder
- java.lang.Object
-
- com.stripe.param.InvoiceItemUpdateParams.Builder
-
- Enclosing class:
- InvoiceItemUpdateParams
public static class InvoiceItemUpdateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvoiceItemUpdateParams.BuilderaddAllDiscount(java.util.List<InvoiceItemUpdateParams.Discount> elements)Add all elements to `discounts` list.InvoiceItemUpdateParams.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.InvoiceItemUpdateParams.BuilderaddAllTaxRate(java.util.List<java.lang.String> elements)Add all elements to `taxRates` list.InvoiceItemUpdateParams.BuilderaddDiscount(InvoiceItemUpdateParams.Discount element)Add an element to `discounts` list.InvoiceItemUpdateParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.InvoiceItemUpdateParams.BuilderaddTaxRate(java.lang.String element)Add an element to `taxRates` list.InvoiceItemUpdateParamsbuild()Finalize and obtain parameter instance from this builder.InvoiceItemUpdateParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.InvoiceItemUpdateParams.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.InvoiceItemUpdateParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.InvoiceItemUpdateParams.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.InvoiceItemUpdateParams.BuildersetAmount(java.lang.Long amount)The integer amount in %s of the charge to be applied to the upcoming invoice.InvoiceItemUpdateParams.BuildersetDescription(EmptyParam description)An arbitrary string which you can attach to the invoice item.InvoiceItemUpdateParams.BuildersetDescription(java.lang.String description)An arbitrary string which you can attach to the invoice item.InvoiceItemUpdateParams.BuildersetDiscountable(java.lang.Boolean discountable)Controls whether discounts apply to this invoice item.InvoiceItemUpdateParams.BuildersetDiscounts(EmptyParam discounts)The coupons & existing discounts which apply to the invoice item or invoice line item.InvoiceItemUpdateParams.BuildersetDiscounts(java.util.List<InvoiceItemUpdateParams.Discount> discounts)The coupons & existing discounts which apply to the invoice item or invoice line item.InvoiceItemUpdateParams.BuildersetMetadata(EmptyParam metadata)Set of key-value pairs that you can attach to an object.InvoiceItemUpdateParams.BuildersetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.InvoiceItemUpdateParams.BuildersetPeriod(InvoiceItemUpdateParams.Period period)The period associated with this invoice item.InvoiceItemUpdateParams.BuildersetPrice(EmptyParam price)The ID of the price object.InvoiceItemUpdateParams.BuildersetPrice(java.lang.String price)The ID of the price object.InvoiceItemUpdateParams.BuildersetPriceData(InvoiceItemUpdateParams.PriceData priceData)Data used to generate a new Price object inline.InvoiceItemUpdateParams.BuildersetQuantity(java.lang.Long quantity)Non-negative integer.InvoiceItemUpdateParams.BuildersetTaxRates(EmptyParam taxRates)The tax rates which apply to the invoice item.InvoiceItemUpdateParams.BuildersetTaxRates(java.util.List<java.lang.String> taxRates)The tax rates which apply to the invoice item.InvoiceItemUpdateParams.BuildersetUnitAmount(java.lang.Long unitAmount)The integer unit amount in %s of the charge to be applied to the upcoming invoice.InvoiceItemUpdateParams.BuildersetUnitAmountDecimal(EmptyParam unitAmountDecimal)Same asunit_amount, but accepts a decimal value in %s with at most 12 decimal places.InvoiceItemUpdateParams.BuildersetUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)Same asunit_amount, but accepts a decimal value in %s with at most 12 decimal places.
-
-
-
Method Detail
-
build
public InvoiceItemUpdateParams build()
Finalize and obtain parameter instance from this builder.
-
setAmount
public InvoiceItemUpdateParams.Builder setAmount(java.lang.Long amount)
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
public InvoiceItemUpdateParams.Builder setDescription(java.lang.String description)
An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
-
setDescription
public InvoiceItemUpdateParams.Builder setDescription(EmptyParam description)
An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking.
-
setDiscountable
public InvoiceItemUpdateParams.Builder setDiscountable(java.lang.Boolean discountable)
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
public InvoiceItemUpdateParams.Builder addDiscount(InvoiceItemUpdateParams.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. SeeInvoiceItemUpdateParams.discountsfor the field documentation.
-
addAllDiscount
public InvoiceItemUpdateParams.Builder addAllDiscount(java.util.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.discountsfor the field documentation.
-
setDiscounts
public InvoiceItemUpdateParams.Builder setDiscounts(EmptyParam 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.
-
setDiscounts
public InvoiceItemUpdateParams.Builder setDiscounts(java.util.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
public InvoiceItemUpdateParams.Builder addExpand(java.lang.String element)
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.expandfor the field documentation.
-
addAllExpand
public InvoiceItemUpdateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
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.expandfor the field documentation.
-
putExtraParam
public InvoiceItemUpdateParams.Builder putExtraParam(java.lang.String key, java.lang.Object value)
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.extraParamsfor the field documentation.
-
putAllExtraParam
public InvoiceItemUpdateParams.Builder putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
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.extraParamsfor the field documentation.
-
putMetadata
public InvoiceItemUpdateParams.Builder putMetadata(java.lang.String key, java.lang.String value)
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.metadatafor the field documentation.
-
putAllMetadata
public InvoiceItemUpdateParams.Builder putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
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.metadatafor the field documentation.
-
setMetadata
public InvoiceItemUpdateParams.Builder setMetadata(EmptyParam metadata)
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
public InvoiceItemUpdateParams.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
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
public InvoiceItemUpdateParams.Builder setPeriod(InvoiceItemUpdateParams.Period period)
The period associated with this invoice item.
-
setPrice
public InvoiceItemUpdateParams.Builder setPrice(java.lang.String price)
The ID of the price object.
-
setPrice
public InvoiceItemUpdateParams.Builder setPrice(EmptyParam price)
The ID of the price object.
-
setPriceData
public InvoiceItemUpdateParams.Builder setPriceData(InvoiceItemUpdateParams.PriceData priceData)
Data used to generate a new Price object inline.
-
setQuantity
public InvoiceItemUpdateParams.Builder setQuantity(java.lang.Long quantity)
Non-negative integer. The quantity of units for the invoice item.
-
addTaxRate
public InvoiceItemUpdateParams.Builder addTaxRate(java.lang.String element)
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.taxRatesfor the field documentation.
-
addAllTaxRate
public InvoiceItemUpdateParams.Builder addAllTaxRate(java.util.List<java.lang.String> elements)
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.taxRatesfor the field documentation.
-
setTaxRates
public InvoiceItemUpdateParams.Builder setTaxRates(EmptyParam taxRates)
The tax rates which apply to the invoice item. When set, thedefault_tax_rateson the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
-
setTaxRates
public InvoiceItemUpdateParams.Builder setTaxRates(java.util.List<java.lang.String> taxRates)
The tax rates which apply to the invoice item. When set, thedefault_tax_rateson the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates.
-
setUnitAmount
public InvoiceItemUpdateParams.Builder setUnitAmount(java.lang.Long unitAmount)
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
public InvoiceItemUpdateParams.Builder setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
Same asunit_amount, but accepts a decimal value in %s with at most 12 decimal places. Only one ofunit_amountandunit_amount_decimalcan be set.
-
setUnitAmountDecimal
public InvoiceItemUpdateParams.Builder setUnitAmountDecimal(EmptyParam unitAmountDecimal)
Same asunit_amount, but accepts a decimal value in %s with at most 12 decimal places. Only one ofunit_amountandunit_amount_decimalcan be set.
-
-