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.



3078
3079
3080
# File 'lib/platform-api/client.rb', line 3078

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



3086
3087
3088
# File 'lib/platform-api/client.rb', line 3086

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



3094
3095
3096
# File 'lib/platform-api/client.rb', line 3094

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



3102
3103
3104
# File 'lib/platform-api/client.rb', line 3102

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:


3118
3119
3120
# File 'lib/platform-api/client.rb', line 3118

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



3111
3112
3113
# File 'lib/platform-api/client.rb', line 3111

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