Sha256: d74b735dd748124929ee38534800344d874890c6506678f14babd3a8b6fd4584
Contents?: true
Size: 998 Bytes
Versions: 65
Compression:
Stored size: 998 Bytes
Contents
module SparkApi module Models class VowAccount < Base extend Finders include Concerns::Savable, Concerns::Destroyable self.element_name = "portal" def initialize(attributes={}) super(attributes) end def enabled? (@attributes['Settings'].class == Hash) && @attributes['Settings']['Enabled'] == 'true' end def enable change_setting :Enabled, 'true' save end def disable change_setting :Enabled, 'false' save end def change_password(new_password) attribute_will_change! 'Password' @attributes['Password'] = new_password save end def change_setting(key, val) attribute_will_change! "Settings" @attributes['Settings'] = {} if @attributes['Settings'].nil? || @attributes['Settings'] != Hash @attributes['Settings'][key.to_s] = val end def post_data; attributes end end end end
Version data entries
65 entries across 65 versions & 1 rubygems