Package com.stripe.param
Class InvoiceUpcomingLinesParams.SubscriptionItem.Builder
java.lang.Object
com.stripe.param.InvoiceUpcomingLinesParams.SubscriptionItem.Builder
- Enclosing class:
- InvoiceUpcomingLinesParams.SubscriptionItem
-
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
(InvoiceUpcomingLinesParams.SubscriptionItem.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 InvoiceUpcomingLinesParams.SubscriptionItem.Builder setBillingThresholds(InvoiceUpcomingLinesParams.SubscriptionItem.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 InvoiceUpcomingLinesParams.SubscriptionItem.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 InvoiceUpcomingLinesParams.SubscriptionItem.Builder addDiscount(InvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.discounts
for the field documentation. -
addAllDiscount
public InvoiceUpcomingLinesParams.SubscriptionItem.Builder addAllDiscount(List<InvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.discounts
for the field documentation. -
setDiscounts
The coupons to redeem into discounts for the subscription item. -
setDiscounts
public InvoiceUpcomingLinesParams.SubscriptionItem.Builder setDiscounts(List<InvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.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. -
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 InvoiceUpcomingLinesParams.SubscriptionItem.Builder setPriceData(InvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.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. SeeInvoiceUpcomingLinesParams.SubscriptionItem.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.
-