-
Notifications
You must be signed in to change notification settings - Fork 2
AMType
Documentation > AMType
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. Because of the significance of the word 'Type' in the programming context, Amatino Python prefixes the class to become AMType.
In Amatino literature and documentation outside Amatino Python, you may see references to 'Types' - These are the 'AMType' class in the Amatino Python context.
You will most often encounter AMType when creating Accounts. Erstwhile, most of the work that AMType does occurs behind the scenes, where it maintains the fundamental double-entry equality, and you won't need to interact with it directly.
AMType operates as an Enumeration of five potential values: .asset, .liability, .income, .expense, and .equity. For example, here's AMType in action when creating an Account:
cash_account = Account.create(
session=session,
entity=mega_corp,
name='Cash',
am_type=AMType.asset, # <-- AMType enumeration as `.asset`
denomination=usd
)