Class: Fog::Account::Softlayer::Brand

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

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ Brand

Returns a new instance of Brand.



19
20
21
# File 'lib/fog/softlayer/models/account/brand.rb', line 19

def initialize(attributes = {})
  super(attributes)
end

Instance Method Details

#createObject



32
33
34
35
# File 'lib/fog/softlayer/models/account/brand.rb', line 32

def create
  template = create_template
  service.create_brand(template).body
end

#get_accountsObject



23
24
25
# File 'lib/fog/softlayer/models/account/brand.rb', line 23

def get_accounts
  service.get_brand_owned_accounts(id).body
end

#saveObject

Raises:

  • (StandardError)


27
28
29
30
# File 'lib/fog/softlayer/models/account/brand.rb', line 27

def save
  return create if attributes[:id].nil?
  raise StandardError, "Update is not implemented"
end