com.paypal.api.payments
Class Payment

java.lang.Object
  extended by com.paypal.api.payments.Payment

public class Payment
extends Object


Constructor Summary
Payment()
          Default Constructor
Payment(String intent, Payer payer, List<Transaction> transactions)
          Parameterized Constructor
 
Method Summary
 Payment create(com.paypal.core.rest.APIContext apiContext)
          Creates (and processes) a new Payment Resource.
 Payment create(String accessToken)
          Creates (and processes) a new Payment Resource.
 Payment execute(com.paypal.core.rest.APIContext apiContext, PaymentExecution paymentExecution)
          Executes the payment (after approved by the Payer) associated with this resource when the payment method is PayPal.
 Payment execute(String accessToken, PaymentExecution paymentExecution)
          Executes the payment (after approved by the Payer) associated with this resource when the payment method is PayPal.
static PaymentHistory get(com.paypal.core.rest.APIContext apiContext, Map<String,String> containerMap)
          Deprecated.  
static PaymentHistory get(com.paypal.core.rest.APIContext apiContext, com.paypal.core.rest.QueryParameters queryParameters)
          Deprecated.  
static Payment get(com.paypal.core.rest.APIContext apiContext, String paymentId)
          Obtain the Payment resource for the given identifier.
static PaymentHistory get(String accessToken, Map<String,String> containerMap)
          Deprecated.  
static PaymentHistory get(String accessToken, com.paypal.core.rest.QueryParameters queryParameters)
          Deprecated.  
static Payment get(String accessToken, String paymentId)
          Obtain the Payment resource for the given identifier.
 String getCreateTime()
          Getter for createTime
 String getId()
          Getter for id
 String getIntent()
          Getter for intent
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
 Payer getPayer()
          Getter for payer
 RedirectUrls getRedirectUrls()
          Getter for redirectUrls
 String getState()
          Getter for state
 List<Transaction> getTransactions()
          Getter for transactions
 String getUpdateTime()
          Getter for updateTime
static void initConfig(File file)
          Initialize using a File(Properties file)
static void initConfig(InputStream is)
          Initialize using InputStream(of a Properties file)
static void initConfig(Properties properties)
          Initialize using Properties
static PaymentHistory list(com.paypal.core.rest.APIContext apiContext, Map<String,String> containerMap)
          Retrieves a list of Payment resources.
static PaymentHistory list(com.paypal.core.rest.APIContext apiContext, com.paypal.core.rest.QueryParameters queryParameters)
          Deprecated.  
static PaymentHistory list(String accessToken, Map<String,String> containerMap)
          Retrieves a list of Payment resources.
static PaymentHistory list(String accessToken, com.paypal.core.rest.QueryParameters queryParameters)
          Deprecated.  
 Payment setCreateTime(String createTime)
          Setter for createTime
 Payment setId(String id)
          Setter for id
 Payment setIntent(String intent)
          Setter for intent
 Payment setLinks(List<Links> links)
          Setter for links
 Payment setPayer(Payer payer)
          Setter for payer
 Payment setRedirectUrls(RedirectUrls redirectUrls)
          Setter for redirectUrls
 Payment setState(String state)
          Setter for state
 Payment setTransactions(List<Transaction> transactions)
          Setter for transactions
 Payment setUpdateTime(String updateTime)
          Setter for updateTime
 String toJSON()
          Returns a JSON string corresponding to object state
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Payment

public Payment()
Default Constructor


Payment

public Payment(String intent,
               Payer payer,
               List<Transaction> transactions)
Parameterized Constructor

Method Detail

getLastRequest

public static String getLastRequest()
Returns the last request sent to the Service

Returns:
Last request sent to the server

getLastResponse

public static String getLastResponse()
Returns the last response returned by the Service

Returns:
Last response got from the Service

initConfig

public static void initConfig(InputStream is)
                       throws com.paypal.core.rest.PayPalRESTException
Initialize using InputStream(of a Properties file)

Parameters:
is - InputStream
Throws:
com.paypal.core.rest.PayPalRESTException

initConfig

public static void initConfig(File file)
                       throws com.paypal.core.rest.PayPalRESTException
Initialize using a File(Properties file)

Parameters:
file - File object of a properties entity
Throws:
com.paypal.core.rest.PayPalRESTException

initConfig

public static void initConfig(Properties properties)
Initialize using Properties

Parameters:
properties - Properties object

setId

public Payment setId(String id)
Setter for id


getId

public String getId()
Getter for id


setCreateTime

public Payment setCreateTime(String createTime)
Setter for createTime


getCreateTime

public String getCreateTime()
Getter for createTime


setUpdateTime

public Payment setUpdateTime(String updateTime)
Setter for updateTime


getUpdateTime

public String getUpdateTime()
Getter for updateTime


setIntent

public Payment setIntent(String intent)
Setter for intent


getIntent

public String getIntent()
Getter for intent


setPayer

public Payment setPayer(Payer payer)
Setter for payer


getPayer

public Payer getPayer()
Getter for payer


setTransactions

public Payment setTransactions(List<Transaction> transactions)
Setter for transactions


getTransactions

public List<Transaction> getTransactions()
Getter for transactions


setState

public Payment setState(String state)
Setter for state


getState

public String getState()
Getter for state


setRedirectUrls

public Payment setRedirectUrls(RedirectUrls redirectUrls)
Setter for redirectUrls


getRedirectUrls

public RedirectUrls getRedirectUrls()
Getter for redirectUrls


setLinks

public Payment setLinks(List<Links> links)
Setter for links


getLinks

public List<Links> getLinks()
Getter for links


create

public Payment create(String accessToken)
               throws com.paypal.core.rest.PayPalRESTException
Creates (and processes) a new Payment Resource.

