Class: Harvest::API::Users

Inherits:
Base
  • Object
show all
Includes:
Behavior::Activatable, Behavior::Crud
Defined in:
lib/harvest/api/users.rb

Instance Attribute Summary

Attributes inherited from Base

#credentials

Instance Method Summary collapse

Methods included from Behavior::Activatable

#activate, #deactivate

Methods included from Behavior::Crud

#all, #create, #delete, #find, #update

Methods inherited from Base

api_model, #initialize

Constructor Details

This class inherits a constructor from Harvest::API::Base

Instance Method Details

#reset_password(id) ⇒ Harvest::User #reset_password(user) ⇒ Harvest::User

Triggers Harvest to reset the user’s password and sends them an email to change it.

Overloads:

  • #reset_password(id) ⇒ Harvest::User

    Parameters:

    • id (Integer)

      the id of the user you want to reset the password for

  • #reset_password(user) ⇒ Harvest::User

    Parameters:

    • user (Harvest::User)

      the user you want to reset the password for

Returns:



15
16
17
18
# File 'lib/harvest/api/users.rb', line 15

def reset_password(user)
  request(:post, credentials, "#{api_model.api_path}/#{user.to_i}/reset_password")
  user
end