Class AuthorizedPaymentClient
Client that use the Authorized Payments (also known as Invoices) APIs.
Inherited Members
Namespace: MercadoPago.Client.AuthorizedPayment
Assembly: MercadoPago.dll
Syntax
public class AuthorizedPaymentClient : MercadoPagoClient<AuthorizedPayment>
Constructors
| Edit this page View SourceAuthorizedPaymentClient()
Initializes a new instance of the AuthorizedPaymentClient class.
Declaration
public AuthorizedPaymentClient()
AuthorizedPaymentClient(IHttpClient)
Initializes a new instance of the AuthorizedPaymentClient class.
Declaration
public AuthorizedPaymentClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
AuthorizedPaymentClient(IHttpClient, ISerializer)
Initializes a new instance of the AuthorizedPaymentClient class.
Declaration
public AuthorizedPaymentClient(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. |
AuthorizedPaymentClient(ISerializer)
Initializes a new instance of the AuthorizedPaymentClient class.
Declaration
public AuthorizedPaymentClient(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 SourceGet(long, RequestOptions)
Gets an AuthorizedPayment by ID.
Declaration
public AuthorizedPayment Get(long id, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
long | id | The AuthorizedPayment ID. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
AuthorizedPayment | The AuthorizedPayment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
GetAsync(long, RequestOptions, CancellationToken)
Gets an AuthorizedPayment by ID.
Declaration
public Task<AuthorizedPayment> GetAsync(long id, RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
long | id | The AuthorizedPayment ID. |
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<AuthorizedPayment> | A task whose the result is the AuthorizedPayment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
Search(SearchRequest, RequestOptions)
Searches for AuthorizedPayment that match the criteria of AdvancedSearchRequest.
Declaration
public ResultsResourcesPage<AuthorizedPayment> Search(SearchRequest request, RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
SearchRequest | request | The search request parameters. |
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
ResultsResourcesPage<AuthorizedPayment> | A page of AuthorizedPayment. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
SearchAsync(SearchRequest, RequestOptions, CancellationToken)
Searches async for AuthorizedPayment that match the criteria of AdvancedSearchRequest.
Declaration
public Task<ResultsResourcesPage<AuthorizedPayment>> 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<AuthorizedPayment>> | A task whose result is a page of AuthorizedPayments. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |