Package com.mercadopago.client
Class MercadoPagoClient
- java.lang.Object
-
- com.mercadopago.client.MercadoPagoClient
-
- Direct Known Subclasses:
CardTokenClient
,CustomerCardClient
,CustomerClient
,IdentificationTypeClient
,MerchantOrderClient
,OauthClient
,PaymentClient
,PaymentMethodClient
,PaymentRefundClient
,PointClient
,PreapprovalClient
,PreferenceClient
,UserClient
public abstract class MercadoPagoClient extends Object
Mercado Pago client class.
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,String>
defaultHeaders
protected MPHttpClient
httpClient
-
Constructor Summary
Constructors Constructor Description MercadoPagoClient(MPHttpClient httpClient)
MercadoPagoClient constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected MPResponse
list(String path, MPRequestOptions requestOptions)
Convenience method to perform requests that returns lists of results.protected MPResponse
list(String path, HttpMethod method, com.google.gson.JsonObject payload, Map<String,Object> queryParams, MPRequestOptions requestOptions)
Convenience method to perform requests that returns lists of results.protected MPResponse
search(String path, MPSearchRequest request)
Convenience method to perform searches.protected MPResponse
search(String path, MPSearchRequest searchRequest, MPRequestOptions requestOptions)
Convenience method to perform searches.protected MPResponse
send(MPRequest request)
Method used directly or by other methods to make requests.protected MPResponse
send(MPRequest request, MPRequestOptions requestOptions)
Method used directly or by other methods to make requests with request options.protected MPResponse
send(String path, HttpMethod method, com.google.gson.JsonObject payload, Map<String,Object> queryParams)
Method used directly or by other methods to make requests.protected MPResponse
send(String path, HttpMethod method, com.google.gson.JsonObject payload, Map<String,Object> queryParams, MPRequestOptions requestOptions)
Method used directly or by other methods to make requests.
-
-
-
Field Detail
-
httpClient
protected final MPHttpClient httpClient
-
-
Constructor Detail
-
MercadoPagoClient
public MercadoPagoClient(MPHttpClient httpClient)
MercadoPagoClient constructor.- Parameters:
httpClient
- http client
-
-
Method Detail
-
send
protected MPResponse send(MPRequest request) throws MPException, MPApiException
Method used directly or by other methods to make requests.- Parameters:
request
- request data- Returns:
- MPResponse response object
- Throws:
MPException
- exceptionMPApiException
-
send
protected MPResponse send(MPRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method used directly or by other methods to make requests with request options.- Parameters:
request
- requestrequestOptions
- requestOptions- Returns:
- MPResponse response
- Throws:
MPException
- exceptionMPApiException
-
send
protected MPResponse send(String path, HttpMethod method, com.google.gson.JsonObject payload, Map<String,Object> queryParams) throws MPException, MPApiException
Method used directly or by other methods to make requests.- Parameters:
path
- path of request urlmethod
- http method used in the requestpayload
- request bodyqueryParams
- query string params- Returns:
- MPResponse response data
- Throws:
MPException
- exceptionMPApiException
-
send
protected MPResponse send(String path, HttpMethod method, com.google.gson.JsonObject payload, Map<String,Object> queryParams, MPRequestOptions requestOptions) throws MPException, MPApiException
Method used directly or by other methods to make requests.- Parameters:
path
- path of request urlmethod
- http method used in the requestpayload
- request bodyqueryParams
- query string paramsrequestOptions
- extra data used to override configuration passed to MercadoPagoConfig for a single request- Returns:
- response data
- Throws:
MPException
- exceptionMPApiException
-
search
protected MPResponse search(String path, MPSearchRequest request) throws MPException, MPApiException
Convenience method to perform searches.- Parameters:
path
- path of request urlrequest
- parameters for performing search request- Returns:
- response data
- Throws:
MPException
- exceptionMPApiException
-
search
protected MPResponse search(String path, MPSearchRequest searchRequest, MPRequestOptions requestOptions) throws MPException, MPApiException
Convenience method to perform searches.- Parameters:
path
- path of searchRequest urlsearchRequest
- parameters for performing search searchRequestrequestOptions
- extra data used to override configuration passed to MercadoPagoConfig for a single searchRequest- Returns:
- response data
- Throws:
MPException
- exceptionMPApiException
-
list
protected MPResponse list(String path, MPRequestOptions requestOptions) throws MPException, MPApiException
Convenience method to perform requests that returns lists of results.- Parameters:
path
- path of request urlrequestOptions
- extra data used to override configuration passed to MercadoPagoConfig for a single request- Returns:
- response data
- Throws:
MPException
- exceptionMPApiException
-
list
protected MPResponse list(String path, HttpMethod method, com.google.gson.JsonObject payload, Map<String,Object> queryParams, MPRequestOptions requestOptions) throws MPException, MPApiException
Convenience method to perform requests that returns lists of results.- Parameters:
path
- path of request urlmethod
- http method used in the requestpayload
- request bodyqueryParams
- query string paramsrequestOptions
- extra data used to override configuration passed to MercadoPagoConfig for a single request- Returns:
- response data
- Throws:
MPException
- exceptionMPApiException
-
-