Sha256: 5c5138eea42fb9c7793fdc20c0cbd2dd29d9b21005fea6de90dbef9d84a415fa
Contents?: true
Size: 410 Bytes
Versions: 1
Compression:
Stored size: 410 Bytes
Contents
module Gemgento class Cart::UpdateItemWorker include Sidekiq::Worker def perform(line_item_id, old_quantity) line_item = Gemgento::LineItem.find(line_item_id) quote = line_item.itemizable response = API::SOAP::Checkout::Product.update(quote, [line_item]) if !response.success? line_item.qty_ordered = old_quantity line_item.save end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gemgento-2.8.0 | app/workers/gemgento/cart/update_item_worker.rb |