Class AdvancedPaymentClient
Client that use the Advanced Payments APIs.
Inherited Members
Namespace: MercadoPago.Client.AdvancedPayment
Assembly: MercadoPago.dll
Syntax
public class AdvancedPaymentClient : MercadoPagoClient<AdvancedPayment>
Constructors
| Edit this page View SourceAdvancedPaymentClient()
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentClient()
AdvancedPaymentClient(IHttpClient)
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
AdvancedPaymentClient(IHttpClient, ISerializer)
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentClient(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. |
AdvancedPaymentClient(ISerializer)
Initializes a new instance of the AdvancedPaymentClient class.
Declaration
public AdvancedPaymentClient(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 SourceCancel(long, RequestOptions)
Cancels a pending advanced payment.
Declaration
public AdvancedPayment Cancel(long id, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPayment | The cancelled advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
CancelAsync(long, RequestOptions, CancellationToken)
Cancels a pending advanced payment async.
Declaration
public Task<AdvancedPayment> CancelAsync(long id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AdvancedPayment> | A task whose the result is the cancelled advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Capture(long, RequestOptions)
Captures a authorized advanced payment.
Declaration
public AdvancedPayment Capture(long id, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPayment | The captured advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
CaptureAsync(long, RequestOptions, CancellationToken)
Captures a authorized advanced payment async.
Declaration
public Task<AdvancedPayment> CaptureAsync(long id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AdvancedPayment> | A task whose the result is the captured advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Create(AdvancedPaymentCreateRequest, RequestOptions)
Creates a advanced payment.
Declaration
public AdvancedPayment Create(AdvancedPaymentCreateRequest request, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
AdvancedPaymentCreateRequest | request | The data to create the advanced payment. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPayment | The created advanced payment. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
CreateAsync(AdvancedPaymentCreateRequest, RequestOptions, CancellationToken)
Creates a advanced payment as an asynchronous operation.
Declaration
public Task<AdvancedPayment> CreateAsync(AdvancedPaymentCreateRequest request, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
AdvancedPaymentCreateRequest | request | The data to create the advanced payment. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<AdvancedPayment> | A task whose the result is the created advanced payment. |
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 advanced payment by your ID.
Declaration
public AdvancedPayment Get(long id, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | The advanced payment ID. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPayment | The advanced payment. |
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 advanced payment by your ID.
Declaration
public Task<AdvancedPayment> GetAsync(long id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | The advanced payment ID. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token |
Returns
Type | Description |
---|---|
Task<AdvancedPayment> | A task whose the result is the advanced payment. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Refund(long, long, RequestOptions)
Refunds a disbursement of a advanced payment.
Declaration
public AdvancedPaymentDisbursementRefund Refund(long id, long disbursementId, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | 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 id, long disbursementId, decimal? amount, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | 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 id, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | 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 id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | 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 id, long disbursementId, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | 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 id, long disbursementId, decimal? amount, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | 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. |
Search(SearchRequest, RequestOptions)
Searches for advanced payments that match the criteria of AdvancedSearchRequest.
Declaration
public ResultsResourcesPage<AdvancedPayment> Search(SearchRequest request, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
SearchRequest | request | The search request parameters. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
ResultsResourcesPage<AdvancedPayment> | A task whose the result is a page of advanced payments. |
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 advanced payments that match the criteria of AdvancedSearchRequest.
Declaration
public Task<ResultsResourcesPage<AdvancedPayment>> 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<ResultsResourcesPage<AdvancedPayment>> | A task whose the result is a page of advanced payments. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
UpdateReleaseDate(long, DateTime, RequestOptions)
Updates the release date of all disbursementes of the advanced payment.
Declaration
public AdvancedPayment UpdateReleaseDate(long id, DateTime releaseDate, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
DateTime | releaseDate | The money reelease date. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPayment | A task whose the result is the updated advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
UpdateReleaseDate(long, long, DateTime, RequestOptions)
Updates the release date of all disbursementes of the advanced payment.
Declaration
public AdvancedPayment UpdateReleaseDate(long id, long disbursementId, DateTime releaseDate, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
long | disbursementId | Disbursement ID. |
DateTime | releaseDate | The money reelease date. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AdvancedPayment | A task whose the result is the updated advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
UpdateReleaseDateAsync(long, DateTime, RequestOptions, CancellationToken)
Updates the release date of all disbursementes of the advanced payment async.
Declaration
public Task<AdvancedPayment> UpdateReleaseDateAsync(long id, DateTime releaseDate, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
DateTime | releaseDate | The money reelease date. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AdvancedPayment> | A task whose the result is the updated advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
UpdateReleaseDateAsync(long, long, DateTime, RequestOptions, CancellationToken)
Updates the release date of all disbursementes of the advanced payment async.
Declaration
public Task<AdvancedPayment> UpdateReleaseDateAsync(long id, long disbursementId, DateTime releaseDate, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | Advanced payment id. |
long | disbursementId | Disbursement ID. |
DateTime | releaseDate | The money reelease date. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AdvancedPayment> | A task whose the result is the updated advanced payment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |