com.paypal.api.payments
Class Authorization

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

public class Authorization
extends Object


Constructor Summary
Authorization()
          Default Constructor
 
Method Summary
 Capture capture(APIContext apiContext, Capture capture)
          Creates (and processes) a new Capture Transaction added as a related resource.
 Capture capture(String accessToken, Capture capture)
          Creates (and processes) a new Capture Transaction added as a related resource.
 Authorization doVoid(APIContext apiContext)
          Voids (cancels) an Authorization.
 Authorization doVoid(String accessToken)
          Voids (cancels) an Authorization.
static Authorization get(APIContext apiContext, String authorizationId)
          Obtain the Authorization transaction resource for the given identifier.
static Authorization get(String accessToken, String authorizationId)
          Obtain the Authorization transaction resource for the given identifier.
 Amount getAmount()
          Getter for amount
 String getCreateTime()
          Getter for createTime
 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 getParentPayment()
          Getter for parentPayment
 String getPaymentMode()
          Getter for paymentMode
 String getProtectionEligibility()
          Getter for protectionEligibility
 String getProtectionEligibilityType()
          Getter for protectionEligibilityType
 String getState()
          Getter for state
 String getUpdateTime()
          Getter for updateTime
 String getValidUntil()
          Getter for validUntil
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
 Authorization reauthorize(APIContext apiContext)
          Reauthorizes an expired Authorization.
 Authorization reauthorize(String accessToken)
          Reauthorizes an expired Authorization.
 Authorization setAmount(Amount amount)
          Setter for amount
 Authorization setCreateTime(String createTime)
          Setter for createTime
 Authorization setId(String id)
          Setter for id
 Authorization setLinks(List<Links> links)
          Setter for links
 Authorization setParentPayment(String parentPayment)
          Setter for parentPayment
 Authorization setPaymentMode(String paymentMode)
          Setter for paymentMode
 Authorization setProtectionEligibility(String protectionEligibility)
          Setter for protectionEligibility
 Authorization setProtectionEligibilityType(String protectionEligibilityType)
          Setter for protectionEligibilityType
 Authorization setState(String state)
          Setter for state
 Authorization setUpdateTime(String updateTime)
          Setter for updateTime
 Authorization setValidUntil(String validUntil)
          Setter for validUntil
 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

Authorization

public Authorization()
Default 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 Authorization setId(String id)
Setter for id


getId

public String getId()
Getter for id


setCreateTime

public Authorization setCreateTime(String createTime)
Setter for createTime


getCreateTime

public String getCreateTime()
Getter for createTime


setUpdateTime

public Authorization setUpdateTime(String updateTime)
Setter for updateTime


getUpdateTime

public String getUpdateTime()
Getter for updateTime


setAmount

public Authorization setAmount(Amount amount)
Setter for amount


getAmount

public Amount getAmount()
Getter for amount


setPaymentMode

public Authorization setPaymentMode(String paymentMode)
Setter for paymentMode


getPaymentMode

public String getPaymentMode()
Getter for paymentMode


setState

public Authorization setState(String state)
Setter for state


getState

public String getState()
Getter for state


setProtectionEligibility

public Authorization setProtectionEligibility(String protectionEligibility)
Setter for protectionEligibility


getProtectionEligibility

public String getProtectionEligibility()
Getter for protectionEligibility


setProtectionEligibilityType

public Authorization setProtectionEligibilityType(String protectionEligibilityType)
Setter for protectionEligibilityType


getProtectionEligibilityType

public String getProtectionEligibilityType()
Getter for protectionEligibilityType


setParentPayment

public Authorization setParentPayment(String parentPayment)
Setter for parentPayment


getParentPayment

public String getParentPayment()
Getter for parentPayment


setValidUntil

public Authorization setValidUntil(String validUntil)
Setter for validUntil


getValidUntil

public String getValidUntil()
Getter for validUntil


setLinks

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


getLinks

public List<Links> getLinks()
Getter for links


get

public static Authorization get(String accessToken,
                                String authorizationId)
                         throws PayPalRESTException
Obtain the Authorization transaction resource for the given identifier.

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

get

public static Authorization get(APIContext apiContext,
                                String authorizationId)
                         throws PayPalRESTException
Obtain the Authorization transaction resource for the given identifier.

Parameters:
apiContext - APIContext used for the API call.
authorizationId - String
Returns:
Authorization
Throws:
PayPalRESTException

capture

public Capture capture(String accessToken,
                       Capture capture)
                throws PayPalRESTException
Creates (and processes) a new Capture Transaction added as a related resource.

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

capture

public Capture capture(APIContext apiContext,
                       Capture capture)
                throws PayPalRESTException
Creates (and processes) a new Capture Transaction added as a related resource.

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

doVoid

public Authorization doVoid(String accessToken)
                     throws PayPalRESTException
Voids (cancels) an Authorization.

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

doVoid

public Authorization doVoid(APIContext apiContext)
                     throws PayPalRESTException
Voids (cancels) an Authorization.

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

reauthorize

public Authorization reauthorize(String accessToken)
                          throws PayPalRESTException
Reauthorizes an expired Authorization.

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

reauthorize

public Authorization reauthorize(APIContext apiContext)
                          throws PayPalRESTException
Reauthorizes an expired Authorization.

Parameters:
apiContext - APIContext used for the API call.
Returns:
Authorization
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.