Class ProductCreateParams.Builder

  • Enclosing class:
    ProductCreateParams

    public static class ProductCreateParams.Builder
    extends java.lang.Object
    • Constructor Detail

      • Builder

        public Builder()
    • 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 to true.
      • 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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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. See ProductCreateParams.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.
      • 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.

      • setType

        public ProductCreateParams.Builder setType​(ProductCreateParams.Type type)
        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​(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.