Package com.stripe.param.checkout
Class SessionCreateParams.LineItem.PriceData.Builder
- java.lang.Object
-
- com.stripe.param.checkout.SessionCreateParams.LineItem.PriceData.Builder
-
- Enclosing class:
- SessionCreateParams.LineItem.PriceData
public static class SessionCreateParams.LineItem.PriceData.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.PriceData
build()
Finalize and obtain parameter instance from this builder.SessionCreateParams.LineItem.PriceData.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.SessionCreateParams.LineItem.PriceData.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.SessionCreateParams.LineItem.PriceData.Builder
setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase.SessionCreateParams.LineItem.PriceData.Builder
setProduct(java.lang.String product)
The ID of the product that this price will belong to.SessionCreateParams.LineItem.PriceData.Builder
setProductData(SessionCreateParams.LineItem.PriceData.ProductData productData)
Data used to generate a new product object inline.SessionCreateParams.LineItem.PriceData.Builder
setRecurring(SessionCreateParams.LineItem.PriceData.Recurring recurring)
The recurring components of a price such asinterval
andusage_type
.SessionCreateParams.LineItem.PriceData.Builder
setTaxBehavior(SessionCreateParams.LineItem.PriceData.TaxBehavior taxBehavior)
Specifies whether the price is considered inclusive of taxes or exclusive of taxes.SessionCreateParams.LineItem.PriceData.Builder
setUnitAmount(java.lang.Long unitAmount)
A non-negative integer in %s representing how much to charge.SessionCreateParams.LineItem.PriceData.Builder
setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places.
-
-
-
Method Detail
-
build
public SessionCreateParams.LineItem.PriceData build()
Finalize and obtain parameter instance from this builder.
-
setCurrency
public SessionCreateParams.LineItem.PriceData.Builder setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
putExtraParam
public SessionCreateParams.LineItem.PriceData.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.PriceData.extraParams
for the field documentation.
-
putAllExtraParam
public SessionCreateParams.LineItem.PriceData.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.PriceData.extraParams
for the field documentation.
-
setProduct
public SessionCreateParams.LineItem.PriceData.Builder setProduct(java.lang.String product)
The ID of the product that this price will belong to. One ofproduct
orproduct_data
is required.
-
setProductData
public SessionCreateParams.LineItem.PriceData.Builder setProductData(SessionCreateParams.LineItem.PriceData.ProductData productData)
Data used to generate a new product object inline. One ofproduct
orproduct_data
is required.
-
setRecurring
public SessionCreateParams.LineItem.PriceData.Builder setRecurring(SessionCreateParams.LineItem.PriceData.Recurring recurring)
The recurring components of a price such asinterval
andusage_type
.
-
setTaxBehavior
public SessionCreateParams.LineItem.PriceData.Builder setTaxBehavior(SessionCreateParams.LineItem.PriceData.TaxBehavior taxBehavior)
Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One ofinclusive
,exclusive
, orunspecified
. Once specified as eitherinclusive
orexclusive
, it cannot be changed.
-
setUnitAmount
public SessionCreateParams.LineItem.PriceData.Builder setUnitAmount(java.lang.Long unitAmount)
A non-negative integer in %s representing how much to charge. One ofunit_amount
orunit_amount_decimal
is required.
-
setUnitAmountDecimal
public SessionCreateParams.LineItem.PriceData.Builder setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
Same asunit_amount
, but accepts a decimal value in %s with at most 12 decimal places. Only one ofunit_amount
andunit_amount_decimal
can be set.
-
-