# AccountsDataTableBuilder

A AccountsDataTableBuilder is used to setup and build two-dimensional arrays containing accounts.

### Constructor

```ts
new AccountsDataTableBuilder(accounts): AccountsDataTableBuilder;
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `accounts` | [`Account`](https://bkper.com/docs/api/bkper-js/classes/account.md)[] |

#### Returns

`AccountsDataTableBuilder`

### archived()

```ts
archived(include): AccountsDataTableBuilder;
```

Defines whether the archived accounts should be included.

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `include` | `boolean` | Whether to include archived accounts |

#### Returns

`AccountsDataTableBuilder`

This builder with respective include archived option, for chaining.

***

### build()

```ts
build(): Promise<any[][]>;
```

Builds a two-dimensional array containing all accounts.

#### Returns

`Promise`\<`any`[][]\>

A promise resolving to a two-dimensional array containing all accounts

***

### groups()

```ts
groups(include): AccountsDataTableBuilder;
```

Defines whether include account groups.

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `include` | `boolean` | Whether to include groups |

#### Returns

`AccountsDataTableBuilder`

This builder with respective include groups option, for chaining.

***

### hiddenProperties()

```ts
hiddenProperties(include): AccountsDataTableBuilder;
```

Defines whether to include hidden properties (keys ending with underscore "_").
Only relevant when [properties](https://bkper.com/docs/api/bkper-js/classes/accountsdatatablebuilder.md#properties) is enabled.
Default is false — hidden properties are excluded.

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `include` | `boolean` | Whether to include hidden properties |

#### Returns

`AccountsDataTableBuilder`

This builder with respective option, for chaining.

***

### ids()

```ts
ids(include): AccountsDataTableBuilder;
```

Defines whether include account ids.

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `include` | `boolean` | Whether to include ids |

#### Returns

`AccountsDataTableBuilder`

This builder with respective include ids option, for chaining.

***

### properties()

```ts
properties(include): AccountsDataTableBuilder;
```

Defines whether include custom account properties.

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `include` | `boolean` | Whether to include properties |

#### Returns

`AccountsDataTableBuilder`

This builder with respective include properties option, for chaining.
