class Fog::Account::Softlayer::Real

Makes real connections to Softlayer.

Public Class Methods

new(options={}) click to toggle source
# File lib/fog/softlayer/account.rb, line 54
def initialize(options={})
  @softlayer_api_key = options[:softlayer_api_key]
  @softlayer_username = options[:softlayer_username]
end

Public Instance Methods

create_brand(attributes) click to toggle source
# File lib/fog/softlayer/requests/account/create_brand.rb, line 35
def create_brand(attributes)
  request(:brand, :create_object, :body => attributes, :http_method => :POST)
end
get_account_owned_brands(identifier) click to toggle source
# File lib/fog/softlayer/requests/account/get_account_owned_brands.rb, line 31
def get_account_owned_brands(identifier)
  return request(:account, :getOwnedBrands) if identifier.nil?
  request(:account, "#{identifier}/getOwnedBrands")
end
get_brand(identifier) click to toggle source
# File lib/fog/softlayer/requests/account/get_brand.rb, line 30
def get_brand(identifier)
  request(:brand, identifier, :expected => [200, 404], :query => 'objectMask=mask[account]')
end
get_brand_owned_accounts(identifier) click to toggle source
# File lib/fog/softlayer/requests/account/get_brand_owned_accounts.rb, line 32
def get_brand_owned_accounts(identifier)
  request(:brand, "#{identifier}/getOwnedAccounts")
end
request(service, path, options = {}) click to toggle source
# File lib/fog/softlayer/account.rb, line 59
def request(service, path, options = {})
  options = {:username => @softlayer_username, :api_key => @softlayer_api_key}.merge(options)
  Fog::Softlayer::Slapi.slapi_request(service, path, options)
end