Package com.stripe.param
Class SubscriptionCreateParams.Item.Builder
- java.lang.Object
-
- com.stripe.param.SubscriptionCreateParams.Item.Builder
-
- Enclosing class:
- SubscriptionCreateParams.Item
public static class SubscriptionCreateParams.Item.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
Modifier and Type Method Description SubscriptionCreateParams.Item.Builder
addAllTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `taxRates` list.SubscriptionCreateParams.Item.Builder
addTaxRate(java.lang.String element)
Add an element to `taxRates` list.SubscriptionCreateParams.Item
build()
Finalize and obtain parameter instance from this builder.SubscriptionCreateParams.Item.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.SubscriptionCreateParams.Item.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.SubscriptionCreateParams.Item.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.SubscriptionCreateParams.Item.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.SubscriptionCreateParams.Item.Builder
setBillingThresholds(EmptyParam billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.SubscriptionCreateParams.Item.Builder
setBillingThresholds(SubscriptionCreateParams.Item.BillingThresholds billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.SubscriptionCreateParams.Item.Builder
setPlan(java.lang.String plan)
Plan ID for this item, as a string.SubscriptionCreateParams.Item.Builder
setPrice(java.lang.String price)
The ID of the price object.SubscriptionCreateParams.Item.Builder
setPriceData(SubscriptionCreateParams.Item.PriceData priceData)
Data used to generate a new Price object inline.SubscriptionCreateParams.Item.Builder
setQuantity(java.lang.Long quantity)
Quantity for this item.SubscriptionCreateParams.Item.Builder
setTaxRates(EmptyParam taxRates)
A list of Tax Rate ids.SubscriptionCreateParams.Item.Builder
setTaxRates(java.util.List<java.lang.String> taxRates)
A list of Tax Rate ids.
-
-
-
Method Detail
-
build
public SubscriptionCreateParams.Item build()
Finalize and obtain parameter instance from this builder.
-
setBillingThresholds
public SubscriptionCreateParams.Item.Builder setBillingThresholds(SubscriptionCreateParams.Item.BillingThresholds billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
-
setBillingThresholds
public SubscriptionCreateParams.Item.Builder setBillingThresholds(EmptyParam billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds.
-
putExtraParam
public SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.extraParams
for the field documentation.
-
putAllExtraParam
public SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.extraParams
for the field documentation.
-
putMetadata
public SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.metadata
for the field documentation.
-
putAllMetadata
public SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.metadata
for the field documentation.
-
setPlan
public SubscriptionCreateParams.Item.Builder setPlan(java.lang.String plan)
Plan ID for this item, as a string.
-
setPrice
public SubscriptionCreateParams.Item.Builder setPrice(java.lang.String price)
The ID of the price object.
-
setPriceData
public SubscriptionCreateParams.Item.Builder setPriceData(SubscriptionCreateParams.Item.PriceData priceData)
Data used to generate a new Price object inline.
-
setQuantity
public SubscriptionCreateParams.Item.Builder setQuantity(java.lang.Long quantity)
Quantity for this item.
-
addTaxRate
public SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.taxRates
for the field documentation.
-
addAllTaxRate
public SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.taxRates
for the field documentation.
-
setTaxRates
public SubscriptionCreateParams.Item.Builder setTaxRates(EmptyParam taxRates)
A list of Tax Rate ids. These Tax Rates will override thedefault_tax_rates
on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
-
setTaxRates
public SubscriptionCreateParams.Item.Builder setTaxRates(java.util.List<java.lang.String> taxRates)
A list of Tax Rate ids. These Tax Rates will override thedefault_tax_rates
on the Subscription. When updating, pass an empty string to remove previously-defined tax rates.
-
-