Package com.stripe.param
Class ProductCreateParams.Builder
- java.lang.Object
-
- com.stripe.param.ProductCreateParams.Builder
-
- Enclosing class:
- ProductCreateParams
public static class ProductCreateParams.Builder extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProductCreateParams.Builder
addAllAttribute(java.util.List<java.lang.String> elements)
Add all elements to `attributes` list.ProductCreateParams.Builder
addAllDeactivateOn(java.util.List<java.lang.String> elements)
Add all elements to `deactivateOn` list.ProductCreateParams.Builder
addAllExpand(java.util.List<java.lang.String> elements)
Add all elements to `expand` list.ProductCreateParams.Builder
addAllImage(java.util.List<java.lang.String> elements)
Add all elements to `images` list.ProductCreateParams.Builder
addAttribute(java.lang.String element)
Add an element to `attributes` list.ProductCreateParams.Builder
addDeactivateOn(java.lang.String element)
Add an element to `deactivateOn` list.ProductCreateParams.Builder
addExpand(java.lang.String element)
Add an element to `expand` list.ProductCreateParams.Builder
addImage(java.lang.String element)
Add an element to `images` list.ProductCreateParams
build()
Finalize and obtain parameter instance from this builder.ProductCreateParams.Builder
putAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)
Add all map key/value pairs to `extraParams` map.ProductCreateParams.Builder
putAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)
Add all map key/value pairs to `metadata` map.ProductCreateParams.Builder
putExtraParam(java.lang.String key, java.lang.Object value)
Add a key/value pair to `extraParams` map.ProductCreateParams.Builder
putMetadata(java.lang.String key, java.lang.String value)
Add a key/value pair to `metadata` map.ProductCreateParams.Builder
setActive(java.lang.Boolean active)
Whether the product is currently available for purchase.ProductCreateParams.Builder
setCaption(java.lang.String caption)
A short one-line description of the product, meant to be displayable to the customer.ProductCreateParams.Builder
setDescription(java.lang.String description)
The product's description, meant to be displayable to the customer.ProductCreateParams.Builder
setId(java.lang.String id)
An identifier will be randomly generated by Stripe.ProductCreateParams.Builder
setName(java.lang.String name)
The product's name, meant to be displayable to the customer.ProductCreateParams.Builder
setPackageDimensions(ProductCreateParams.PackageDimensions packageDimensions)
The dimensions of this product for shipping purposes.ProductCreateParams.Builder
setShippable(java.lang.Boolean shippable)
Whether this product is shipped (i.e., physical goods).ProductCreateParams.Builder
setStatementDescriptor(java.lang.String statementDescriptor)
An arbitrary string to be displayed on your customer's credit card or bank statement.ProductCreateParams.Builder
setTaxCode(java.lang.String taxCode)
A tax code ID.ProductCreateParams.Builder
setType(ProductCreateParams.Type type)
The type of the product.ProductCreateParams.Builder
setUnitLabel(java.lang.String unitLabel)
A label that represents units of this product in Stripe and on customers’ receipts and invoices.ProductCreateParams.Builder
setUrl(java.lang.String url)
A URL of a publicly-accessible webpage for this product.
-
-
-
Method Detail
-
build
public ProductCreateParams build()
Finalize and obtain parameter instance from this builder.
-
setActive
public ProductCreateParams.Builder setActive(java.lang.Boolean active)
Whether the product is currently available for purchase. Defaults totrue
.
-
addAttribute
public ProductCreateParams.Builder addAttribute(java.lang.String element)
Add an element to `attributes` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeProductCreateParams.attributes
for the field documentation.
-
addAllAttribute
public ProductCreateParams.Builder addAllAttribute(java.util.List<java.lang.String> elements)
Add all elements to `attributes` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeProductCreateParams.attributes
for the field documentation.
-
setCaption
public ProductCreateParams.Builder setCaption(java.lang.String caption)
A short one-line description of the product, meant to be displayable to the customer. May only be set if type=good
.
-
addDeactivateOn
public ProductCreateParams.Builder addDeactivateOn(java.lang.String element)
Add an element to `deactivateOn` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeProductCreateParams.deactivateOn
for the field documentation.
-
addAllDeactivateOn
public ProductCreateParams.Builder addAllDeactivateOn(java.util.List<java.lang.String> elements)
Add all elements to `deactivateOn` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeProductCreateParams.deactivateOn
for the field documentation.
-
setDescription
public ProductCreateParams.Builder setDescription(java.lang.String description)
The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes.
-
addExpand
public ProductCreateParams.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. SeeProductCreateParams.expand
for the field documentation.
-
addAllExpand
public ProductCreateParams.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. SeeProductCreateParams.expand
for the field documentation.
-
putExtraParam
public ProductCreateParams.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. SeeProductCreateParams.extraParams
for the field documentation.
-
putAllExtraParam
public ProductCreateParams.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. SeeProductCreateParams.extraParams
for the field documentation.
-
setId
public ProductCreateParams.Builder setId(java.lang.String id)
An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account.
-
addImage
public ProductCreateParams.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. SeeProductCreateParams.images
for the field documentation.
-
addAllImage
public ProductCreateParams.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. SeeProductCreateParams.images
for the field documentation.
-
putMetadata
public ProductCreateParams.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. SeeProductCreateParams.metadata
for the field documentation.
-
putAllMetadata
public ProductCreateParams.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. SeeProductCreateParams.metadata
for the field documentation.
-
setName
public ProductCreateParams.Builder setName(java.lang.String name)
The product's name, meant to be displayable to the customer. Whenever this product is sold via a subscription, name will show up on associated invoice line item descriptions.
-
setPackageDimensions
public ProductCreateParams.Builder setPackageDimensions(ProductCreateParams.PackageDimensions packageDimensions)
The dimensions of this product for shipping purposes.
-
setShippable
public ProductCreateParams.Builder setShippable(java.lang.Boolean shippable)
Whether this product is shipped (i.e., physical goods).
-
setStatementDescriptor
public ProductCreateParams.Builder setStatementDescriptor(java.lang.String statementDescriptor)
An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all.This may be up to 22 characters. The statement description may not include
<
,>
,\
,"
,'
characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. It must contain at least one letter.
-
setTaxCode
public ProductCreateParams.Builder setTaxCode(java.lang.String taxCode)
A tax code ID.
-
setType
public ProductCreateParams.Builder setType(ProductCreateParams.Type type)
The type of the product. Defaults toservice
if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter togood
to use this product with Orders and SKUs. On API versions before2018-02-05
, this field defaults togood
for compatibility reasons.
-
setUnitLabel
public ProductCreateParams.Builder setUnitLabel(java.lang.String unitLabel)
A label that represents units of this product in Stripe and on customers’ receipts and invoices. When set, this will be included in associated invoice line item descriptions.
-
setUrl
public ProductCreateParams.Builder setUrl(java.lang.String url)
A URL of a publicly-accessible webpage for this product.
-
-