[@acaldas/document-model-libs](../README.md) / [Exports](../modules.md) / [BudgetStatement](../modules/BudgetStatement.md) / BudgetStatement

# Class: BudgetStatement

[BudgetStatement](../modules/BudgetStatement.md).BudgetStatement

This is an abstract class representing a document and provides methods
for creating and manipulating documents.

**`Typeparam`**

T - The type of data stored in the document.

**`Typeparam`**

A - The type of action the document can take.

## Hierarchy

- `default`

- `default`

- `default`

- `default`

- `default`

- `default`

- [`BaseDocument`](Document.BaseDocument.md)<[`BudgetStatementState`](../modules/BudgetStatement.md#budgetstatementstate), [`BudgetStatementAction`](../modules/BudgetStatement.md#budgetstatementaction)\>

  ↳ **`BudgetStatement`**

## Table of contents

### Constructors

- [constructor](BudgetStatement.BudgetStatement.md#constructor)

### Properties

- [\_document](BudgetStatement.BudgetStatement.md#_document)
- [fileExtension](BudgetStatement.BudgetStatement.md#fileextension)

### Budget Statement Accessors

- [month](BudgetStatement.BudgetStatement.md#month)
- [owner](BudgetStatement.BudgetStatement.md#owner)
- [quoteCurrency](BudgetStatement.BudgetStatement.md#quotecurrency)

### Other Accessors

- [comments](BudgetStatement.BudgetStatement.md#comments)
- [created](BudgetStatement.BudgetStatement.md#created)
- [documentType](BudgetStatement.BudgetStatement.md#documenttype)
- [ftes](BudgetStatement.BudgetStatement.md#ftes)
- [initialState](BudgetStatement.BudgetStatement.md#initialstate)
- [lastModified](BudgetStatement.BudgetStatement.md#lastmodified)
- [name](BudgetStatement.BudgetStatement.md#name)
- [operations](BudgetStatement.BudgetStatement.md#operations)
- [revision](BudgetStatement.BudgetStatement.md#revision)
- [state](BudgetStatement.BudgetStatement.md#state)
- [vesting](BudgetStatement.BudgetStatement.md#vesting)

### Methods

- [addComment](BudgetStatement.BudgetStatement.md#addcomment)
- [addVesting](BudgetStatement.BudgetStatement.md#addvesting)
- [deleteComment](BudgetStatement.BudgetStatement.md#deletecomment)
- [deleteVesting](BudgetStatement.BudgetStatement.md#deletevesting)
- [dispatch](BudgetStatement.BudgetStatement.md#dispatch)
- [getAttachment](BudgetStatement.BudgetStatement.md#getattachment)
- [getComment](BudgetStatement.BudgetStatement.md#getcomment)
- [getVesting](BudgetStatement.BudgetStatement.md#getvesting)
- [loadFromFile](BudgetStatement.BudgetStatement.md#loadfromfile)
- [loadState](BudgetStatement.BudgetStatement.md#loadstate)
- [prune](BudgetStatement.BudgetStatement.md#prune)
- [redo](BudgetStatement.BudgetStatement.md#redo)
- [saveToFile](BudgetStatement.BudgetStatement.md#savetofile)
- [setFtes](BudgetStatement.BudgetStatement.md#setftes)
- [setMonth](BudgetStatement.BudgetStatement.md#setmonth)
- [setName](BudgetStatement.BudgetStatement.md#setname)
- [setOwner](BudgetStatement.BudgetStatement.md#setowner)
- [setQuoteCurrency](BudgetStatement.BudgetStatement.md#setquotecurrency)
- [undo](BudgetStatement.BudgetStatement.md#undo)
- [updateComment](BudgetStatement.BudgetStatement.md#updatecomment)
- [updateVesting](BudgetStatement.BudgetStatement.md#updatevesting)
- [fromFile](BudgetStatement.BudgetStatement.md#fromfile)
- [stateFromFile](BudgetStatement.BudgetStatement.md#statefromfile)

### Account

- [accounts](BudgetStatement.BudgetStatement.md#accounts)
- [addAccount](BudgetStatement.BudgetStatement.md#addaccount)
- [deleteAccount](BudgetStatement.BudgetStatement.md#deleteaccount)
- [getAccount](BudgetStatement.BudgetStatement.md#getaccount)
- [sortAccounts](BudgetStatement.BudgetStatement.md#sortaccounts)
- [updateAccount](BudgetStatement.BudgetStatement.md#updateaccount)

### Audit

- [addAuditReport](BudgetStatement.BudgetStatement.md#addauditreport)
- [deleteAuditReport](BudgetStatement.BudgetStatement.md#deleteauditreport)
- [getAuditReport](BudgetStatement.BudgetStatement.md#getauditreport)
- [getAuditReports](BudgetStatement.BudgetStatement.md#getauditreports)

### Line Item

- [addLineItem](BudgetStatement.BudgetStatement.md#addlineitem)
- [deleteLineItem](BudgetStatement.BudgetStatement.md#deletelineitem)
- [getLineItem](BudgetStatement.BudgetStatement.md#getlineitem)
- [getLineItems](BudgetStatement.BudgetStatement.md#getlineitems)
- [sortLineItems](BudgetStatement.BudgetStatement.md#sortlineitems)
- [updateLineItem](BudgetStatement.BudgetStatement.md#updatelineitem)

## Constructors

### constructor

• **new BudgetStatement**(`initialState?`)

Creates a new BudgetStatement instance.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `initialState?` | `Partial`<[`ExtendedState`](../modules/Document.md#extendedstate)<`Partial`<`BudgetStatementData`\>\>\> | An optional object representing the initial state of the BudgetStatement. |

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[constructor](Document.BaseDocument.md#constructor)

#### Defined in

[src/budget-statement/gen/object.ts:47](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/object.ts#L47)

## Properties

### \_document

• `Protected` **\_document**: [`Document`](../modules/Document.md#document)<`BudgetStatementData`, [`BudgetStatementAction`](../modules/BudgetStatement.md#budgetstatementaction)\>

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[_document](Document.BaseDocument.md#_document)

#### Defined in

[src/document/object.ts:19](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L19)

___

### fileExtension

▪ `Static` **fileExtension**: `string` = `'phbs'`

The file extension used to save budget statements.

#### Defined in

[src/budget-statement/gen/object.ts:40](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/object.ts#L40)

## Budget Statement Accessors

### month

• `get` **month**(): `Maybe`<`string`\>

Gets the month of the budget statement.

#### Returns

`Maybe`<`string`\>

#### Inherited from

BaseObject.month

#### Defined in

[src/budget-statement/gen/base/object.ts:18](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L18)

___

### owner

• `get` **owner**(): `Maybe`<[`Owner`](../modules/BudgetStatement.md#owner)\>

Gets the owner of the budget statement.

#### Returns

`Maybe`<[`Owner`](../modules/BudgetStatement.md#owner)\>

#### Inherited from

BaseObject.owner

#### Defined in

[src/budget-statement/gen/base/object.ts:26](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L26)

___

### quoteCurrency

• `get` **quoteCurrency**(): `Maybe`<`string`\>

Gets the quote currency of the budget statement.

#### Returns

`Maybe`<`string`\>

#### Inherited from

BaseObject.quoteCurrency

#### Defined in

[src/budget-statement/gen/base/object.ts:34](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L34)

___

## Other Accessors

### comments

• `get` **comments**(): [`Comment`](../modules/BudgetStatement.md#comment)[]

#### Returns

[`Comment`](../modules/BudgetStatement.md#comment)[]

#### Inherited from

CommentObject.comments

#### Defined in

[src/budget-statement/gen/comment/object.ts:26](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/comment/object.ts#L26)

___

### created

• `get` **created**(): `string`

Gets the timestamp of the date the document was created.

#### Returns

`string`

#### Inherited from

AccountObject.created

#### Defined in

[src/document/object.ts:108](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L108)

___

### documentType

• `get` **documentType**(): `string`

Gets the type of document.

#### Returns

`string`

#### Inherited from

AccountObject.documentType

#### Defined in

[src/document/object.ts:101](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L101)

___

### ftes

• `get` **ftes**(): `Maybe`<[`Ftes`](../modules/BudgetStatement.md#ftes)\>

#### Returns

`Maybe`<[`Ftes`](../modules/BudgetStatement.md#ftes)\>

#### Inherited from

BaseObject.ftes

#### Defined in

[src/budget-statement/gen/base/object.ts:38](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L38)

___

### initialState

• `get` **initialState**(): [`ExtendedState`](../modules/Document.md#extendedstate)<`T`\>

Gets the initial state of the document.

#### Returns

[`ExtendedState`](../modules/Document.md#extendedstate)<`T`\>

#### Inherited from

AccountObject.initialState

#### Defined in

[src/document/object.ts:129](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L129)

___

### lastModified

• `get` **lastModified**(): `string`

Gets the timestamp of the date the document was last modified.

#### Returns

`string`

#### Inherited from

AccountObject.lastModified

#### Defined in

[src/document/object.ts:115](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L115)

___

### name

• `get` **name**(): `string`

Gets the name of the document.

#### Returns

`string`

#### Inherited from

AccountObject.name

#### Defined in

[src/document/object.ts:94](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L94)

___

### operations

• `get` **operations**(): [`Operation`](../modules/Document.md#operation)<[`BaseAction`](../modules/Document.md#baseaction) \| `A`\>[]

Gets the list of operations performed on the document.

#### Returns

[`Operation`](../modules/Document.md#operation)<[`BaseAction`](../modules/Document.md#baseaction) \| `A`\>[]

#### Inherited from

AccountObject.operations

#### Defined in

[src/document/object.ts:87](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L87)

___

### revision

• `get` **revision**(): `number`

Gets the revision number of the document.

#### Returns

`number`

#### Inherited from

AccountObject.revision

#### Defined in

[src/document/object.ts:122](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L122)

___

### state

• `get` **state**(): `T`

Gets the current state of the document.

#### Returns

`T`

#### Inherited from

AccountObject.state

#### Defined in

[src/document/object.ts:80](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L80)

___

### vesting

• `get` **vesting**(): [`Vesting`](../modules/BudgetStatement.md#vesting)[]

#### Returns

[`Vesting`](../modules/BudgetStatement.md#vesting)[]

#### Inherited from

VestingObject.vesting

#### Defined in

[src/budget-statement/gen/vesting/object.ts:26](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/vesting/object.ts#L26)

## Methods

### addComment

▸ **addComment**(`comments`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `comments` | [`CommentInput`](../modules/BudgetStatement.md#commentinput)[] |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

CommentObject.addComment

#### Defined in

[src/budget-statement/gen/comment/object.ts:14](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/comment/object.ts#L14)

___

### addVesting

▸ **addVesting**(`vesting`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `vesting` | [`VestingInput`](../modules/BudgetStatement.md#vestinginput)[] |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

VestingObject.addVesting

#### Defined in

[src/budget-statement/gen/vesting/object.ts:14](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/vesting/object.ts#L14)

___

### deleteComment

▸ **deleteComment**(`comments`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `comments` | `string`[] |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

CommentObject.deleteComment

#### Defined in

[src/budget-statement/gen/comment/object.ts:22](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/comment/object.ts#L22)

___

### deleteVesting

▸ **deleteVesting**(`vesting`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `vesting` | `string`[] |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

VestingObject.deleteVesting

#### Defined in

[src/budget-statement/gen/vesting/object.ts:22](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/vesting/object.ts#L22)

___

### dispatch

▸ `Protected` **dispatch**(`action`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Dispatches an action to update the state of the document.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `action` | [`BaseAction`](../modules/Document.md#baseaction) \| [`BudgetStatementAction`](../modules/BudgetStatement.md#budgetstatementaction) | The action to dispatch. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

The Document instance.

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[dispatch](Document.BaseDocument.md#dispatch)

#### Defined in

[src/document/object.ts:40](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L40)

___

### getAttachment

▸ **getAttachment**(`attachment`): [`DocumentFile`](../modules/Document.md#documentfile)

Gets the attachment associated with the given key.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `attachment` | `string` | The key of the attachment to retrieve. |

#### Returns

[`DocumentFile`](../modules/Document.md#documentfile)

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[getAttachment](Document.BaseDocument.md#getattachment)

#### Defined in

[src/document/object.ts:137](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L137)

___

### getComment

▸ **getComment**(`key`): `undefined` \| [`Comment`](../modules/BudgetStatement.md#comment)

#### Parameters

| Name | Type |
| :------ | :------ |
| `key` | `string` |

#### Returns

`undefined` \| [`Comment`](../modules/BudgetStatement.md#comment)

#### Inherited from

CommentObject.getComment

#### Defined in

[src/budget-statement/gen/comment/object.ts:30](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/comment/object.ts#L30)

___

### getVesting

▸ **getVesting**(`key`): `undefined` \| [`Vesting`](../modules/BudgetStatement.md#vesting)

#### Parameters

| Name | Type |
| :------ | :------ |
| `key` | `string` |

#### Returns

`undefined` \| [`Vesting`](../modules/BudgetStatement.md#vesting)

#### Inherited from

VestingObject.getVesting

#### Defined in

[src/budget-statement/gen/vesting/object.ts:30](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/vesting/object.ts#L30)

___

### loadFromFile

▸ **loadFromFile**(`path`): `Promise`<`void`\>

Loads the budget statement from a file.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path to the file to load. |

#### Returns

`Promise`<`void`\>

A promise that resolves with the loaded `BudgetStatement` instance.

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[loadFromFile](Document.BaseDocument.md#loadfromfile)

#### Defined in

[src/budget-statement/gen/object.ts:70](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/object.ts#L70)

___

### loadState

▸ **loadState**(`state`, `operations`): `void`

Loads a document state and a set of operations.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `state` | `Pick`<[`ExtendedState`](../modules/Document.md#extendedstate)<`BudgetStatementData`\>, ``"name"`` \| ``"state"``\> | The state to load. |
| `operations` | `number` | The operations to apply to the document. |

#### Returns

`void`

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[loadState](Document.BaseDocument.md#loadstate)

#### Defined in

[src/document/object.ts:178](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L178)

___

### prune

▸ **prune**(`start?`, `end?`): `void`

Removes a range of operations from the document.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `start?` | `number` | The starting index of the range to remove. |
| `end?` | `number` | The ending index of the range to remove. |

#### Returns

`void`

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[prune](Document.BaseDocument.md#prune)

#### Defined in

[src/document/object.ts:169](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L169)

___

### redo

▸ **redo**(`count`): `void`

Reapplies a number of actions to the document.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `count` | `number` | The number of actions to reapply. |

#### Returns

`void`

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[redo](Document.BaseDocument.md#redo)

#### Defined in

[src/document/object.ts:161](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L161)

___

### saveToFile

▸ **saveToFile**(`path`, `name?`): `Promise`<`string`\>

Saves the budget statement to a file.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path to the file to save. |
| `name?` | `string` | - |

#### Returns

`Promise`<`string`\>

A promise that resolves when the save operation completes.

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[saveToFile](Document.BaseDocument.md#savetofile)

#### Defined in

[src/budget-statement/gen/object.ts:60](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/object.ts#L60)

___

### setFtes

▸ **setFtes**(`ftes`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `ftes` | [`FtesInput`](../modules/BudgetStatement.md#ftesinput) |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

BaseObject.setFtes

#### Defined in

[src/budget-statement/gen/base/object.ts:54](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L54)

___

### setMonth

▸ **setMonth**(`month`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `month` | `string` |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

BaseObject.setMonth

#### Defined in

[src/budget-statement/gen/base/object.ts:46](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L46)

___

### setName

▸ **setName**(`name`): `void`

Sets the name of the document.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `name` | `string` | The new name of the document. |

#### Returns

`void`

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[setName](Document.BaseDocument.md#setname)

#### Defined in

[src/document/object.ts:145](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L145)

___

### setOwner

▸ **setOwner**(`owner`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `owner` | [`OwnerInput`](../modules/BudgetStatement.md#ownerinput) |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

BaseObject.setOwner

#### Defined in

[src/budget-statement/gen/base/object.ts:42](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L42)

___

### setQuoteCurrency

▸ **setQuoteCurrency**(`currency`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `currency` | `string` |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

BaseObject.setQuoteCurrency

#### Defined in

[src/budget-statement/gen/base/object.ts:50](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/base/object.ts#L50)

___

### undo

▸ **undo**(`count`): `void`

Reverts a number of actions from the document.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `count` | `number` | The number of actions to revert. |

#### Returns

`void`

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[undo](Document.BaseDocument.md#undo)

#### Defined in

[src/document/object.ts:153](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L153)

___

### updateComment

▸ **updateComment**(`comments`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `comments` | `CommentUpdateInput`[] |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

CommentObject.updateComment

#### Defined in

[src/budget-statement/gen/comment/object.ts:18](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/comment/object.ts#L18)

___

### updateVesting

▸ **updateVesting**(`vesting`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Parameters

| Name | Type |
| :------ | :------ |
| `vesting` | [`VestingUpdateInput`](../modules/BudgetStatement.md#vestingupdateinput)[] |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

VestingObject.updateVesting

#### Defined in

[src/budget-statement/gen/vesting/object.ts:18](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/vesting/object.ts#L18)

___

### fromFile

▸ `Static` **fromFile**(`path`): `Promise`<[`BudgetStatement`](BudgetStatement.BudgetStatement.md)\>

Creates a new `BudgetStatement` instance from a file.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The path to the file to load. |

#### Returns

`Promise`<[`BudgetStatement`](BudgetStatement.BudgetStatement.md)\>

A promise that resolves with the loaded `BudgetStatement` instance.

#### Defined in

[src/budget-statement/gen/object.ts:80](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/object.ts#L80)

___

### stateFromFile

▸ `Static` `Protected` **stateFromFile**<`T`, `A`\>(`path`, `reducer`): `Promise`<[`Document`](../modules/Document.md#document)<`T`, `A`\>\>

Loads the state of the document from a file and returns it.

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | `T` |
| `A` | extends [`Action`](../modules/Document.md#action)<`string`, `unknown`\> |

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The file path where the state is stored. |
| `reducer` | [`Reducer`](../modules/Document.md#reducer)<`T`, `A`\> | The reducer function that updates the state. |

#### Returns

`Promise`<[`Document`](../modules/Document.md#document)<`T`, `A`\>\>

The state of the document.

#### Inherited from

[BaseDocument](Document.BaseDocument.md).[stateFromFile](Document.BaseDocument.md#statefromfile)

#### Defined in

[src/document/object.ts:69](https://github.com/acaldas/document-model-libs/blob/d48c213/src/document/object.ts#L69)

## Account

### accounts

• `get` **accounts**(): [`Account`](../modules/BudgetStatement.md#account)[]

Returns an array of all accounts in the budget statement.

#### Returns

[`Account`](../modules/BudgetStatement.md#account)[]

#### Inherited from

AccountObject.accounts

#### Defined in

[src/budget-statement/gen/account/object.ts:69](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/account/object.ts#L69)

___

### addAccount

▸ **addAccount**(`accounts`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Adds one or more accounts to the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `accounts` | [`AccountInput`](../modules/BudgetStatement.md#accountinput)[] | An array of AccountInput objects to add. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

AccountObject.addAccount

#### Defined in

[src/budget-statement/gen/account/object.ts:29](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/account/object.ts#L29)

___

### deleteAccount

▸ **deleteAccount**(`accounts`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Deletes one or more accounts from the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `accounts` | `string`[] | An array of addresses of the accounts to delete. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

AccountObject.deleteAccount

#### Defined in

[src/budget-statement/gen/account/object.ts:50](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/account/object.ts#L50)

___

### getAccount

▸ **getAccount**(`address`): `undefined` \| [`Account`](../modules/BudgetStatement.md#account)

Returns the Account object with the specified address.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `address` | `string` | The address of the Account to retrieve. |

#### Returns

`undefined` \| [`Account`](../modules/BudgetStatement.md#account)

#### Inherited from

AccountObject.getAccount

#### Defined in

[src/budget-statement/gen/account/object.ts:79](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/account/object.ts#L79)

___

### sortAccounts

▸ **sortAccounts**(`accounts`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Sorts the accounts inthe budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `accounts` | `string`[] | An array of addresses of the accounts to sort. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

AccountObject.sortAccounts

#### Defined in

[src/budget-statement/gen/account/object.ts:60](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/account/object.ts#L60)

___

### updateAccount

▸ **updateAccount**(`accounts`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Updates one or more existing accounts in the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `accounts` | `AccountUpdateInput`[] | An array of AccountInput objects to update. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

AccountObject.updateAccount

#### Defined in

[src/budget-statement/gen/account/object.ts:40](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/account/object.ts#L40)

## Audit

### addAuditReport

▸ **addAuditReport**(`reports`, `attachments`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Adds audit reports to the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `reports` | [`AuditReport`](../modules/BudgetStatement.md#auditreport)[] | An array of audit report objects to add. |
| `attachments` | [`DocumentFile`](../modules/Document.md#documentfile) & { `hash`: `string`  }[] | - |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

AuditObject.addAuditReport

#### Defined in

[src/budget-statement/gen/audit/object.ts:21](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/audit/object.ts#L21)

___

### deleteAuditReport

▸ **deleteAuditReport**(`reports`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Deletes audit reports from the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `reports` | `string`[] | An array of objects that contain the report attachment name of the audits items to be deleted. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

AuditObject.deleteAuditReport

#### Defined in

[src/budget-statement/gen/audit/object.ts:34](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/audit/object.ts#L34)

___

### getAuditReport

▸ **getAuditReport**(`report`): `undefined` \| [`AuditReport`](../modules/BudgetStatement.md#auditreport)

Retrieves a specific audit report from the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `report` | `string` | The name of the attachment of the report to be retrieved. |

#### Returns

`undefined` \| [`AuditReport`](../modules/BudgetStatement.md#auditreport)

The audit report object if it exists, or undefined if not.

#### Inherited from

AuditObject.getAuditReport

#### Defined in

[src/budget-statement/gen/audit/object.ts:55](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/audit/object.ts#L55)

___

### getAuditReports

▸ **getAuditReports**(): [`AuditReport`](../modules/BudgetStatement.md#auditreport)[]

Retrieves all audit reports from the budget statement.

#### Returns

[`AuditReport`](../modules/BudgetStatement.md#auditreport)[]

An array of audit report objects.

#### Inherited from

AuditObject.getAuditReports

#### Defined in

[src/budget-statement/gen/audit/object.ts:44](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/audit/object.ts#L44)

## Line Item

### addLineItem

▸ **addLineItem**(`account`, `lineItems`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Adds a line item to the specified account.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `account` | `string` | The address of the account to which the line item will be added. |
| `lineItems` | `Partial`<[`LineItem`](../modules/BudgetStatement.md#lineitem)\> & `Pick`<[`LineItem`](../modules/BudgetStatement.md#lineitem), ``"category"`` \| ``"group"``\>[] | An array of line item objects to be added to the account. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

LineItemObject.addLineItem

#### Defined in

[src/budget-statement/gen/line-item/object.ts:31](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/line-item/object.ts#L31)

___

### deleteLineItem

▸ **deleteLineItem**(`account`, `lineItems`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Deletes line items for the specified account.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `account` | `string` | The address of the account for which line items will be deleted. |
| `lineItems` | `LineItemDeleteInput`[] | An array of objects that contain the category and group of the line items to be deleted. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

LineItemObject.deleteLineItem

#### Defined in

[src/budget-statement/gen/line-item/object.ts:59](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/line-item/object.ts#L59)

___

### getLineItem

▸ **getLineItem**(`account`, `lineItem`): `undefined` \| [`LineItem`](../modules/BudgetStatement.md#lineitem)

Retrieves a specific line item for the specified account.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `account` | `string` | The address of the account for which the line item will be retrieved. |
| `lineItem` | `LineItemDeleteInput` | An object that contains the category and group of the line item to be retrieved. |

#### Returns

`undefined` \| [`LineItem`](../modules/BudgetStatement.md#lineitem)

The line item object that matches the specified category and group, or undefined if it does not exist.

#### Inherited from

LineItemObject.getLineItem

#### Defined in

[src/budget-statement/gen/line-item/object.ts:100](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/line-item/object.ts#L100)

___

### getLineItems

▸ **getLineItems**(`account`): `undefined` \| [`LineItem`](../modules/BudgetStatement.md#lineitem)[]

Retrieves line items for the specified account.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `account` | `string` | The address of the account for which line items will be retrieved. |

#### Returns

`undefined` \| [`LineItem`](../modules/BudgetStatement.md#lineitem)[]

An array of line item objects for the specified account, or undefined if the account does not exist.

#### Inherited from

LineItemObject.getLineItems

#### Defined in

[src/budget-statement/gen/line-item/object.ts:87](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/line-item/object.ts#L87)

___

### sortLineItems

▸ **sortLineItems**(`account`, `lineItems`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Sorts the line items of an account.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `account` | `string` | The account containing the line items to sort. |
| `lineItems` | `LineItemsSortInput`[] | An array of line items to sort. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

LineItemObject.sortLineItems

#### Defined in

[src/budget-statement/gen/line-item/object.ts:73](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/line-item/object.ts#L73)

___

### updateLineItem

▸ **updateLineItem**(`account`, `lineItems`): [`BudgetStatement`](BudgetStatement.BudgetStatement.md)

Updates line items for the specified account.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `account` | `string` | The address of the account for which line items will be updated. |
| `lineItems` | `LineItemUpdateInput`[] | An array of line item input objects to be updated. |

#### Returns

[`BudgetStatement`](BudgetStatement.BudgetStatement.md)

#### Inherited from

LineItemObject.updateLineItem

#### Defined in

[src/budget-statement/gen/line-item/object.ts:45](https://github.com/acaldas/document-model-libs/blob/d48c213/src/budget-statement/gen/line-item/object.ts#L45)
