
com.paypal.base.APICallPreHandler Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.commerce.payment.method.paypal
Show all versions of com.liferay.commerce.payment.method.paypal
Liferay Commerce Payment Method PayPal
package com.paypal.base;
import com.paypal.base.exception.ClientActionRequiredException;
import com.paypal.base.exception.OAuthException;
import com.paypal.base.rest.OAuthTokenCredential;
import java.util.Map;
/**
* APICallPreHandler
defines a high level abstraction for call
* specific operations. PayPal REST API is provided by {@link com.paypal.base.rest.RESTAPICallPreHandler}
*/
public interface APICallPreHandler {
/**
* Returns headers for HTTP call
*
* @return Map of headers with name and value
* @throws OAuthException
*/
Map getHeaderMap() throws OAuthException;
/**
* Returns the payload for the API call. The implementation should take care
* in formatting the payload appropriately
*
* @return Payload as String
*/
String getPayLoad();
/**
* 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
* {@link Constants})are taken to be default for the API call.
*
* @return Endpoint String.
*/
String getEndPoint();
/**
* Returns {@link OAuthTokenCredential} configured for the api call
*
* @return ICredential object
*/
OAuthTokenCredential getCredential();
/**
* Validates settings and integrity before call
*
* @throws ClientActionRequiredException
*/
void validate() throws ClientActionRequiredException;
/**
* Return configurationMap
*
* @return configurationMap in this call pre-handler
*/
public Map getConfigurationMap();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy