class Aptible::Api::Account
Public Class Methods
generate_handle(organization_name, plan_id)
click to toggle source
# File lib/aptible/api/account.rb, line 67 def self.generate_handle(organization_name, plan_id) rand = ('a'..'z').to_a.sample(8).join "#{organization_name.parameterize}-#{plan_id}-#{rand}" end
Public Instance Methods
dumptruck_port()
click to toggle source
# File lib/aptible/api/account.rb, line 51 def dumptruck_port # TODO: Fetch from API 45022 end
each_orphaned_backup() { |entry| ... }
click to toggle source
# File lib/aptible/api/account.rb, line 72 def each_orphaned_backup base_href = "#{links['backups'].base_href}?orphaned=true" Backup.each_page(href: base_href, headers: headers, token: token) do |page| page.each { |entry| yield entry } end end
operations()
click to toggle source
# File lib/aptible/api/account.rb, line 46 def operations # TODO: Implement /accounts/:id/operations [] end
organization()
click to toggle source
# File lib/aptible/api/account.rb, line 60 def organization return @organization if @organization auth = Aptible::Auth::Organization.new(token: token, headers: headers) @organization = auth.find_by_url(organization_url) end
organization_url()
click to toggle source
# File lib/aptible/api/account.rb, line 56 def organization_url links['organization'].href end
production?()
click to toggle source
# File lib/aptible/api/account.rb, line 42 def production? type == 'production' end