Class Product

    • Constructor Detail

      • Product

        public Product()
    • Method Detail

      • getTaxCode

        public java.lang.String getTaxCode()
        Get ID of expandable taxCode object.
      • setTaxCode

        public void setTaxCode​(java.lang.String id)
      • getTaxCodeObject

        public TaxCode getTaxCodeObject()
        Get expanded taxCode.
      • setTaxCodeObject

        public void setTaxCodeObject​(TaxCode expandableObject)
      • retrieve

        public static Product retrieve​(java.lang.String id)
                                throws StripeException
        Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
        Throws:
        StripeException
      • retrieve

        public static Product retrieve​(java.lang.String id,
                                       RequestOptions options)
                                throws StripeException
        Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
        Throws:
        StripeException
      • retrieve

        public static Product retrieve​(java.lang.String id,
                                       java.util.Map<java.lang.String,​java.lang.Object> params,
                                       RequestOptions options)
                                throws StripeException
        Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
        Throws:
        StripeException
      • retrieve

        public static Product retrieve​(java.lang.String id,
                                       ProductRetrieveParams params,
                                       RequestOptions options)
                                throws StripeException
        Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information.
        Throws:
        StripeException
      • update

        public Product update​(java.util.Map<java.lang.String,​java.lang.Object> params)
                       throws StripeException
        Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.
        Specified by:
        update in interface MetadataStore<Product>
        Throws:
        StripeException
      • list

        public static ProductCollection list​(java.util.Map<java.lang.String,​java.lang.Object> params)
                                      throws StripeException
        Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
        Throws:
        StripeException
      • list

        public static ProductCollection list​(java.util.Map<java.lang.String,​java.lang.Object> params,
                                             RequestOptions options)
                                      throws StripeException
        Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.
        Throws:
        StripeException
      • delete

        public Product delete()
                       throws StripeException
        Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
        Throws:
        StripeException
      • delete

        public Product delete​(RequestOptions options)
                       throws StripeException
        Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
        Throws:
        StripeException
      • delete

        public Product delete​(java.util.Map<java.lang.String,​java.lang.Object> params)
                       throws StripeException
        Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
        Throws:
        StripeException
      • delete

        public Product delete​(java.util.Map<java.lang.String,​java.lang.Object> params,
                              RequestOptions options)
                       throws StripeException
        Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it.
        Throws:
        StripeException
      • getActive

        public java.lang.Boolean getActive()
        Whether the product is currently available for purchase.
      • getAttributes

        public java.util.List<java.lang.String> getAttributes()
        A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]).
      • getCaption

        public java.lang.String getCaption()
        A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good.
      • getCreated

        public java.lang.Long getCreated()
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • getDeactivateOn

        public java.util.List<java.lang.String> getDeactivateOn()
        An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good.
      • getDeleted

        public java.lang.Boolean getDeleted()
        Always true for a deleted object.
      • getDescription

        public java.lang.String getDescription()
        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.
      • getImages

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

        public java.lang.Boolean getLivemode()
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • getName

        public java.lang.String getName()
        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.
      • getObject

        public java.lang.String getObject()
        String representing the object's type. Objects of the same type share the same value.

        Equal to product.

      • getPackageDimensions

        public PackageDimensions getPackageDimensions()
        The dimensions of this product for shipping purposes.
      • getShippable

        public java.lang.Boolean getShippable()
        Whether this product is shipped (i.e., physical goods).
      • getStatementDescriptor

        public java.lang.String getStatementDescriptor()
        Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.
      • getType

        public java.lang.String getType()
        The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.

        One of good, or service.

      • getUnitLabel

        public java.lang.String getUnitLabel()
        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.
      • getUpdated

        public java.lang.Long getUpdated()
        Time at which the object was last updated. Measured in seconds since the Unix epoch.
      • getUrl

        public java.lang.String getUrl()
        A URL of a publicly-accessible webpage for this product.
      • setActive

        public void setActive​(java.lang.Boolean active)
        Whether the product is currently available for purchase.
      • setAttributes

        public void setAttributes​(java.util.List<java.lang.String> attributes)
        A list of up to 5 attributes that each SKU can provide values for (e.g., ["color", "size"]).
      • setCaption

        public void setCaption​(java.lang.String caption)
        A short one-line description of the product, meant to be displayable to the customer. Only applicable to products of type=good.
      • setCreated

        public void setCreated​(java.lang.Long created)
        Time at which the object was created. Measured in seconds since the Unix epoch.
      • setDeactivateOn

        public void setDeactivateOn​(java.util.List<java.lang.String> deactivateOn)
        An array of connect application identifiers that cannot purchase this product. Only applicable to products of type=good.
      • setDeleted

        public void setDeleted​(java.lang.Boolean deleted)
        Always true for a deleted object.
      • setDescription

        public void 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.
      • setId

        public void setId​(java.lang.String id)
        Unique identifier for the object.
      • setImages

        public void 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.
      • setLivemode

        public void setLivemode​(java.lang.Boolean livemode)
        Has the value true if the object exists in live mode or the value false if the object exists in test mode.
      • setMetadata

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

        public void 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.
      • setObject

        public void setObject​(java.lang.String object)
        String representing the object's type. Objects of the same type share the same value.

        Equal to product.

      • setPackageDimensions

        public void setPackageDimensions​(PackageDimensions packageDimensions)
        The dimensions of this product for shipping purposes.
      • setShippable

        public void setShippable​(java.lang.Boolean shippable)
        Whether this product is shipped (i.e., physical goods).
      • setStatementDescriptor

        public void setStatementDescriptor​(java.lang.String statementDescriptor)
        Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used.
      • setType

        public void setType​(java.lang.String type)
        The type of the product. The product is either of type good, which is eligible for use with Orders and SKUs, or service, which is eligible for use with Subscriptions and Plans.

        One of good, or service.

      • setUnitLabel

        public void 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.
      • setUpdated

        public void setUpdated​(java.lang.Long updated)
        Time at which the object was last updated. Measured in seconds since the Unix epoch.
      • setUrl

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

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getId

        public java.lang.String getId()
        Unique identifier for the object.
        Specified by:
        getId in interface HasId
      • getMetadata

        public java.util.Map<java.lang.String,​java.lang.String> getMetadata()
        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.
        Specified by:
        getMetadata in interface MetadataStore<Product>