Package com.stripe.param
Class SubscriptionCreateParams.Item.Builder
java.lang.Object
com.stripe.param.SubscriptionCreateParams.Item.Builder
- Enclosing class:
- SubscriptionCreateParams.Item
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd all elements to `discounts` list.addAllTaxRate(List<String> elements) Add all elements to `taxRates` list.Add an element to `discounts` list.addTaxRate(String element) Add an element to `taxRates` 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.setBillingThresholds(EmptyParam billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setBillingThresholds(SubscriptionCreateParams.Item.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setDiscounts(EmptyParam discounts) The coupons to redeem into discounts for the subscription item.setDiscounts(List<SubscriptionCreateParams.Item.Discount> discounts) The coupons to redeem into discounts for the subscription item.Plan ID for this item, as a string.The ID of the price object.Data used to generate a new Price object inline.setQuantity(Long quantity) Quantity for this item.setTaxRates(EmptyParam taxRates) A list of Tax Rate ids.setTaxRates(List<String> taxRates) A list of Tax Rate ids.Define options to configure the trial on the subscription item.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
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. Pass an empty string to remove previously-defined thresholds. -
setBillingThresholds
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. -
addDiscount
public SubscriptionCreateParams.Item.Builder addDiscount(SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.discountsfor the field documentation. -
addAllDiscount
public SubscriptionCreateParams.Item.Builder addAllDiscount(List<SubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.discountsfor the field documentation. -
setDiscounts
The coupons to redeem into discounts for the subscription item. -
setDiscounts
public SubscriptionCreateParams.Item.Builder setDiscounts(List<SubscriptionCreateParams.Item.Discount> discounts) The coupons to redeem into discounts for the subscription item. -
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. SeeSubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.extraParamsfor 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. SeeSubscriptionCreateParams.Item.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. SeeSubscriptionCreateParams.Item.metadatafor the field documentation. -
setPlan
Plan ID for this item, as a string. -
setPrice
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
Quantity for this item. -
addTaxRate
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.taxRatesfor the field documentation. -
addAllTaxRate
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.taxRatesfor the field documentation. -
setTaxRates
A list of Tax Rate ids. These Tax Rates will override thedefault_tax_rateson the Subscription. When updating, pass an empty string to remove previously-defined tax rates. -
setTaxRates
A list of Tax Rate ids. These Tax Rates will override thedefault_tax_rateson the Subscription. When updating, pass an empty string to remove previously-defined tax rates. -
setTrial
Define options to configure the trial on the subscription item.
-