Class: IdnSdkRuby::Com::Nbos::Capi::Modules::Identity::V0::MemberSignupModel
- Inherits:
-
BasicActiveModel
- Object
- BasicActiveModel
- IdnSdkRuby::Com::Nbos::Capi::Modules::Identity::V0::MemberSignupModel
- Defined in:
- lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#firstName ⇒ Object
Returns the value of attribute firstName.
-
#jsonAttributes ⇒ Object
Returns the value of attribute jsonAttributes.
-
#lastName ⇒ Object
Returns the value of attribute lastName.
-
#message ⇒ Object
Returns the value of attribute message.
-
#password ⇒ Object
Returns the value of attribute password.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
- #add_errors(json_response) ⇒ Object
- #add_messages(json_response) ⇒ Object
- #as_json(options = {}) ⇒ Object
-
#initialize(userName = nil, passWord = nil, eMail = nil, first_name = nil, last_name = nil) ⇒ MemberSignupModel
constructor
A new instance of MemberSignupModel.
- #to_json(*options) ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(userName = nil, passWord = nil, eMail = nil, first_name = nil, last_name = nil) ⇒ MemberSignupModel
Returns a new instance of MemberSignupModel.
11 12 13 14 15 16 17 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 11 def initialize(userName = nil, passWord = nil, eMail = nil, first_name = nil, last_name = nil) @username = userName @email = eMail @password = passWord @firstName = first_name @lastName = last_name end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def email @email end |
#firstName ⇒ Object
Returns the value of attribute firstName.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def firstName @firstName end |
#jsonAttributes ⇒ Object
Returns the value of attribute jsonAttributes.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def jsonAttributes @jsonAttributes end |
#lastName ⇒ Object
Returns the value of attribute lastName.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def lastName @lastName end |
#message ⇒ Object
Returns the value of attribute message.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def @message end |
#password ⇒ Object
Returns the value of attribute password.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def password @password end |
#username ⇒ Object
Returns the value of attribute username.
9 10 11 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 9 def username @username end |
Instance Method Details
#add_errors(json_response) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 19 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
27 28 29 30 31 32 33 34 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 27 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
36 37 38 39 40 41 42 43 44 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 36 def as_json(={}) { username: @username, password: @password, firstName: @firstName, lastName: @lastName, email: @email } end |
#to_json(*options) ⇒ Object
46 47 48 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 46 def to_json(*) as_json(*).to_json(*) end |
#to_s ⇒ Object
50 51 52 |
# File 'lib/idn_sdk_ruby/com/nbos/capi/modules/identity/v0/member_signup_model.rb', line 50 def to_s to_json end |