Sha256: 4920220a97dcb331a23975dcf1ff143cc4b867d2fe6c463a39788f912a92e370
Contents?: true
Size: 381 Bytes
Versions: 22
Compression:
Stored size: 381 Bytes
Contents
module Spree module Variants class RemoveLineItems prepend Spree::ServiceModule::Base def call(variant:) variant.line_items.joins(:order).where.not(spree_orders: { state: 'complete' }).find_each do |line_item| Spree::Variants::RemoveLineItemJob.perform_later(line_item: line_item) end success(true) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems