Package com.stripe.param
Class SkuCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.SkuCreateParams.Builder
-
- Enclosing class:
- SkuCreateParams
public static class SkuCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SkuCreateParams.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.SkuCreateParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.SkuCreateParamsbuild()Finalize and obtain parameter instance from this builder.SkuCreateParams.BuilderputAllAttribute(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `attributes` map.SkuCreateParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.SkuCreateParams.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.SkuCreateParams.BuilderputAttribute(java.lang.String key, java.lang.String value)Add a key/value pair to `attributes` map.SkuCreateParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.SkuCreateParams.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.SkuCreateParams.BuildersetActive(java.lang.Boolean active)Whether the SKU is available for purchase.SkuCreateParams.BuildersetCurrency(java.lang.String currency)Three-letter ISO currency code, in lowercase.SkuCreateParams.BuildersetId(java.lang.String id)The identifier for the SKU.SkuCreateParams.BuildersetImage(java.lang.String image)The URL of an image for this SKU, meant to be displayable to the customer.SkuCreateParams.BuildersetInventory(SkuCreateParams.Inventory inventory)Description of the SKU's inventory.SkuCreateParams.BuildersetPackageDimensions(SkuCreateParams.PackageDimensions packageDimensions)The dimensions of this SKU for shipping purposes.SkuCreateParams.BuildersetPrice(java.lang.Long price)The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).SkuCreateParams.BuildersetProduct(java.lang.String product)The ID of the product this SKU is associated with.
-
-
-
Method Detail
-
build
public SkuCreateParams build()
Finalize and obtain parameter instance from this builder.
-
setActive
public SkuCreateParams.Builder setActive(java.lang.Boolean active)
Whether the SKU is available for purchase. Default totrue.
-
putAttribute
public SkuCreateParams.Builder putAttribute(java.lang.String key, java.lang.String value)
Add a key/value pair to `attributes` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSkuCreateParams.attributesfor the field documentation.
-
putAllAttribute
public SkuCreateParams.Builder putAllAttribute(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `attributes` map. A map is initialized for the first `put/putAll` call, and subsequent calls add additional key/value pairs to the original map. SeeSkuCreateParams.attributesfor the field documentation.
-
setCurrency
public SkuCreateParams.Builder setCurrency(java.lang.String currency)
Three-letter ISO currency code, in lowercase. Must be a supported currency.
-
addExpand
public SkuCreateParams.Builder addExpand(java.lang.String element)
Add an element to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSkuCreateParams.expandfor the field documentation.
-
addAllExpand
public SkuCreateParams.Builder addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeSkuCreateParams.expandfor the field documentation.
-
putExtraParam
public SkuCreateParams.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. SeeSkuCreateParams.extraParamsfor the field documentation.
-
putAllExtraParam
public SkuCreateParams.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. SeeSkuCreateParams.extraParamsfor the field documentation.
-
setId
public SkuCreateParams.Builder setId(java.lang.String id)
The identifier for the SKU. Must be unique. If not provided, an identifier will be randomly generated.
-
setImage
public SkuCreateParams.Builder setImage(java.lang.String image)
The URL of an image for this SKU, meant to be displayable to the customer.
-
setInventory
public SkuCreateParams.Builder setInventory(SkuCreateParams.Inventory inventory)
Description of the SKU's inventory.
-
putMetadata
public SkuCreateParams.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. SeeSkuCreateParams.metadatafor the field documentation.
-
putAllMetadata
public SkuCreateParams.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. SeeSkuCreateParams.metadatafor the field documentation.
-
setPackageDimensions
public SkuCreateParams.Builder setPackageDimensions(SkuCreateParams.PackageDimensions packageDimensions)
The dimensions of this SKU for shipping purposes.
-
setPrice
public SkuCreateParams.Builder setPrice(java.lang.Long price)
The cost of the item as a nonnegative integer in the smallest currency unit (that is, 100 cents to charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
-
setProduct
public SkuCreateParams.Builder setProduct(java.lang.String product)
The ID of the product this SKU is associated with. Must be a product with typegood.
-
-