public class Plan extends ApiResource implements HasId, MetadataStore<Plan>
Modifier and Type | Class and Description |
---|---|
static class |
Plan.Tier |
static class |
Plan.TransformUsage |
ApiResource.RequestMethod, ApiResource.RequestType
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor and Description |
---|
Plan() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(java.lang.Object other) |
static Plan |
create(java.util.Map<java.lang.String,java.lang.Object> params)
You can create plans using the API, or in the Stripe Dashboard.
|
static Plan |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
You can create plans using the API, or in the Stripe Dashboard.
|
Plan |
delete()
Deleting plans means new subscribers can’t be added.
|
Plan |
delete(java.util.Map<java.lang.String,java.lang.Object> params)
Deleting plans means new subscribers can’t be added.
|
Plan |
delete(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Deleting plans means new subscribers can’t be added.
|
Plan |
delete(RequestOptions options)
Deleting plans means new subscribers can’t be added.
|
boolean |
equals(java.lang.Object o) |
java.lang.Boolean |
getActive()
Whether the plan is currently available for new subscriptions.
|
java.lang.String |
getAggregateUsage()
Specifies a usage aggregation strategy for plans of `usage_type=metered`.
|
java.lang.Long |
getAmount()
The amount in %s to be charged on the interval specified.
|
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](https://www.iso.org/iso-4217-currency-codes.html), in
lowercase.
|
java.lang.Boolean |
getDeleted()
Always true for a deleted object.
|
java.lang.String |
getId()
Unique identifier for the object.
|
java.lang.String |
getInterval()
One of `day`, `week`, `month` or `year`.
|
java.lang.Long |
getIntervalCount()
The number of intervals (specified in the `interval` property) between subscription billings.
|
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 |
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`.
|
java.util.List<Plan.Tier> |
getTiers()
Each element represents a pricing tier.
|
java.lang.String |
getTiersMode()
Defines if the tiering price should be `graduated` or `volume` based.
|
Plan.TransformUsage |
getTransformUsage()
Apply a transformation to the reported usage or set quantity before computing the billed price.
|
java.lang.Long |
getTrialPeriodDays()
Default number of trial days when subscribing a customer to this plan using
[`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
|
java.lang.String |
getUsageType()
Configures how the quantity per period should be determined, can be either `metered` or
`licensed`.
|
int |
hashCode() |
static PlanCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params)
Returns a list of your plans.
|
static PlanCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Returns a list of your plans.
|
static Plan |
retrieve(java.lang.String plan)
Retrieves the plan with the given ID.
|
static Plan |
retrieve(java.lang.String plan,
java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Retrieves the plan with the given ID.
|
static Plan |
retrieve(java.lang.String plan,
RequestOptions options)
Retrieves the plan with the given ID.
|
void |
setActive(java.lang.Boolean active)
Whether the plan is currently available for new subscriptions.
|
void |
setAggregateUsage(java.lang.String aggregateUsage)
Specifies a usage aggregation strategy for plans of `usage_type=metered`.
|
void |
setAmount(java.lang.Long amount)
The amount in %s to be charged on the interval specified.
|
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](https://www.iso.org/iso-4217-currency-codes.html), 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 |
setInterval(java.lang.String interval)
One of `day`, `week`, `month` or `year`.
|
void |
setIntervalCount(java.lang.Long intervalCount)
The number of intervals (specified in the `interval` property) between subscription billings.
|
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 |
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 |
setTiers(java.util.List<Plan.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 |
setTransformUsage(Plan.TransformUsage transformUsage)
Apply a transformation to the reported usage or set quantity before computing the billed price.
|
void |
setTrialPeriodDays(java.lang.Long trialPeriodDays)
Default number of trial days when subscribing a customer to this plan using
[`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan).
|
void |
setUsageType(java.lang.String usageType)
Configures how the quantity per period should be determined, can be either `metered` or
`licensed`.
|
Plan |
update(java.util.Map<java.lang.String,java.lang.Object> params)
Updates the specified plan by setting the values of the parameters passed.
|
Plan |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options)
Updates the specified plan by setting the values of the parameters passed.
|
classUrl, classUrl, instanceUrl, instanceUrl, multipartRequest, request, requestCollection, setExpandableFieldId, setStripeResponseGetter, singleClassUrl, singleClassUrl, subresourceUrl, urlEncode
equals, getLastResponse, setLastResponse, toJson, toString
public java.lang.String getProduct()
public void setProduct(java.lang.String id)
public Product getProductObject()
public void setProductObject(Product expandableObject)
public static PlanCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static PlanCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Plan create(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public static Plan create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public static Plan retrieve(java.lang.String plan) throws StripeException
StripeException
public static Plan retrieve(java.lang.String plan, RequestOptions options) throws StripeException
StripeException
public static Plan retrieve(java.lang.String plan, java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public Plan update(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
update
in interface MetadataStore<Plan>
StripeException
public Plan update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
update
in interface MetadataStore<Plan>
StripeException
public Plan delete() throws StripeException
StripeException
public Plan delete(RequestOptions options) throws StripeException
StripeException
public Plan delete(java.util.Map<java.lang.String,java.lang.Object> params) throws StripeException
StripeException
public Plan delete(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws StripeException
StripeException
public java.lang.Boolean getActive()
public java.lang.String getAggregateUsage()
public java.lang.Long getAmount()
public java.lang.String getBillingScheme()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.Boolean getDeleted()
public java.lang.String getInterval()
public java.lang.Long getIntervalCount()
public java.lang.Boolean getLivemode()
public java.lang.String getNickname()
public java.lang.String getObject()
public java.util.List<Plan.Tier> getTiers()
public java.lang.String getTiersMode()
public Plan.TransformUsage getTransformUsage()
public java.lang.Long getTrialPeriodDays()
public java.lang.String getUsageType()
public void setActive(java.lang.Boolean active)
public void setAggregateUsage(java.lang.String aggregateUsage)
public void setAmount(java.lang.Long amount)
public void setBillingScheme(java.lang.String billingScheme)
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 setInterval(java.lang.String interval)
public void setIntervalCount(java.lang.Long intervalCount)
public void setLivemode(java.lang.Boolean livemode)
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)
public void setTiers(java.util.List<Plan.Tier> tiers)
public void setTiersMode(java.lang.String tiersMode)
public void setTransformUsage(Plan.TransformUsage transformUsage)
public void setTrialPeriodDays(java.lang.Long trialPeriodDays)
public void setUsageType(java.lang.String usageType)
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<Plan>