Class: PlatformAPI::OrganizationApp

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

Overview

An organization app encapsulates the organization specific functionality of Heroku apps.

Instance Method Summary collapse

Constructor Details

#initialize(client) ⇒ OrganizationApp

Returns a new instance of OrganizationApp.



998
999
1000
# File 'lib/platform-api/client.rb', line 998

def initialize(client)
  @client = client
end

Instance Method Details

#create(organization_name, body) ⇒ Object

Create a new organization app. Use this endpoint instead of the /apps endpoint when you want to create an app that will be owned by an organization in which you are a member, rather than your personal account.

Parameters:

  • organization_name:

    unique name of organization

  • body:

    the object to pass as the request payload



1006
1007
1008
# File 'lib/platform-api/client.rb', line 1006

def create(organization_name, body)
  @client.organization_app.create(organization_name, body)
end

#list(organization_name) ⇒ Object

List organization apps.

Parameters:

  • organization_name:

    unique name of organization



1013
1014
1015
# File 'lib/platform-api/client.rb', line 1013

def list(organization_name)
  @client.organization_app.list(organization_name)
end

#transfer_to_account(app_id_or_app_name, body) ⇒ Object

Transfer an existing organization app to another Heroku account.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



1029
1030
1031
# File 'lib/platform-api/client.rb', line 1029

def (app_id_or_app_name, body)
  @client.organization_app.(app_id_or_app_name, body)
end

#transfer_to_organization(app_id_or_app_name, body) ⇒ Object

Transfer an existing organization app to another 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



1037
1038
1039
# File 'lib/platform-api/client.rb', line 1037

def transfer_to_organization(app_id_or_app_name, body)
  @client.organization_app.transfer_to_organization(app_id_or_app_name, body)
end

#update_locked(app_id_or_app_name, body) ⇒ Object

Lock or unlock an organization app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app

  • body:

    the object to pass as the request payload



1021
1022
1023
# File 'lib/platform-api/client.rb', line 1021

def update_locked(app_id_or_app_name, body)
  @client.organization_app.update_locked(app_id_or_app_name, body)
end