Package com.stripe.param
Class PriceCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.PriceCreateParams.Builder
-
- Enclosing class:
- PriceCreateParams
public static class PriceCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PriceCreateParams.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.PriceCreateParams.BuilderaddAllTier(java.util.List<PriceCreateParams.Tier> elements)Add all elements to `tiers` list.PriceCreateParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.PriceCreateParams.BuilderaddTier(PriceCreateParams.Tier element)Add an element to `tiers` list.PriceCreateParamsbuild()Finalize and obtain parameter instance from this builder.PriceCreateParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.PriceCreateParams.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.PriceCreateParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.PriceCreateParams.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.PriceCreateParams.BuildersetActive(java.lang.Boolean active)Whether the price can be used for new purchases.PriceCreateParams.BuildersetBillingScheme(PriceCreateParams.BillingScheme billingScheme)Describes how to compute the price per period.PriceCreateParams.BuildersetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.PriceCreateParams.BuildersetLookupKey(java.lang.String lookupKey)A lookup key used to retrieve prices dynamically from a static string.PriceCreateParams.BuildersetNickname(java.lang.String nickname)A brief description of the price, hidden from customers.PriceCreateParams.BuildersetProduct(java.lang.String product)The ID of the product that this price will belong to.PriceCreateParams.BuildersetProductData(PriceCreateParams.ProductData productData)These fields can be used to create a new product that this price will belong to.PriceCreateParams.BuildersetRecurring(PriceCreateParams.Recurring recurring)The recurring components of a price such asintervalandusage_type.PriceCreateParams.BuildersetTaxBehavior(PriceCreateParams.TaxBehavior taxBehavior)Specifies whether the price is considered inclusive of taxes or exclusive of taxes.PriceCreateParams.BuildersetTiersMode(PriceCreateParams.TiersMode tiersMode)Defines if the tiering price should begraduatedorvolumebased.PriceCreateParams.BuildersetTransferLookupKey(java.lang.Boolean transferLookupKey)If set to true, will atomically remove the lookup key from the existing price, and assign it to this price.PriceCreateParams.BuildersetTransformQuantity(PriceCreateParams.TransformQuantity transformQuantity)Apply a transformation to the reported usage or set quantity before computing the billed price.PriceCreateParams.BuildersetUnitAmount(java.lang.Long unitAmount)A positive integer in %s (or 0 for a free price) representing how much to charge.PriceCreateParams.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 PriceCreateParams build()
Finalize and obtain parameter instance from this builder.
-
setActive
public PriceCreateParams.Builder setActive(java.lang.Boolean active)
Whether the price can be used for new purchases. Defaults totrue.
-
setBillingScheme
public PriceCreateParams.Builder setBillingScheme(PriceCreateParams.BillingScheme billingScheme)
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
public PriceCreateParams.Builder setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
addExpand
public PriceCreateParams.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. SeePriceCreateParams.expandfor the field documentation.
-
addAllExpand
public PriceCreateParams.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. SeePriceCreateParams.expandfor the field documentation.
-
putExtraParam
public PriceCreateParams.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. SeePriceCreateParams.extraParamsfor the field documentation.
-
putAllExtraParam
public PriceCreateParams.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. SeePriceCreateParams.extraParamsfor the field documentation.
-
setLookupKey
public PriceCreateParams.Builder setLookupKey(java.lang.String lookupKey)
A lookup key used to retrieve prices dynamically from a static string.
-
putMetadata
public PriceCreateParams.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. SeePriceCreateParams.metadatafor the field documentation.
-
putAllMetadata
public PriceCreateParams.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. SeePriceCreateParams.metadatafor the field documentation.
-
setNickname
public PriceCreateParams.Builder setNickname(java.lang.String nickname)
A brief description of the price, hidden from customers.
-
setProduct
public PriceCreateParams.Builder setProduct(java.lang.String product)
The ID of the product that this price will belong to.
-
setProductData
public PriceCreateParams.Builder setProductData(PriceCreateParams.ProductData productData)
These fields can be used to create a new product that this price will belong to.
-
setRecurring
public PriceCreateParams.Builder setRecurring(PriceCreateParams.Recurring recurring)
The recurring components of a price such asintervalandusage_type.
-
setTaxBehavior
public PriceCreateParams.Builder setTaxBehavior(PriceCreateParams.TaxBehavior taxBehavior)
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
public PriceCreateParams.Builder addTier(PriceCreateParams.Tier element)
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
public PriceCreateParams.Builder addAllTier(java.util.List<PriceCreateParams.Tier> elements)
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
public PriceCreateParams.Builder setTiersMode(PriceCreateParams.TiersMode tiersMode)
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
public PriceCreateParams.Builder setTransferLookupKey(java.lang.Boolean transferLookupKey)
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
public PriceCreateParams.Builder setUnitAmount(java.lang.Long unitAmount)
A positive integer in %s (or 0 for a free price) representing how much to charge.
-
setUnitAmountDecimal
public PriceCreateParams.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.
-
-