Class: PlatformAPI::OrganizationAppCollaborator

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

Overview

Deprecated: An organization collaborator represents an account that has been given access to an organization app on Heroku.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationAppCollaborator

Returns a new instance of OrganizationAppCollaborator.



1854
1855
1856
# File 'lib/platform-api/client.rb', line 1854

def initialize(client)
  @client = client
end

Instance Method Details

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

Create a new collaborator on an organization 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 organization.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



1862
1863
1864
# File 'lib/platform-api/client.rb', line 1862

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

#delete(app_name, collaborator_email) ⇒ Object

Delete an existing collaborator from an organization app.

Parameters:

  • app_name:

    unique name of app

  • collaborator_email:

    invited email address of collaborator



1870
1871
1872
# File 'lib/platform-api/client.rb', line 1870

def delete(app_name, collaborator_email)
  @client.organization_app_collaborator.delete(app_name, collaborator_email)
end

#info(app_name, collaborator_email) ⇒ Object

Info for a collaborator on an organization app.

Parameters:

  • app_name:

    unique name of app

  • collaborator_email:

    invited email address of collaborator



1878
1879
1880
# File 'lib/platform-api/client.rb', line 1878

def info(app_name, collaborator_email)
  @client.organization_app_collaborator.info(app_name, collaborator_email)
end

#list(app_name) ⇒ Object

List collaborators on an organization app.

Parameters:

  • app_name:

    unique name of app



1894
1895
1896
# File 'lib/platform-api/client.rb', line 1894

def list(app_name)
  @client.organization_app_collaborator.list(app_name)
end

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

Update an existing collaborator from an organization app.

Parameters:

  • app_name:

    unique name of app

  • collaborator_email:

    invited email address of collaborator

  • body:

    the object to pass as the request payload



1887
1888
1889
# File 'lib/platform-api/client.rb', line 1887

def update(app_name, collaborator_email, body = {})
  @client.organization_app_collaborator.update(app_name, collaborator_email, body)
end