Class OrderTransactionClient
Client that use the Order APIs.
Inherited Members
Namespace: MercadoPago.Client.Order
Assembly: MercadoPago.dll
Syntax
public class OrderTransactionClient : MercadoPagoClient<OrderTransaction>
Constructors
| Edit this page View SourceOrderTransactionClient()
Initializes a new instance of the OrderTransactionClient class.
Declaration
public OrderTransactionClient()
OrderTransactionClient(IHttpClient)
Initializes a new instance of the OrderTransactionClient class.
Declaration
public OrderTransactionClient(IHttpClient httpClient)
Parameters
| Type | Name | Description |
|---|---|---|
| IHttpClient | httpClient | The http client that will be used in HTTP requests. |
OrderTransactionClient(IHttpClient, ISerializer)
Initializes a new instance of the OrderTransactionClient class.
Declaration
public OrderTransactionClient(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. |
OrderTransactionClient(ISerializer)
Initializes a new instance of the OrderTransactionClient class.
Declaration
public OrderTransactionClient(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(string, OrderTransactionRequest, RequestOptions)
Create a transaction.
Declaration
public OrderTransaction Create(string id, OrderTransactionRequest request, RequestOptions requestOptions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The order id. |
| OrderTransactionRequest | request | The order transaction. |
| RequestOptions | requestOptions |
Returns
| Type | Description |
|---|---|
| OrderTransaction | The created transaction. |
Remarks
Check the API documentation here.
Exceptions
| Type | Condition |
|---|---|
| MercadoPagoException | If a unexpected exception occurs. |
| MercadoPagoApiException | If the API returns a error. |
CreateAsync(string, OrderTransactionRequest, RequestOptions, CancellationToken)
Create a transaction as an asynchronous operation.
Declaration
public Task<OrderTransaction> CreateAsync(string id, OrderTransactionRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | id | The order id. |
| OrderTransactionRequest | request | The order transaction. |
| RequestOptions | requestOptions | |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<OrderTransaction> | A task whose the result is the created transaction. |
Remarks
Check the API documentation here.
Exceptions
| Type | Condition |
|---|---|
| MercadoPagoException | If a unexpected exception occurs. |
| MercadoPagoApiException | If the API returns a error. |
Delete(string, string, RequestOptions)
Delete a transaction.
Declaration
public OrderTransaction Delete(string oderId, string transactionId, RequestOptions requestOptions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oderId | The order id. |
| string | transactionId | The transaction id. |
| RequestOptions | requestOptions |
Returns
| Type | Description |
|---|---|
| OrderTransaction |
Remarks
Check the API documentation here.
Exceptions
| Type | Condition |
|---|---|
| MercadoPagoException | If a unexpected exception occurs. |
| MercadoPagoApiException | If the API returns a error. |
DeleteAsync(string, string, RequestOptions, CancellationToken)
Delete a transaction as an asynchronous operation.
Declaration
public Task<OrderTransaction> DeleteAsync(string oderId, string transactionId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | oderId | The order id. |
| string | transactionId | The transaction id. |
| RequestOptions | requestOptions | |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<OrderTransaction> |
Remarks
Check the API documentation here.
Exceptions
| Type | Condition |
|---|---|
| MercadoPagoException | If a unexpected exception occurs. |
| MercadoPagoApiException | If the API returns a error. |
Update(string, string, OrderPaymentRequest, RequestOptions)
Update a transaction.
Declaration
public OrderUpdateTransaction Update(string orderId, string transactionId, OrderPaymentRequest request, RequestOptions requestOptions = null)
Parameters
| Type | Name | Description |
|---|---|---|
| string | orderId | The order id. |
| string | transactionId | The transaction id. |
| OrderPaymentRequest | request | The order transaction. |
| RequestOptions | requestOptions |
Returns
| Type | Description |
|---|---|
| OrderUpdateTransaction | The updated transaction. |
Remarks
Check the API documentation here.
Exceptions
| Type | Condition |
|---|---|
| MercadoPagoException | If a unexpected exception occurs. |
| MercadoPagoApiException | If the API returns a error. |
UpdateAsync(string, string, OrderPaymentRequest, RequestOptions, CancellationToken)
Update a transaction as an asynchronous operation.
Declaration
public Task<OrderUpdateTransaction> UpdateAsync(string orderId, string transactionId, OrderPaymentRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| string | orderId | The order id. |
| string | transactionId | The transaction id. |
| OrderPaymentRequest | request | The order transaction. |
| RequestOptions | requestOptions | |
| CancellationToken | cancellationToken | Cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<OrderUpdateTransaction> | A task whose the result is the updated transaction. |
Remarks
Check the API documentation here.
Exceptions
| Type | Condition |
|---|---|
| MercadoPagoException | If a unexpected exception occurs. |
| MercadoPagoApiException | If the API returns a error. |