Class OrderRefundClient
Client that use the Order APIs.
Inherited Members
Namespace: MercadoPago.Client.Order
Assembly: MercadoPago.dll
Syntax
public class OrderRefundClient : MercadoPagoClient<Order>
Constructors
| Edit this page View SourceOrderRefundClient()
Initializes a new instance of the OrderRefundClient class.
Declaration
public OrderRefundClient()
OrderRefundClient(IHttpClient)
Initializes a new instance of the OrderRefundClient class.
Declaration
public OrderRefundClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
OrderRefundClient(IHttpClient, ISerializer)
Initializes a new instance of the OrderRefundClient class.
Declaration
public OrderRefundClient(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. |
OrderRefundClient(ISerializer)
Initializes a new instance of the OrderRefundClient class.
Declaration
public OrderRefundClient(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 SourceRefund(string, OrderRefundPaymentRequest, RequestOptions)
Process a order.
Declaration
public Order Refund(string id, OrderRefundPaymentRequest request = null, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
string | id | The order id. |
OrderRefundPaymentRequest | request | The order refund partial. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
Order | The created order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
RefundAsync(string, OrderRefundPaymentRequest, RequestOptions, CancellationToken)
Process a order as an asynchronous operation.
Declaration
public Task<Order> RefundAsync(string id, OrderRefundPaymentRequest request = null, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
string | id | The order id. |
OrderRefundPaymentRequest | request | The order refund partial. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<Order> | A task whose the result is the created order. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |