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