Class: IdnSdkRuby::Com::Nbos::Capi::Modules::Identity::V0::UpdatePasswordApiModel
- Inherits:
-
BasicActiveModel
- Object
- BasicActiveModel
- IdnSdkRuby::Com::Nbos::Capi::Modules::Identity::V0::UpdatePasswordApiModel
- Defined in:
- lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb
Instance Attribute Summary collapse
-
#message ⇒ Object
Returns the value of attribute message.
-
#newPassword ⇒ Object
Returns the value of attribute newPassword.
-
#password ⇒ Object
Returns the value of attribute password.
Instance Method Summary collapse
- #add_errors(json_response) ⇒ Object
- #add_messages(json_response) ⇒ Object
- #as_json(options = {}) ⇒ Object
-
#initialize(password = nil, new_password = nil) ⇒ UpdatePasswordApiModel
constructor
A new instance of UpdatePasswordApiModel.
- #to_json(*options) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(password = nil, new_password = nil) ⇒ UpdatePasswordApiModel
Returns a new instance of UpdatePasswordApiModel.
10 11 12 13 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 10 def initialize(password = nil, new_password = nil) @password = password @newPassword = new_password end |
Instance Attribute Details
#message ⇒ Object
Returns the value of attribute message.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 9 def @message end |
#newPassword ⇒ Object
Returns the value of attribute newPassword.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 9 def newPassword @newPassword end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 9 def password @password end |
Instance Method Details
#add_errors(json_response) ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 15 def add_errors(json_response) json_response["errors"].each do |e| property_name = e['propertyName'] msg = e['message'] self.errors[property_name] << msg end end |
#add_messages(json_response) ⇒ Object
23 24 25 26 27 28 29 30 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 23 def (json_response) if json_response["message"].present? @message = json_response["message"] elsif json_response["error"].present? @message = json_response["error"] end end |
#as_json(options = {}) ⇒ Object
32 33 34 35 36 37 38 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 32 def as_json(={}) { password: @password, newPassword: @newPassword, message: @message } end |
#to_json(*options) ⇒ Object
40 41 42 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 40 def to_json(*) as_json(*).to_json(*) end |
#to_s ⇒ Object
44 45 46 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/update_password_api_model.rb', line 44 def to_s to_json end |