OrganizationMembership
Members
The OrganizationApi that this object was created with.
organizationId : number
organizationId : numberThe organization id that this membership is associated with.
membershipId : string
membershipId : stringThe id of this membership.
userId : string
userId : stringThe id of the user that this membership is associated with.
Methods
constructor(api, membership)
constructor(api, membership)Create a new Membership object using the Organization API.
apimust be an instance ofOrganizationApi;membershipmust implement theOrganizationMembershipReferenceinterface.
async addRole(name)
async addRole(name)Add a new role to this membership.
The result is an OrganizationRole object or false if it failed.
async getRoles()
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()
async getOrganization()Get the organization associated with this membership.
The result is an Organization object or false if it failed.
reference()
reference()Create a UserReference object that is associated with this membership's user.
async organizationProfile()
async organizationProfile()Get this membership's organization profile.
The result of this function implements the OrganizationProfileInfo interface.
async remove()
async remove()Remove this membership from the organization.
The result is a boolean that indicates success.
Last updated