Class UserService
Class representing a set of user-related functionality.
Inherited Members
Namespace: EasyPost.Services
Assembly: EasyPost.dll
Syntax
public class UserService : EasyPostService, IEasyPostService
  Methods
| Improve this Doc View SourceAllChildren(AllChildren, CancellationToken)
List all Child User objects.
Declaration
public async Task<ChildUserCollection> AllChildren(AllChildren parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| AllChildren | parameters | AllChildren parameter set.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<ChildUserCollection> | ChildUserCollection instance.  | 
      
AllChildren(Nullable<Dictionary<String, Object>>, CancellationToken)
List all Child User objects. Related API documentation.
Declaration
public async Task<ChildUserCollection> AllChildren(Dictionary<string, object>? parameters = null, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Nullable<Dictionary<System.String, System.Object>> | parameters | Dictionary containing parameters to filter the result list with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<ChildUserCollection> | A ChildUserCollection instance.  | 
      
CreateChild(Dictionary<String, Object>, CancellationToken)
Create a child User for the current account. Related API documentation.
Declaration
public async Task<User> CreateChild(Dictionary<string, object> parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| Dictionary<System.String, System.Object> | parameters | Parameters to create the child User with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<User> | The created child User.  | 
      
CreateChild(CreateChild, CancellationToken)
Create a child User for the current account. Related API documentation.
Declaration
public async Task<User> CreateChild(CreateChild parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CreateChild | parameters | Parameters to create the child User with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<User> | The created child User.  | 
      
Delete(String, CancellationToken)
Delete a child User. Related API documentation.
Declaration
public async Task Delete(string id, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | The ID of the child User to delete.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task | None.  | 
      
GetNextPageOfChildren(ChildUserCollection, Nullable<Int32>, CancellationToken)
Get the next page of a paginated ChildUserCollection.
Declaration
public async Task<ChildUserCollection> GetNextPageOfChildren(ChildUserCollection collection, int? pageSize = null, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| ChildUserCollection | collection | The ChildUserCollection to get the next page of.  | 
      
| System.Nullable<System.Int32> | pageSize | The size of the next page.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<ChildUserCollection> | The next page, as a ChildUserCollection instance.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| EndOfPaginationError | Thrown if there is no next page to retrieve.  | 
      
Retrieve(Nullable<String>, CancellationToken)
Declaration
public async Task<User> Retrieve(string? id = null, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.Nullable<System.String> | id | The ID of the User to retrieve.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<User> | The retrieved User.  | 
      
RetrieveMe(CancellationToken)
Retrieve the current User.
Declaration
public async Task<User> RetrieveMe(CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<User> | The current User.  | 
      
Update(String, Dictionary<String, Object>, CancellationToken)
Update a User. Related API documentation.
Declaration
public async Task<User> Update(string id, Dictionary<string, object> parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | The ID of the User to update.  | 
      
| Dictionary<System.String, System.Object> | parameters | Data to update User with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<User> | The updated User.  | 
      
Update(String, Update, CancellationToken)
Update a User. Related API documentation.
Declaration
public async Task<User> Update(string id, Update parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | The ID of the User to update.  | 
      
| Update | parameters | Data to update User with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<User> | The updated User.  | 
      
UpdateBrand(String, Dictionary<String, Object>, CancellationToken)
Update a User's Brand. Related API documentation.
Declaration
public async Task<Brand> UpdateBrand(string id, Dictionary<string, object> parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | |
| Dictionary<System.String, System.Object> | parameters | Parameters to update the Brand with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<Brand> | The updated Brand.  | 
      
UpdateBrand(String, UpdateBrand, CancellationToken)
Update a User's Brand. Related API documentation.
Declaration
public async Task<Brand> UpdateBrand(string id, UpdateBrand parameters, CancellationToken cancellationToken = null)
  Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | id | |
| UpdateBrand | parameters | Parameters to update the Brand with.  | 
      
| CancellationToken | cancellationToken | 
Returns
| Type | Description | 
|---|---|
| Task<Brand> | The updated Brand.  |