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.



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

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



3293
3294
3295
# File 'lib/platform-api/client.rb', line 3293

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



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

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



3286
3287
3288
# File 'lib/platform-api/client.rb', line 3286

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



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

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



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

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