HasId
, MetadataStore<Plan>
public class Plan extends APIResource implements MetadataStore<Plan>, HasId
APIResource.RequestMethod, APIResource.RequestType
CHARSET, GSON
PRETTY_PRINT_GSON
Constructor | Description |
---|---|
Plan() |
Modifier and Type | Method | Description |
---|---|---|
static PlanCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params) |
Deprecated.
Use the
list(Map) method instead.
This method will be removed in the next major version. |
static PlanCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options) |
Deprecated.
Use the
list(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
static PlanCollection |
all(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey) |
Deprecated.
Use the
list(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
protected boolean |
canEqual(java.lang.Object other) |
|
static Plan |
create(java.util.Map<java.lang.String,java.lang.Object> params) |
Create a plan.
|
static Plan |
create(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options) |
Create a plan.
|
static Plan |
create(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey) |
Deprecated.
Use the
create(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
DeletedPlan |
delete() |
Delete a plan.
|
DeletedPlan |
delete(RequestOptions options) |
Delete a plan.
|
DeletedPlan |
delete(java.lang.String apiKey) |
Deprecated.
Use the
delete(RequestOptions) method instead.
This method will be removed in the next major version. |
boolean |
equals(java.lang.Object o) |
|
java.lang.Boolean |
getActive() |
|
java.lang.Long |
getAmount() |
|
java.lang.String |
getBillingScheme() |
|
java.lang.Long |
getCreated() |
|
java.lang.String |
getCurrency() |
|
java.lang.String |
getId() |
|
java.lang.String |
getInterval() |
|
java.lang.Integer |
getIntervalCount() |
|
java.lang.Boolean |
getLivemode() |
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata() |
|
java.lang.String |
getName() |
Deprecated.
Prefer using the
getProduct().getName() method instead. |
java.lang.String |
getNickname() |
|
java.lang.String |
getObject() |
|
java.lang.String |
getProduct() |
|
Product |
getProductObject() |
|
java.lang.String |
getStatementDescription() |
Deprecated.
Prefer using the
getProduct().getStatementDescriptor() method instead. |
java.lang.String |
getStatementDescriptor() |
Deprecated.
Prefer using the
getProduct().getStatementDescriptor() method instead. |
java.util.List<PlanTier> |
getTiers() |
|
java.lang.String |
getTiersMode() |
|
PlanTransformUsage |
getTransformUsage() |
|
java.lang.Integer |
getTrialPeriodDays() |
Deprecated.
Prefer using the
Subscription.create(java.util.Map<java.lang.String, java.lang.Object>) method with the trial_end
parameter instead. |
java.lang.String |
getUsageType() |
|
int |
hashCode() |
|
static PlanCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params) |
List all plans.
|
static PlanCollection |
list(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options) |
List all plans.
|
static Plan |
retrieve(java.lang.String id) |
Retrieve a plan.
|
static Plan |
retrieve(java.lang.String id,
RequestOptions options) |
Retrieve a plan.
|
static Plan |
retrieve(java.lang.String id,
java.lang.String apiKey) |
Deprecated.
Use the
retrieve(String, RequestOptions) method instead.
This method will be removed in the next major version. |
void |
setActive(java.lang.Boolean active) |
|
void |
setAmount(java.lang.Long amount) |
|
void |
setBillingScheme(java.lang.String billingScheme) |
|
void |
setCreated(java.lang.Long created) |
|
void |
setCurrency(java.lang.String currency) |
|
void |
setId(java.lang.String id) |
|
void |
setInterval(java.lang.String interval) |
|
void |
setIntervalCount(java.lang.Integer intervalCount) |
|
void |
setLivemode(java.lang.Boolean livemode) |
|
void |
setMetadata(java.util.Map<java.lang.String,java.lang.String> metadata) |
|
void |
setName(java.lang.String name) |
Deprecated.
Prefer using the
getProduct().getName() method instead. |
void |
setNickname(java.lang.String nickname) |
|
void |
setObject(java.lang.String object) |
|
void |
setProduct(java.lang.String productID) |
|
void |
setProductObject(Product product) |
|
void |
setStatementDescription(java.lang.String statementDescription) |
Deprecated.
Prefer using the
getProduct().getStatementDescriptor() method instead. |
void |
setStatementDescriptor(java.lang.String statementDescriptor) |
Deprecated.
Prefer using the
getProduct().getStatementDescriptor() method instead. |
void |
setTiers(java.util.List<PlanTier> tiers) |
|
void |
setTiersMode(java.lang.String tiersMode) |
|
void |
setTransformUsage(PlanTransformUsage transformUsage) |
|
void |
setTrialPeriodDays(java.lang.Integer trialPeriodDays) |
Deprecated.
Prefer using the
Subscription.create(java.util.Map<java.lang.String, java.lang.Object>) method with the trial_end
parameter instead. |
void |
setUsageType(java.lang.String usageType) |
|
Plan |
update(java.util.Map<java.lang.String,java.lang.Object> params) |
Update a plan.
|
Plan |
update(java.util.Map<java.lang.String,java.lang.Object> params,
RequestOptions options) |
Update a plan.
|
Plan |
update(java.util.Map<java.lang.String,java.lang.Object> params,
java.lang.String apiKey) |
Deprecated.
Use the
update(Map, RequestOptions) method instead.
This method will be removed in the next major version. |
classURL, classURL, instanceURL, instanceURL, multipartRequest, request, requestCollection, setExpandableFieldID, setStripeResponseGetter, singleClassURL, singleClassURL, subresourceURL, urlEncode
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getLastResponse, setLastResponse, toJson, toString
public java.lang.String getProduct()
public void setProduct(java.lang.String productID)
public Product getProductObject()
public void setProductObject(Product product)
@Deprecated public static PlanCollection all(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map)
method instead.
This method will be removed in the next major version.@Deprecated public static PlanCollection all(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map, RequestOptions)
method instead.
This method will be removed in the next major version.@Deprecated public static PlanCollection all(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
list(Map, RequestOptions)
method instead.
This method will be removed in the next major version.public static Plan create(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Plan create(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Plan create(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
create(Map, RequestOptions)
method instead.
This method will be removed in the next major version.public DeletedPlan delete() throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public DeletedPlan delete(RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public DeletedPlan delete(java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
delete(RequestOptions)
method instead.
This method will be removed in the next major version.public static PlanCollection list(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static PlanCollection list(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Plan retrieve(java.lang.String id) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
public static Plan retrieve(java.lang.String id, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
@Deprecated public static Plan retrieve(java.lang.String id, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
retrieve(String, RequestOptions)
method instead.
This method will be removed in the next major version.public Plan update(java.util.Map<java.lang.String,java.lang.Object> params) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update
in interface MetadataStore<Plan>
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
public Plan update(java.util.Map<java.lang.String,java.lang.Object> params, RequestOptions options) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update
in interface MetadataStore<Plan>
AuthenticationException
InvalidRequestException
APIConnectionException
CardException
APIException
@Deprecated public Plan update(java.util.Map<java.lang.String,java.lang.Object> params, java.lang.String apiKey) throws AuthenticationException, InvalidRequestException, APIConnectionException, CardException, APIException
update(Map, RequestOptions)
method instead.
This method will be removed in the next major version.public java.lang.String getObject()
public java.lang.Boolean getActive()
public java.lang.Long getAmount()
public java.lang.String getBillingScheme()
public java.lang.Long getCreated()
public java.lang.String getCurrency()
public java.lang.String getInterval()
public java.lang.Integer getIntervalCount()
public java.lang.Boolean getLivemode()
public java.lang.String getNickname()
public java.util.List<PlanTier> getTiers()
public java.lang.String getTiersMode()
public PlanTransformUsage getTransformUsage()
public java.lang.String getUsageType()
@Deprecated public java.lang.String getName()
getProduct().getName()
method instead.name
attribute.name
attribute@Deprecated public java.lang.String getStatementDescription()
getProduct().getStatementDescriptor()
method instead.statement_description
attribute.statement_description
attribute@Deprecated public java.lang.String getStatementDescriptor()
getProduct().getStatementDescriptor()
method instead.statement_descriptor
attribute.statement_descriptor
attribute@Deprecated public java.lang.Integer getTrialPeriodDays()
Subscription.create(java.util.Map<java.lang.String, java.lang.Object>)
method with the trial_end
parameter instead.trial_period_days
attribute.trial_period_days
attributepublic void setId(java.lang.String id)
public void setObject(java.lang.String object)
public void setActive(java.lang.Boolean active)
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 setInterval(java.lang.String interval)
public void setIntervalCount(java.lang.Integer 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 setTiers(java.util.List<PlanTier> tiers)
public void setTiersMode(java.lang.String tiersMode)
public void setTransformUsage(PlanTransformUsage transformUsage)
public void setUsageType(java.lang.String usageType)
@Deprecated public void setName(java.lang.String name)
getProduct().getName()
method instead.name
attribute.@Deprecated public void setStatementDescription(java.lang.String statementDescription)
getProduct().getStatementDescriptor()
method instead.statement_description
attribute.@Deprecated public void setStatementDescriptor(java.lang.String statementDescriptor)
getProduct().getStatementDescriptor()
method instead.statement_descriptor
attribute.@Deprecated public void setTrialPeriodDays(java.lang.Integer trialPeriodDays)
Subscription.create(java.util.Map<java.lang.String, java.lang.Object>)
method with the trial_end
parameter instead.trial_period_days
attribute.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.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface MetadataStore<Plan>