Class: PlatformAPI::Invitation

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

Overview

An invitation represents an invite sent to a user to use the Heroku platform.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ Invitation

Returns a new instance of Invitation.


1409
1410
1411
# File 'lib/platform-api/client.rb', line 1409

def initialize(client)
  @client = client
end

Instance Method Details

#create(body = {}) ⇒ Object

Invite a user.

Parameters:

  • body:

    the object to pass as the request payload


1423
1424
1425
# File 'lib/platform-api/client.rb', line 1423

def create(body = {})
  @client.invitation.create(body)
end

#finalize(invitation_token, body = {}) ⇒ Object

Finalize Invitation and Create Account.

Parameters:

  • invitation_token:

    Unique identifier of an invitation

  • body:

    the object to pass as the request payload


1447
1448
1449
# File 'lib/platform-api/client.rb', line 1447

def finalize(invitation_token, body = {})
  @client.invitation.finalize(invitation_token, body)
end

#info(invitation_token) ⇒ Object

Info for invitation.

Parameters:

  • invitation_token:

    Unique identifier of an invitation


1416
1417
1418
# File 'lib/platform-api/client.rb', line 1416

def info(invitation_token)
  @client.invitation.info(invitation_token)
end

#send_verification_code(invitation_token, body = {}) ⇒ Object

Send a verification code for an invitation via SMS/phone call.

Parameters:

  • invitation_token:

    Unique identifier of an invitation

  • body:

    the object to pass as the request payload


1431
1432
1433
# File 'lib/platform-api/client.rb', line 1431

def send_verification_code(invitation_token, body = {})
  @client.invitation.send_verification_code(invitation_token, body)
end

#verify(invitation_token, body = {}) ⇒ Object

Verify an invitation using a verification code.

Parameters:

  • invitation_token:

    Unique identifier of an invitation

  • body:

    the object to pass as the request payload


1439
1440
1441
# File 'lib/platform-api/client.rb', line 1439

def verify(invitation_token, body = {})
  @client.invitation.verify(invitation_token, body)
end