Package com.mercadopago.client.point
Class PointClient
- java.lang.Object
-
- com.mercadopago.client.MercadoPagoClient
-
- com.mercadopago.client.point.PointClient
-
public class PointClient extends MercadoPagoClient
Client that use the Point APIs.
-
-
Field Summary
-
Fields inherited from class com.mercadopago.client.MercadoPagoClient
defaultHeaders, httpClient
-
-
Constructor Summary
Constructors Constructor Description PointClient()Default constructor.PointClient(MPHttpClient httpClient)Constructor used for providing a custom http client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointCancelPaymentIntentcancelPaymentIntent(String deviceId, String paymentIntentId)Method responsible for cancelling a payment intent.PointCancelPaymentIntentcancelPaymentIntent(String deviceId, String paymentIntentId, MPRequestOptions requestOptions)Method responsible for cancelling a payment intent.PointDeviceOperatingModechangeDeviceOperatingMode(String deviceId, PointDeviceOperatingModeRequest request)Method responsible for change the device operating mode.PointDeviceOperatingModechangeDeviceOperatingMode(String deviceId, PointDeviceOperatingModeRequest request, MPRequestOptions requestOptions)Method responsible for change the device operating mode with request options.PointPaymentIntentcreatePaymentIntent(String deviceId, PointPaymentIntentRequest request)Method responsible for creating a payment intent.PointPaymentIntentcreatePaymentIntent(String deviceId, PointPaymentIntentRequest request, MPRequestOptions requestOptions)Method responsible for creating payment intent with request options.PointDevicesgetDevices(MPSearchRequest request)Method responsible for getting the devices.PointDevicesgetDevices(MPSearchRequest request, MPRequestOptions requestOptions)Method responsible for getting the devices.PointPaymentIntentListgetPaymentIntentList(PointPaymentIntentListRequest request)Method responsible for getting a list of payment intents with their final states between a date range.PointPaymentIntentListgetPaymentIntentList(PointPaymentIntentListRequest request, MPRequestOptions requestOptions)Method responsible for getting a list of payment intents with their final states between a date range with request options.PointStatusPaymentIntentgetPaymentIntentStatus(String paymentIntentId)Method responsible for finding the last state of a payment intent.PointStatusPaymentIntentgetPaymentIntentStatus(String paymentIntentId, MPRequestOptions requestOptions)Method responsible for finding the last state of a payment intent.PointSearchPaymentIntentsearchPaymentIntent(String paymentIntentId)Method responsible for getting a payment intent.PointSearchPaymentIntentsearchPaymentIntent(String paymentIntentId, MPRequestOptions requestOptions)Method responsible for getting a payment intent.
-
-
-
Constructor Detail
-
PointClient
public PointClient()
Default constructor. Uses the default http client used by the SDK.
-
PointClient
public PointClient(MPHttpClient httpClient)
Constructor used for providing a custom http client.- Parameters:
httpClient- httpClient
-
-
Method Detail
-
createPaymentIntent
public PointPaymentIntent createPaymentIntent(String deviceId, PointPaymentIntentRequest request) throws MPException, MPApiException
Method responsible for creating a payment intent.- Parameters:
deviceId- device idrequest- attributes used to create a payment intent- Returns:
- payment intent information
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
createPaymentIntent
public PointPaymentIntent createPaymentIntent(String deviceId, PointPaymentIntentRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for creating payment intent with request options.- Parameters:
deviceId- device idrequest- attributes used to create a payment intentrequestOptions- metadata to customize the request- Returns:
- payment intent information
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
getPaymentIntentList
public PointPaymentIntentList getPaymentIntentList(PointPaymentIntentListRequest request) throws MPException, MPApiException
Method responsible for getting a list of payment intents with their final states between a date range.- Parameters:
request- attributes used to set date range.- Returns:
- list of payment intents.
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
getPaymentIntentList
public PointPaymentIntentList getPaymentIntentList(PointPaymentIntentListRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for getting a list of payment intents with their final states between a date range with request options.- Parameters:
request- attributes used to set date range.requestOptions- metadata to customize the request- Returns:
- list of payment intents.
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
cancelPaymentIntent
public PointCancelPaymentIntent cancelPaymentIntent(String deviceId, String paymentIntentId) throws MPException, MPApiException
Method responsible for cancelling a payment intent.- Parameters:
deviceId- device idpaymentIntentId- payment intent id- Returns:
- cancelled payment intent id
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
cancelPaymentIntent
public PointCancelPaymentIntent cancelPaymentIntent(String deviceId, String paymentIntentId, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for cancelling a payment intent.- Parameters:
deviceId- device idpaymentIntentId- payment intent idrequestOptions- metadata to customize the request- Returns:
- cancelled payment intent id
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
searchPaymentIntent
public PointSearchPaymentIntent searchPaymentIntent(String paymentIntentId) throws MPException, MPApiException
Method responsible for getting a payment intent.- Parameters:
paymentIntentId- payment intent id- Returns:
- payment intent
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
searchPaymentIntent
public PointSearchPaymentIntent searchPaymentIntent(String paymentIntentId, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for getting a payment intent.- Parameters:
paymentIntentId- payment intent idrequestOptions- metadata to customize the request- Returns:
- payment intent
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
getPaymentIntentStatus
public PointStatusPaymentIntent getPaymentIntentStatus(String paymentIntentId) throws MPException, MPApiException
Method responsible for finding the last state of a payment intent.- Parameters:
paymentIntentId- payment intent id- Returns:
- payment intent status
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
getPaymentIntentStatus
public PointStatusPaymentIntent getPaymentIntentStatus(String paymentIntentId, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for finding the last state of a payment intent.- Parameters:
paymentIntentId- payment intent idrequestOptions- metadata to customize the request- Returns:
- payment intent status
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
getDevices
public PointDevices getDevices(MPSearchRequest request) throws MPException, MPApiException
Method responsible for getting the devices. Devices can be filtered by pos and/or store.- Parameters:
request- attributes used to set search params- Returns:
- devices
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
getDevices
public PointDevices getDevices(MPSearchRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for getting the devices. Devices can be filtered by pos and/or store with request options.- Parameters:
request- attributes used to set search paramsrequestOptions- metadata to customize the request- Returns:
- devices
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
changeDeviceOperatingMode
public PointDeviceOperatingMode changeDeviceOperatingMode(String deviceId, PointDeviceOperatingModeRequest request) throws MPException, MPApiException
Method responsible for change the device operating mode.- Parameters:
deviceId- device idrequest- request used to set operating mode- Returns:
- device operating mode
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
changeDeviceOperatingMode
public PointDeviceOperatingMode changeDeviceOperatingMode(String deviceId, PointDeviceOperatingModeRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for change the device operating mode with request options.- Parameters:
deviceId- device idrequest- request used to set operating moderequestOptions- metadata to customize the request- Returns:
- device operating mode
- Throws:
MPException- an error if the request failsMPApiException- See Also:
- api docs
-
-