class EY::CloudClient::Account

Public Class Methods

all(api) click to toggle source
# File lib/engineyard-cloud-client/models/account.rb, line 7
def self.all(api)
  self.from_array(api, api.get("/accounts")["accounts"])
end

Public Instance Methods

add_app(app) click to toggle source
# File lib/engineyard-cloud-client/models/account.rb, line 11
def add_app(app)
  @apps ||= []
  existing_app = @apps.detect { |a| app.id == a.id }
  unless existing_app
    @apps << app
  end
  existing_app || app
end
add_environment(environment) click to toggle source
# File lib/engineyard-cloud-client/models/account.rb, line 24
def add_environment(environment)
  @environments ||= []
  existing_environment = @environments.detect { |env| environment.id == env.id }
  unless existing_environment
    @environments << environment
  end
  existing_environment || environment
end
apps() click to toggle source
# File lib/engineyard-cloud-client/models/account.rb, line 20
def apps
  @apps ||= []
end
environments() click to toggle source
# File lib/engineyard-cloud-client/models/account.rb, line 33
def environments
  @environments ||= []
end
sort_attributes() click to toggle source
# File lib/engineyard-cloud-client/models/account.rb, line 37
def sort_attributes
  sort_string(name)
end