Show / Hide Table of Contents

Class UserService

Class representing a set of user-related functionality.

Inheritance
System.Object
EasyPostService
UserService
Implements
IEasyPostService
IDisposable
Inherited Members
EasyPostService.Client
EasyPostService.RequestAsync<T>(Method, String, CancellationToken, Nullable<Dictionary<String, Object>>, Nullable<String>, ApiVersion)
EasyPostService.RequestAsync(Method, String, CancellationToken, Nullable<Dictionary<String, Object>>, ApiVersion)
EasyPostService.Dispose()
EasyPostService.Dispose(Boolean)
Namespace: EasyPost.Services
Assembly: EasyPost.dll
Syntax
public class UserService : EasyPostService, IEasyPostService

Methods

| Improve this Doc View Source

AllChildren(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

to use for the HTTP request.

Returns
Type Description
Task<ChildUserCollection>

ChildUserCollection instance.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<ChildUserCollection>

A ChildUserCollection instance.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<User>

The created child User.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<User>

The created child User.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task

None.

| Improve this Doc View Source

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

to use for the HTTP request.

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.

| Improve this Doc View Source

Retrieve(Nullable<String>, CancellationToken)

Retrieve a child User. If no ID is specified, the current User will be returned.

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

to use for the HTTP request.

Returns
Type Description
Task<User>

The retrieved User.

| Improve this Doc View Source

RetrieveMe(CancellationToken)

Retrieve the current User.

Declaration
public async Task<User> RetrieveMe(CancellationToken cancellationToken = null)
Parameters
Type Name Description
CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<User>

The current User.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<User>

The updated User.

| Improve this Doc View Source

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

to use for the HTTP request.

Returns
Type Description
Task<User>

The updated User.

| Improve this Doc View Source

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

The ID of the User to update the Brand of.

Dictionary<System.String, System.Object> parameters

Parameters to update the Brand with.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Brand>

The updated Brand.

| Improve this Doc View Source

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

The ID of the User to update the Brand of.

UpdateBrand parameters

Parameters to update the Brand with.

CancellationToken cancellationToken

to use for the HTTP request.

Returns
Type Description
Task<Brand>

The updated Brand.

Implements

IEasyPostService
IDisposable
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX