Class: WorkOS::UserObject
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::UserObject
- Defined in:
- lib/workos/connect/user_object.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, email: :email, first_name: :first_name, last_name: :last_name, metadata: :metadata }.freeze
Instance Attribute Summary collapse
-
#email ⇒ Object
Returns the value of attribute email.
-
#first_name ⇒ Object
Returns the value of attribute first_name.
-
#id ⇒ Object
Returns the value of attribute id.
-
#last_name ⇒ Object
Returns the value of attribute last_name.
-
#metadata ⇒ Object
Returns the value of attribute metadata.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ UserObject
constructor
A new instance of UserObject.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ UserObject
Returns a new instance of UserObject.
22 23 24 25 26 27 28 29 |
# File 'lib/workos/connect/user_object.rb', line 22 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @email = hash[:email] @first_name = hash[:first_name] @last_name = hash[:last_name] @metadata = hash[:metadata] || {} end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
15 16 17 |
# File 'lib/workos/connect/user_object.rb', line 15 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
15 16 17 |
# File 'lib/workos/connect/user_object.rb', line 15 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
15 16 17 |
# File 'lib/workos/connect/user_object.rb', line 15 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
15 16 17 |
# File 'lib/workos/connect/user_object.rb', line 15 def last_name @last_name end |
#metadata ⇒ Object
Returns the value of attribute metadata.
15 16 17 |
# File 'lib/workos/connect/user_object.rb', line 15 def @metadata end |