class Fog::Account::Softlayer::Brand

Public Class Methods

new(attributes = {}) click to toggle source
Calls superclass method
# File lib/fog/softlayer/models/account/brand.rb, line 19
def initialize(attributes = {})
  super(attributes)
end

Public Instance Methods

create() click to toggle source
# File lib/fog/softlayer/models/account/brand.rb, line 32
def create
  template = create_template
  service.create_brand(template).body
end
get_accounts() click to toggle source
# File lib/fog/softlayer/models/account/brand.rb, line 23
def get_accounts
  service.get_brand_owned_accounts(id).body
end
save() click to toggle source
# 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

Private Instance Methods

create_template() click to toggle source
# File lib/fog/softlayer/models/account/brand.rb, line 39
def create_template
  {
    keyName: attributes[:key_name],
    longName: attributes[:long_name],
    name: attributes[:name],
    account: attributes[:account]
  }
end