Acquire.Accounting._accounts module¶
-
class
Accounts(user_guid=None, group=None, aclrules=None)[source]¶ Bases:
objectThis 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
Parameters: - account (
Account) – Account to check against group - bucket (dict, default=None) – Bucket to load data from
Returns: True if account in group, else False
Return type: bool
- account (
-
create_account(name, description=None, overdraft_limit=None, bucket=None, authorisation=None)[source]¶ Create a new account called ‘name’ in this group. This will return the existing account if it already exists
Parameters: - name (str) – Name of account to create
- description (default=None) – Description of account
- overdraft_limit (int, default=None) – Limit of overdraft
- bucket – Bucket to load data from
-
get_account(name, bucket=None)[source]¶ Return the account called ‘name’ from this group
Parameters: - name (
str) – Name of account to retrieve - bucket (
dict) – Bucket to load data from
Returns: Account object
Return type: Account- name (
-
group()[source]¶ Return the name of the group that this set of accounts refers to
Returns: Name of the group Return type: string
-
identifiers()[source]¶ Return the set of validated identifiers that are known to be attached to this group of accounts
-