Sha256: 0fb7aee924adf23ef0d1f19767be4ac3a7bf6a5d94e0e2a0f1b870fb68b6dfa7
Contents?: true
Size: 568 Bytes
Versions: 34
Compression:
Stored size: 568 Bytes
Contents
module Payments class CollectWorker include Sidekiq::Worker sidekiq_options :queue => :payments def perform(collection_id) collection = Collection.find(collection_id) response = RestClient.post "#{Terminal.config.host}/collections", :terminal => Terminal.config.keyword, :collection => { :banknotes => collection.banknotes, :collected_at => collection.created_at, :session_ids => collection.payment_ids } collection.update_attribute(:reported_at, DateTime.now) end end end
Version data entries
34 entries across 34 versions & 1 rubygems