Class PaymentMethodClient
Client with methods of Payment Method APIs.
Inherited Members
Namespace: MercadoPago.Client.PaymentMethod
Assembly: MercadoPago.dll
Syntax
public class PaymentMethodClient : MercadoPagoClient<PaymentMethod>
Constructors
| Edit this page View SourcePaymentMethodClient()
Initializes a new instance of the PaymentMethodClient class.
Declaration
public PaymentMethodClient()
PaymentMethodClient(IHttpClient)
Initializes a new instance of the PaymentMethodClient class.
Declaration
public PaymentMethodClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
PaymentMethodClient(IHttpClient, ISerializer)
Initializes a new instance of the PaymentMethodClient class.
Declaration
public PaymentMethodClient(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. |
PaymentMethodClient(ISerializer)
Initializes a new instance of the PaymentMethodClient class.
Declaration
public PaymentMethodClient(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 SourceList(RequestOptions)
Lists the Payment Methods.
Declaration
public ResourcesList<PaymentMethod> List(RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
ResourcesList<PaymentMethod> | The list of Payment Method. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
ListAsync(RequestOptions, CancellationToken)
Lists async the Payment Methods.
Declaration
public Task<ResourcesList<PaymentMethod>> ListAsync(RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<ResourcesList<PaymentMethod>> | A task whose the result is the list of Payment Method. |
Remarks
Check the API documentation here.
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |