Acquire.Accounting._account module¶
-
class
Account(name=None, description=None, uid=None, bucket=None)[source]¶ Bases:
objectThis class represents a single account in the ledger. It has a balance, and a record of the set of transactions that have been applied.
The account really holds two accounts: the liability account and actual capital account. We combine both together into a single account to ensure that updates occur atomically
All data for this account is stored in the object store
Assert that the passed authorisation is valid for this account
-
available_balance(bucket=None)[source]¶ Return the available balance of this account. This is the amount of value that can be spent (e.g. includes overdraft and fixed daily spend limits, and except any outstanding liabilities)
-
balance_status(bucket=None)[source]¶ Return the overall balance status as a dictionary with keys ‘balance’, ‘liability’, ‘receivable’ and ‘spent_today’
-
static
from_data(data)[source]¶ Construct and return an Account from the passed dictionary that has been decoded from json