public class Sku extends ApiResource implements HasId, MetadataStore<Sku>
Modifier and Type | Class and Description |
---|---|
static class |
Sku.Inventory |
ApiResource.RequestMethod
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Sku() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Sku |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new SKU associated with a product.
|
static Sku |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a new SKU associated with a product.
|
static Sku |
create(SkuCreateParams params)
Creates a new SKU associated with a product.
|
static Sku |
create(SkuCreateParams params,
RequestOptions options)
Creates a new SKU associated with a product.
|
Sku |
delete()
Delete a SKU.
|
Sku |
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Delete a SKU.
|
Sku |
delete(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Delete a SKU.
|
Sku |
delete(RequestOptions options)
Delete a SKU.
|
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getActive()
Whether the SKU is available for purchase.
|
java.util.Map<java.lang.String,java.lang.String> |
getAttributes()
A dictionary of attributes and values for the attributes defined by the product.
|
java.lang.Long |
getCreated()
Time at which the object was created.
|
java.lang.String |
getCurrency()
Three-letter ISO currency code,
in lowercase.
|
java.lang.Boolean |
getDeleted()
Always true for a deleted object.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.String |
getImage()
The URL of an image for this SKU, meant to be displayable to the customer.
|
Sku.Inventory |
getInventory() |
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 |
getObject()
String representing the object's type.
|
PackageDimensions |
getPackageDimensions()
The dimensions of this SKU for shipping purposes.
|
java.lang.Long |
getPrice()
The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to
charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
|
java.lang.String |
getProduct()
Get ID of expandable
product object. |
Product |
getProductObject()
Get expanded
product . |
java.lang.Long |
getUpdated()
Time at which the object was last updated.
|
int |
hashCode() |
static SkuCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your SKUs.
|
static SkuCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your SKUs.
|
static SkuCollection |
list(SkuListParams params)
Returns a list of your SKUs.
|
static SkuCollection |
list(SkuListParams params,
RequestOptions options)
Returns a list of your SKUs.
|
static Sku |
retrieve(java.lang.String id)
Retrieves the details of an existing SKU.
|
static Sku |
retrieve(java.lang.String id,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the details of an existing SKU.
|
static Sku |
retrieve(java.lang.String id,
RequestOptions options)
Retrieves the details of an existing SKU.
|
static Sku |
retrieve(java.lang.String id,
SkuRetrieveParams params,
RequestOptions options)
Retrieves the details of an existing SKU.
|
void |
setActive(java.lang.Boolean active)
Whether the SKU is available for purchase.
|
void |
setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
A dictionary of attributes and values for the attributes defined by the product.
|
void |
setCreated(java.lang.Long created)
Time at which the object was created.
|
void |
setCurrency(java.lang.String currency)
Three-letter ISO currency code,
in lowercase.
|
void |
setDeleted(java.lang.Boolean deleted)
Always true for a deleted object.
|
void |
setId(java.lang.String id)
Unique identifier for the object.
|
void |
setImage(java.lang.String image)
The URL of an image for this SKU, meant to be displayable to the customer.
|
void |
setInventory(Sku.Inventory inventory) |
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 |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setPackageDimensions(PackageDimensions packageDimensions)
The dimensions of this SKU for shipping purposes.
|
void |
setPrice(java.lang.Long price)
The cost of the item as a positive integer in the smallest currency unit (that is, 100 cents to
charge $1.00, or 100 to charge ¥100, Japanese Yen being a zero-decimal currency).
|
void |
setProduct(java.lang.String id) |
void |
setProductObject(Product expandableObject) |
void |
setUpdated(java.lang.Long updated)
Time at which the object was last updated.
|
Sku |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specific SKU by setting the values of the parameters passed.
|
Sku |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the specific SKU by setting the values of the parameters passed.
|
Sku |
update(SkuUpdateParams params)
Updates the specific SKU by setting the values of the parameters passed.
|
Sku |
update(SkuUpdateParams params,
RequestOptions options)
Updates the specific SKU 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 java.lang.String getProduct()
product
object.public void setProduct(java.lang.String id)
public Product getProductObject()
product
.public void setProductObject(Product expandableObject)
public static Sku retrieve(java.lang.String id) throws StripeException
StripeException
public static Sku retrieve(java.lang.String id, RequestOptions options) throws StripeException
StripeException
public static Sku retrieve(java.lang.String id, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Sku retrieve(java.lang.String id, SkuRetrieveParams params, RequestOptions options) throws StripeException
StripeException
public static SkuCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static SkuCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static SkuCollection list(SkuListParams params) throws StripeException
StripeException
public static SkuCollection list(SkuListParams params, RequestOptions options) throws StripeException
StripeException
public Sku update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
Note that a SKU’s attributes
are not editable. Instead, you would need to
deactivate the existing SKU and create a new one with the new attribute values.
update
in interface MetadataStore<Sku>
StripeException
public Sku update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
Note that a SKU’s attributes
are not editable. Instead, you would need to
deactivate the existing SKU and create a new one with the new attribute values.
update
in interface MetadataStore<Sku>
StripeException
public Sku update(SkuUpdateParams params) throws StripeException
Note that a SKU’s attributes
are not editable. Instead, you would need to
deactivate the existing SKU and create a new one with the new attribute values.
StripeException
public Sku update(SkuUpdateParams params, RequestOptions options) throws StripeException
Note that a SKU’s attributes
are not editable. Instead, you would need to
deactivate the existing SKU and create a new one with the new attribute values.
StripeException
public static Sku create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Sku create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Sku create(SkuCreateParams params) throws StripeException
StripeException
public static Sku create(SkuCreateParams params, RequestOptions options) throws StripeException
StripeException
public Sku delete() throws StripeException
StripeException
public Sku delete(RequestOptions options) throws StripeException
StripeException
public Sku delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Sku delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public java.lang.Boolean getActive()
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
["size", "gender"]
, a valid SKU has the following
dictionary of attributes: {"size": "Medium", "gender": "Unisex"}
.public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Boolean getDeleted()
public java.lang.String getImage()
public Sku.Inventory getInventory()
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 getObject()
Equal to sku
.
public PackageDimensions getPackageDimensions()
public java.lang.Long getPrice()
public java.lang.Long getUpdated()
public void setActive(java.lang.Boolean active)
public void setAttributes(java.util.Map<java.lang.String,java.lang.String> attributes)
["size", "gender"]
, a valid SKU has the following
dictionary of attributes: {"size": "Medium", "gender": "Unisex"}
.public void setCreated(java.lang.Long created)
public void setCurrency(java.lang.String currency)
public void setDeleted(java.lang.Boolean deleted)
public void setId(java.lang.String id)
public void setImage(java.lang.String image)
public void setInventory(Sku.Inventory inventory)
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 setObject(java.lang.String object)
Equal to sku
.
public void setPackageDimensions(PackageDimensions packageDimensions)
public void setPrice(java.lang.Long price)
public void setUpdated(java.lang.Long updated)
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<Sku>