public class Product extends ApiResource implements HasId, MetadataStore<Product>
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Product() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Product |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new product object.
|
static Product |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a new product object.
|
static Product |
create(ProductCreateParams params)
Creates a new product object.
|
static Product |
create(ProductCreateParams params,
RequestOptions options)
Creates a new product object.
|
Product |
delete()
Delete a product.
|
Product |
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Delete a product.
|
Product |
delete(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Delete a product.
|
Product |
delete(RequestOptions options)
Delete a product.
|
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getActive()
Whether the product is currently available for purchase.
|
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"] ). |
java.lang.String |
getCaption()
A short one-line description of the product, meant to be displayable to the customer.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.util.List<java.lang.String> |
getDeactivateOn()
An array of connect application identifiers that cannot purchase this product.
|
java.lang.Boolean |
getDeleted()
Always true for a deleted object.
|
java.lang.String |
getDescription()
The product's description, meant to be displayable to the customer.
|
java.lang.String |
getId()
Unique identifier for the object.
|
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.
|
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. |
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Set of key-value pairs that you can attach
to an object.
|
java.lang.String |
getName()
The product's name, meant to be displayable to the customer.
|
java.lang.String |
getObject()
String representing the object's type.
|
PackageDimensions |
getPackageDimensions()
The dimensions of this product for shipping purposes.
|
java.lang.Boolean |
getShippable()
Whether this product is a shipped good.
|
java.lang.String |
getStatementDescriptor()
Extra information about a product which will appear on your customer's credit card statement.
|
java.lang.String |
getType()
The type of the product.
|
java.lang.String |
getUnitLabel()
A label that represents units of this product in Stripe and on customers’ receipts and
invoices.
|
java.lang.Long |
getUpdated()
Time at which the object was last updated.
|
java.lang.String |
getUrl()
A URL of a publicly-accessible webpage for this product.
|
int |
hashCode() |
static ProductCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your products.
|
static ProductCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your products.
|
static ProductCollection |
list(ProductListParams params)
Returns a list of your products.
|
static ProductCollection |
list(ProductListParams params,
RequestOptions options)
Returns a list of your products.
|
static Product |
retrieve(java.lang.String id)
Retrieves the details of an existing product.
|
static Product |
retrieve(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the details of an existing product.
|
static Product |
retrieve(java.lang.String id,
ProductRetrieveParams params,
RequestOptions options)
Retrieves the details of an existing product.
|
static Product |
retrieve(java.lang.String id,
RequestOptions options)
Retrieves the details of an existing product.
|
void |
setActive(java.lang.Boolean active)
Whether the product is currently available for purchase.
|
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"] ). |
void |
setCaption(java.lang.String caption)
A short one-line description of the product, meant to be displayable to the customer.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setDeactivateOn(java.util.List<java.lang.String> deactivateOn)
An array of connect application identifiers that cannot purchase this product.
|
void |
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
|
void |
setDescription(java.lang.String description)
The product's description, meant to be displayable to the customer.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
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.
|
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. |
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
Set of key-value pairs that you can attach
to an object.
|
void |
setName(java.lang.String name)
The product's name, meant to be displayable to the customer.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPackageDimensions(PackageDimensions packageDimensions)
The dimensions of this product for shipping purposes.
|
void |
setShippable(java.lang.Boolean shippable)
Whether this product is a shipped good.
|
void |
setStatementDescriptor(java.lang.String statementDescriptor)
Extra information about a product which will appear on your customer's credit card statement.
|
void |
setType(java.lang.String type)
The type of the product.
|
void |
setUnitLabel(java.lang.String unitLabel)
A label that represents units of this product in Stripe and on customers’ receipts and
invoices.
|
void |
setUpdated(java.lang.Long updated)
Time at which the object was last updated.
|
void |
setUrl(java.lang.String url)
A URL of a publicly-accessible webpage for this product.
|
Product |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specific product by setting the values of the parameters passed.
|
Product |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the specific product by setting the values of the parameters passed.
|
Product |
update(ProductUpdateParams params)
Updates the specific product by setting the values of the parameters passed.
|
Product |
update(ProductUpdateParams params,
RequestOptions options)
Updates the specific product by setting the values of the parameters passed.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeId
equals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toString
public static Product create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Product create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Product create(ProductCreateParams params) throws StripeException
StripeException
public static Product create(ProductCreateParams params, RequestOptions options) throws StripeException
StripeException
public static Product retrieve(java.lang.String id) throws StripeException
StripeException
public static Product retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeException
public static Product retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Product retrieve(java.lang.String id, ProductRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public Product update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update
in interface MetadataStore<Product>
StripeException
public Product update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update
in interface MetadataStore<Product>
StripeException
public Product update(ProductUpdateParams params) throws StripeException
StripeException
public Product update(ProductUpdateParams params, RequestOptions options) throws StripeException
StripeException
public static ProductCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static ProductCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static ProductCollection list(ProductListParams params) throws StripeException
StripeException
public static ProductCollection list(ProductListParams params, RequestOptions options) throws StripeException
StripeException
public Product delete() throws StripeException
type=good
is only possible if it has no SKUs
associated with it.StripeException
public Product delete(RequestOptions options) throws StripeException
type=good
is only possible if it has no SKUs
associated with it.StripeException
public Product delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
type=good
is only possible if it has no SKUs
associated with it.StripeException
public Product delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
type=good
is only possible if it has no SKUs
associated with it.StripeException
public java.lang.Boolean getActive()
public java.util.List<java.lang.String> getAttributes()
["color",
"size"]
).public java.lang.String getCaption()
type=good
.public java.lang.Long getCreated()
public java.util.List<java.lang.String> getDeactivateOn()
type=good
.public java.lang.Boolean getDeleted()
public java.lang.String getDescription()
public java.util.List<java.lang.String> getImages()
public java.lang.Boolean getLivemode()
true
if the object exists in live mode or the value false
if the
object exists in test mode.public java.lang.String getName()
public java.lang.String getObject()
Equal to product
.
public PackageDimensions getPackageDimensions()
package_dimensions
. Only applicable to products
of type=good
.public java.lang.Boolean getShippable()
type=good
.public java.lang.String getStatementDescriptor()
public java.lang.String getType()
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
.
public java.lang.String getUnitLabel()
public java.lang.Long getUpdated()
public java.lang.String getUrl()
type=good
.public void setActive(java.lang.Boolean active)
public void setAttributes(java.util.List<java.lang.String> attributes)
["color",
"size"]
).public void setCaption(java.lang.String caption)
type=good
.public void setCreated(java.lang.Long created)
public void setDeactivateOn(java.util.List<java.lang.String> deactivateOn)
type=good
.public void setDeleted(java.lang.Boolean deleted)
public void setDescription(java.lang.String description)
public void setId(java.lang.String id)
public void setImages(java.util.List<java.lang.String> images)
public void setLivemode(java.lang.Boolean livemode)
true
if the object exists in live mode or the value false
if the
object exists in test mode.public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setName(java.lang.String name)
public void setObject(java.lang.String object)
Equal to product
.
public void setPackageDimensions(PackageDimensions packageDimensions)
package_dimensions
. Only applicable to products
of type=good
.public void setShippable(java.lang.Boolean shippable)
type=good
.public void setStatementDescriptor(java.lang.String statementDescriptor)
public void setType(java.lang.String 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
.
public void setUnitLabel(java.lang.String unitLabel)
public void setUpdated(java.lang.Long updated)
public void setUrl(java.lang.String url)
type=good
.public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
protected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<Product>