Show / Hide Table of Contents

# Interface IAnybillClientCategoryModule

Module of the IAnybillClient for working with categories.

###### Namespace: anybill.POS.Client.Modules

###### Assembly: anybill.POS.Client.Abstractions.dll

##### Syntax

    public interface IAnybillClientCategoryModule

### Methods

#### GetAllCategoriesAsync(CancellationToken)

Get all categories

##### Declaration

    Task<IReadOnlyCollection<ICategoryResponse>> GetAllCategoriesAsync(CancellationToken cancellationToken = default(CancellationToken))

##### Parameters

Type | Name | Description
--- | --- | ---
System.Threading.CancellationToken | cancellationToken | The cancellation token.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<System.Collections.Generic.IReadOnlyCollection<ICategoryResponse>> | Returns an array of all existing categories

#### GetCategoryByIdAsync(Guid, CancellationToken)

Get category

##### Declaration

    Task<ICategoryResponse> GetCategoryByIdAsync(Guid categoryId, CancellationToken cancellationToken = default(CancellationToken))

##### Parameters

Type | Name | Description
--- | --- | ---
System.Guid | categoryId | Id of the category.
System.Threading.CancellationToken | cancellationToken | The cancellation token.

##### Returns

Type | Description
--- | ---
System.Threading.Tasks.Task<ICategoryResponse> | Returns the category with the given id.