Interface IPartnerAgentBranches
Represents the interface for branch-related operations in the Partner Agent API client.
Namespace: PAccess.PartnerAgents.ApiClient.Services.Branches
Assembly: PAccess.PartnerAgents.ApiClient.dll
Syntax
public interface IPartnerAgentBranches
Methods
View SourceGetAllAsync(CancellationToken)
Retrieves all branches asynchronously.
Declaration
Task<IReadOnlyList<BranchDetails>> GetAllAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<BranchDetails>> | A task representing the asynchronous operation that returns the list of all branches. |
GetBranchUsersAsync(int, CancellationToken)
Retrieves the users of a branch asynchronously.
Declaration
Task<IReadOnlyList<UserDetails>> GetBranchUsersAsync(int id, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The ID of the branch. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<IReadOnlyList<UserDetails>> | A task representing the asynchronous operation that returns the list of users belonging to the branch. |
GetByIdAsync(int, CancellationToken)
Retrieves a branch by ID asynchronously.
Declaration
Task<BranchDetails?> GetByIdAsync(int id, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| int | id | The ID of the branch. |
| CancellationToken | cancellationToken | The cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<BranchDetails> | A task representing the asynchronous operation that returns the branch with the specified ID. |