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.BuilderaddAllAttribute(java.util.List<java.lang.String> elements)Add all elements to `attributes` list.ProductCreateParams.BuilderaddAllDeactivateOn(java.util.List<java.lang.String> elements)Add all elements to `deactivateOn` list.ProductCreateParams.BuilderaddAllExpand(java.util.List<java.lang.String> elements)Add all elements to `expand` list.ProductCreateParams.BuilderaddAllImage(java.util.List<java.lang.String> elements)Add all elements to `images` list.ProductCreateParams.BuilderaddAttribute(java.lang.String element)Add an element to `attributes` list.ProductCreateParams.BuilderaddDeactivateOn(java.lang.String element)Add an element to `deactivateOn` list.ProductCreateParams.BuilderaddExpand(java.lang.String element)Add an element to `expand` list.ProductCreateParams.BuilderaddImage(java.lang.String element)Add an element to `images` list.ProductCreateParamsbuild()Finalize and obtain parameter instance from this builder.ProductCreateParams.BuilderputAllExtraParam(java.util.Map<java.lang.String,java.lang.Object> map)Add all map key/value pairs to `extraParams` map.ProductCreateParams.BuilderputAllMetadata(java.util.Map<java.lang.String,java.lang.String> map)Add all map key/value pairs to `metadata` map.ProductCreateParams.BuilderputExtraParam(java.lang.String key, java.lang.Object value)Add a key/value pair to `extraParams` map.ProductCreateParams.BuilderputMetadata(java.lang.String key, java.lang.String value)Add a key/value pair to `metadata` map.ProductCreateParams.BuildersetActive(java.lang.Boolean active)Whether the product is currently available for purchase.ProductCreateParams.BuildersetCaption(java.lang.String caption)A short one-line description of the product, meant to be displayable to the customer.ProductCreateParams.BuildersetDescription(java.lang.String description)The product's description, meant to be displayable to the customer.ProductCreateParams.BuildersetId(java.lang.String id)An identifier will be randomly generated by Stripe.ProductCreateParams.BuildersetName(java.lang.String name)The product's name, meant to be displayable to the customer.ProductCreateParams.BuildersetPackageDimensions(ProductCreateParams.PackageDimensions packageDimensions)The dimensions of this product for shipping purposes.ProductCreateParams.BuildersetShippable(java.lang.Boolean shippable)Whether this product is shipped (i.e., physical goods).ProductCreateParams.BuildersetStatementDescriptor(java.lang.String statementDescriptor)An arbitrary string to be displayed on your customer's credit card or bank statement.ProductCreateParams.BuildersetTaxCode(java.lang.String taxCode)A tax code ID.ProductCreateParams.BuildersetType(ProductCreateParams.Type type)The type of the product.ProductCreateParams.BuildersetUnitLabel(java.lang.String unitLabel)A label that represents units of this product in Stripe and on customers’ receipts and invoices.ProductCreateParams.BuildersetUrl(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.attributesfor 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.attributesfor 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.deactivateOnfor 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.deactivateOnfor 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.expandfor 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.expandfor 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.extraParamsfor 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.extraParamsfor 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.imagesfor 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.imagesfor 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.metadatafor 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.metadatafor 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 toserviceif not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter togoodto use this product with Orders and SKUs. On API versions before2018-02-05, this field defaults togoodfor 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.
-
-