public class Plan extends PayPalResource
| Constructor and Description |
|---|
Plan()
Default Constructor
|
Plan(java.lang.String name,
java.lang.String description,
java.lang.String type)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(java.lang.Object other) |
Plan |
create(APIContext apiContext)
Create a new billing plan by passing the details for the plan, including the plan name, description, and type, to the request URI.
|
Plan |
create(java.lang.String accessToken)
Deprecated.
Please use
create(APIContext) instead. |
boolean |
equals(java.lang.Object o) |
static Plan |
get(APIContext apiContext,
java.lang.String planId)
Retrieve the details for a particular billing plan by passing the billing plan ID to the request URI.
|
static Plan |
get(java.lang.String accessToken,
java.lang.String planId)
Deprecated.
Please use
get(APIContext, String) instead. |
java.lang.String |
getCreateTime()
Time when the billing plan was created.
|
java.lang.String |
getDescription()
Description of the billing plan.
|
java.lang.String |
getId()
Identifier of the billing plan.
|
java.util.List<Links> |
getLinks() |
MerchantPreferences |
getMerchantPreferences()
Specific preferences such as: set up fee, max fail attempts, autobill amount, and others that are configured for this billing plan.
|
java.lang.String |
getName()
Name of the billing plan.
|
java.util.List<PaymentDefinition> |
getPaymentDefinitions()
Array of payment definitions for this billing plan.
|
java.lang.String |
getState()
Status of the billing plan.
|
java.util.List<Terms> |
getTerms()
Array of terms for this billing plan.
|
java.lang.String |
getType()
Type of the billing plan.
|
java.lang.String |
getUpdateTime()
Time when this billing plan was updated.
|
int |
hashCode() |
static PlanList |
list(APIContext apiContext,
java.util.Map<java.lang.String,java.lang.String> containerMap)
List billing plans according to optional query string parameters specified.
|
static PlanList |
list(java.lang.String accessToken,
java.util.Map<java.lang.String,java.lang.String> containerMap)
Deprecated.
Please use
list(APIContext, Map) instead. |
Plan |
setCreateTime(java.lang.String createTime)
Time when the billing plan was created.
|
Plan |
setDescription(java.lang.String description)
Description of the billing plan.
|
Plan |
setId(java.lang.String id)
Identifier of the billing plan.
|
Plan |
setLinks(java.util.List<Links> links) |
Plan |
setMerchantPreferences(MerchantPreferences merchantPreferences)
Specific preferences such as: set up fee, max fail attempts, autobill amount, and others that are configured for this billing plan.
|
Plan |
setName(java.lang.String name)
Name of the billing plan.
|
Plan |
setPaymentDefinitions(java.util.List<PaymentDefinition> paymentDefinitions)
Array of payment definitions for this billing plan.
|
Plan |
setState(java.lang.String state)
Status of the billing plan.
|
Plan |
setTerms(java.util.List<Terms> terms)
Array of terms for this billing plan.
|
Plan |
setType(java.lang.String type)
Type of the billing plan.
|
Plan |
setUpdateTime(java.lang.String updateTime)
Time when this billing plan was updated.
|
void |
update(APIContext apiContext,
java.util.List<Patch> patchRequest)
Replace specific fields within a billing plan by passing the ID of the billing plan to the request URI.
|
void |
update(java.lang.String accessToken,
java.util.List<Patch> patchRequest)
Deprecated.
Please use
update(APIContext, List) instead. |
configureAndExecute, configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientCredential, getClientID, getClientSecret, getConfigurations, getCredential, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefaulttoJSON, toStringpublic Plan()
public Plan(java.lang.String name,
java.lang.String description,
java.lang.String type)
public static Plan get(java.lang.String accessToken, java.lang.String planId) throws PayPalRESTException
get(APIContext, String) instead.accessToken - Access Token used for the API call.planId - StringPayPalRESTExceptionpublic static Plan get(APIContext apiContext, java.lang.String planId) throws PayPalRESTException
apiContext - APIContext used for the API call.planId - StringPayPalRESTExceptionpublic Plan create(java.lang.String accessToken) throws PayPalRESTException
create(APIContext) instead.accessToken - Access Token used for the API call.PayPalRESTExceptionpublic Plan create(APIContext apiContext) throws PayPalRESTException
apiContext - APIContext used for the API call.PayPalRESTExceptionpublic void update(java.lang.String accessToken,
java.util.List<Patch> patchRequest)
throws PayPalRESTException
update(APIContext, List) instead.accessToken - Access Token used for the API call.patchRequest - PatchRequestPayPalRESTExceptionpublic void update(APIContext apiContext, java.util.List<Patch> patchRequest) throws PayPalRESTException
apiContext - APIContext used for the API call.patchRequest - PatchRequestPayPalRESTExceptionpublic static PlanList list(java.lang.String accessToken, java.util.Map<java.lang.String,java.lang.String> containerMap) throws PayPalRESTException
list(APIContext, Map) instead.accessToken - Access Token used for the API call.containerMap - MapPayPalRESTExceptionpublic static PlanList list(APIContext apiContext, java.util.Map<java.lang.String,java.lang.String> containerMap) throws PayPalRESTException
apiContext - APIContext used for the API call.containerMap - MapPayPalRESTExceptionpublic java.lang.String getId()
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getType()
public java.lang.String getState()
public java.lang.String getCreateTime()
public java.lang.String getUpdateTime()
public java.util.List<PaymentDefinition> getPaymentDefinitions()
public java.util.List<Terms> getTerms()
public MerchantPreferences getMerchantPreferences()
public java.util.List<Links> getLinks()
public Plan setId(java.lang.String id)
public Plan setName(java.lang.String name)
public Plan setDescription(java.lang.String description)
public Plan setType(java.lang.String type)
public Plan setState(java.lang.String state)
public Plan setCreateTime(java.lang.String createTime)
public Plan setUpdateTime(java.lang.String updateTime)
public Plan setPaymentDefinitions(java.util.List<PaymentDefinition> paymentDefinitions)
public Plan setTerms(java.util.List<Terms> terms)
public Plan setMerchantPreferences(MerchantPreferences merchantPreferences)
public boolean equals(java.lang.Object o)
equals in class PayPalModelprotected boolean canEqual(java.lang.Object other)
canEqual in class PayPalModelpublic int hashCode()
hashCode in class PayPalModel