Package com.stripe.param
Class InvoiceItemCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.InvoiceItemCreateParams.Builder
-
- Enclosing class:
- InvoiceItemCreateParams
public static class InvoiceItemCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InvoiceItemCreateParams.BuilderaddAllDiscount(java.util.List<InvoiceItemCreateParams.Discount> elements)Add all elements to `discounts` list.InvoiceItemCreateParams.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.InvoiceItemCreateParams.BuilderaddAllTaxRate(java.util.List<java.lang.String> elements)Add all elements to `taxRates` list.InvoiceItemCreateParams.BuilderaddDiscount(InvoiceItemCreateParams.Discount element)Add an element to `discounts` list.InvoiceItemCreateParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.InvoiceItemCreateParams.BuilderaddTaxRate(java.lang.String element)Add an element to `taxRates` list.InvoiceItemCreateParamsbuild()Finalize and obtain parameter instance from this builder.InvoiceItemCreateParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.InvoiceItemCreateParams.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.InvoiceItemCreateParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.InvoiceItemCreateParams.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.InvoiceItemCreateParams.BuildersetAmount(java.lang.Long amount)The integer amount in %s of the charge to be applied to the upcoming invoice.InvoiceItemCreateParams.BuildersetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.InvoiceItemCreateParams.BuildersetCustomer(java.lang.String customer)The ID of the customer who will be billed when this invoice item is billed.InvoiceItemCreateParams.BuildersetDescription(java.lang.String description)An arbitrary string which you can attach to the invoice item.InvoiceItemCreateParams.BuildersetDiscountable(java.lang.Boolean discountable)Controls whether discounts apply to this invoice item.InvoiceItemCreateParams.BuildersetDiscounts(EmptyParam discounts)The coupons to redeem into discounts for the invoice item or invoice line item.InvoiceItemCreateParams.BuildersetDiscounts(java.util.List<InvoiceItemCreateParams.Discount> discounts)The coupons to redeem into discounts for the invoice item or invoice line item.InvoiceItemCreateParams.BuildersetInvoice(java.lang.String invoice)The ID of an existing invoice to add this invoice item to.InvoiceItemCreateParams.BuildersetMetadata(EmptyParam metadata)Set of key-value pairs that you can attach to an object.InvoiceItemCreateParams.BuildersetMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)Set of key-value pairs that you can attach to an object.InvoiceItemCreateParams.BuildersetPeriod(InvoiceItemCreateParams.Period period)The period associated with this invoice item.InvoiceItemCreateParams.BuildersetPrice(java.lang.String price)The ID of the price object.InvoiceItemCreateParams.BuildersetPriceData(InvoiceItemCreateParams.PriceData priceData)Data used to generate a new Price object inline.InvoiceItemCreateParams.BuildersetQuantity(java.lang.Long quantity)Non-negative integer.InvoiceItemCreateParams.BuildersetSubscription(java.lang.String subscription)The ID of a subscription to add this invoice item to.InvoiceItemCreateParams.BuildersetUnitAmount(java.lang.Long unitAmount)The integer unit amount in %s of the charge to be applied to the upcoming invoice.InvoiceItemCreateParams.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 InvoiceItemCreateParams build()
Finalize and obtain parameter instance from this builder.
-
setAmount
public InvoiceItemCreateParams.Builder setAmount(java.lang.Long amount)
The integer amount in %s of the charge to be applied to the upcoming invoice. Passing in a negativeamountwill reduce theamount_dueon the invoice.
-
setCurrency
public InvoiceItemCreateParams.Builder setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
setCustomer
public InvoiceItemCreateParams.Builder setCustomer(java.lang.String customer)
The ID of the customer who will be billed when this invoice item is billed.
-
setDescription
public InvoiceItemCreateParams.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 InvoiceItemCreateParams.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.
-
addDiscount
public InvoiceItemCreateParams.Builder addDiscount(InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.discountsfor the field documentation.
-
addAllDiscount
public InvoiceItemCreateParams.Builder addAllDiscount(java.util.List<InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.discountsfor the field documentation.
-
setDiscounts
public InvoiceItemCreateParams.Builder setDiscounts(EmptyParam discounts)
The coupons to redeem into discounts for the invoice item or invoice line item.
-
setDiscounts
public InvoiceItemCreateParams.Builder setDiscounts(java.util.List<InvoiceItemCreateParams.Discount> discounts)
The coupons to redeem into discounts for the invoice item or invoice line item.
-
addExpand
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.expandfor the field documentation.
-
addAllExpand
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.expandfor the field documentation.
-
putExtraParam
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.extraParamsfor the field documentation.
-
putAllExtraParam
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.extraParamsfor the field documentation.
-
setInvoice
public InvoiceItemCreateParams.Builder setInvoice(java.lang.String invoice)
The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice.
-
putMetadata
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.metadatafor the field documentation.
-
putAllMetadata
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.metadatafor the field documentation.
-
setMetadata
public InvoiceItemCreateParams.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 InvoiceItemCreateParams.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 InvoiceItemCreateParams.Builder setPeriod(InvoiceItemCreateParams.Period period)
The period associated with this invoice item.
-
setPrice
public InvoiceItemCreateParams.Builder setPrice(java.lang.String price)
The ID of the price object.
-
setPriceData
public InvoiceItemCreateParams.Builder setPriceData(InvoiceItemCreateParams.PriceData priceData)
Data used to generate a new Price object inline.
-
setQuantity
public InvoiceItemCreateParams.Builder setQuantity(java.lang.Long quantity)
Non-negative integer. The quantity of units for the invoice item.
-
setSubscription
public InvoiceItemCreateParams.Builder setSubscription(java.lang.String subscription)
The ID of a subscription to add this invoice item to. When left blank, the invoice item will be be added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription.
-
addTaxRate
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.taxRatesfor the field documentation.
-
addAllTaxRate
public InvoiceItemCreateParams.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. SeeInvoiceItemCreateParams.taxRatesfor the field documentation.
-
setUnitAmount
public InvoiceItemCreateParams.Builder setUnitAmount(java.lang.Long unitAmount)
The integer unit amount in %s of the charge to be applied to the upcoming invoice. Thisunit_amountwill be multiplied by the quantity to get the full amount. Passing in a negativeunit_amountwill reduce theamount_dueon the invoice.
-
setUnitAmountDecimal
public InvoiceItemCreateParams.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.
-
-