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.



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

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



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

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

#info(app_id_or_app_name) ⇒ Object

Info for an organization app.

Parameters:

  • app_id_or_app_name:

    unique identifier of app or unique name of app



1052
1053
1054
# File 'lib/platform-api/client.rb', line 1052

def info(app_id_or_app_name)
  @client.organization_app.info(app_id_or_app_name)
end

#list(organization_name) ⇒ Object

List organization apps.

Parameters:

  • organization_name:

    unique name of organization



1045
1046
1047
# File 'lib/platform-api/client.rb', line 1045

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



1068
1069
1070
# File 'lib/platform-api/client.rb', line 1068

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



1076
1077
1078
# File 'lib/platform-api/client.rb', line 1076

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



1060
1061
1062
# File 'lib/platform-api/client.rb', line 1060

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