|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.paypal.api.payments.Agreement
public class Agreement
| Constructor Summary | |
|---|---|
Agreement()
Default Constructor |
|
Agreement(String name,
String description,
String startDate,
Payer payer,
Plan plan)
Parameterized Constructor |
|
| Method Summary | |
|---|---|
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. |
Agreement |
execute(APIContext apiContext)
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 |
static String |
getLastRequest()
Returns the last request sent to the Service |
static String |
getLastResponse()
Returns the last response returned by the Service |
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 |
static OAuthTokenCredential |
initConfig(File file)
Initialize using a File(Properties file) |
static OAuthTokenCredential |
initConfig(InputStream is)
Initialize using InputStream(of a Properties file) |
static OAuthTokenCredential |
initConfig(Properties properties)
Initialize using Properties |
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. |
String |
toJSON()
Returns a JSON string corresponding to object state |
String |
toString()
|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Agreement()
public Agreement(String name,
String description,
String startDate,
Payer payer,
Plan plan)
| Method Detail |
|---|
public static String getLastRequest()
public static String getLastResponse()
public static OAuthTokenCredential initConfig(InputStream is)
throws PayPalRESTException
is - InputStream
PayPalRESTException
public static OAuthTokenCredential initConfig(File file)
throws PayPalRESTException
file - File object of a properties entity
PayPalRESTExceptionpublic static OAuthTokenCredential initConfig(Properties properties)
properties - Properties object
public Agreement setId(String id)
public String getId()
public Agreement setState(String state)
public String getState()
public Agreement setName(String name)
public String getName()
public Agreement setDescription(String description)
public String getDescription()
public Agreement setStartDate(String startDate)
public String getStartDate()
public Agreement setAgreementDetails(AgreementDetails agreementDetails)
public AgreementDetails getAgreementDetails()
public Agreement setPayer(Payer payer)
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 Agreement setPlan(Plan plan)
public Plan getPlan()
public Agreement setCreateTime(String createTime)
public String getCreateTime()
public Agreement setUpdateTime(String updateTime)
public String getUpdateTime()
public Agreement setToken(String token)
public String getToken()
public Agreement setLinks(List<Links> links)
public List<Links> getLinks()
public Agreement create(String accessToken)
throws PayPalRESTException,
MalformedURLException,
UnsupportedEncodingException
accessToken - Access Token used for the API call.
PayPalRESTException
UnsupportedEncodingException
MalformedURLException
public Agreement create(APIContext apiContext)
throws PayPalRESTException,
MalformedURLException,
UnsupportedEncodingException
apiContext - APIContext used for the API call.
PayPalRESTException
MalformedURLException
UnsupportedEncodingException
public Agreement execute(String accessToken)
throws PayPalRESTException
accessToken - Access Token used for the API call.
PayPalRESTException
public Agreement execute(APIContext apiContext)
throws PayPalRESTException
apiContext - APIContext used for the API call.
PayPalRESTException
public static Agreement get(String accessToken,
String agreementId)
throws PayPalRESTException
accessToken - Access Token used for the API call.agreementId - String
PayPalRESTException
public static Agreement get(APIContext apiContext,
String agreementId)
throws PayPalRESTException
apiContext - APIContext used for the API call.agreementId - String
PayPalRESTException
public Agreement update(String accessToken,
List<Patch> patchRequest)
throws PayPalRESTException
accessToken - Access Token used for the API call.patchRequest - PatchRequest
PayPalRESTException
public Agreement update(APIContext apiContext,
List<Patch> patchRequest)
throws PayPalRESTException
apiContext - APIContext used for the API call.patchRequest - PatchRequest (list of patches)
PayPalRESTException
public void suspend(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void suspend(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void reActivate(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void reActivate(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void cancel(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void cancel(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void billBalance(String accessToken,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
accessToken - Access Token used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void billBalance(APIContext apiContext,
AgreementStateDescriptor agreementStateDescriptor)
throws PayPalRESTException
apiContext - APIContext used for the API call.agreementStateDescriptor - AgreementStateDescriptor
PayPalRESTException
public void setBalance(String accessToken,
Currency currency)
throws PayPalRESTException
accessToken - Access Token used for the API call.currency - Currency
PayPalRESTException
public void setBalance(APIContext apiContext,
Currency currency)
throws PayPalRESTException
apiContext - APIContext used for the API call.currency - Currency
PayPalRESTException
public static AgreementTransactions transactions(String accessToken,
String agreementId,
Date startDate,
Date endDate)
throws PayPalRESTException
accessToken - Access Token used for the API call.agreementId - String
PayPalRESTException
public static AgreementTransactions transactions(APIContext apiContext,
String agreementId,
Date startDate,
Date endDate)
throws PayPalRESTException
apiContext - APIContext used for the API call.agreementId - String
PayPalRESTExceptionpublic String toJSON()
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||