class SparkApi::Models::VowAccount
Public Class Methods
new(attributes={})
click to toggle source
Calls superclass method
SparkApi::Models::Base::new
# File lib/spark_api/models/vow_account.rb, line 10 def initialize(attributes={}) super(attributes) end
Public Instance Methods
change_password(new_password)
click to toggle source
# File lib/spark_api/models/vow_account.rb, line 28 def change_password(new_password) attribute_will_change! 'Password' @attributes['Password'] = new_password save end
change_setting(key, val)
click to toggle source
# File lib/spark_api/models/vow_account.rb, line 34 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
disable()
click to toggle source
# File lib/spark_api/models/vow_account.rb, line 23 def disable change_setting :Enabled, 'false' save end
enable()
click to toggle source
# File lib/spark_api/models/vow_account.rb, line 18 def enable change_setting :Enabled, 'true' save end
enabled?()
click to toggle source
# File lib/spark_api/models/vow_account.rb, line 14 def enabled? (@attributes['Settings'].class == Hash) && @attributes['Settings']['Enabled'] == 'true' end
post_data()
click to toggle source
# File lib/spark_api/models/vow_account.rb, line 40 def post_data; attributes end