public class Plan extends PayPalResource
Constructor and Description |
---|
Plan()
Default Constructor
|
Plan(String name,
String description,
String type)
Parameterized Constructor
|
Modifier and Type | Method and Description |
---|---|
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(String accessToken)
Create a new billing plan by passing the details for the plan, including the plan name, description, and type, to the request URI.
|
static Plan |
get(APIContext apiContext,
String planId)
Retrieve the details for a particular billing plan by passing the billing plan ID to the request URI.
|
static Plan |
get(String accessToken,
String planId)
Retrieve the details for a particular billing plan by passing the billing plan ID to the request URI.
|
String |
getCreateTime()
Getter for createTime
|
String |
getDescription()
Getter for description
|
String |
getId()
Getter for id
|
List<Links> |
getLinks()
Getter for links
|
MerchantPreferences |
getMerchantPreferences()
Getter for merchantPreferences
|
String |
getName()
Getter for name
|
List<PaymentDefinition> |
getPaymentDefinitions()
Getter for paymentDefinitions
|
String |
getState()
Getter for state
|
List<Terms> |
getTerms()
Getter for terms
|
String |
getType()
Getter for type
|
String |
getUpdateTime()
Getter for updateTime
|
static PlanList |
list(APIContext apiContext,
Map<String,String> containerMap)
List billing plans according to optional query string parameters specified.
|
static PlanList |
list(String accessToken,
Map<String,String> containerMap)
List billing plans according to optional query string parameters specified.
|
Plan |
setCreateTime(String createTime)
Setter for createTime
|
Plan |
setDescription(String description)
Setter for description
|
Plan |
setId(String id)
Setter for id
|
Plan |
setLinks(List<Links> links)
Setter for links
|
Plan |
setMerchantPreferences(MerchantPreferences merchantPreferences)
Setter for merchantPreferences
|
Plan |
setName(String name)
Setter for name
|
Plan |
setPaymentDefinitions(List<PaymentDefinition> paymentDefinitions)
Setter for paymentDefinitions
|
Plan |
setState(String state)
Setter for state
|
Plan |
setTerms(List<Terms> terms)
Setter for terms
|
Plan |
setType(String type)
Setter for type
|
Plan |
setUpdateTime(String updateTime)
Setter for updateTime
|
void |
update(APIContext apiContext,
List<Patch> patchRequest)
Replace specific fields within a billing plan by passing the ID of the billing plan to the request URI.
|
void |
update(String accessToken,
List<Patch> patchRequest)
Replace specific fields within a billing plan by passing the ID of the billing plan to the request URI.
|
configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientID, getClientSecret, getConfigurations, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefault
equals, hashCode, toJSON, toString
public String getId()
public String getName()
public String getDescription()
public String getType()
public String getState()
public String getCreateTime()
public String getUpdateTime()
public Plan setPaymentDefinitions(List<PaymentDefinition> paymentDefinitions)
public List<PaymentDefinition> getPaymentDefinitions()
public Plan setMerchantPreferences(MerchantPreferences merchantPreferences)
public MerchantPreferences getMerchantPreferences()
public static Plan get(String accessToken, String planId) throws PayPalRESTException
accessToken
- Access Token used for the API call.planId
- StringPayPalRESTException
public static Plan get(APIContext apiContext, String planId) throws PayPalRESTException
apiContext
- APIContext
used for the API call.planId
- StringPayPalRESTException
public Plan create(String accessToken) throws PayPalRESTException
accessToken
- Access Token used for the API call.PayPalRESTException
public Plan create(APIContext apiContext) throws PayPalRESTException
apiContext
- APIContext
used for the API call.PayPalRESTException
public void update(String accessToken, List<Patch> patchRequest) throws PayPalRESTException
accessToken
- Access Token used for the API call.patchRequest
- PatchRequestPayPalRESTException
public void update(APIContext apiContext, List<Patch> patchRequest) throws PayPalRESTException
apiContext
- APIContext
used for the API call.patchRequest
- PatchRequestPayPalRESTException
public static PlanList list(String accessToken, Map<String,String> containerMap) throws PayPalRESTException
accessToken
- Access Token used for the API call.containerMap
- MapPayPalRESTException
public static PlanList list(APIContext apiContext, Map<String,String> containerMap) throws PayPalRESTException
apiContext
- APIContext
used for the API call.containerMap
- MapPayPalRESTException
Copyright © 2015. All Rights Reserved.