Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface OrganizationMembership

Hierarchy

Index

Properties

Methods

Properties

role

role: string

Role

status

status: boolean

status

sys

sys: MetaSysProps & { user: { sys: MetaLinkProps } }

System metadata

Methods

delete

  • delete(): Promise<void>
  • Deletes this object on the server.

    example```javascript

    const contentful = require('contentful-management')

    const client = contentful.createClient({ accessToken: '' })

    client.getOrganization('organization_id') .then(org => org.getOrganizationMembership('organizationMembership_id')) .then((organizationMembership) => { organizationMembership.delete(); }) .catch(console.error)

    Returns Promise<void>

toPlainObject

update

  • Sends an update to the server with any changes made to the object's properties

    example
    const contentful = require('contentful-management')
    
    const client = contentful.createClient({
      accessToken: '<content_management_api_key>'
    })
    
    client.getOrganization('organization_id')
    .then(org => org.getOrganizationMembership('organizationMembership_id'))
    .then((organizationMembership) => {
     organizationMembership.role = 'member';
     organizationMembership.update();
    })
    .catch(console.error)

    Returns Promise<OrganizationMembership>

    Object returned from the server with updated changes.