Parameters:
accessToken - Access Token used for the API call.
Returns:
Payment
Throws:
com.paypal.core.rest.PayPalRESTException

create

public Payment create(com.paypal.core.rest.APIContext apiContext)
               throws com.paypal.core.rest.PayPalRESTException
Creates (and processes) a new Payment Resource.

Parameters:
apiContext - APIContext used for the API call.
Returns:
Payment
Throws:
com.paypal.core.rest.PayPalRESTException

get

public static Payment get(String accessToken,
                          String paymentId)
                   throws com.paypal.core.rest.PayPalRESTException
Obtain the Payment resource for the given identifier.

Parameters:
accessToken - Access Token used for the API call.
paymentId - String
Returns:
Payment
Throws:
com.paypal.core.rest.PayPalRESTException

get

public static Payment get(com.paypal.core.rest.APIContext apiContext,
                          String paymentId)
                   throws com.paypal.core.rest.PayPalRESTException
Obtain the Payment resource for the given identifier.

Parameters:
apiContext - APIContext used for the API call.
paymentId - String
Returns:
Payment
Throws:
com.paypal.core.rest.PayPalRESTException

execute

public Payment execute(String accessToken,
                       PaymentExecution paymentExecution)
                throws com.paypal.core.rest.PayPalRESTException
Executes the payment (after approved by the Payer) associated with this resource when the payment method is PayPal.

Parameters:
accessToken - Access Token used for the API call.
paymentExecution - PaymentExecution
Returns:
Payment
Throws:
com.paypal.core.rest.PayPalRESTException

execute

public Payment execute(com.paypal.core.rest.APIContext apiContext,
                       PaymentExecution paymentExecution)
                throws com.paypal.core.rest.PayPalRESTException
Executes the payment (after approved by the Payer) associated with this resource when the payment method is PayPal.

Parameters:
apiContext - APIContext used for the API call.
paymentExecution - PaymentExecution
Returns:
Payment
Throws:
com.paypal.core.rest.PayPalRESTException

list

public static PaymentHistory list(String accessToken,
                                  Map<String,String> containerMap)
                           throws com.paypal.core.rest.PayPalRESTException
Retrieves a list of Payment resources.

Parameters:
accessToken - Access Token used for the API call.
containerMap - Map containing the query strings with the following values as keys: count, start_id, start_index, start_time, end_time, payee_id, sort_by, sort_order, All other keys in the map are ignored by the SDK
Returns:
PaymentHistory
Throws:
com.paypal.core.rest.PayPalRESTException

list

public static PaymentHistory list(com.paypal.core.rest.APIContext apiContext,
                                  Map<String,String> containerMap)
                           throws com.paypal.core.rest.PayPalRESTException
Retrieves a list of Payment resources.

Parameters:
apiContext - APIContext used for the API call.
containerMap - Map containing the query strings with the following values as keys: count, start_id, start_index, start_time, end_time, payee_id, sort_by, sort_order, All other keys in the map are ignored by the SDK
Returns:
PaymentHistory
Throws:
com.paypal.core.rest.PayPalRESTException

get

public static PaymentHistory get(String accessToken,
                                 Map<String,String> containerMap)
                          throws com.paypal.core.rest.PayPalRESTException
Deprecated. 

Get call for Payment.

Parameters:
accessToken - AccessToken used for the API call
containerMap - Map containing the query strings with the following values as keys: count, start_id, start_index, start_time, end_time, payee_id, sort_by, sort_order, All other keys in the map are ignored by the SDK
Returns:
PaymentHistory
Throws:
com.paypal.core.rest.PayPalRESTException

get

public static PaymentHistory get(com.paypal.core.rest.APIContext apiContext,
                                 Map<String,String> containerMap)
                          throws com.paypal.core.rest.PayPalRESTException
Deprecated. 

Get call for Payment.

Parameters:
apiContext - APIContext to be used for the call.
containerMap - Map containing the query strings with the following values as keys: count, start_id, start_index, start_time, end_time, payee_id, sort_by, sort_order, All other keys in the map are ignored by the SDK
Returns:
PaymentHistory
Throws:
com.paypal.core.rest.PayPalRESTException

get

public static PaymentHistory get(String accessToken,
                                 com.paypal.core.rest.QueryParameters queryParameters)
                          throws com.paypal.core.rest.PayPalRESTException
Deprecated. 

Get call for Payment.

Parameters:
accessToken - AccessToken used for the API call
queryParameters - Container for query strings
Returns:
PaymentHistory
Throws:
com.paypal.core.rest.PayPalRESTException

get

public static PaymentHistory get(com.paypal.core.rest.APIContext apiContext,
                                 com.paypal.core.rest.QueryParameters queryParameters)
                          throws com.paypal.core.rest.PayPalRESTException
Deprecated. 

Get call for Payment.

Parameters:
apiContext - APIContext to be used for the call.
queryParameters - Container for query strings
Returns:
PaymentHistory
Throws:
com.paypal.core.rest.PayPalRESTException

list

public static PaymentHistory list(String accessToken,
                                  com.paypal.core.rest.QueryParameters queryParameters)
                           throws com.paypal.core.rest.PayPalRESTException
Deprecated. 

Retrieves a list of Payment resources.

Throws:
com.paypal.core.rest.PayPalRESTException

list

public static PaymentHistory list(com.paypal.core.rest.APIContext apiContext,
                                  com.paypal.core.rest.QueryParameters queryParameters)
                           throws com.paypal.core.rest.PayPalRESTException
Deprecated. 

Retrieves a list of Payment resources.

Throws:
com.paypal.core.rest.PayPalRESTException

toJSON

public String toJSON()
Returns a JSON string corresponding to object state

Returns:
JSON representation

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013. All Rights Reserved.