public class Agreement extends PayPalResource
| Constructor and Description |
|---|
Agreement()
Default Constructor
|
Agreement(String name,
String description,
String startDate,
Payer payer,
Plan plan)
Parameterized Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
billBalance(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Bill an outstanding amount for an agreement by passing the ID of the agreement to the request URI.
|
void |
billBalance(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Bill an outstanding amount for an agreement by passing the ID of the agreement to the request URI.
|
void |
cancel(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Cancel a billing agreement by passing the ID of the agreement to the request URI.
|
void |
cancel(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Cancel a billing agreement by passing the ID of the agreement to the request URI.
|
Agreement |
create(APIContext apiContext)
Create a new billing agreement by passing the details for the agreement, including the name, description, start date, payer, and billing plan in the request JSON.
|
Agreement |
create(String accessToken)
Create a new billing agreement by passing the details for the agreement, including the name, description, start date, payer, and billing plan in the request JSON.
|
static Agreement |
execute(APIContext apiContext,
String token)
Execute a billing agreement after buyer approval by passing the payment token to the request URI.
|
Agreement |
execute(String accessToken)
Execute a billing agreement after buyer approval by passing the payment token to the request URI.
|
static Agreement |
get(APIContext apiContext,
String agreementId)
Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI.
|
static Agreement |
get(String accessToken,
String agreementId)
Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI.
|
AgreementDetails |
getAgreementDetails()
Getter for agreementDetails
|
String |
getCreateTime()
Getter for createTime
|
String |
getDescription()
Getter for description
|
String |
getId()
Getter for id
|
List<Links> |
getLinks()
Getter for links
|
String |
getName()
Getter for name
|
List<OverrideChargeModel> |
getOverrideChargeModels()
Getter for overrideChargeModels
|
MerchantPreferences |
getOverrideMerchantPreferences()
Getter for overrideMerchantPreferences
|
Payer |
getPayer()
Getter for payer
|
Plan |
getPlan()
Getter for plan
|
Address |
getShippingAddress()
Getter for shippingAddress
|
String |
getStartDate()
Getter for startDate
|
String |
getState()
Getter for state
|
String |
getToken()
Getter for token
|
String |
getUpdateTime()
Getter for updateTime
|
void |
reActivate(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Reactivate a suspended billing agreement by passing the ID of the agreement to the appropriate URI.
|
void |
reActivate(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Reactivate a suspended billing agreement by passing the ID of the agreement to the appropriate URI.
|
Agreement |
setAgreementDetails(AgreementDetails agreementDetails)
Setter for agreementDetails
|
void |
setBalance(APIContext apiContext,
Currency currency)
Set the balance for an agreement by passing the ID of the agreement to the request URI.
|
void |
setBalance(String accessToken,
Currency currency)
Set the balance for an agreement by passing the ID of the agreement to the request URI.
|
Agreement |
setCreateTime(String createTime)
Setter for createTime
|
Agreement |
setDescription(String description)
Setter for description
|
Agreement |
setId(String id)
Setter for id
|
Agreement |
setLinks(List<Links> links)
Setter for links
|
Agreement |
setName(String name)
Setter for name
|
Agreement |
setOverrideChargeModels(List<OverrideChargeModel> overrideChargeModels)
Setter for overrideChargeModels
|
Agreement |
setOverrideMerchantPreferences(MerchantPreferences overrideMerchantPreferences)
Setter for overrideMerchantPreferences
|
Agreement |
setPayer(Payer payer)
Setter for payer
|
Agreement |
setPlan(Plan plan)
Setter for plan
|
Agreement |
setShippingAddress(Address shippingAddress)
Setter for shippingAddress
|
Agreement |
setStartDate(String startDate)
Setter for startDate
|
Agreement |
setState(String state)
Setter for state
|
Agreement |
setToken(String token)
Setter for token
|
Agreement |
setUpdateTime(String updateTime)
Setter for updateTime
|
void |
suspend(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Suspend a particular billing agreement by passing the ID of the agreement to the request URI.
|
void |
suspend(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Suspend a particular billing agreement by passing the ID of the agreement to the request URI.
|
static AgreementTransactions |
transactions(APIContext apiContext,
String agreementId,
Date startDate,
Date endDate)
List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI.
|
static AgreementTransactions |
transactions(String accessToken,
String agreementId,
Date startDate,
Date endDate)
List transactions for a billing agreement by passing the ID of the agreement, as well as the start and end dates of the range of transactions to list, to the request URI.
|
Agreement |
update(APIContext apiContext,
List<Patch> patchRequest)
Update details of a billing agreement, such as the description, shipping address, and start date, by passing the ID of the agreement to the request URI.
|
Agreement |
update(String accessToken,
List<Patch> patchRequest)
Update details of a billing agreement, such as the description, shipping address, and start date, by passing the ID of the agreement to the request URI.
|
configureAndExecute, configureAndExecute, configureAndExecute, createAPICallPreHandler, getClientID, getClientSecret, getConfigurations, getLastRequest, getLastResponse, getOAuthTokenCredential, initConfig, initConfig, initConfig, initializeToDefaultequals, hashCode, toJSON, toStringpublic String getId()
public String getState()
public String getName()
public String getDescription()
public String getStartDate()
public Agreement setAgreementDetails(AgreementDetails agreementDetails)
public AgreementDetails getAgreementDetails()
public Payer getPayer()
public Agreement setShippingAddress(Address shippingAddress)
public Address getShippingAddress()
public Agreement setOverrideMerchantPreferences(MerchantPreferences overrideMerchantPreferences)
public MerchantPreferences getOverrideMerchantPreferences()
public Agreement setOverrideChargeModels(List<OverrideChargeModel> overrideChargeModels)
public List<OverrideChargeModel> getOverrideChargeModels()
public Plan getPlan()
public String getCreateTime()
public String getUpdateTime()
public String getToken()
public Agreement create(String accessToken) throws PayPalRESTException, MalformedURLException, UnsupportedEncodingException
accessToken - Access Token used for the API call.PayPalRESTExceptionUnsupportedEncodingExceptionMalformedURLExceptionpublic Agreement create(APIContext apiContext) throws PayPalRESTException, MalformedURLException, UnsupportedEncodingException
apiContext - APIContext used for the API call.PayPalRESTExceptionMalformedURLExceptionUnsupportedEncodingExceptionpublic Agreement execute(String accessToken) throws PayPalRESTException
accessToken - Access Token used for the API call.PayPalRESTExceptionpublic static Agreement execute(APIContext apiContext, String token) throws PayPalRESTException
apiContext - APIContext used for the API call.token - payment token (e.g., EC-0JP008296V451950C)PayPalRESTExceptionpublic static Agreement get(String accessToken, String agreementId) throws PayPalRESTException
accessToken - Access Token used for the API call.agreementId - StringPayPalRESTExceptionpublic static Agreement get(APIContext apiContext, String agreementId) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementId - StringPayPalRESTExceptionpublic Agreement update(String accessToken, List<Patch> patchRequest) throws PayPalRESTException
accessToken - Access Token used for the API call.patchRequest - PatchRequestPayPalRESTExceptionpublic Agreement update(APIContext apiContext, List<Patch> patchRequest) throws PayPalRESTException
apiContext - APIContext used for the API call.patchRequest - PatchRequest (list of patches)PayPalRESTExceptionpublic void suspend(String accessToken, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void suspend(APIContext apiContext, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void reActivate(String accessToken, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void reActivate(APIContext apiContext, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void cancel(String accessToken, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void cancel(APIContext apiContext, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void billBalance(String accessToken, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void billBalance(APIContext apiContext, AgreementStateDescriptor agreementStateDescriptor) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptorPayPalRESTExceptionpublic void setBalance(String accessToken, Currency currency) throws PayPalRESTException
accessToken - Access Token used for the API call.currency - CurrencyPayPalRESTExceptionpublic void setBalance(APIContext apiContext, Currency currency) throws PayPalRESTException
apiContext - APIContext used for the API call.currency - CurrencyPayPalRESTExceptionpublic static AgreementTransactions transactions(String accessToken, String agreementId, Date startDate, Date endDate) throws PayPalRESTException
accessToken - Access Token used for the API call.agreementId - StringPayPalRESTExceptionpublic static AgreementTransactions transactions(APIContext apiContext, String agreementId, Date startDate, Date endDate) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementId - StringPayPalRESTExceptionCopyright © 2015. All Rights Reserved.