Class RateCreateParams.Builder
java.lang.Object
com.stripe.param.v2.billing.ratecards.RateCreateParams.Builder
- Enclosing class:
- RateCreateParams
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddAllTier
(List<RateCreateParams.Tier> elements) Add all elements to `tiers` list.addTier
(RateCreateParams.Tier element) Add an element to `tiers` list.build()
Finalize and obtain parameter instance from this builder.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.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.setCustomPricingUnitAmount
(RateCreateParams.CustomPricingUnitAmount customPricingUnitAmount) The custom pricing unit that this rate binds to.setMeteredItem
(String meteredItem) The Metered Item that this rate binds to.The ID of the price object to take price information from.setTieringMode
(RateCreateParams.TieringMode tieringMode) Defines whether the tiered price should be graduated or volume-based.setTransformQuantity
(RateCreateParams.TransformQuantity transformQuantity) Apply a transformation to the reported usage or set quantity before computing the amount billed.setUnitAmount
(String unitAmount) The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setCustomPricingUnitAmount
public RateCreateParams.Builder setCustomPricingUnitAmount(RateCreateParams.CustomPricingUnitAmount customPricingUnitAmount) The custom pricing unit that this rate binds to. -
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. SeeRateCreateParams.extraParams
for 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. SeeRateCreateParams.extraParams
for the field documentation. -
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. SeeRateCreateParams.metadata
for 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. SeeRateCreateParams.metadata
for the field documentation. -
setMeteredItem
The Metered Item that this rate binds to. -
setPrice
The ID of the price object to take price information from. The price must have the same interval as the rate card. Updates to the Price will not be reflected in the Rate Card or its rates. -
setTieringMode
Defines whether the tiered price should be graduated or volume-based. In volume-based tiering, the maximum quantity within a period determines the per-unit price. In graduated tiering, the pricing changes as the quantity grows into new tiers. Can only be set iftiers
is set. -
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. SeeRateCreateParams.tiers
for 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. SeeRateCreateParams.tiers
for the field documentation. -
setTransformQuantity
public RateCreateParams.Builder setTransformQuantity(RateCreateParams.TransformQuantity transformQuantity) Apply a transformation to the reported usage or set quantity before computing the amount billed. -
setUnitAmount
The per-unit amount to be charged, represented as a decimal string in minor currency units with at most 12 decimal places. Cannot be set iftiers
is provided.
-