OrganizationMembership

Members

The OrganizationApi that this object was created with.

organizationId : number

The organization id that this membership is associated with.

membershipId : string

The id of this membership.

userId : string

The id of the user that this membership is associated with.

Methods

constructor(api, membership)

Create a new Membership object using the Organization API.

async addRole(name)

Add a new role to this membership.

The result is an OrganizationRole object or false if it failed.

async getRoles()

Get all the roles associated with this membership.

The result is an array of OrganizationRole objects or false if it failed.

async getOrganization()

Get the organization associated with this membership.

The result is an Organization object or false if it failed.

reference()

Create a UserReference object that is associated with this membership's user.

async organizationProfile()

Get this membership's organization profile.

The result of this function implements the OrganizationProfileInfo interface.

async remove()

Remove this membership from the organization.

The result is a boolean that indicates success.

Last updated