[@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)<[`State`](../modules/BudgetStatement.md#state), [`BudgetStatementAction`](../modules/BudgetStatement.md#budgetstatementaction)\>

  ↳ **`BudgetStatement`**

## Constructors

### constructor

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

Creates a new BudgetStatement instance.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `initialState?` | `Partial`<`Omit`<[`BudgetStatementDocument`](../modules/BudgetStatement.md#budgetstatementdocument), ``"data"``\> & { `data`: `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:45](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/object.ts#L45)

## Properties

### state

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

#### Inherited from

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

#### Defined in

[src/document/object.ts:13](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L13)

___

### fileExtension

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

The file extension used to save budget statements.

#### Defined in

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

## 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/8be7e70/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/8be7e70/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/8be7e70/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/8be7e70/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/8be7e70/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/8be7e70/src/budget-statement/gen/account/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/8be7e70/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/8be7e70/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/8be7e70/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:22](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/comment/object.ts#L22)

___

### 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:88](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L88)

___

### documentType

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

Gets the type of document.

#### Returns

`string`

#### Inherited from

AccountObject.documentType

#### Defined in

[src/document/object.ts:81](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L81)

___

### 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/8be7e70/src/budget-statement/gen/base/object.ts#L38)

___

### initialState

• `get` **initialState**(): `Omit`<`Document`<`T`, `A`\>, ``"initialState"``\>

Gets the initial state of the document.

#### Returns

`Omit`<`Document`<`T`, `A`\>, ``"initialState"``\>

#### Inherited from

AccountObject.initialState

#### Defined in

[src/document/object.ts:109](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L109)

___

### 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:95](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L95)

___

### name

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

Gets the name of the document.

#### Returns

`string`

#### Inherited from

AccountObject.name

#### Defined in

[src/document/object.ts:74](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L74)

___

### operations

• `get` **operations**(): `Operation`<`BaseAction` \| `A`\>[]

Gets the list of operations performed on the document.

#### Returns

`Operation`<`BaseAction` \| `A`\>[]

#### Inherited from

AccountObject.operations

#### Defined in

[src/document/object.ts:116](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L116)

___

### revision

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

Gets the revision number of the document.

#### Returns

`number`

#### Inherited from

AccountObject.revision

#### Defined in

[src/document/object.ts:102](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L102)

___

### 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/8be7e70/src/budget-statement/gen/vesting/object.ts#L26)

## Audit

### addAuditReport

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

Adds audit reports to the budget statement.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `reports` | { `report`: `DocumentFile` ; `status`: [`AuditReportStatus`](../modules/BudgetStatement.md#auditreportstatus) ; `timestamp?`: `string`  }[] | An array of audit report objects to add. |

#### 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/8be7e70/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:37](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/audit/object.ts#L37)

___

### 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:58](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/audit/object.ts#L58)

___

### 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:47](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/audit/object.ts#L47)

## 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:10](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/comment/object.ts#L10)

___

### 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/8be7e70/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:18](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/comment/object.ts#L18)

___

### 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/8be7e70/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` \| [`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:34](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L34)

___

### getAttachment

▸ **getAttachment**(`attachment`): `DocumentFile`

Gets the attachment associated with the given key.

#### Parameters

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

#### Returns

`DocumentFile`

#### Inherited from

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

#### Defined in

[src/document/object.ts:124](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L124)

___

### 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:26](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/comment/object.ts#L26)

___

### 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/8be7e70/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:71](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/object.ts#L71)

___

### loadState

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

Loads a document state and a set of operations.

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `state` | `Pick`<`Document`<`BudgetStatementData`, [`BudgetStatementAction`](../modules/BudgetStatement.md#budgetstatementaction)\>, ``"name"`` \| ``"data"``\> | 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:165](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L165)

___

### 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:156](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L156)

___

### 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:148](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L148)

___

### 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:61](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/object.ts#L61)

___

### 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/8be7e70/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/8be7e70/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:132](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L132)

___

### 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/8be7e70/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/8be7e70/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:140](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L140)

___

### 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:14](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/comment/object.ts#L14)

___

### 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/8be7e70/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:81](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/object.ts#L81)

___

### stateFromFile

▸ `Static` `Protected` **stateFromFile**<`T`, `A`\>(`path`, `reducer`): `Promise`<`Document`<`T`, `BaseAction` \| `A`\>\>

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

#### Type parameters

| Name | Type |
| :------ | :------ |
| `T` | `T` |
| `A` | extends `Action`<`string`\> |

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `path` | `string` | The file path where the state is stored. |
| `reducer` | `Reducer`<`T`, `BaseAction` \| `A`\> | The reducer function that updates the state. |

#### Returns

`Promise`<`Document`<`T`, `BaseAction` \| `A`\>\>

The state of the document.

#### Inherited from

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

#### Defined in

[src/document/object.ts:63](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/document/object.ts#L63)

## 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:26](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/line-item/object.ts#L26)

___

### 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:54](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/line-item/object.ts#L54)

___

### 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:96](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/line-item/object.ts#L96)

___

### 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:82](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/line-item/object.ts#L82)

___

### 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:68](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/line-item/object.ts#L68)

___

### 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:40](https://github.com/acaldas/document-model-libs/blob/8be7e70/src/budget-statement/gen/line-item/object.ts#L40)
