Class: FidorApi::Password
- Inherits:
-
Connectivity::Resource
- Object
- Connectivity::Resource
- FidorApi::Password
- Extended by:
- ModelAttribute
- Defined in:
- lib/fidor_api/password.rb
Defined Under Namespace
Modules: ClientSupport
Instance Attribute Summary
Attributes inherited from Connectivity::Resource
Class Method Summary collapse
Methods inherited from Connectivity::Resource
all, find, #initialize, model_name, #persisted?, #reload, #save, #update_attributes
Constructor Details
This class inherits a constructor from FidorApi::Connectivity::Resource
Class Method Details
.request_new(email) ⇒ Object
7 8 9 10 11 |
# File 'lib/fidor_api/password.rb', line 7 def self.request_new(email) params = {email: email, type: "reset_token"} response = endpoint.for(self).put(action: "new_token", payload: params) response.body["success"] end |
.update(attributes) ⇒ Object
13 14 15 16 |
# File 'lib/fidor_api/password.rb', line 13 def self.update(attributes) response = endpoint.for(self).post(payload: attributes) response.body["success"] end |