public class Agreement extends PayPalResource
| Constructor and Description |
|---|
Agreement()
Default Constructor
|
Agreement(java.lang.String name,
java.lang.String description,
java.lang.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(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Deprecated.
Please use
billBalance(APIContext, AgreementStateDescriptor) instead. |
void |
cancel(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Cancel a billing agreement by passing the ID of the agreement to the request URI.
|
void |
cancel(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Deprecated.
Please use
cancel(APIContext, AgreementStateDescriptor) instead. |
protected boolean |
canEqual(java.lang.Object other) |
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(java.lang.String accessToken)
Deprecated.
Please use
create(APIContext) instead. |
boolean |
equals(java.lang.Object o) |
static Agreement |
execute(APIContext apiContext,
java.lang.String token)
Execute a billing agreement after buyer approval by passing the payment token to the request URI.
|
Agreement |
execute(java.lang.String accessToken)
Deprecated.
Please use
execute(APIContext, String) instead. |
static Agreement |
get(APIContext apiContext,
java.lang.String agreementId)
Retrieve details for a particular billing agreement by passing the ID of the agreement to the request URI.
|
static Agreement |
get(java.lang.String accessToken,
java.lang.String agreementId)
Deprecated.
Please use
get(APIContext, String) instead. |
AgreementDetails |
getAgreementDetails()
Details of the agreement.
|
java.lang.String |
getCreateTime()
Date and time that this resource was created.
|
java.lang.String |
getDescription()
Description of the agreement.
|
java.lang.String |
getId()
Identifier of the agreement.
|
java.util.List<Links> |
getLinks() |
java.lang.String |
getName()
Name of the agreement.
|
java.util.List<OverrideChargeModel> |
getOverrideChargeModels()
Array of override_charge_model for this agreement if needed to change the default models from the billing plan.
|
MerchantPreferences |
getOverrideMerchantPreferences()
Default merchant preferences from the billing plan are used, unless override preferences are provided here.
|
Payer |
getPayer()
Details of the buyer who is enrolling in this agreement.
|
Plan |
getPlan()
Plan details for this agreement.
|
Address |
getShippingAddress()
Shipping address object of the agreement, which should be provided if it is different from the default address.
|
java.lang.String |
getStartDate()
Start date of the agreement.
|
java.lang.String |
getState()
State of the agreement
|
java.lang.String |
getToken()
Payment token
|
java.lang.String |
getUpdateTime()
Date and time that this resource was updated.
|
int |
hashCode() |
void |
reActivate(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Reactivate a suspended billing agreement by passing the ID of the agreement to the appropriate URI.
|
void |
reActivate(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Deprecated.
Please use
reActivate(APIContext, AgreementStateDescriptor) instead. |
Agreement |
setAgreementDetails(AgreementDetails agreementDetails)
Details of the agreement.
|
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(java.lang.String accessToken,
Currency currency)
Deprecated.
Please use
setBalance(APIContext, Currency) instead. |
Agreement |
setCreateTime(java.lang.String createTime)
Date and time that this resource was created.
|
Agreement |
setDescription(java.lang.String description)
Description of the agreement.
|
Agreement |
setId(java.lang.String id)
Identifier of the agreement.
|
Agreement |
setLinks(java.util.List<Links> links) |
Agreement |
setName(java.lang.String name)
Name of the agreement.
|
Agreement |
setOverrideChargeModels(java.util.List<OverrideChargeModel> overrideChargeModels)
Array of override_charge_model for this agreement if needed to change the default models from the billing plan.
|
Agreement |
setOverrideMerchantPreferences(MerchantPreferences overrideMerchantPreferences)
Default merchant preferences from the billing plan are used, unless override preferences are provided here.
|
Agreement |
setPayer(Payer payer)
Details of the buyer who is enrolling in this agreement.
|
Agreement |
setPlan(Plan plan)
Plan details for this agreement.
|
Agreement |
setShippingAddress(Address shippingAddress)
Shipping address object of the agreement, which should be provided if it is different from the default address.
|
Agreement |
setStartDate(java.lang.String startDate)
Start date of the agreement.
|
Agreement |
setState(java.lang.String state)
State of the agreement
|
Agreement |
setToken(java.lang.String token)
Payment token
|
Agreement |
setUpdateTime(java.lang.String updateTime)
Date and time that this resource was updated.
|
void |
suspend(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
Suspend a particular billing agreement by passing the ID of the agreement to the request URI.
|
void |
suspend(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
Deprecated.
Please use
suspend(APIContext, AgreementStateDescriptor) instead. |
static AgreementTransactions |
transactions(APIContext apiContext,
java.lang.String agreementId,
java.util.Date startDate,
java.util.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(java.lang.String accessToken,
java.lang.String agreementId,
java.util.Date startDate,
java.util.Date endDate)
Deprecated.
Please use
transactions(APIContext, String, Date, Date) instead. |
Agreement |
update(APIContext apiContext,
java.util.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(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 Agreement create(java.lang.String accessToken) throws PayPalRESTException, java.net.MalformedURLException, java.io.UnsupportedEncodingException
create(APIContext) instead.accessToken - Access Token used for the API call.PayPalRESTExceptionjava.io.UnsupportedEncodingExceptionjava.net.MalformedURLExceptionpublic Agreement create(APIContext apiContext) throws PayPalRESTException, java.net.MalformedURLException, java.io.UnsupportedEncodingException
apiContext - APIContext used for the API call.PayPalRESTExceptionjava.net.MalformedURLExceptionjava.io.UnsupportedEncodingExceptionpublic Agreement execute(java.lang.String accessToken) throws PayPalRESTException
execute(APIContext, String) instead.accessToken - Access Token used for the API call.PayPalRESTExceptionpublic static Agreement execute(APIContext apiContext, java.lang.String token) throws PayPalRESTException
apiContext - APIContext used for the API call.token - payment token (e.g., EC-0JP008296V451950C)PayPalRESTExceptionpublic static Agreement get(java.lang.String accessToken, java.lang.String agreementId) throws PayPalRESTException
get(APIContext, String) instead.accessToken - Access Token used for the API call.agreementId - StringPayPalRESTExceptionpublic static Agreement get(APIContext apiContext, java.lang.String agreementId) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementId - StringPayPalRESTExceptionpublic Agreement 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 Agreement update(APIContext apiContext, java.util.List<Patch> patchRequest) throws PayPalRESTException
apiContext - APIContext used for the API call.patchRequest - PatchRequest (list of patches)PayPalRESTExceptionpublic void suspend(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
suspend(APIContext, AgreementStateDescriptor) instead.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(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
reActivate(APIContext, AgreementStateDescriptor) instead.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(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
cancel(APIContext, AgreementStateDescriptor) instead.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(java.lang.String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
billBalance(APIContext, AgreementStateDescriptor) instead.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(java.lang.String accessToken,
Currency currency)
throws PayPalRESTException
setBalance(APIContext, Currency) instead.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(java.lang.String accessToken, java.lang.String agreementId, java.util.Date startDate, java.util.Date endDate) throws PayPalRESTException
transactions(APIContext, String, Date, Date) instead.accessToken - Access Token used for the API call.agreementId - StringPayPalRESTExceptionpublic static AgreementTransactions transactions(APIContext apiContext, java.lang.String agreementId, java.util.Date startDate, java.util.Date endDate) throws PayPalRESTException
apiContext - APIContext used for the API call.agreementId - StringPayPalRESTExceptionpublic java.lang.String getId()
public java.lang.String getState()
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getStartDate()
public AgreementDetails getAgreementDetails()
public Payer getPayer()
public Address getShippingAddress()
public MerchantPreferences getOverrideMerchantPreferences()
public java.util.List<OverrideChargeModel> getOverrideChargeModels()
public Plan getPlan()
public java.lang.String getCreateTime()
public java.lang.String getUpdateTime()
public java.lang.String getToken()
public java.util.List<Links> getLinks()
public Agreement setId(java.lang.String id)
public Agreement setState(java.lang.String state)
public Agreement setName(java.lang.String name)
public Agreement setDescription(java.lang.String description)
public Agreement setStartDate(java.lang.String startDate)
public Agreement setAgreementDetails(AgreementDetails agreementDetails)
public Agreement setPayer(Payer payer)
public Agreement setShippingAddress(Address shippingAddress)
public Agreement setOverrideMerchantPreferences(MerchantPreferences overrideMerchantPreferences)
public Agreement setOverrideChargeModels(java.util.List<OverrideChargeModel> overrideChargeModels)
public Agreement setCreateTime(java.lang.String createTime)
public Agreement setUpdateTime(java.lang.String updateTime)
public Agreement setToken(java.lang.String token)
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