-
Notifications
You must be signed in to change notification settings - Fork 1
Entity
Documentation > Entity
An Amatino entity is a economic unit to be described by accounting information. Entities are described by Accounts and Transactions.
Examples of an Entity include a legal company, a consolidated group of companies, a project, or even a person.
Users may be granted fine-grained permissions to read and or write to individual Accounts within an Entity.
.session
- Session
The Session used to retrieve or create this Entity.
Example: See Session object
A unique Amatino identifier for this Entity
Example: "oB3cjSNKXklkJ4Tb"
The friendly name of this Entity
Example: "MegaCorp"
A unique identifier of the Amatino User who owns this Entity
Example: 689323
A description of the permissions granted to Amatino Users with respect to this Entity.
Example: {'9523413': {'56': {'write': False, 'read': True}}, '5235891': {'56': {'write': True, 'read': True}, '725': {'write': False, 'read': True}}}
Note: Expect the permissions graph to be refactored as an expressive object in future, with methods such as .grantsReadTo(user)
Friendly description of this Entity
Example: "A company devoted to complete and utter world domination"
The integer identification of the Region in which this Entity is physically stored
Example: 4
A flag indicating whether this Entity is active, or is deleted
Example: true
- session: Session
- name: String -
"My First Entity"
- description: String -
"Cayman Islands holding company"
- storageRegionId: [Optional]Number -
4
ornull
- callback: (Error, Entity)
const _ = Entity.create(
session,
"My First Entity",
"Cayman Islands holding company",
null,
(error, entity) => {
console.log(entity.name) // Logs "My First Entity"
});
- session: Session
- entityId: String
- callback: (Error, Entity)
const _ = Entity.retrieve(
session,
"oB3cjSNKXklkJ4Tb",
(error, entity) => {
console.log(entity.id) // Logs "oB3cjSNKXklkJ4Tb"
});
Not implemented
Not implemented