Class: Securevideo::Api::User

Inherits:
Object
  • Object
show all
Includes:
Her::Model
Defined in:
lib/securevideo/api/user.rb

Instance Method Summary collapse

Instance Method Details

#update_password(new_password) ⇒ Object



16
17
18
19
20
21
22
23
# File 'lib/securevideo/api/user.rb', line 16

def update_password(new_password)
  res = self.class.put("password/#{id}", { "NewPassword" => new_password })
  if !res.respond_to?(:Message) || res.Message.nil?
    Struct.new(:status).new(:ok)
  else
    Struct.new(:status, :message).new(:error, res.Message)
  end
end