com.paypal.base
Interface APICallPreHandler

All Known Implementing Classes:
DefaultSOAPAPICallHandler, MerchantAPICallPreHandler, PlatformAPICallPreHandler, RESTAPICallPreHandler

public interface APICallPreHandler

APICallPreHandler defines a high level abstraction for call specific operations. The calls may be divided as per formats as SOAP or NVP. PayPal Merchant Services are provided by MerchantAPICallPreHandler which is a decorator over the basic DefaultSOAPAPICallHandler. PayPal Platform Services are provided by PlatformAPICallPreHandler. PayPal REST API is provided by RESTAPICallPreHandler


Method Summary
 ICredential getCredential()
          Returns ICredential configured for the api call
 String getEndPoint()
          Returns the endpoint for the API call.
 Map<String,String> getHeaderMap()
          Returns headers for HTTP call
 String getPayLoad()
          Returns the payload for the API call.
 void validate()
          Validates settings and integrity before call
 

Method Detail

getHeaderMap

Map<String,String> getHeaderMap()
                                throws OAuthException
Returns headers for HTTP call

Returns:
Map of headers with name and value
Throws:
OAuthException

getPayLoad

String getPayLoad()
Returns the payload for the API call. The implementation should take care in formatting the payload appropriately

Returns:
Payload as String

getEndPoint

String getEndPoint()
Returns the endpoint for the API call. The implementation may calculate the endpoint depending on parameters set on it. If no endpoint is found in the passed configuration, then SANDBOX endpoints (hardcoded in Constants)are taken to be default for the API call.

Returns:
Endpoint String.

getCredential

ICredential getCredential()
Returns ICredential configured for the api call

Returns:
ICredential object

validate

void validate()
              throws ClientActionRequiredException
Validates settings and integrity before call

Throws:
ClientActionRequiredException


Copyright © 2015. All Rights Reserved.