com.paypal.api.payments
Class Payment

java.lang.Object
  extended by com.paypal.api.payments.Payment
Direct Known Subclasses:
FuturePayment

public class Payment
extends Object


Constructor Summary
Payment()
          Default Constructor
Payment(String intent, Payer payer)
          Parameterized Constructor
 
Method Summary
 Payment create(APIContext apiContext)
          Creates (and processes) a new Payment Resource.
 Payment create(String accessToken)
          Creates (and processes) a new Payment Resource.
 Payment execute(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 Payment get(APIContext apiContext, String paymentId)
          Obtain the Payment resource for the given identifier.
static Payment get(String accessToken, String paymentId)
          Obtain the Payment resource for the given identifier.
 Object getCart()
          Getter for cart
 String getCreateTime()
          Getter for createTime
 String getExperienceProfileId()
          Getter for Experience Profile ID
 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 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
static PaymentHistory list(APIContext apiContext, Map<String,String> containerMap)
          Retrieves a list of Payment resources.
static PaymentHistory list(String accessToken, Map<String,String> containerMap)
          Retrieves a list of Payment resources.
 Payment setCart(Object cart)
          Setter for cart
 Payment setCreateTime(String createTime)
          Setter for createTime
 void setExperienceProfileId(String experienceProfileId)
          Setter for Experience Profile ID
 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)
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 OAuthTokenCredential initConfig(InputStream is)
                                       throws PayPalRESTException
Initialize using InputStream(of a Properties file)

Parameters:
is - InputStream
Returns:
OAuthTokenCredential instance using client ID and client secret loaded from configuration.
Throws:
PayPalRESTException

initConfig

public static OAuthTokenCredential initConfig(File file)
                                       throws PayPalRESTException
Initialize using a File(Properties file)

Parameters:
file - File object of a properties entity
Returns:
OAuthTokenCredential instance using client ID and client secret loaded from configuration.
Throws:
PayPalRESTException

initConfig

public static OAuthTokenCredential initConfig(Properties properties)
Initialize using Properties

Parameters:
properties - Properties object
Returns:
OAuthTokenCredential instance using client ID and client secret loaded from configuration.

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


getExperienceProfileId

public String getExperienceProfileId()
Getter for Experience Profile ID


setExperienceProfileId

public void setExperienceProfileId(String experienceProfileId)
Setter for Experience Profile ID


setPayer

public Payment setPayer(Payer payer)
Setter for payer


getPayer

public Payer getPayer()
Getter for payer


setCart

public Payment setCart(Object cart)
Setter for cart


getCart

public Object getCart()
Getter for cart


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 PayPalRESTException
Creates (and processes) a new Payment Resource.

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

create

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

Parameters:
apiContext - APIContext used for the API call.
Returns:
Payment
Throws:
PayPalRESTException

get

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

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

get

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

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

execute

public Payment execute(String accessToken,
                       PaymentExecution paymentExecution)
                throws 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:
PayPalRESTException

execute

public Payment execute(APIContext apiContext,
                       PaymentExecution paymentExecution)
                throws 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:
PayPalRESTException

list

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

Parameters:
accessToken - Access Token used for the API call.
containerMap - Map
Returns:
PaymentHistory
Throws:
PayPalRESTException

list

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

Parameters:
apiContext - APIContext used for the API call.
containerMap - Map
Returns:
PaymentHistory
Throws:
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 © 2015. All Rights Reserved.