Class: DeliveryChannels::CancelOrderWorker

Inherits:
ApplicationWorker
  • Object
show all
Defined in:
app/workers/delivery_channels/cancel_order_worker.rb

Overview

typed: ignore

Instance Method Summary collapse

Instance Method Details

#perform(reservation_id, order_id, config_param = {}) ⇒ Object



10
11
12
13
14
15
16
17
18
# File 'app/workers/delivery_channels/cancel_order_worker.rb', line 10

def perform(reservation_id, order_id, config_param = {})
  config = config_param.with_indifferent_access
  config[:skip_reorder] = false unless config.key?(:skip_reorder)
  config[:order_id] = order_id
  delivery_order = DeliveryChannel::OrderManager.new(reservation_id, config)
  response = delivery_order.cancel_order

  BUSINESS_LOGGER.info('delivery: cancel order', note: response, reservation_id: reservation_id)
end