Class UserClient
Client to get the User information.
Inherited Members
Namespace: MercadoPago.Client.User
Assembly: MercadoPago.dll
Syntax
public class UserClient : MercadoPagoClient<User>
Constructors
| Edit this page View SourceUserClient()
Initializes a new instance of the UserClient class.
Declaration
public UserClient()
UserClient(IHttpClient)
Initializes a new instance of the UserClient class.
Declaration
public UserClient(IHttpClient httpClient)
Parameters
Type | Name | Description |
---|---|---|
IHttpClient | httpClient | The http client that will be used in HTTP requests. |
UserClient(IHttpClient, ISerializer)
Initializes a new instance of the UserClient class.
Declaration
public UserClient(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. |
UserClient(ISerializer)
Initializes a new instance of the UserClient class.
Declaration
public UserClient(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(RequestOptions)
Get the User information using the Access Token.
Declaration
public User Get(RequestOptions requestOptions = null)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | requestOptions |
Returns
Type | Description |
---|---|
User | The User. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |
GetAsync(RequestOptions, CancellationToken)
Get async the User information using the Access Token.
Declaration
public Task<User> GetAsync(RequestOptions requestOptions = null, CancellationToken cancellationToken = default)
Parameters
Type | Name | Description |
---|---|---|
RequestOptions | requestOptions | |
CancellationToken | cancellationToken | Cancellation token. |
Returns
Type | Description |
---|---|
Task<User> | A task whose the result is the User. |
Exceptions
Type | Condition |
---|---|
MercadoPagoException | If a unexpected exception occurs. |
MercadoPagoApiException | If the API returns a error. |