# TransactionsDataTableBuilder

A TransactionsDataTableBuilder is used to setup and build two-dimensional arrays containing transactions.

### Constructor

```ts
new TransactionsDataTableBuilder(
   book, 
   transactions, 
   account?): TransactionsDataTableBuilder;
```

#### Parameters

| Parameter | Type |
| :------ | :------ |
| `book` | [`Book`](https://bkper.com/docs/api/bkper-js/classes/book.md) |
| `transactions` | [`Transaction`](https://bkper.com/docs/api/bkper-js/classes/transaction.md)[] |
| `account?` | [`Account`](https://bkper.com/docs/api/bkper-js/classes/account.md) |

#### Returns

`TransactionsDataTableBuilder`

### build()

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

Builds a two-dimensional array containing all transactions.

#### Returns

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

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

***

### formatDates()

```ts
formatDates(format): TransactionsDataTableBuilder;
```

Defines whether the dates should be formatted, based on date pattern of the [[Book]].

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `format` | `boolean` | Whether to format dates |

#### Returns

`TransactionsDataTableBuilder`

This builder with respective formatting option, for chaining.

***

### formatValues()

```ts
formatValues(format): TransactionsDataTableBuilder;
```

Defines whether amounts should be formatted based on [[DecimalSeparator]] of the [[Book]].

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `format` | `boolean` | Whether to format values |

#### Returns

`TransactionsDataTableBuilder`

This builder with respective formatting option, for chaining.

***

### getAccount()

```ts
getAccount(): Account | undefined;
```

Gets the account used to filter transactions, when applicable.

#### Returns

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

The account, when filtering by a single account.

***

### hiddenProperties()

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

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

#### Parameters

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

#### Returns

`TransactionsDataTableBuilder`

This builder with respective option, for chaining.

***

### ids()

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

Defines whether to include transaction ids and remote ids.

#### Parameters

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

#### Returns

`TransactionsDataTableBuilder`

This builder with respective option, for chaining.

***

### ~~includeIds()~~

```ts
includeIds(include): TransactionsDataTableBuilder;
```

> **Caution: Deprecated**
> Use [ids](https://bkper.com/docs/api/bkper-js/classes/transactionsdatatablebuilder.md#ids) instead.
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `include` | `boolean` |

#### Returns

`TransactionsDataTableBuilder`

***

### ~~includeProperties()~~

```ts
includeProperties(include): TransactionsDataTableBuilder;
```

> **Caution: Deprecated**
> Use [properties](https://bkper.com/docs/api/bkper-js/classes/transactionsdatatablebuilder.md#properties) instead.
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `include` | `boolean` |

#### Returns

`TransactionsDataTableBuilder`

***

### ~~includeUrls()~~

```ts
includeUrls(include): TransactionsDataTableBuilder;
```

> **Caution: Deprecated**
> Use [urls](https://bkper.com/docs/api/bkper-js/classes/transactionsdatatablebuilder.md#urls) instead.
#### Parameters

| Parameter | Type |
| :------ | :------ |
| `include` | `boolean` |

#### Returns

`TransactionsDataTableBuilder`

***

### properties()

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

Defines whether to include custom transaction properties.

#### Parameters

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

#### Returns

`TransactionsDataTableBuilder`

This builder with respective option, for chaining.

***

### recordedAt()

```ts
recordedAt(include): TransactionsDataTableBuilder;
```

Defines whether to include the "Recorded at" column.

#### Parameters

| Parameter | Type | Description |
| :------ | :------ | :------ |
| `include` | `boolean` | Whether to include the recorded at column |

#### Returns

`TransactionsDataTableBuilder`

This builder with respective option, for chaining.

***

### urls()

```ts
urls(include): TransactionsDataTableBuilder;
```

Defines whether to include attachments and url links.

#### Parameters

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

#### Returns

`TransactionsDataTableBuilder`

This builder with respective option, for chaining.
