Package com.stripe.param
Class PriceCreateParams.Builder
java.lang.Object
com.stripe.param.PriceCreateParams.Builder
- Enclosing class:
- PriceCreateParams
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllExpand(List<String> elements) Add all elements to `expand` list.addAllTier(List<PriceCreateParams.Tier> elements) Add all elements to `tiers` list.Add an element to `expand` list.addTier(PriceCreateParams.Tier element) Add an element to `tiers` list.build()Finalize and obtain parameter instance from this builder.Add all map key/value pairs to `currencyOptions` map.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.putCurrencyOption(String key, PriceCreateParams.CurrencyOption value) Add a key/value pair to `currencyOptions` 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.Whether the price can be used for new purchases.setBillingScheme(PriceCreateParams.BillingScheme billingScheme) Describes how to compute the price per period.setCurrency(String currency) Required. Three-letter ISO currency code, in lowercase.setCustomUnitAmount(PriceCreateParams.CustomUnitAmount customUnitAmount) When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links.setLookupKey(String lookupKey) A lookup key used to retrieve prices dynamically from a static string.setNickname(String nickname) A brief description of the price, hidden from customers.setProduct(String product) setProductData(PriceCreateParams.ProductData productData) These fields can be used to create a new product that this price will belong to.setRecurring(PriceCreateParams.Recurring recurring) The recurring components of a price such asintervalandusage_type.setTaxBehavior(PriceCreateParams.TaxBehavior taxBehavior) Only required if a default tax behavior was not provided in the Stripe Tax settings.setTiersMode(PriceCreateParams.TiersMode tiersMode) Defines if the tiering price should begraduatedorvolumebased.setTransferLookupKey(Boolean transferLookupKey) If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.setTransformQuantity(PriceCreateParams.TransformQuantity transformQuantity) Apply a transformation to the reported usage or set quantity before computing the billed price.setUnitAmount(Long unitAmount) A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge.setUnitAmountDecimal(BigDecimal unitAmountDecimal) Same asunit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setActive
Whether the price can be used for new purchases. Defaults totrue. -
setBillingScheme
Describes how to compute the price per period. Eitherper_unitortiered.per_unitindicates that the fixed amount (specified inunit_amountorunit_amount_decimal) will be charged per unit inquantity(for prices withusage_type=licensed), or per unit of total usage (for prices withusage_type=metered).tieredindicates that the unit pricing will be computed using a tiering strategy as defined using thetiersandtiers_modeattributes. -
setCurrency
Required. Three-letter ISO currency code, in lowercase. Must be a supported currency. -
putCurrencyOption
public PriceCreateParams.Builder putCurrencyOption(String key, PriceCreateParams.CurrencyOption value) Add a key/value pair to `currencyOptions` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeePriceCreateParams.currencyOptionsfor the field documentation. -
putAllCurrencyOption
public PriceCreateParams.Builder putAllCurrencyOption(Map<String, PriceCreateParams.CurrencyOption> map) Add all map key/value pairs to `currencyOptions` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeePriceCreateParams.currencyOptionsfor the field documentation. -
setCustomUnitAmount
public PriceCreateParams.Builder setCustomUnitAmount(PriceCreateParams.CustomUnitAmount customUnitAmount) When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. -
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. SeePriceCreateParams.expandfor 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. SeePriceCreateParams.expandfor 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. SeePriceCreateParams.extraParamsfor 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. SeePriceCreateParams.extraParamsfor the field documentation. -
setLookupKey
A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. -
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. SeePriceCreateParams.metadatafor 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. SeePriceCreateParams.metadatafor the field documentation. -
setNickname
A brief description of the price, hidden from customers. -
setProduct
-
setProductData
These fields can be used to create a new product that this price will belong to. -
setRecurring
The recurring components of a price such asintervalandusage_type. -
setTaxBehavior
Only required if a default tax behavior was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One ofinclusive,exclusive, orunspecified. Once specified as eitherinclusiveorexclusive, it cannot be changed. -
addTier
Add an element to `tiers` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePriceCreateParams.tiersfor the field documentation. -
addAllTier
Add all elements to `tiers` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeePriceCreateParams.tiersfor the field documentation. -
setTiersMode
Defines if the tiering price should begraduatedorvolumebased. Involume-based tiering, the maximum quantity within a period determines the per unit price, ingraduatedtiering pricing can successively change as the quantity grows. -
setTransferLookupKey
If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. -
setTransformQuantity
public PriceCreateParams.Builder setTransformQuantity(PriceCreateParams.TransformQuantity transformQuantity) Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined withtiers. -
setUnitAmount
A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One ofunit_amount,unit_amount_decimal, orcustom_unit_amountis required, unlessbilling_scheme=tiered. -
setUnitAmountDecimal
Same asunit_amount, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one ofunit_amountandunit_amount_decimalcan be set.
-