Class: WorkOS::UserCreated
- Inherits:
-
Types::BaseModel
- Object
- Types::BaseModel
- WorkOS::UserCreated
- Defined in:
- lib/workos/user_management/user_created.rb
Constant Summary collapse
- HASH_ATTRS =
{ id: :id, event: :event, data: :data, created_at: :created_at, context: :context, object: :object }.freeze
Instance Attribute Summary collapse
-
#context ⇒ Object
Returns the value of attribute context.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#data ⇒ Object
Returns the value of attribute data.
-
#event ⇒ Object
Returns the value of attribute event.
-
#id ⇒ Object
Returns the value of attribute id.
-
#object ⇒ Object
Returns the value of attribute object.
Attributes inherited from Types::BaseModel
Instance Method Summary collapse
-
#initialize(json) ⇒ UserCreated
constructor
A new instance of UserCreated.
Methods inherited from Types::BaseModel
Methods included from HashProvider
Constructor Details
#initialize(json) ⇒ UserCreated
Returns a new instance of UserCreated.
24 25 26 27 28 29 30 31 32 |
# File 'lib/workos/user_management/user_created.rb', line 24 def initialize(json) hash = self.class.normalize(json) @id = hash[:id] @event = hash[:event] @data = hash[:data] ? WorkOS::User.new(hash[:data]) : nil @created_at = hash[:created_at] @context = hash[:context] ? WorkOS::EventContext.new(hash[:context]) : nil @object = hash[:object] end |
Instance Attribute Details
#context ⇒ Object
Returns the value of attribute context.
16 17 18 |
# File 'lib/workos/user_management/user_created.rb', line 16 def context @context end |
#created_at ⇒ Object
Returns the value of attribute created_at.
16 17 18 |
# File 'lib/workos/user_management/user_created.rb', line 16 def created_at @created_at end |
#data ⇒ Object
Returns the value of attribute data.
16 17 18 |
# File 'lib/workos/user_management/user_created.rb', line 16 def data @data end |
#event ⇒ Object
Returns the value of attribute event.
16 17 18 |
# File 'lib/workos/user_management/user_created.rb', line 16 def event @event end |
#id ⇒ Object
Returns the value of attribute id.
16 17 18 |
# File 'lib/workos/user_management/user_created.rb', line 16 def id @id end |
#object ⇒ Object
Returns the value of attribute object.
16 17 18 |
# File 'lib/workos/user_management/user_created.rb', line 16 def object @object end |