Interface IPartnerAgentUsers
Represents the interface for user-related operations in the Partner Agent API client.
Namespace: PAccess.PartnerAgents.ApiClient.Services.Users
Assembly: PAccess.PartnerAgents.ApiClient.dll
Syntax
public interface IPartnerAgentUsers
Methods
View SourceCreateAsync(CreateUserRequest, CancellationToken)
Creates a user asynchronously.
Declaration
Task<CreateUserResponse> CreateAsync(CreateUserRequest request, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateUserRequest | request | The request object containing the details of the user creation. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<CreateUserResponse> | A task representing the asynchronous operation that returns the response of the user creation. |
GetAllAsync(CancellationToken)
Retrieves all users asynchronously.
Declaration
Task<IReadOnlyList<UserDetails>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<UserDetails>> | A task representing the asynchronous operation that returns the list of all users. |
GetByIdAsync(int, CancellationToken)
Retrieves a user by ID asynchronously.
Declaration
Task<UserDetails?> GetByIdAsync(int id, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The ID of the user. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<UserDetails> | A task representing the asynchronous operation that returns the user with the specified ID. |