Class ProductUpdateParams.Builder

  • Enclosing class:
    ProductUpdateParams

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

      • Builder

        public Builder()
    • Method Detail

      • build

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

        public ProductUpdateParams.Builder setActive​(java.lang.Boolean active)
        Whether the product is available for purchase.
      • addAttribute

        public ProductUpdateParams.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 ProductUpdateParams.attributes for the field documentation.
      • addAllAttribute

        public ProductUpdateParams.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 ProductUpdateParams.attributes for the field documentation.
      • setAttributes

        public ProductUpdateParams.Builder setAttributes​(EmptyParam attributes)
        A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., ["color", "size"]). If a value for attributes is specified, the list specified will replace the existing attributes list on this product. Any attributes not present after the update will be deleted from the SKUs for this product.
      • setAttributes

        public ProductUpdateParams.Builder setAttributes​(java.util.List<java.lang.String> attributes)
        A list of up to 5 alphanumeric attributes that each SKU can provide values for (e.g., ["color", "size"]). If a value for attributes is specified, the list specified will replace the existing attributes list on this product. Any attributes not present after the update will be deleted from the SKUs for this product.
      • setCaption

        public ProductUpdateParams.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.
      • setCaption

        public ProductUpdateParams.Builder setCaption​(EmptyParam 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 ProductUpdateParams.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 ProductUpdateParams.deactivateOn for the field documentation.
      • addAllDeactivateOn

        public ProductUpdateParams.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 ProductUpdateParams.deactivateOn for the field documentation.
      • setDescription

        public ProductUpdateParams.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.
      • setDescription

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

        public ProductUpdateParams.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 ProductUpdateParams.expand for the field documentation.
      • putExtraParam

        public ProductUpdateParams.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 ProductUpdateParams.extraParams for the field documentation.
      • putAllExtraParam

        public ProductUpdateParams.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 ProductUpdateParams.extraParams for the field documentation.
      • addImage

        public ProductUpdateParams.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 ProductUpdateParams.images for the field documentation.
      • addAllImage

        public ProductUpdateParams.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 ProductUpdateParams.images for the field documentation.
      • setImages

        public ProductUpdateParams.Builder setImages​(java.util.List<java.lang.String> images)
        A list of up to 8 URLs of images for this product, meant to be displayable to the customer.
      • putMetadata

        public ProductUpdateParams.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 ProductUpdateParams.metadata for the field documentation.
      • putAllMetadata

        public ProductUpdateParams.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 ProductUpdateParams.metadata for the field documentation.
      • setMetadata

        public ProductUpdateParams.Builder setMetadata​(EmptyParam metadata)
        Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
      • setMetadata

        public ProductUpdateParams.Builder setMetadata​(java.util.Map<java.lang.String,​java.lang.String> metadata)
        Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to metadata.
      • setName

        public ProductUpdateParams.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.
      • setName

        public ProductUpdateParams.Builder setName​(EmptyParam 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 ProductUpdateParams.Builder setShippable​(java.lang.Boolean shippable)
        Whether this product is shipped (i.e., physical goods).
      • setStatementDescriptor

        public ProductUpdateParams.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. May only be set if type=service.

      • setStatementDescriptor

        public ProductUpdateParams.Builder setStatementDescriptor​(EmptyParam 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. May only be set if type=service.

      • setUnitLabel

        public ProductUpdateParams.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. May only be set if type=service.
      • setUnitLabel

        public ProductUpdateParams.Builder setUnitLabel​(EmptyParam 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. May only be set if type=service.
      • setUrl

        public ProductUpdateParams.Builder setUrl​(java.lang.String url)
        A URL of a publicly-accessible webpage for this product.