Class: MekariSso::UserRegister
- Defined in:
- lib/params/user_register.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#password ⇒ Object
Returns the value of attribute password.
-
#phone ⇒ Object
Returns the value of attribute phone.
Attributes inherited from Config
#accept_language, #base_url, #client_id, #client_secret
Instance Method Summary collapse
- #available_keys ⇒ Object
-
#initialize(options = nil) ⇒ UserRegister
constructor
A new instance of UserRegister.
- #validate_required! ⇒ Object
Methods inherited from Config
Constructor Details
#initialize(options = nil) ⇒ UserRegister
Returns a new instance of UserRegister.
9 10 11 |
# File 'lib/params/user_register.rb', line 9 def initialize( = nil) apply() if end |
Instance Attribute Details
#access_token ⇒ Object
Returns the value of attribute access_token.
7 8 9 |
# File 'lib/params/user_register.rb', line 7 def access_token @access_token end |
#email ⇒ Object
Returns the value of attribute email.
7 8 9 |
# File 'lib/params/user_register.rb', line 7 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
7 8 9 |
# File 'lib/params/user_register.rb', line 7 def first_name @first_name end |
#last_name ⇒ Object
Returns the value of attribute last_name.
7 8 9 |
# File 'lib/params/user_register.rb', line 7 def last_name @last_name end |
#password ⇒ Object
Returns the value of attribute password.
7 8 9 |
# File 'lib/params/user_register.rb', line 7 def password @password end |
#phone ⇒ Object
Returns the value of attribute phone.
7 8 9 |
# File 'lib/params/user_register.rb', line 7 def phone @phone end |
Instance Method Details
#available_keys ⇒ Object
13 14 15 |
# File 'lib/params/user_register.rb', line 13 def available_keys %i[email first_name last_name password phone access_token] end |
#validate_required! ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/params/user_register.rb', line 17 def validate_required! unless @email.present? raise ArgumentError, "Params email is required options" end unless @first_name.present? raise ArgumentError, "Params first_name is required options" end unless @password.present? raise ArgumentError, "Params password is required options" end unless @phone.present? raise ArgumentError, "Params phone is required options" end unless @access_token.present? raise ArgumentError, "Params access_token is required options" end end |