Class: Fog::Account::Softlayer::Brands

Inherits:
Collection
  • Object
show all
Defined in:
lib/fog/softlayer/models/account/brands.rb

Instance Method Summary collapse

Instance Method Details

#allObject



16
17
18
19
# File 'lib/fog/softlayer/models/account/brands.rb', line 16

def all
  data = service.
  load(data)
end

#get(identifier) ⇒ Object



21
22
23
24
25
26
27
# File 'lib/fog/softlayer/models/account/brands.rb', line 21

def get(identifier)
  return nil if identifier.nil? || identifier == ""
  data = service.get_brand(identifier).body
  new.merge_attributes(data)
rescue Excon::Errors::NotFound
  nil
end