V2_OrganizationAPI

new V2_OrganizationAPI(rest)

This class is used to interact with Organizations in TidyHQ.
Parameters:
NameTypeDescription
restRestThe rest instance to use for requests.

Methods

(async) getAdmins(optionsopt) → {Promise.<TidyAPI_V2_Contacts>}

Returns all admins configured / provisioned for the current organization.
Parameters:
NameTypeAttributesDefaultDescription
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
limitnumber<optional>
The maximum number of admins to return.
offsetnumber<optional>
The number of admins to skip.
updated_sincestring<optional>
The timestamp of the last update in ISO 8601 format.
updated_beforestring<optional>
The timestamp of the last update in ISO 8601 format.
Returns:
- The admins.
Type: 
Promise.<TidyAPI_V2_Contacts>

(async) getOrganization(optionsopt) → {Promise.<TidyAPI_V2_Organization>}

Returns the organization the current token is associated with.
Parameters:
NameTypeAttributesDefaultDescription
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
Returns:
- The organization.
Type: 
Promise.<TidyAPI_V2_Organization>

(async) getRoles(optionsopt) → {Promise.<TidyAPI_V2_OrganizationRoles>}

Returns all roles configured / provisioned for the current organization.
Parameters:
NameTypeAttributesDefaultDescription
optionsobject<optional>
{}
Properties
NameTypeAttributesDescription
access_tokenstring<optional>
The access token to use.
limitnumber<optional>
The maximum number of roles to return.
offsetnumber<optional>
The number of roles to skip.
updated_sincestring<optional>
The timestamp of the last update in ISO 8601 format.
updated_beforestring<optional>
The timestamp of the last update in ISO 8601 format.
Returns:
- The roles.
Type: 
Promise.<TidyAPI_V2_OrganizationRoles>