Class: PlatformAPI::TeamInvitation

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

Overview

A team invitation represents an invite to a team.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TeamInvitation

Returns a new instance of TeamInvitation.



3241
3242
3243
# File 'lib/platform-api/client.rb', line 3241

def initialize(client)
  @client = client
end

Instance Method Details

#accept(team_invitation_token) ⇒ Object

Accept Team Invitation

Parameters:

  • team_invitation_token:

    special token for invitation



3278
3279
3280
# File 'lib/platform-api/client.rb', line 3278

def accept(team_invitation_token)
  @client.team_invitation.accept(team_invitation_token)
end

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

Create Team Invitation

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • body:

    the object to pass as the request payload



3256
3257
3258
# File 'lib/platform-api/client.rb', line 3256

def create(team_name_or_team_id, body = {})
  @client.team_invitation.create(team_name_or_team_id, body)
end

#get(team_invitation_token) ⇒ Object

Get an invitation by its token

Parameters:

  • team_invitation_token:

    special token for invitation



3271
3272
3273
# File 'lib/platform-api/client.rb', line 3271

def get(team_invitation_token)
  @client.team_invitation.get(team_invitation_token)
end

#list(team_name) ⇒ Object

Get a list of a team's Identity Providers

Parameters:

  • team_name:

    unique name of team



3248
3249
3250
# File 'lib/platform-api/client.rb', line 3248

def list(team_name)
  @client.team_invitation.list(team_name)
end

#revoke(team_name_or_team_id, team_invitation_id) ⇒ Object

Revoke a team invitation.

Parameters:

  • team_name_or_team_id:

    unique name of team or unique identifier of team

  • team_invitation_id:

    unique identifier of an invitation



3264
3265
3266
# File 'lib/platform-api/client.rb', line 3264

def revoke(team_name_or_team_id, team_invitation_id)
  @client.team_invitation.revoke(team_name_or_team_id, team_invitation_id)
end