Class: Clerk::Models::Components::LogWithPayload

Inherits:
Object
  • Object
show all
Includes:
Crystalline::MetadataFields
Defined in:
lib/clerk/models/components/logwithpayload.rb

Overview

A log entry with the full event payload. Returned by the single-event endpoint. List responses use Log, whose payload is absent unless specific fields were requested via payload_fields.

Instance Method Summary collapse

Methods included from Crystalline::MetadataFields

#field, #fields, included, #marshal_single, #to_dict, #to_json

Constructor Details

#initialize(object:, id:, event_time:, actor:, subject:, type:, trace_id:, span_id:, event_context:, payload:, actor_type: nil, source: nil, impersonator: nil, client_id: nil, session_id: nil, parent_span_id: nil, group_id: nil, group_type: nil, group_started_at: nil) ⇒ LogWithPayload

Returns a new instance of LogWithPayload.



61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/clerk/models/components/logwithpayload.rb', line 61

def initialize(object:, id:, event_time:, actor:, subject:, type:, trace_id:, span_id:, event_context:, payload:, actor_type: nil, source: nil, impersonator: nil, client_id: nil, session_id: nil, parent_span_id: nil, group_id: nil, group_type: nil, group_started_at: nil)
  @object = object
  @id = id
  @event_time = event_time
  @actor = actor
  @subject = subject
  @type = type
  @trace_id = trace_id
  @span_id = span_id
  @event_context = event_context
  @payload = payload
  @actor_type = actor_type
  @source = source
  @impersonator = impersonator
  @client_id = client_id
  @session_id = session_id
  @parent_span_id = parent_span_id
  @group_id = group_id
  @group_type = group_type
  @group_started_at = group_started_at
end

Instance Method Details

#==(other) ⇒ Object



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/clerk/models/components/logwithpayload.rb', line 84

def ==(other)
  return false unless other.is_a? self.class
  return false unless @object == other.object
  return false unless @id == other.id
  return false unless @event_time == other.event_time
  return false unless @actor == other.actor
  return false unless @subject == other.subject
  return false unless @type == other.type
  return false unless @trace_id == other.trace_id
  return false unless @span_id == other.span_id
  return false unless @event_context == other.event_context
  return false unless @payload == other.payload
  return false unless @actor_type == other.actor_type
  return false unless @source == other.source
  return false unless @impersonator == other.impersonator
  return false unless @client_id == other.client_id
  return false unless @session_id == other.session_id
  return false unless @parent_span_id == other.parent_span_id
  return false unless @group_id == other.group_id
  return false unless @group_type == other.group_type
  return false unless @group_started_at == other.group_started_at
  true
end