Class: PlatformAPI::OrganizationInvitation

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

Overview

An organization invitation represents an invite to an organization.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationInvitation

Returns a new instance of OrganizationInvitation.


1819
1820
1821
# File 'lib/platform-api/client.rb', line 1819

def initialize(client)
  @client = client
end

Instance Method Details

#accept(organization_invitation_token) ⇒ Object

Accept Organization Invitation

Parameters:

  • organization_invitation_token:

    Special token for invitation


1856
1857
1858
# File 'lib/platform-api/client.rb', line 1856

def accept(organization_invitation_token)
  @client.organization_invitation.accept(organization_invitation_token)
end

#create(organization_name_or_organization_id, body = {}) ⇒ Object

Create Organization Invitation

Parameters:

  • organization_name_or_organization_id:

    unique name of organization or unique identifier of organization

  • body:

    the object to pass as the request payload


1834
1835
1836
# File 'lib/platform-api/client.rb', line 1834

def create(organization_name_or_organization_id, body = {})
  @client.organization_invitation.create(organization_name_or_organization_id, body)
end

#get(organization_invitation_token) ⇒ Object

Get an invitation by its token

Parameters:

  • organization_invitation_token:

    Special token for invitation


1849
1850
1851
# File 'lib/platform-api/client.rb', line 1849

def get(organization_invitation_token)
  @client.organization_invitation.get(organization_invitation_token)
end

#list(organization_name) ⇒ Object

Get a list of an organization's Identity Providers

Parameters:

  • organization_name:

    unique name of organization


1826
1827
1828
# File 'lib/platform-api/client.rb', line 1826

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

#revoke(organization_name_or_organization_id, organization_invitation_id) ⇒ Object

Revoke an organization invitation.

Parameters:

  • organization_name_or_organization_id:

    unique name of organization or unique identifier of organization

  • organization_invitation_id:

    Unique identifier of an invitation


1842
1843
1844
# File 'lib/platform-api/client.rb', line 1842

def revoke(organization_name_or_organization_id, organization_invitation_id)
  @client.organization_invitation.revoke(organization_name_or_organization_id, organization_invitation_id)
end