Organization

Members

memberships : OrganizationMembership[]

All the memberships that this organization has.

The OrganizationAPI that this object was created with.

created : Date

The date that the organization was created at.

id : number

The ID of this organization.

name : string

The name of this organization.

website : string

The website URL of this organization.

address : string

The address of this organization.

uniqueId : string

The unique ID of this organization.

taxNumber : string

The tax number of this organization.

city : string

The city where this organization is based.

state : string

The state where this organization is based.

verified : boolean

The verification status of this organization.

zipCode : string

The zip code where this organization is located.

counry : string

The country where this organization is based.

Methods

constructor(api, organization)

Create a new Organization object using the Organization API.

const details = await organizationApi.organizationInfo(organizationId)
const organization = new Organization(organizationApi, 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)

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()

Delete this organization.

The result is a boolean that indicates success.

if (await organization.remove()) {
    // the organization was deleted successfully
}

Last updated