Class: WorkOS::AuditLogEventIngestion

Inherits:
Types::BaseModel show all
Defined in:
lib/workos/audit_logs/audit_log_event_ingestion.rb

Constant Summary collapse

HASH_ATTRS =
{
  organization_id: :organization_id,
  event: :event
}.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) ⇒ AuditLogEventIngestion

Returns a new instance of AuditLogEventIngestion.



16
17
18
19
20
# File 'lib/workos/audit_logs/audit_log_event_ingestion.rb', line 16

def initialize(json)
  hash = self.class.normalize(json)
  @organization_id = hash[:organization_id]
  @event = hash[:event] ? WorkOS::AuditLogEvent.new(hash[:event]) : nil
end

Instance Attribute Details

#eventObject

Returns the value of attribute event.



12
13
14
# File 'lib/workos/audit_logs/audit_log_event_ingestion.rb', line 12

def event
  @event
end

#organization_idObject

Returns the value of attribute organization_id.



12
13
14
# File 'lib/workos/audit_logs/audit_log_event_ingestion.rb', line 12

def organization_id
  @organization_id
end