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.BuilderaddAllDiscount(java.util.List<InvoiceUpcomingParams.InvoiceItem.Discount> elements)Add all elements to `discounts` list.InvoiceUpcomingParams.InvoiceItem.BuilderaddAllTaxRate(java.util.List<java.lang.String> elements)Add all elements to `taxRates` list.InvoiceUpcomingParams.InvoiceItem.BuilderaddDiscount(InvoiceUpcomingParams.InvoiceItem.Discount element)Add an element to `discounts` list.InvoiceUpcomingParams.InvoiceItem.BuilderaddTaxRate(java.lang.String element)Add an element to `taxRates` list.InvoiceUpcomingParams.InvoiceItembuild()Finalize and obtain parameter instance from this builder.InvoiceUpcomingParams.InvoiceItem.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.InvoiceUpcomingParams.InvoiceItem.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.InvoiceUpcomingParams.InvoiceItem.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.InvoiceUpcomingParams.InvoiceItem.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.InvoiceUpcomingParams.InvoiceItem.BuildersetAmount(java.lang.Long amount)The integer amount in %s of previewed invoice item.InvoiceUpcomingParams.InvoiceItem.BuildersetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.InvoiceUpcomingParams.InvoiceItem.BuildersetDescription(java.lang.String description)An arbitrary string which you can attach to the invoice item.InvoiceUpcomingParams.InvoiceItem.BuildersetDiscountable(java.lang.Boolean discountable)Explicitly controls whether discounts apply to this invoice item.InvoiceUpcomingParams.InvoiceItem.BuildersetDiscounts(EmptyParam discounts)The coupons to redeem into discounts for the invoice item in the preview.InvoiceUpcomingParams.InvoiceItem.BuildersetDiscounts(java.util.List<InvoiceUpcomingParams.InvoiceItem.Discount> discounts)The coupons to redeem into discounts for the invoice item in the preview.InvoiceUpcomingParams.InvoiceItem.BuildersetInvoiceitem(java.lang.String invoiceitem)The ID of the invoice item to update in preview.InvoiceUpcomingParams.InvoiceItem.BuildersetMetadata(EmptyParam metadata)Set of key-value pairs that you can attach to an object.InvoiceUpcomingParams.InvoiceItem.BuildersetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.InvoiceUpcomingParams.InvoiceItem.BuildersetPeriod(InvoiceUpcomingParams.InvoiceItem.Period period)The period associated with this invoice item.InvoiceUpcomingParams.InvoiceItem.BuildersetPrice(java.lang.String price)The ID of the price object.InvoiceUpcomingParams.InvoiceItem.BuildersetPriceData(InvoiceUpcomingParams.InvoiceItem.PriceData priceData)Data used to generate a new Price object inline.InvoiceUpcomingParams.InvoiceItem.BuildersetQuantity(java.lang.Long quantity)Non-negative integer.InvoiceUpcomingParams.InvoiceItem.BuildersetTaxRates(EmptyParam taxRates)The tax rates that apply to the item.InvoiceUpcomingParams.InvoiceItem.BuildersetTaxRates(java.util.List<java.lang.String> taxRates)The tax rates that apply to the item.InvoiceUpcomingParams.InvoiceItem.BuildersetUnitAmount(java.lang.Long unitAmount)The integer unit amount in %s of the charge to be applied to the upcoming invoice.InvoiceUpcomingParams.InvoiceItem.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 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.discountsfor 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.discountsfor 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.extraParamsfor 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.extraParamsfor 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.metadatafor 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.metadatafor 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.taxRatesfor 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.taxRatesfor the field documentation.
-
setTaxRates
public InvoiceUpcomingParams.InvoiceItem.Builder setTaxRates(EmptyParam taxRates)
The tax rates that apply to the item. When set, anydefault_tax_ratesdo 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_ratesdo 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_amountandunit_amount_decimalcan be set.
-
-