Class MerchantOrderClient
Client with methods of Merchant Order APIs.
Inherited Members
Namespace: MercadoPago.Client.MerchantOrder
Assembly: MercadoPago.dll
Syntax
public class MerchantOrderClient : MercadoPagoClient<MerchantOrder>
Constructors
| Edit this page View SourceMerchantOrderClient()
Initializes a new instance of the MerchantOrderClient class.
Declaration
public MerchantOrderClient()
MerchantOrderClient(IHttpClient)
Initializes a new instance of the MerchantOrderClient class.
Declaration
public MerchantOrderClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
MerchantOrderClient(IHttpClient, ISerializer)
Initializes a new instance of the MerchantOrderClient class.
Declaration
public MerchantOrderClient(IHttpClient httpClient, ISerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
ISerializer | serializer | The serializer that will be used to serialize the HTTP requests content and to deserialize the HTTP response content. |
MerchantOrderClient(ISerializer)
Initializes a new instance of the MerchantOrderClient class.
Declaration
public MerchantOrderClient(ISerializer serializer)
Parameters
Type | Name | Description |
---|---|---|
ISerializer | serializer | The serializer that will be used to serialize the HTTP requests content and to deserialize the HTTP response content. |
Methods
| Edit this page View SourceCreate(MerchantOrderCreateRequest, RequestOptions)
Creates a Merchant Order.
Declaration
public MerchantOrder Create(MerchantOrderCreateRequest request, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
MerchantOrderCreateRequest | request | The data to create the Merchant Order. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
MerchantOrder | The created Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
CreateAsync(MerchantOrderCreateRequest, RequestOptions, CancellationToken)
Creates a Merchant Order as an asynchronous operation.
Declaration
public Task<MerchantOrder> CreateAsync(MerchantOrderCreateRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
MerchantOrderCreateRequest | request | The data to create the Merchant Order. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<MerchantOrder> | A task whose the result is the created Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Get(long, RequestOptions)
Get a Merchant Order by your ID.
Declaration
public MerchantOrder Get(long id, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | The Merchant Order ID. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
MerchantOrder | The Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
GetAsync(long, RequestOptions, CancellationToken)
Get async a Merchant Order by your ID.
Declaration
public Task<MerchantOrder> GetAsync(long id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | The Merchant Order ID. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<MerchantOrder> | A task whose the result is the Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Search(SearchRequest, RequestOptions)
Searches for Merchant Order that match the criteria of SearchRequest.
Declaration
public ElementsResourcesPage<MerchantOrder> Search(SearchRequest request, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
SearchRequest | request | The search request parameters. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
ElementsResourcesPage<MerchantOrder> | A page of Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
SearchAsync(SearchRequest, RequestOptions, CancellationToken)
Searches async for Merchant Order that match the criteria of SearchRequest.
Declaration
public Task<ElementsResourcesPage<MerchantOrder>> SearchAsync(SearchRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
SearchRequest | request | The search request parameters. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<ElementsResourcesPage<MerchantOrder>> | A task whose the result is a page of Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Update(long, MerchantOrderUpdateRequest, RequestOptions)
Updates a Merchant Order.
Declaration
public MerchantOrder Update(long id, MerchantOrderUpdateRequest request, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | The ID of the Merchant Order. |
MerchantOrderUpdateRequest | request | The data to update the Merchant Order. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
MerchantOrder | A task whose the result is the updated Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
UpdateAsync(long, MerchantOrderUpdateRequest, RequestOptions, CancellationToken)
Updates a Merchant Order as an asynchronous operation.
Declaration
public Task<MerchantOrder> UpdateAsync(long id, MerchantOrderUpdateRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | The ID of the Merchant Order. |
MerchantOrderUpdateRequest | request | The data to update the Merchant Order. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<MerchantOrder> | A task whose the result is the updated Merchant Order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |