Package com.stripe.param.checkout
Class SessionCreateParams.LineItem.Builder
- java.lang.Object
-
- com.stripe.param.checkout.SessionCreateParams.LineItem.Builder
-
- Enclosing class:
- SessionCreateParams.LineItem
public static class SessionCreateParams.LineItem.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SessionCreateParams.LineItem.Builder
addAllDynamicTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `dynamicTaxRates` list.SessionCreateParams.LineItem.Builder
addAllImage(java.util.List<java.lang.String> elements)
Add all elements to `images` list.SessionCreateParams.LineItem.Builder
addAllTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `taxRates` list.SessionCreateParams.LineItem.Builder
addDynamicTaxRate(java.lang.String element)
Add an element to `dynamicTaxRates` list.SessionCreateParams.LineItem.Builder
addImage(java.lang.String element)
Add an element to `images` list.SessionCreateParams.LineItem.Builder
addTaxRate(java.lang.String element)
Add an element to `taxRates` list.SessionCreateParams.LineItem
build()
Finalize and obtain parameter instance from this builder.SessionCreateParams.LineItem.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.SessionCreateParams.LineItem.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.SessionCreateParams.LineItem.Builder
setAdjustableQuantity(SessionCreateParams.LineItem.AdjustableQuantity adjustableQuantity)
When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.SessionCreateParams.LineItem.Builder
setAmount(java.lang.Long amount)
[Deprecated] The amount to be collected per unit of the line item.SessionCreateParams.LineItem.Builder
setCurrency(java.lang.String currency)
[Deprecated] Three-letter ISO currency code, in lowercase.SessionCreateParams.LineItem.Builder
setDescription(java.lang.String description)
The description for the line item, to be displayed on the Checkout page.SessionCreateParams.LineItem.Builder
setName(java.lang.String name)
[Deprecated] The name for the item to be displayed on the Checkout page.SessionCreateParams.LineItem.Builder
setPrice(java.lang.String price)
SessionCreateParams.LineItem.Builder
setPriceData(SessionCreateParams.LineItem.PriceData priceData)
Data used to generate a new Price object inline.SessionCreateParams.LineItem.Builder
setQuantity(java.lang.Long quantity)
The quantity of the line item being purchased.
-
-
-
Method Detail
-
build
public SessionCreateParams.LineItem build()
Finalize and obtain parameter instance from this builder.
-
setAdjustableQuantity
public SessionCreateParams.LineItem.Builder setAdjustableQuantity(SessionCreateParams.LineItem.AdjustableQuantity adjustableQuantity)
When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout.
-
setAmount
public SessionCreateParams.LineItem.Builder setAmount(java.lang.Long amount)
[Deprecated] The amount to be collected per unit of the line item. If specified, must also passcurrency
andname
.
-
setCurrency
public SessionCreateParams.LineItem.Builder setCurrency(java.lang.String currency)
[Deprecated] Three-letter ISO currency code, in lowercase. Must be a supported currency. Required ifamount
is passed.
-
setDescription
public SessionCreateParams.LineItem.Builder setDescription(java.lang.String description)
The description for the line item, to be displayed on the Checkout page.If using
price
orprice_data
, will default to the name of the associated product.
-
addDynamicTaxRate
public SessionCreateParams.LineItem.Builder addDynamicTaxRate(java.lang.String element)
Add an element to `dynamicTaxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSessionCreateParams.LineItem.dynamicTaxRates
for the field documentation.
-
addAllDynamicTaxRate
public SessionCreateParams.LineItem.Builder addAllDynamicTaxRate(java.util.List<java.lang.String> elements)
Add all elements to `dynamicTaxRates` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSessionCreateParams.LineItem.dynamicTaxRates
for the field documentation.
-
putExtraParam
public SessionCreateParams.LineItem.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. SeeSessionCreateParams.LineItem.extraParams
for the field documentation.
-
putAllExtraParam
public SessionCreateParams.LineItem.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. SeeSessionCreateParams.LineItem.extraParams
for the field documentation.
-
addImage
public SessionCreateParams.LineItem.Builder addImage(java.lang.String element)
Add an element to `images` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSessionCreateParams.LineItem.images
for the field documentation.
-
addAllImage
public SessionCreateParams.LineItem.Builder addAllImage(java.util.List<java.lang.String> elements)
Add all elements to `images` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSessionCreateParams.LineItem.images
for the field documentation.
-
setName
public SessionCreateParams.LineItem.Builder setName(java.lang.String name)
[Deprecated] The name for the item to be displayed on the Checkout page. Required ifamount
is passed.
-
setPrice
public SessionCreateParams.LineItem.Builder setPrice(java.lang.String price)
-
setPriceData
public SessionCreateParams.LineItem.Builder setPriceData(SessionCreateParams.LineItem.PriceData priceData)
-
setQuantity
public SessionCreateParams.LineItem.Builder setQuantity(java.lang.Long quantity)
The quantity of the line item being purchased. Quantity should not be defined whenrecurring.usage_type=metered
.
-
addTaxRate
public SessionCreateParams.LineItem.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. SeeSessionCreateParams.LineItem.taxRates
for the field documentation.
-
addAllTaxRate
public SessionCreateParams.LineItem.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. SeeSessionCreateParams.LineItem.taxRates
for the field documentation.
-
-