-
Notifications
You must be signed in to change notification settings - Fork 2
Entity
Documentation > Entity
An Amatino entity is a economic unit to be described by accounting information. Entities are described by accounts, transactions, and entries.
An example of an entity might be a legal company, a consolidated group of companies, a project, or even a person.
.session - Session
The underlying credentials used to retrieve this Entity
The unique identifier of this Entity across all of Amatino
Example: '8AXpUrZx5fpBtl1o'
The human-friendly name of this Entity
Example: 'Mega Corporation
The description of this Entity
Example: 'A company devoted to complete and utter world domination'
The integer identifier of the physical region in which this Entity's data is stored
Example: 4
The integer identifier of the User who owns this Entity
Example: 869067642534
A indicator of whether this Entity is in an active (True) or deleted (False) state.
.permissions_graph - PermissionsGraph
An object containing the permissions granted in this Entity to Users. For example, read access on a particular account.
Create a new Entity.
mega_corp = Entity.create(
session=session,
name='Mega Corporation'
)Retrieve an existing Entity.
- session: Session
- entity_id: str
mega_corp = Entity.retrieve(
session=session,
entity_id='8AXpUrZx5fpBtl1o'
)Replace metadata describing this Entity. All parameters are optional, and those that you do not provide will default to the Entity's existing properties.
NB that .update() does not modify the Entity instance in place. The returned Entity instance is updated.
- name: Optional[str]
- description: Optional[str]
- owner: Optional[User]
- permissions_graph: Optional[PermissionsGraph]
updated_entity = mega_corp.update(
description="New, fancier description"
)