Class AdvancedPaymentRefundClient
Client with methods to refund advanced payments.
Inherited Members
Namespace: MercadoPago.Client.AdvancedPayment
Assembly: MercadoPago.dll
Syntax
public class AdvancedPaymentRefundClient : MercadoPagoClient<AdvancedPaymentDisbursementRefund>
Constructors
| Edit this page View SourceAdvancedPaymentRefundClient()
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentRefundClient()
AdvancedPaymentRefundClient(IHttpClient)
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentRefundClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
AdvancedPaymentRefundClient(IHttpClient, ISerializer)
Initializes a new instance of the AdvancedPaymentRefundClient class.
Declaration
public AdvancedPaymentRefundClient(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. |
AdvancedPaymentRefundClient(ISerializer)
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentRefundClient(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(long, long, RequestOptions)
Refunds a disbursement of a advanced payment.
Declaration
public AdvancedPaymentDisbursementRefund Refund(long advancedPaymentId, long disbursementId, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | advancedPaymentId | Advanced Payment ID. |
long | disbursementId | Disbursement ID. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPaymentDisbursementRefund | The refund of the disbursement. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Refund(long, long, decimal?, RequestOptions)
Refunds a disbursement of a advanced payment.
Declaration
public AdvancedPaymentDisbursementRefund Refund(long advancedPaymentId, long disbursementId, decimal? amount, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | advancedPaymentId | Advanced Payment ID. |
long | disbursementId | Disbursement ID. |
decimal? | amount | Amount to be refunded. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPaymentDisbursementRefund | The refund of the disbursement. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
RefundAll(long, RequestOptions)
Refunds async all disbursements of a advanced payment.
Declaration
public ResourcesList<AdvancedPaymentDisbursementRefund> RefundAll(long advancedPaymentId, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | advancedPaymentId | Advanced Payment ID. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
ResourcesList<AdvancedPaymentDisbursementRefund> | A task whose the result is the refunds list. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
RefundAllAsync(long, RequestOptions, CancellationToken)
Refunds async all disbursements of a advanced payment.
Declaration
public Task<ResourcesList<AdvancedPaymentDisbursementRefund>> RefundAllAsync(long advancedPaymentId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | advancedPaymentId | Advanced Payment ID. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<ResourcesList<AdvancedPaymentDisbursementRefund>> | A task whose the result is the refunds list. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
RefundAsync(long, long, RequestOptions, CancellationToken)
Refunds async a disbursement of a advanced payment.
Declaration
public Task<AdvancedPaymentDisbursementRefund> RefundAsync(long advancedPaymentId, long disbursementId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | advancedPaymentId | Advanced Payment ID. |
long | disbursementId | Disbursement ID. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AdvancedPaymentDisbursementRefund> | A task whose the result is the refund of the disbursement. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
RefundAsync(long, long, decimal?, RequestOptions, CancellationToken)
Refunds async a disbursement of a advanced payment.
Declaration
public Task<AdvancedPaymentDisbursementRefund> RefundAsync(long advancedPaymentId, long disbursementId, decimal? amount, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | advancedPaymentId | Advanced Payment ID. |
long | disbursementId | Disbursement ID. |
decimal? | amount | Amount to be refunded. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AdvancedPaymentDisbursementRefund> | A task whose the result is the refund of the disbursement. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |