Package com.stripe.param
Class ProductCreateParams.Builder
java.lang.Object
com.stripe.param.ProductCreateParams.Builder
- Enclosing class:
- ProductCreateParams
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddAllExpand
(List<String> elements) Add all elements to `expand` list.addAllImage
(List<String> elements) Add all elements to `images` list.Add all elements to `marketingFeatures` list.Add an element to `expand` list.Add an element to `images` list.Add an element to `marketingFeatures` list.build()
Finalize and obtain parameter instance from this builder.putAllExtraParam
(Map<String, Object> map) Add all map key/value pairs to `extraParams` map.putAllMetadata
(Map<String, String> map) Add all map key/value pairs to `metadata` map.putExtraParam
(String key, Object value) Add a key/value pair to `extraParams` map.putMetadata
(String key, String value) Add a key/value pair to `metadata` map.Whether the product is currently available for purchase.setDefaultPriceData
(ProductCreateParams.DefaultPriceData defaultPriceData) Data used to generate a new Price object.setDescription
(String description) The product's description, meant to be displayable to the customer.An identifier will be randomly generated by Stripe.Required. The product's name, meant to be displayable to the customer.setPackageDimensions
(ProductCreateParams.PackageDimensions packageDimensions) The dimensions of this product for shipping purposes.setShippable
(Boolean shippable) Whether this product is shipped (i.e., physical goods).setStatementDescriptor
(String statementDescriptor) An arbitrary string to be displayed on your customer's credit card or bank statement.setTaxCode
(String taxCode) A tax code ID.The type of the product.setUnitLabel
(String unitLabel) A label that represents units of this product.A URL of a publicly-accessible webpage for this product.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
build
Finalize and obtain parameter instance from this builder. -
setActive
Whether the product is currently available for purchase. Defaults totrue
. -
setDefaultPriceData
public ProductCreateParams.Builder setDefaultPriceData(ProductCreateParams.DefaultPriceData defaultPriceData) Data used to generate a new Price object. This Price will be set as the default price for this product. -
setDescription
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
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
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
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
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
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
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
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. -
addMarketingFeature
public ProductCreateParams.Builder addMarketingFeature(ProductCreateParams.MarketingFeature element) Add an element to `marketingFeatures` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeProductCreateParams.marketingFeatures
for the field documentation. -
addAllMarketingFeature
public ProductCreateParams.Builder addAllMarketingFeature(List<ProductCreateParams.MarketingFeature> elements) Add all elements to `marketingFeatures` list. A list is initialized for the first `add/addAll` call, and subsequent calls adds additional elements to the original list. SeeProductCreateParams.marketingFeatures
for the field documentation. -
putMetadata
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
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
Required. The product's name, meant to be displayable to the customer. -
setPackageDimensions
public ProductCreateParams.Builder setPackageDimensions(ProductCreateParams.PackageDimensions packageDimensions) The dimensions of this product for shipping purposes. -
setShippable
Whether this product is shipped (i.e., physical goods). -
setStatementDescriptor
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. Only used for subscription payments. -
setTaxCode
A tax code ID. -
setType
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
A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. -
setUrl
A URL of a publicly-accessible webpage for this product.
-