Class MerchantOrderClient
- java.lang.Object
-
- com.mercadopago.client.MercadoPagoClient
-
- com.mercadopago.client.merchantorder.MerchantOrderClient
-
public class MerchantOrderClient extends MercadoPagoClient
MerchantOrderClient class.
-
-
Field Summary
-
Fields inherited from class com.mercadopago.client.MercadoPagoClient
defaultHeaders, httpClient
-
-
Constructor Summary
Constructors Constructor Description MerchantOrderClient()
Default constructor.MerchantOrderClient(MPHttpClient httpClient)
Constructor used for providing a custom http client.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MerchantOrder
create(MerchantOrderCreateRequest request)
Method responsible for creating merchant order.MerchantOrder
create(MerchantOrderCreateRequest request, MPRequestOptions requestOptions)
Method responsible for creating merchant order with request options.MerchantOrder
get(Long id)
Method responsible for getting merchant order.MerchantOrder
get(Long id, MPRequestOptions requestOptions)
Method responsible for getting merchant order.MPElementsResourcesPage<MerchantOrder>
search(MPSearchRequest request)
Method responsible for search merchant order.MPElementsResourcesPage<MerchantOrder>
search(MPSearchRequest request, MPRequestOptions requestOptions)
Method responsible for search merchant order.MerchantOrder
update(Long id, MerchantOrderUpdateRequest request)
Method responsible for creating merchant order.MerchantOrder
update(Long id, MerchantOrderUpdateRequest request, MPRequestOptions requestOptions)
Method responsible for creating merchant order with request options.
-
-
-
Constructor Detail
-
MerchantOrderClient
public MerchantOrderClient()
Default constructor. Uses the default http client used by the SDK.
-
MerchantOrderClient
public MerchantOrderClient(MPHttpClient httpClient)
Constructor used for providing a custom http client.- Parameters:
httpClient
- httpClient
-
-
Method Detail
-
get
public MerchantOrder get(Long id) throws MPException, MPApiException
Method responsible for getting merchant order.- Parameters:
id
- merchant order id- Returns:
- merchant order information
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
get
public MerchantOrder get(Long id, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for getting merchant order.- Parameters:
id
- merchant order idrequestOptions
- metadata to customize the request- Returns:
- merchant order information
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
create
public MerchantOrder create(MerchantOrderCreateRequest request) throws MPException, MPApiException
Method responsible for creating merchant order.- Parameters:
request
- attributes used to create merchant order- Returns:
- merchant order information
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
create
public MerchantOrder create(MerchantOrderCreateRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for creating merchant order with request options.- Parameters:
request
- attributes used to create merchant orderrequestOptions
- metadata to customize the request- Returns:
- merchant order information
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
update
public MerchantOrder update(Long id, MerchantOrderUpdateRequest request) throws MPException, MPApiException
Method responsible for creating merchant order.- Parameters:
request
- attributes used to update merchant orderid
- merchant order id- Returns:
- merchant order information
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
update
public MerchantOrder update(Long id, MerchantOrderUpdateRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for creating merchant order with request options.- Parameters:
request
- attributes used to update merchant orderid
- merchant order idrequestOptions
- metadata to customize the request- Returns:
- merchant order response
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
search
public MPElementsResourcesPage<MerchantOrder> search(MPSearchRequest request) throws MPException, MPApiException
Method responsible for search merchant order.- Parameters:
request
- attributes used to search merchant order- Returns:
- list of results
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
search
public MPElementsResourcesPage<MerchantOrder> search(MPSearchRequest request, MPRequestOptions requestOptions) throws MPException, MPApiException
Method responsible for search merchant order.- Parameters:
request
- attributes used to search merchant orderrequestOptions
- metadata to customize the request- Returns:
- list of results
- Throws:
MPException
- an error if the request failsMPApiException
- See Also:
- api docs
-
-