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.



3207
3208
3209
# File 'lib/platform-api/client.rb', line 3207

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



3244
3245
3246
# File 'lib/platform-api/client.rb', line 3244

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



3222
3223
3224
# File 'lib/platform-api/client.rb', line 3222

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



3237
3238
3239
# File 'lib/platform-api/client.rb', line 3237

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



3214
3215
3216
# File 'lib/platform-api/client.rb', line 3214

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



3230
3231
3232
# File 'lib/platform-api/client.rb', line 3230

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