Class: PlatformAPI::TeamAppCollaborator

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

Overview

A team collaborator represents an account that has been given access to a team app on Heroku.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ TeamAppCollaborator

Returns a new instance of TeamAppCollaborator.



3142
3143
3144
# File 'lib/platform-api/client.rb', line 3142

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new collaborator on a team app. Use this endpoint instead of the /apps/{app_id_or_name}/collaborator endpoint when you want the collaborator to be granted permissions according to their role in the team.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



3150
3151
3152
# File 'lib/platform-api/client.rb', line 3150

def create(app_id_or_app_name, body = {})
  @client.team_app_collaborator.create(app_id_or_app_name, body)
end

#delete(team_app_identity, collaborator_email) ⇒ Object

Delete an existing collaborator from a team app.

Parameters:

  • team_app_identity:
  • collaborator_email:

    invited email address of collaborator



3158
3159
3160
# File 'lib/platform-api/client.rb', line 3158

def delete(team_app_identity, collaborator_email)
  @client.team_app_collaborator.delete(team_app_identity, collaborator_email)
end

#info(team_app_identity, collaborator_email) ⇒ Object

Info for a collaborator on a team app.

Parameters:

  • team_app_identity:
  • collaborator_email:

    invited email address of collaborator



3166
3167
3168
# File 'lib/platform-api/client.rb', line 3166

def info(team_app_identity, collaborator_email)
  @client.team_app_collaborator.info(team_app_identity, collaborator_email)
end

#list(team_app_identity) ⇒ Object

List collaborators on a team app.

Parameters:

  • team_app_identity:


3182
3183
3184
# File 'lib/platform-api/client.rb', line 3182

def list(team_app_identity)
  @client.team_app_collaborator.list(team_app_identity)
end

#update(team_app_identity, collaborator_email, body = {}) ⇒ Object

Update an existing collaborator from a team app.

Parameters:

  • team_app_identity:
  • collaborator_email:

    invited email address of collaborator

  • body:

    the object to pass as the request payload



3175
3176
3177
# File 'lib/platform-api/client.rb', line 3175

def update(team_app_identity, collaborator_email, body = {})
  @client.team_app_collaborator.update(team_app_identity, collaborator_email, body)
end