Class: PlatformAPI::OrganizationMember

Inherits:
Object
  • Object
show all
Defined in:
lib/platform-api/client.rb

Overview

An organization member is an individual with access to an organization.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationMember

Returns a new instance of OrganizationMember.



1659
1660
1661
# File 'lib/platform-api/client.rb', line 1659

def initialize(client)
  @client = client
end

Instance Method Details

#create_or_update(organization_name, body) ⇒ Object

Create a new organization member, or update their role.

Parameters:

  • organization_name:

    unique name of organization

  • body:

    the object to pass as the request payload



1667
1668
1669
# File 'lib/platform-api/client.rb', line 1667

def create_or_update(organization_name, body)
  @client.organization_member.create_or_update(organization_name, body)
end

#delete(organization_name, organization_member_email_or_app_id) ⇒ Object

Remove a member from the organization.

Parameters:

  • organization_name:

    unique name of organization

  • organization_member_email_or_app_id:

    email address of the organization member or unique identifier of app



1675
1676
1677
# File 'lib/platform-api/client.rb', line 1675

def delete(organization_name, organization_member_email_or_app_id)
  @client.organization_member.delete(organization_name, organization_member_email_or_app_id)
end

#list(organization_name) ⇒ Object

List members of the organization.

Parameters:

  • organization_name:

    unique name of organization



1682
1683
1684
# File 'lib/platform-api/client.rb', line 1682

def list(organization_name)
  @client.organization_member.list(organization_name)
end