Package com.stripe.param
Class InvoiceUpcomingParams.InvoiceItem.Builder
- java.lang.Object
-
- com.stripe.param.InvoiceUpcomingParams.InvoiceItem.Builder
-
- Enclosing class:
- InvoiceUpcomingParams.InvoiceItem
public static class InvoiceUpcomingParams.InvoiceItem.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvoiceUpcomingParams.InvoiceItem.Builder
addAllDiscount(java.util.List<InvoiceUpcomingParams.InvoiceItem.Discount> elements)
Add all elements to `discounts` list.InvoiceUpcomingParams.InvoiceItem.Builder
addAllTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `taxRates` list.InvoiceUpcomingParams.InvoiceItem.Builder
addDiscount(InvoiceUpcomingParams.InvoiceItem.Discount element)
Add an element to `discounts` list.InvoiceUpcomingParams.InvoiceItem.Builder
addTaxRate(java.lang.String element)
Add an element to `taxRates` list.InvoiceUpcomingParams.InvoiceItem
build()
Finalize and obtain parameter instance from this builder.InvoiceUpcomingParams.InvoiceItem.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.InvoiceUpcomingParams.InvoiceItem.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.InvoiceUpcomingParams.InvoiceItem.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.InvoiceUpcomingParams.InvoiceItem.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.InvoiceUpcomingParams.InvoiceItem.Builder
setAmount(java.lang.Long amount)
The integer amount in %s of previewed invoice item.InvoiceUpcomingParams.InvoiceItem.Builder
setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase.InvoiceUpcomingParams.InvoiceItem.Builder
setDescription(java.lang.String description)
An arbitrary string which you can attach to the invoice item.InvoiceUpcomingParams.InvoiceItem.Builder
setDiscountable(java.lang.Boolean discountable)
Explicitly controls whether discounts apply to this invoice item.InvoiceUpcomingParams.InvoiceItem.Builder
setDiscounts(EmptyParam discounts)
The coupons to redeem into discounts for the invoice item in the preview.InvoiceUpcomingParams.InvoiceItem.Builder
setDiscounts(java.util.List<InvoiceUpcomingParams.InvoiceItem.Discount> discounts)
The coupons to redeem into discounts for the invoice item in the preview.InvoiceUpcomingParams.InvoiceItem.Builder
setInvoiceitem(java.lang.String invoiceitem)
The ID of the invoice item to update in preview.InvoiceUpcomingParams.InvoiceItem.Builder
setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object.InvoiceUpcomingParams.InvoiceItem.Builder
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.InvoiceUpcomingParams.InvoiceItem.Builder
setPeriod(InvoiceUpcomingParams.InvoiceItem.Period period)
The period associated with this invoice item.InvoiceUpcomingParams.InvoiceItem.Builder
setPrice(java.lang.String price)
The ID of the price object.InvoiceUpcomingParams.InvoiceItem.Builder
setPriceData(InvoiceUpcomingParams.InvoiceItem.PriceData priceData)
Data used to generate a new Price object inline.InvoiceUpcomingParams.InvoiceItem.Builder
setQuantity(java.lang.Long quantity)
Non-negative integer.InvoiceUpcomingParams.InvoiceItem.Builder
setTaxRates(EmptyParam taxRates)
The tax rates that apply to the item.InvoiceUpcomingParams.InvoiceItem.Builder
setTaxRates(java.util.List<java.lang.String> taxRates)
The tax rates that apply to the item.InvoiceUpcomingParams.InvoiceItem.Builder
setUnitAmount(java.lang.Long unitAmount)
The integer unit amount in %s of the charge to be applied to the upcoming invoice.InvoiceUpcomingParams.InvoiceItem.Builder
setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places.
-
-
-
Method Detail
-
build
public InvoiceUpcomingParams.InvoiceItem build()
Finalize and obtain parameter instance from this builder.
-
setAmount
public InvoiceUpcomingParams.InvoiceItem.Builder setAmount(java.lang.Long amount)
The integer amount in %s of previewed invoice item.
-
setCurrency
public InvoiceUpcomingParams.InvoiceItem.Builder setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency. Only applicable to new invoice items.
-
setDescription
public InvoiceUpcomingParams.InvoiceItem.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.
-
setDiscountable
public InvoiceUpcomingParams.InvoiceItem.Builder setDiscountable(java.lang.Boolean discountable)
Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items.
-
addDiscount
public InvoiceUpcomingParams.InvoiceItem.Builder addDiscount(InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.discounts
for the field documentation.
-
addAllDiscount
public InvoiceUpcomingParams.InvoiceItem.Builder addAllDiscount(java.util.List<InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.discounts
for the field documentation.
-
setDiscounts
public InvoiceUpcomingParams.InvoiceItem.Builder setDiscounts(EmptyParam discounts)
The coupons to redeem into discounts for the invoice item in the preview.
-
setDiscounts
public InvoiceUpcomingParams.InvoiceItem.Builder setDiscounts(java.util.List<InvoiceUpcomingParams.InvoiceItem.Discount> discounts)
The coupons to redeem into discounts for the invoice item in the preview.
-
putExtraParam
public InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.extraParams
for the field documentation.
-
putAllExtraParam
public InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.extraParams
for the field documentation.
-
setInvoiceitem
public InvoiceUpcomingParams.InvoiceItem.Builder setInvoiceitem(java.lang.String invoiceitem)
The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice.
-
putMetadata
public InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.metadata
for the field documentation.
-
putAllMetadata
public InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.metadata
for the field documentation.
-
setMetadata
public InvoiceUpcomingParams.InvoiceItem.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 InvoiceUpcomingParams.InvoiceItem.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 InvoiceUpcomingParams.InvoiceItem.Builder setPeriod(InvoiceUpcomingParams.InvoiceItem.Period period)
The period associated with this invoice item.
-
setPrice
public InvoiceUpcomingParams.InvoiceItem.Builder setPrice(java.lang.String price)
The ID of the price object.
-
setPriceData
public InvoiceUpcomingParams.InvoiceItem.Builder setPriceData(InvoiceUpcomingParams.InvoiceItem.PriceData priceData)
Data used to generate a new Price object inline.
-
setQuantity
public InvoiceUpcomingParams.InvoiceItem.Builder setQuantity(java.lang.Long quantity)
Non-negative integer. The quantity of units for the invoice item.
-
addTaxRate
public InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.taxRates
for the field documentation.
-
addAllTaxRate
public InvoiceUpcomingParams.InvoiceItem.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. SeeInvoiceUpcomingParams.InvoiceItem.taxRates
for the field documentation.
-
setTaxRates
public InvoiceUpcomingParams.InvoiceItem.Builder setTaxRates(EmptyParam taxRates)
The tax rates that apply to the item. When set, anydefault_tax_rates
do not apply to this item.
-
setTaxRates
public InvoiceUpcomingParams.InvoiceItem.Builder setTaxRates(java.util.List<java.lang.String> taxRates)
The tax rates that apply to the item. When set, anydefault_tax_rates
do not apply to this item.
-
setUnitAmount
public InvoiceUpcomingParams.InvoiceItem.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 InvoiceUpcomingParams.InvoiceItem.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_amount
andunit_amount_decimal
can be set.
-
-