Package com.stripe.param
Class InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder
java.lang.Object
com.stripe.param.InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder
- Enclosing class:
- InvoiceCreatePreviewParams.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
(InvoiceCreatePreviewParams.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 InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder setBillingThresholds(InvoiceCreatePreviewParams.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 InvoiceCreatePreviewParams.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
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder setClearUsage(Boolean clearUsage) 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 InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder addDiscount(InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.SubscriptionDetails.Item.discounts
for the field documentation. -
addAllDiscount
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder addAllDiscount(List<InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.SubscriptionDetails.Item.discounts
for the field documentation. -
setDiscounts
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder setDiscounts(EmptyParam discounts) The coupons to redeem into discounts for the subscription item. -
setDiscounts
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder setDiscounts(List<InvoiceCreatePreviewParams.SubscriptionDetails.Item.Discount> discounts) The coupons to redeem into discounts for the subscription item. -
putExtraParam
public InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.SubscriptionDetails.Item.extraParams
for the field documentation. -
putAllExtraParam
public InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.SubscriptionDetails.Item.extraParams
for the field documentation. -
setId
Subscription item to update. -
putMetadata
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder putMetadata(String key, 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. SeeInvoiceCreatePreviewParams.SubscriptionDetails.Item.metadata
for the field documentation. -
putAllMetadata
public InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.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 InvoiceCreatePreviewParams.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 InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder setPriceData(InvoiceCreatePreviewParams.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. SeeInvoiceCreatePreviewParams.SubscriptionDetails.Item.taxRates
for the field documentation. -
addAllTaxRate
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder addAllTaxRate(List<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. SeeInvoiceCreatePreviewParams.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
public InvoiceCreatePreviewParams.SubscriptionDetails.Item.Builder setTaxRates(List<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.
-