Acquire.Accounting._accounts module

class Accounts(group=None)[source]

Bases: object

This class provides the interface to grouping and ungrouping accounts, and associating them with users and services. An account can belong to multiple groups. Authorisation of access to accounts is based on which group they are in. Typically the groups will refer to users, e.g. all of the accounts for a user will be in the user’s group, and can then be authorised by authorising the user

contains(account, bucket=None)[source]

Return whether or not this group contains the passed account

create_account(name, description=None, overdraft_limit=None, bucket=None)[source]

Create a new account called ‘name’ in this group. This will return the existing account if it already exists

get_account(name, bucket=None)[source]

Return the account called ‘name’ from this group

group()[source]

Return the name of the group that this set of accounts refers to

list_accounts(bucket=None)[source]

Return the names of all of the accounts in this group