Organization
Members
All the memberships that this organization has.
The OrganizationAPI that this object was created with.
created : Date
created : DateThe date that the organization was created at.
id : number
id : numberThe ID of this organization.
name : string
name : stringThe name of this organization.
website : string
website : stringThe website URL of this organization.
address : string
address : stringThe address of this organization.
uniqueId : string
uniqueId : stringThe unique ID of this organization.
taxNumber : string
taxNumber : stringThe tax number of this organization.
city : string
city : stringThe city where this organization is based.
state : string
state : stringThe state where this organization is based.
verified : boolean
verified : booleanThe verification status of this organization.
zipCode : string
zipCode : stringThe zip code where this organization is located.
counry : string
counry : stringThe country where this organization is based.
Methods
constructor(api, organization)
constructor(api, organization)Create a new Organization object using the Organization API.
apimust be an instance ofOrganizationApi;organizationmust implement theOrganizationInfointerface.
const details = await organizationApi.organizationInfo(organizationId)
const organization = new Organization(organizationApi, details)async update(details)
async update(details)Update this organization's details.
The details object must implement the interface OrganizationUpdateDetails.
The result is a boolean that indicates success.
if (await organization.update({name: 'New Name'})) {
// the organization's name was updated successfully
}async invite(email)
async invite(email)Invite a user to this organization by email.
The result is a boolean that indicates success.
if (await organization.invite(email)) {
// the user was invited successfully
}async remove()
async remove()Delete this organization.
The result is a boolean that indicates success.
if (await organization.remove()) {
// the organization was deleted successfully
}Last updated