Class: WorkOS::RoleDeleted

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/authorization/role_deleted.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

Attributes inherited from Types::BaseModel

#last_response

Instance Method Summary collapse

Methods inherited from Types::BaseModel

normalize

Methods included from HashProvider

#inspect, #to_h, #to_json

Constructor Details

#initialize(json) ⇒ RoleDeleted

Returns a new instance of RoleDeleted.



24
25
26
27
28
29
30
31
32
# File 'lib/workos/authorization/role_deleted.rb', line 24

def initialize(json)
  hash = self.class.normalize(json)
  @id = hash[:id]
  @event = hash[:event]
  @data = hash[:data] ? WorkOS::RoleDeletedData.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

#contextObject

Returns the value of attribute context.



16
17
18
# File 'lib/workos/authorization/role_deleted.rb', line 16

def context
  @context
end

#created_atObject

Returns the value of attribute created_at.



16
17
18
# File 'lib/workos/authorization/role_deleted.rb', line 16

def created_at
  @created_at
end

#dataObject

Returns the value of attribute data.



16
17
18
# File 'lib/workos/authorization/role_deleted.rb', line 16

def data
  @data
end

#eventObject

Returns the value of attribute event.



16
17
18
# File 'lib/workos/authorization/role_deleted.rb', line 16

def event
  @event
end

#idObject

Returns the value of attribute id.



16
17
18
# File 'lib/workos/authorization/role_deleted.rb', line 16

def id
  @id
end

#objectObject

Returns the value of attribute object.



16
17
18
# File 'lib/workos/authorization/role_deleted.rb', line 16

def object
  @object
end