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, name: :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.
-
#name ⇒ Object
Returns the value of attribute name.
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.
24 25 26 27 28 29 30 31 32 |
# File 'lib/workos/connect/user_object.rb', line 24 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @email = hash[:email] @first_name = hash[:first_name] @last_name = hash[:last_name] @name = hash[:name] @metadata = hash[:metadata] || {} end |
Instance Attribute Details
#email ⇒ Object
Returns the value of attribute email.
16 17 18 |
# File 'lib/workos/connect/user_object.rb', line 16 def email @email end |
#first_name ⇒ Object
Returns the value of attribute first_name.
16 17 18 |
# File 'lib/workos/connect/user_object.rb', line 16 def first_name @first_name end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/workos/connect/user_object.rb', line 16 def id @id end |
#last_name ⇒ Object
Returns the value of attribute last_name.
16 17 18 |
# File 'lib/workos/connect/user_object.rb', line 16 def last_name @last_name end |
#metadata ⇒ Object
Returns the value of attribute metadata.
16 17 18 |
# File 'lib/workos/connect/user_object.rb', line 16 def @metadata end |
#name ⇒ Object
Returns the value of attribute name.
16 17 18 |
# File 'lib/workos/connect/user_object.rb', line 16 def name @name end |