Acquire.Accounting._balance module

class Balance(balance=None, liability=None, receivable=None, _is_safe=False)[source]

Bases: object

Very simple class that holds the balance, liability and recievable values for an account at a point in time

available(overdraft_limit=None)[source]

Return the available balance (balance - liability)

balance()[source]

Return the balance

static from_data(data)[source]

Construct a balance from the passed json-deserialised object

is_overdrawn(overdraft_limit=None)[source]

Return whether or not this balance is overdrawn

liability()[source]

Return the liability

receivable()[source]

Return the receivable

to_data()[source]

Return this balance as a JSON-serialisable object

static total(balances)[source]

Return the sum of the passed balances