View Source API Reference bookk v0.1.3
Modules
An Account is pretty much like a bucked. It has a single purpose: holding a measurable amount of something, in this case it's currency.
An account class has properties that are inherited by accounts and serves as a way of grouping account's balances.
An Account head is a struct contained all the values necessary to
either fetch or create a Bookk.Account
from/into a Bookk.Ledger
.
A Chart of Accounts (abbrv.: CoA) is a mapping of all the accounts and all the ledgers that can exist in your system. But instead of hard-coding them, you define patterns for accounts and ledgers supported by your application using functions and pattern matching.
An interledger entry is a collection of journal entries affecting
multiple ledgers that must be transacted under the same accounting
transaction. It's somewhat analogous to an Ecto.Multi
holding
multiple operations or a git commit that affect multiple files.
A Journal Entry is a set of operations that must be transacted under the same accounting transaction. Those operations describe a change in balance for an account. Operations are analogous to git commits, they represent a diff on a account's balance.
A ledger is a book that holds accounts. Traditionally, ledgers would also hold the journal entries that changed the accounts but, in this library, persisting those journal entries is considered off scope. You may persist state the way the best fits your needs.
A state struct that holds multiple ledgers. It's considered "naive" because it doesn't hold any information regarding the journal entries that put the state into its current value.
DSL notation for describing an interledger entries
(Bookk.InterledgerEntry
).
An operation describe a change in balance on a single account
(Bookk.Account
).
An error representing that something (a journal entry, a ledger, a state...) isn't balanced.