public class Price extends ApiResource implements HasId, MetadataStore<Price>
| Modifier and Type | Class and Description |
|---|---|
static class |
Price.Recurring |
static class |
Price.Tier |
static class |
Price.TransformQuantity |
ApiResource.RequestMethodCHARSET, GSONPRETTY_PRINT_GSON| Constructor and Description |
|---|
Price() |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Price |
create(java.util.Map<java.lang.String,java.lang.Object> params)
Creates a new price for an existing product.
|
static Price |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Creates a new price for an existing product.
|
static Price |
create(PriceCreateParams params)
Creates a new price for an existing product.
|
static Price |
create(PriceCreateParams params,
RequestOptions options)
Creates a new price for an existing product.
|
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getActive()
Whether the price can be used for new purchases.
|
java.lang.String |
getBillingScheme()
Describes how to compute the price per period.
|
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.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.lang.String |
getLookupKey()
A lookup key used to retrieve prices dynamically from a static string.
|
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 |
getNickname()
A brief description of the plan, hidden from customers.
|
java.lang.String |
getObject()
String representing the object's type.
|
java.lang.String |
getProduct()
Get ID of expandable
product object. |
Product |
getProductObject()
Get expanded
product. |
Price.Recurring |
getRecurring()
The recurring components of a price such as
interval and usage_type. |
java.util.List<Price.Tier> |
getTiers()
Each element represents a pricing tier.
|
java.lang.String |
getTiersMode()
Defines if the tiering price should be
graduated or volume based. |
Price.TransformQuantity |
getTransformQuantity()
Apply a transformation to the reported usage or set quantity before computing the amount
billed.
|
java.lang.String |
getType()
One of
one_time or recurring depending on whether the price is for a one-time
purchase or a recurring (subscription) purchase. |
java.lang.Long |
getUnitAmount()
The unit amount in %s to be charged, represented as a whole integer if possible.
|
java.math.BigDecimal |
getUnitAmountDecimal()
The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal
places.
|
int |
hashCode() |
static PriceCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your prices.
|
static PriceCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your prices.
|
static PriceCollection |
list(PriceListParams params)
Returns a list of your prices.
|
static PriceCollection |
list(PriceListParams params,
RequestOptions options)
Returns a list of your prices.
|
static Price |
retrieve(java.lang.String price)
Retrieves the price with the given ID.
|
static Price |
retrieve(java.lang.String price,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the price with the given ID.
|
static Price |
retrieve(java.lang.String price,
PriceRetrieveParams params,
RequestOptions options)
Retrieves the price with the given ID.
|
static Price |
retrieve(java.lang.String price,
RequestOptions options)
Retrieves the price with the given ID.
|
void |
setActive(java.lang.Boolean active)
Whether the price can be used for new purchases.
|
void |
setBillingScheme(java.lang.String billingScheme)
Describes how to compute the price per period.
|
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 |
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 |
setLookupKey(java.lang.String lookupKey)
A lookup key used to retrieve prices dynamically from a static string.
|
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 |
setNickname(java.lang.String nickname)
A brief description of the plan, hidden from customers.
|
void |
setObject(java.lang.String object)
String representing the object's type.
|
void |
setProduct(java.lang.String id) |
void |
setProductObject(Product expandableObject) |
void |
setRecurring(Price.Recurring recurring)
The recurring components of a price such as
interval and usage_type. |
void |
setTiers(java.util.List<Price.Tier> tiers)
Each element represents a pricing tier.
|
void |
setTiersMode(java.lang.String tiersMode)
Defines if the tiering price should be
graduated or volume based. |
void |
setTransformQuantity(Price.TransformQuantity transformQuantity)
Apply a transformation to the reported usage or set quantity before computing the amount
billed.
|
void |
setType(java.lang.String type)
One of
one_time or recurring depending on whether the price is for a one-time
purchase or a recurring (subscription) purchase. |
void |
setUnitAmount(java.lang.Long unitAmount)
The unit amount in %s to be charged, represented as a whole integer if possible.
|
void |
setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
The unit amount in %s to be charged, represented as a decimal string with at most 12 decimal
places.
|
Price |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified price by setting the values of the parameters passed.
|
Price |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the specified price by setting the values of the parameters passed.
|
Price |
update(PriceUpdateParams params)
Updates the specified price by setting the values of the parameters passed.
|
Price |
update(PriceUpdateParams params,
RequestOptions options)
Updates the specified price by setting the values of the parameters passed.
|
checkNullTypedParams, classUrl, classUrl, instanceUrl, instanceUrl, request, request, requestCollection, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode, urlEncodeIdequals, getLastResponse, getRawJsonObject, setLastResponse, toJson, toStringpublic java.lang.String getProduct()
product object.public void setProduct(java.lang.String id)
public Product getProductObject()
product.public void setProductObject(Product expandableObject)
public static PriceCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static PriceCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static PriceCollection list(PriceListParams params) throws StripeException
StripeExceptionpublic static PriceCollection list(PriceListParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static Price create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeExceptionpublic static Price create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static Price create(PriceCreateParams params) throws StripeException
StripeExceptionpublic static Price create(PriceCreateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic static Price retrieve(java.lang.String price) throws StripeException
StripeExceptionpublic static Price retrieve(java.lang.String price, RequestOptions options) throws StripeException
StripeExceptionpublic static Price retrieve(java.lang.String price, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeExceptionpublic static Price retrieve(java.lang.String price, PriceRetrieveParams params, RequestOptions options) throws StripeException
StripeExceptionpublic Price update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update in interface MetadataStore<Price>StripeExceptionpublic Price update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update in interface MetadataStore<Price>StripeExceptionpublic Price update(PriceUpdateParams params) throws StripeException
StripeExceptionpublic Price update(PriceUpdateParams params, RequestOptions options) throws StripeException
StripeExceptionpublic java.lang.Boolean getActive()
public java.lang.String getBillingScheme()
per_unit or tiered.
per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered).
tiered indicates that the unit pricing will be computed using a tiering strategy as
defined using the tiers and tiers_mode attributes.
One of per_unit, or tiered.
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Boolean getDeleted()
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 getLookupKey()
public java.lang.String getNickname()
public java.lang.String getObject()
Equal to price.
public Price.Recurring getRecurring()
interval and usage_type.public java.util.List<Price.Tier> getTiers()
billing_scheme to be
set to tiered. See also the documentation for billing_scheme.public java.lang.String getTiersMode()
graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In
graduated tiering, pricing can change as the quantity grows.
One of graduated, or volume.
public Price.TransformQuantity getTransformQuantity()
tiers.public java.lang.String getType()
one_time or recurring depending on whether the price is for a one-time
purchase or a recurring (subscription) purchase.public java.lang.Long getUnitAmount()
public java.math.BigDecimal getUnitAmountDecimal()
public void setActive(java.lang.Boolean active)
public void setBillingScheme(java.lang.String billingScheme)
per_unit or tiered.
per_unit indicates that the fixed amount (specified in unit_amount or unit_amount_decimal) will be charged per unit in quantity (for prices with usage_type=licensed), or per unit of total usage (for prices with usage_type=metered).
tiered indicates that the unit pricing will be computed using a tiering strategy as
defined using the tiers and tiers_mode attributes.
One of per_unit, or tiered.
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 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 setLookupKey(java.lang.String lookupKey)
public void setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata)
public void setNickname(java.lang.String nickname)
public void setObject(java.lang.String object)
Equal to price.
public void setRecurring(Price.Recurring recurring)
interval and usage_type.public void setTiers(java.util.List<Price.Tier> tiers)
billing_scheme to be
set to tiered. See also the documentation for billing_scheme.public void setTiersMode(java.lang.String tiersMode)
graduated or volume based. In volume-based tiering, the maximum quantity within a period determines the per unit price. In
graduated tiering, pricing can change as the quantity grows.
One of graduated, or volume.
public void setTransformQuantity(Price.TransformQuantity transformQuantity)
tiers.public void setType(java.lang.String type)
one_time or recurring depending on whether the price is for a one-time
purchase or a recurring (subscription) purchase.public void setUnitAmount(java.lang.Long unitAmount)
public void setUnitAmountDecimal(java.math.BigDecimal unitAmountDecimal)
public boolean equals(java.lang.Object o)
equals in class java.lang.Objectprotected boolean canEqual(java.lang.Object other)
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String getId()
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata in interface MetadataStore<Price>