Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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:
expense. Each value is itself an
Object containing a Number
.value and String
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
See the Account class documentation for examples of Type in action.