Class: Orders::CompleteWorker

Inherits:
Object
  • Object
show all
Includes:
Sidekiq::Worker
Defined in:
app/workers/orders/complete_worker.rb

Instance Method Summary collapse

Instance Method Details

#perform(order_id) ⇒ Object



9
10
11
12
13
14
15
16
# File 'app/workers/orders/complete_worker.rb', line 9

def perform(order_id)
  order = Order.find(order_id)

  response = RestClient.post "#{Terminal.config.host}/terminal_orders/#{order.foreign_id}/complete",
    :terminal => Terminal.keyword

  Terminal.ping
end