Class: SnapDeploy::Provider::Heroku::API::OrganizationApp

Inherits:
Object
  • Object
show all
Defined in:
lib/snap_deploy/provider/heroku/api.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.



1170
1171
1172
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1170

def initialize(client)
  @client = client
end

Instance Method Details

#create(body) ⇒ Object

Create a new app in the specified organization, in the default organization if unspecified, or in personal account, if default organization is not set.

Parameters:

  • body:

    the object to pass as the request payload



1177
1178
1179
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1177

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

#info(app_name) ⇒ Object

Info for an organization app.

Parameters:

  • app_name:

    unique name of app



1196
1197
1198
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1196

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

#listObject

List apps in the default organization, or in personal account, if default organization is not set.



1182
1183
1184
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1182

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

#list_for_organization(organization_name) ⇒ Object

List organization apps.

Parameters:

  • organization_name:

    unique name of organization



1189
1190
1191
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1189

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

#transfer_to_account(app_name, body) ⇒ Object

Transfer an existing organization app to another Heroku account.

Parameters:

  • app_name:

    unique name of app

  • body:

    the object to pass as the request payload



1212
1213
1214
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1212

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

#transfer_to_organization(app_name, body) ⇒ Object

Transfer an existing organization app to another organization.

Parameters:

  • app_name:

    unique name of app

  • body:

    the object to pass as the request payload



1220
1221
1222
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1220

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

#update_locked(app_name, body) ⇒ Object

Lock or unlock an organization app.

Parameters:

  • app_name:

    unique name of app

  • body:

    the object to pass as the request payload



1204
1205
1206
# File 'lib/snap_deploy/provider/heroku/api.rb', line 1204

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