Class: Edi::RmaEventProcessor
- Inherits:
-
BaseService
- Object
- BaseService
- Edi::RmaEventProcessor
- Defined in:
- app/services/edi/rma_event_processor.rb
Overview
Service object: rma event processor.
Instance Attribute Summary
Attributes inherited from BaseService
Instance Method Summary collapse
Methods inherited from BaseService
#initialize, #log_debug, #log_error, #log_info, #log_warning, #logger, #process, #tagged_logger
Constructor Details
This class inherits a constructor from BaseService
Instance Method Details
#load_orchestrator(customer_id) ⇒ Object
14 15 16 |
# File 'app/services/edi/rma_event_processor.rb', line 14 def load_orchestrator(customer_id) Edi::BaseOrchestrator.orchestrator_for_customer_id(customer_id) end |
#process_received(rma, _options = {}) ⇒ Object
6 7 8 9 10 11 12 |
# File 'app/services/edi/rma_event_processor.rb', line 6 def process_received(rma, = {}) return unless rma.original_order&.edi_transaction_id # Order doesn't come from EDI return unless (o = load_orchestrator(rma.customer_id)) logger.info "Edi -> Processing received event for rma id #{rma.id}" o..receive_rma(rma) if o. end |