Class ProductCreateParams.Builder

java.lang.Object
com.stripe.param.ProductCreateParams.Builder
Enclosing class:
ProductCreateParams

public static class ProductCreateParams.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • build

      public ProductCreateParams build()
      Finalize and obtain parameter instance from this builder.
    • setActive

      public ProductCreateParams.Builder setActive(Boolean active)
      Whether the product is currently available for purchase. Defaults to true.
    • 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

      public ProductCreateParams.Builder setDescription(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(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. See ProductCreateParams.expand for the field documentation.
    • addAllExpand

      public ProductCreateParams.Builder addAllExpand(List<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. See ProductCreateParams.expand for the field documentation.
    • putExtraParam

      public ProductCreateParams.Builder putExtraParam(String key, 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. See ProductCreateParams.extraParams for the field documentation.
    • putAllExtraParam

      public ProductCreateParams.Builder putAllExtraParam(Map<String,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. See ProductCreateParams.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

      public ProductCreateParams.Builder addImage(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. See ProductCreateParams.images for the field documentation.
    • addAllImage

      public ProductCreateParams.Builder addAllImage(List<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. See ProductCreateParams.images for the field documentation.
    • addMarketingFeature

      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. See ProductCreateParams.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. See ProductCreateParams.marketingFeatures for the field documentation.
    • putMetadata

      public ProductCreateParams.Builder putMetadata(String key, 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. See ProductCreateParams.metadata for the field documentation.
    • putAllMetadata

      public ProductCreateParams.Builder putAllMetadata(Map<String,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. See ProductCreateParams.metadata for the field documentation.
    • setName

      public ProductCreateParams.Builder setName(String name)
      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

      public ProductCreateParams.Builder setShippable(Boolean shippable)
      Whether this product is shipped (i.e., physical goods).
    • setStatementDescriptor

      public ProductCreateParams.Builder setStatementDescriptor(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. Only used for subscription payments.

    • setTaxCode

      public ProductCreateParams.Builder setTaxCode(String taxCode)
      A tax code ID.
    • setType

      The type of the product. Defaults to service if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to good to use this product with Orders and SKUs. On API versions before 2018-02-05, this field defaults to good for compatibility reasons.
    • setUnitLabel

      public ProductCreateParams.Builder setUnitLabel(String unitLabel)
      A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal.
    • setUrl

      public ProductCreateParams.Builder setUrl(String url)
      A URL of a publicly-accessible webpage for this product.