Hugh Jeremy edited this page Aug 17, 2018 · 2 revisions

Documentation > Type

Double-entry accounting divides accounts into five fundamental types: Assets, liabilities, equities, incomes and expenses. Throughout Amatino, these five constants are referred to as Types.

You will most often encounter Types when creating Accounts. Erstwhile, most of the work that Types do occurs behind the scenes, and you won't need to interact with them directly.

Under the hood, Types allow Amatino to maintain the fundamental double-entry equality, wherein all accounts balance to zero.

The Type object is an enumeration of the five possible types: .asset, .liability, equity, income, and expense. Each value is itself an Object containing a Number .value and String .name.


.value: 1
.name: "asset"


.value: 2
.name: "liability"


.value: 3
.name: "equity"


.value: 4
.name: "income"


.value: 5
.name: "expense"


You will most often need to use the Type enumeration when creating or updating Accounts. In such cases, you will pass a Type value as a parameter. For example, you might pass Type.asset when creating an asset Account. Account objects provide their Type in their .type property.

See the Account class documentation for examples of Type in action.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.