Class: Unit::Types::AuthorizedUser
- Inherits:
-
Object
- Object
- Unit::Types::AuthorizedUser
- Defined in:
- lib/unit/types/authorized_user.rb
Instance Attribute Summary collapse
-
#email ⇒ Object
readonly
Returns the value of attribute email.
-
#full_name ⇒ Object
readonly
Returns the value of attribute full_name.
-
#jwt_subject ⇒ Object
readonly
Returns the value of attribute jwt_subject.
-
#phone ⇒ Object
readonly
Returns the value of attribute phone.
Instance Method Summary collapse
-
#initialize(full_name, email, phone, jwt_subject = nil) ⇒ AuthorizedUser
constructor
A new instance of AuthorizedUser.
- #represent ⇒ Object
Constructor Details
#initialize(full_name, email, phone, jwt_subject = nil) ⇒ AuthorizedUser
Returns a new instance of AuthorizedUser.
14 15 16 17 18 19 |
# File 'lib/unit/types/authorized_user.rb', line 14 def initialize(full_name, email, phone, jwt_subject = nil) @full_name = full_name @email = email @phone = phone @jwt_subject = jwt_subject end |
Instance Attribute Details
#email ⇒ Object (readonly)
Returns the value of attribute email.
8 9 10 |
# File 'lib/unit/types/authorized_user.rb', line 8 def email @email end |
#full_name ⇒ Object (readonly)
Returns the value of attribute full_name.
8 9 10 |
# File 'lib/unit/types/authorized_user.rb', line 8 def full_name @full_name end |
#jwt_subject ⇒ Object (readonly)
Returns the value of attribute jwt_subject.
8 9 10 |
# File 'lib/unit/types/authorized_user.rb', line 8 def jwt_subject @jwt_subject end |
#phone ⇒ Object (readonly)
Returns the value of attribute phone.
8 9 10 |
# File 'lib/unit/types/authorized_user.rb', line 8 def phone @phone end |
Instance Method Details
#represent ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/unit/types/authorized_user.rb', line 21 def represent payload = { fullName: full_name.represent, email: email, phone: phone.represent, jwtSubject: jwt_subject } payload.compact end |