Package com.stripe.param
Class SubscriptionUpdateParams.Item.Builder
java.lang.Object
com.stripe.param.SubscriptionUpdateParams.Item.Builder
- Enclosing class:
- SubscriptionUpdateParams.Item
-
Constructor Summary
-
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
(SubscriptionUpdateParams.Item.BillingThresholds billingThresholds) Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.setClearUsage
(Boolean clearUsage) Delete all usage for a given subscription item.setDeleted
(Boolean deleted) A flag that, if set totrue
, will delete the specified item.setDiscounts
(EmptyParam discounts) The coupons to redeem into discounts for the subscription item.setDiscounts
(List<SubscriptionUpdateParams.Item.Discount> discounts) The coupons to redeem into discounts for the subscription item.setId
(EmptyParam id) Subscription item to update.Subscription item to update.setMetadata
(EmptyParam metadata) Set of key-value pairs that you can attach to an object.setMetadata
(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.setPlan
(EmptyParam plan) Plan ID for this item, as a string.Plan ID for this item, as a string.setPrice
(EmptyParam price) The ID of the price object.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.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setBillingThresholds
public SubscriptionUpdateParams.Item.Builder setBillingThresholds(SubscriptionUpdateParams.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
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. -
setClearUsage
Delete all usage for a given subscription item. Allowed only whendeleted
is set totrue
and the current plan'susage_type
ismetered
. -
setDeleted
A flag that, if set totrue
, will delete the specified item. -
addDiscount
public SubscriptionUpdateParams.Item.Builder addDiscount(SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.discounts
for the field documentation. -
addAllDiscount
public SubscriptionUpdateParams.Item.Builder addAllDiscount(List<SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.discounts
for the field documentation. -
setDiscounts
The coupons to redeem into discounts for the subscription item. -
setDiscounts
public SubscriptionUpdateParams.Item.Builder setDiscounts(List<SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.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. SeeSubscriptionUpdateParams.Item.extraParams
for the field documentation. -
setId
Subscription item to update. -
setId
Subscription item to update. -
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. SeeSubscriptionUpdateParams.Item.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. SeeSubscriptionUpdateParams.Item.metadata
for the field documentation. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
. -
setMetadata
Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value tometadata
. -
setPlan
Plan ID for this item, as a string. -
setPlan
Plan ID for this item, as a string. -
setPrice
The ID of the price object. One ofprice
orprice_data
is required. When changing a subscription item's price,quantity
is set to 1 unless aquantity
parameter is provided. -
setPrice
The ID of the price object. One ofprice
orprice_data
is required. When changing a subscription item's price,quantity
is set to 1 unless aquantity
parameter is provided. -
setPriceData
public SubscriptionUpdateParams.Item.Builder setPriceData(SubscriptionUpdateParams.Item.PriceData priceData) -
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. SeeSubscriptionUpdateParams.Item.taxRates
for 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. SeeSubscriptionUpdateParams.Item.taxRates
for the field documentation. -
setTaxRates
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
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.
-