Class Organisation
¶
A branch may belong to no organisation or to one organisation. Usually the organisation is returned as part of the login response and contains some information about the organisation, such as the name and its unique identifier.
var api = new TVS.Api();
api.login('organisation-username', 'password').then(function(loginResponse) {
// name of the organisation, the user belongs to
if (loginResponse.Organisation) {
console.log('Organisation:', loginResponse.Organisation.Name);
} else {
console.log('User does not belong to any organisation');
}
});
- class Organisation()¶
Captures information about an organisation. A user account may be associated with an organisation through branch membership and different rules and visibility of information may apply based on the branch and/or organisation.
- Arguments
json (
object()
) – The original JSON data object on which basis this organisation object is created.
Properties
- Organisation.Id¶
The unique identifier of the organisation.
- Organisation.Name¶
The unique name of the organisation.
- Organisation.Description¶
An optional description of the organisation.