Package com.stripe.model
Class Product
java.lang.Object
com.stripe.model.StripeObject
com.stripe.net.ApiResource
com.stripe.model.Product
- All Implemented Interfaces:
HasId,MetadataStore<Product>,StripeObjectInterface
-
Nested Class Summary
Nested classes/interfaces inherited from class com.stripe.net.ApiResource
ApiResource.RequestMethod -
Field Summary
Fields inherited from class com.stripe.net.ApiResource
CHARSET, GSONFields inherited from class com.stripe.model.StripeObject
PRETTY_PRINT_GSON -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanstatic Productcreate(ProductCreateParams params) Creates a new product object.static Productcreate(ProductCreateParams params, RequestOptions options) Creates a new product object.static ProductCreates a new product object.static Productcreate(Map<String, Object> params, RequestOptions options) Creates a new product object.delete()Delete a product.delete(RequestOptions options) Delete a product.Delete a product.delete(Map<String, Object> params, RequestOptions options) Delete a product.booleanWhether the product is currently available for purchase.A list of up to 5 attributes that each SKU can provide values for (e.g.,["color", "size"]).A short one-line description of the product, meant to be displayable to the customer.Time at which the object was created.An array of connect application identifiers that cannot purchase this product.Get ID of expandabledefaultPriceobject.Get expandeddefaultPrice.Always true for a deleted object.The product's description, meant to be displayable to the customer.getId()Unique identifier for the object.A list of up to 8 URLs of images for this product, meant to be displayable to the customer.Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.Set of key-value pairs that you can attach to an object.getName()The product's name, meant to be displayable to the customer.String representing the object's type.The dimensions of this product for shipping purposes.Whether this product is shipped (i.e., physical goods).Extra information about a product which will appear on your customer's credit card statement.Get ID of expandabletaxCodeobject.Get expandedtaxCode.getType()The type of the product.A label that represents units of this product in Stripe and on customers’ receipts and invoices.Time at which the object was last updated.getUrl()A URL of a publicly-accessible webpage for this product.inthashCode()static ProductCollectionlist(ProductListParams params) Returns a list of your products.static ProductCollectionlist(ProductListParams params, RequestOptions options) Returns a list of your products.static ProductCollectionReturns a list of your products.static ProductCollectionlist(Map<String, Object> params, RequestOptions options) Returns a list of your products.static ProductRetrieves the details of an existing product.static Productretrieve(String id, RequestOptions options) Retrieves the details of an existing product.static Productretrieve(String id, ProductRetrieveParams params, RequestOptions options) Retrieves the details of an existing product.static ProductRetrieves the details of an existing product.static ProductSearchResultsearch(ProductSearchParams params) Search for products you’ve previously created using Stripe’s Search Query Language.static ProductSearchResultsearch(ProductSearchParams params, RequestOptions options) Search for products you’ve previously created using Stripe’s Search Query Language.static ProductSearchResultSearch for products you’ve previously created using Stripe’s Search Query Language.static ProductSearchResultsearch(Map<String, Object> params, RequestOptions options) Search for products you’ve previously created using Stripe’s Search Query Language.voidWhether the product is currently available for purchase.voidsetAttributes(List<String> attributes) A list of up to 5 attributes that each SKU can provide values for (e.g.,["color", "size"]).voidsetCaption(String caption) A short one-line description of the product, meant to be displayable to the customer.voidsetCreated(Long created) Time at which the object was created.voidsetDeactivateOn(List<String> deactivateOn) An array of connect application identifiers that cannot purchase this product.voidvoidsetDefaultPriceObject(Price expandableObject) voidsetDeleted(Boolean deleted) Always true for a deleted object.voidsetDescription(String description) The product's description, meant to be displayable to the customer.voidUnique identifier for the object.voidA list of up to 8 URLs of images for this product, meant to be displayable to the customer.voidsetLivemode(Boolean livemode) Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode.voidsetMetadata(Map<String, String> metadata) Set of key-value pairs that you can attach to an object.voidThe product's name, meant to be displayable to the customer.voidString representing the object's type.voidsetPackageDimensions(PackageDimensions packageDimensions) The dimensions of this product for shipping purposes.voidsetShippable(Boolean shippable) Whether this product is shipped (i.e., physical goods).voidsetStatementDescriptor(String statementDescriptor) Extra information about a product which will appear on your customer's credit card statement.voidsetTaxCode(String id) voidsetTaxCodeObject(TaxCode expandableObject) voidThe type of the product.voidsetUnitLabel(String unitLabel) A label that represents units of this product in Stripe and on customers’ receipts and invoices.voidsetUpdated(Long updated) Time at which the object was last updated.voidA URL of a publicly-accessible webpage for this product.update(ProductUpdateParams params) Updates the specific product by setting the values of the parameters passed.update(ProductUpdateParams params, RequestOptions options) Updates the specific product by setting the values of the parameters passed.Updates the specific product by setting the values of the parameters passed.update(Map<String, Object> params, RequestOptions options) Updates the specific product by setting the values of the parameters passed.Methods inherited from class com.stripe.net.ApiResource
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, requestSearchResult, requestSearchResult, requestStream, requestStream, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdMethods inherited from class com.stripe.model.StripeObject
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
-
Constructor Details
-
Product
public Product()
-
-
Method Details
-
getDefaultPrice
Get ID of expandabledefaultPriceobject. -
setDefaultPrice
-
getDefaultPriceObject
Get expandeddefaultPrice. -
setDefaultPriceObject
-
getTaxCode
Get ID of expandabletaxCodeobject. -
setTaxCode
-
getTaxCodeObject
Get expandedtaxCode. -
setTaxCodeObject
-
search
Search for products you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static ProductSearchResult search(Map<String, Object> params, RequestOptions options) throws StripeExceptionSearch for products you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
Search for products you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
search
public static ProductSearchResult search(ProductSearchParams params, RequestOptions options) throws StripeException Search for products you’ve previously created using Stripe’s Search Query Language. Don’t use search in read-after-write flows where strict consistency is necessary. Under normal operating conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up to an hour behind during outages. Search functionality is not available to merchants in India.- Throws:
StripeException
-
create
Creates a new product object.- Throws:
StripeException
-
create
public static Product create(Map<String, Object> params, RequestOptions options) throws StripeExceptionCreates a new product object.- Throws:
StripeException
-
create
Creates a new product object.- Throws:
StripeException
-
create
public static Product create(ProductCreateParams params, RequestOptions options) throws StripeException Creates a new product object.- Throws:
StripeException
-
retrieve
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
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(String id, Map<String, Object> params, RequestOptions options) throws StripeExceptionRetrieves 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(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
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Product>- Throws:
StripeException
-
update
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Specified by:
updatein interfaceMetadataStore<Product>- Throws:
StripeException
-
update
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
update
Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged.- Throws:
StripeException
-
list
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(Map<String, Object> params, RequestOptions options) throws StripeExceptionReturns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first.- Throws:
StripeException
-
list
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(ProductListParams 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
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product withtype=goodis only possible if it has no SKUs associated with it.- Throws:
StripeException
-
delete
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product withtype=goodis only possible if it has no SKUs associated with it.- Throws:
StripeException
-
delete
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product withtype=goodis only possible if it has no SKUs associated with it.- Throws:
StripeException
-
delete
Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product withtype=goodis only possible if it has no SKUs associated with it.- Throws:
StripeException
-
getActive
Whether the product is currently available for purchase. -
getAttributes
A list of up to 5 attributes that each SKU can provide values for (e.g.,["color", "size"]). -
getCaption
A short one-line description of the product, meant to be displayable to the customer. Only applicable to products oftype=good. -
getCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
getDeactivateOn
An array of connect application identifiers that cannot purchase this product. Only applicable to products oftype=good. -
getDeleted
Always true for a deleted object. -
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
A list of up to 8 URLs of images for this product, meant to be displayable to the customer. -
getLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
getName
The product's name, meant to be displayable to the customer. -
getObject
String representing the object's type. Objects of the same type share the same value.Equal to
product. -
getPackageDimensions
The dimensions of this product for shipping purposes. -
getShippable
Whether this product is shipped (i.e., physical goods). -
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
The type of the product. The product is either of typegood, which is eligible for use with Orders and SKUs, orservice, which is eligible for use with Subscriptions and Plans.One of
good, orservice. -
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
Time at which the object was last updated. Measured in seconds since the Unix epoch. -
getUrl
A URL of a publicly-accessible webpage for this product. -
setActive
Whether the product is currently available for purchase. -
setAttributes
A list of up to 5 attributes that each SKU can provide values for (e.g.,["color", "size"]). -
setCaption
A short one-line description of the product, meant to be displayable to the customer. Only applicable to products oftype=good. -
setCreated
Time at which the object was created. Measured in seconds since the Unix epoch. -
setDeactivateOn
An array of connect application identifiers that cannot purchase this product. Only applicable to products oftype=good. -
setDeleted
Always true for a deleted object. -
setDescription
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
Unique identifier for the object. -
setImages
A list of up to 8 URLs of images for this product, meant to be displayable to the customer. -
setLivemode
Has the valuetrueif the object exists in live mode or the valuefalseif the object exists in test mode. -
setMetadata
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
The product's name, meant to be displayable to the customer. -
setObject
String representing the object's type. Objects of the same type share the same value.Equal to
product. -
setPackageDimensions
The dimensions of this product for shipping purposes. -
setShippable
Whether this product is shipped (i.e., physical goods). -
setStatementDescriptor
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
The type of the product. The product is either of typegood, which is eligible for use with Orders and SKUs, orservice, which is eligible for use with Subscriptions and Plans.One of
good, orservice. -
setUnitLabel
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
Time at which the object was last updated. Measured in seconds since the Unix epoch. -
setUrl
A URL of a publicly-accessible webpage for this product. -
equals
-
canEqual
-
hashCode
public int hashCode() -
getId
Unique identifier for the object. -
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:
getMetadatain interfaceMetadataStore<Product>
-