Class: Assistant::TechnicalSupport::CaseEventStream::EventBuilder::SupportCaseSerializer

Inherits:
Base
  • Object
show all
Defined in:
app/services/assistant/technical_support/case_event_stream/event_builder/support_case_serializer.rb

Constant Summary collapse

SOURCE_TYPE =
'SupportCase'

Constants inherited from Base

Base::RawEvent

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Assistant::TechnicalSupport::CaseEventStream::EventBuilder::Base

Instance Method Details

#call(support_case) ⇒ Object



6
7
8
9
10
11
# File 'app/services/assistant/technical_support/case_event_stream/event_builder/support_case_serializer.rb', line 6

def call(support_case)
  record_source(SOURCE_TYPE)
  events = [description_event(support_case), lifecycle_event(support_case), reopened_event(support_case)].compact
  include_source(SOURCE_TYPE) if events.any?
  events
end