Package com.stripe.param
Class SubscriptionUpdateParams.Item.Builder
- java.lang.Object
-
- com.stripe.param.SubscriptionUpdateParams.Item.Builder
-
- Enclosing class:
- SubscriptionUpdateParams.Item
public static class SubscriptionUpdateParams.Item.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SubscriptionUpdateParams.Item.Builder
addAllTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `taxRates` list.SubscriptionUpdateParams.Item.Builder
addTaxRate(java.lang.String element)
Add an element to `taxRates` list.SubscriptionUpdateParams.Item
build()
Finalize and obtain parameter instance from this builder.SubscriptionUpdateParams.Item.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.SubscriptionUpdateParams.Item.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.SubscriptionUpdateParams.Item.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.SubscriptionUpdateParams.Item.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.SubscriptionUpdateParams.Item.Builder
setBillingThresholds(EmptyParam billingThresholds)
Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period.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.SubscriptionUpdateParams.Item.Builder
setClearUsage(java.lang.Boolean clearUsage)
Delete all usage for a given subscription item.SubscriptionUpdateParams.Item.Builder
setDeleted(java.lang.Boolean deleted)
A flag that, if set totrue
, will delete the specified item.SubscriptionUpdateParams.Item.Builder
setId(EmptyParam id)
Subscription item to update.SubscriptionUpdateParams.Item.Builder
setId(java.lang.String id)
Subscription item to update.SubscriptionUpdateParams.Item.Builder
setMetadata(EmptyParam metadata)
Set of key-value pairs that you can attach to an object.SubscriptionUpdateParams.Item.Builder
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach to an object.SubscriptionUpdateParams.Item.Builder
setPlan(EmptyParam plan)
Plan ID for this item, as a string.SubscriptionUpdateParams.Item.Builder
setPlan(java.lang.String plan)
Plan ID for this item, as a string.SubscriptionUpdateParams.Item.Builder
setPrice(EmptyParam price)
The ID of the price object.SubscriptionUpdateParams.Item.Builder
setPrice(java.lang.String price)
The ID of the price object.SubscriptionUpdateParams.Item.Builder
setPriceData(SubscriptionUpdateParams.Item.PriceData priceData)
Data used to generate a new Price object inline.SubscriptionUpdateParams.Item.Builder
setQuantity(java.lang.Long quantity)
Quantity for this item.SubscriptionUpdateParams.Item.Builder
setTaxRates(EmptyParam taxRates)
A list of Tax Rate ids.SubscriptionUpdateParams.Item.Builder
setTaxRates(java.util.List<java.lang.String> taxRates)
A list of Tax Rate ids.
-
-
-
Method Detail
-
build
public SubscriptionUpdateParams.Item 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
public SubscriptionUpdateParams.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.
-
setClearUsage
public SubscriptionUpdateParams.Item.Builder setClearUsage(java.lang.Boolean clearUsage)
Delete all usage for a given subscription item. Allowed only whendeleted
is set totrue
and the current plan'susage_type
ismetered
.
-
setDeleted
public SubscriptionUpdateParams.Item.Builder setDeleted(java.lang.Boolean deleted)
A flag that, if set totrue
, will delete the specified item.
-
putExtraParam
public SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.extraParams
for the field documentation.
-
putAllExtraParam
public SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.extraParams
for the field documentation.
-
setId
public SubscriptionUpdateParams.Item.Builder setId(java.lang.String id)
Subscription item to update.
-
setId
public SubscriptionUpdateParams.Item.Builder setId(EmptyParam id)
Subscription item to update.
-
putMetadata
public SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.metadata
for the field documentation.
-
putAllMetadata
public SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.metadata
for the field documentation.
-
setMetadata
public SubscriptionUpdateParams.Item.Builder setMetadata(EmptyParam metadata)
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
public SubscriptionUpdateParams.Item.Builder setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
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
public SubscriptionUpdateParams.Item.Builder setPlan(java.lang.String plan)
Plan ID for this item, as a string.
-
setPlan
public SubscriptionUpdateParams.Item.Builder setPlan(EmptyParam plan)
Plan ID for this item, as a string.
-
setPrice
public SubscriptionUpdateParams.Item.Builder setPrice(java.lang.String price)
The ID of the price object. When changing a subscription item's price,quantity
is set to 1 unless aquantity
parameter is provided.
-
setPrice
public SubscriptionUpdateParams.Item.Builder setPrice(EmptyParam price)
The ID of the price object. 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)
Data used to generate a new Price object inline.
-
setQuantity
public SubscriptionUpdateParams.Item.Builder setQuantity(java.lang.Long quantity)
Quantity for this item.
-
addTaxRate
public SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.taxRates
for the field documentation.
-
addAllTaxRate
public SubscriptionUpdateParams.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. SeeSubscriptionUpdateParams.Item.taxRates
for the field documentation.
-
setTaxRates
public SubscriptionUpdateParams.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 SubscriptionUpdateParams.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.
-
-