Package com.stripe.param
Class InvoiceUpcomingParams.SubscriptionDetails.Item.Builder
java.lang.Object
com.stripe.param.InvoiceUpcomingParams.SubscriptionDetails.Item.Builder
- Enclosing class:
- InvoiceUpcomingParams.SubscriptionDetails.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
(InvoiceUpcomingParams.SubscriptionDetails.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.The coupons to redeem into discounts for the subscription item.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.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.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setBillingThresholds
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder setBillingThresholds(InvoiceUpcomingParams.SubscriptionDetails.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 InvoiceUpcomingParams.SubscriptionDetails.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
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 InvoiceUpcomingParams.SubscriptionDetails.Item.Builder addDiscount(InvoiceUpcomingParams.SubscriptionDetails.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. SeeInvoiceUpcomingParams.SubscriptionDetails.Item.discounts
for the field documentation. -
addAllDiscount
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder addAllDiscount(List<InvoiceUpcomingParams.SubscriptionDetails.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. SeeInvoiceUpcomingParams.SubscriptionDetails.Item.discounts
for the field documentation. -
setDiscounts
The coupons to redeem into discounts for the subscription item. -
setDiscounts
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder setDiscounts(List<InvoiceUpcomingParams.SubscriptionDetails.Item.Discount> discounts) The coupons to redeem into discounts for the subscription item. -
putExtraParam
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder putExtraParam(String key, 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. SeeInvoiceUpcomingParams.SubscriptionDetails.Item.extraParams
for the field documentation. -
putAllExtraParam
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder putAllExtraParam(Map<String, 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. SeeInvoiceUpcomingParams.SubscriptionDetails.Item.extraParams
for the field documentation. -
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. SeeInvoiceUpcomingParams.SubscriptionDetails.Item.metadata
for the field documentation. -
putAllMetadata
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder putAllMetadata(Map<String, 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. SeeInvoiceUpcomingParams.SubscriptionDetails.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
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder setMetadata(Map<String, 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
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. -
setPriceData
public InvoiceUpcomingParams.SubscriptionDetails.Item.Builder setPriceData(InvoiceUpcomingParams.SubscriptionDetails.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. SeeInvoiceUpcomingParams.SubscriptionDetails.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. SeeInvoiceUpcomingParams.SubscriptionDetails.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.
-