Sha256: 9961b9d7ef90bf6d511c8ae0b0eceaefc3b847fd07733526a7d08f6693f98a3d
Contents?: true
Size: 586 Bytes
Versions: 78
Compression:
Stored size: 586 Bytes
Contents
module Spree module Cart class RemoveLineItem prepend Spree::ServiceModule::Base def call(order:, line_item:, options: nil) options ||= {} ActiveRecord::Base.transaction do line_item.destroy! Spree::Dependencies.cart_recalculate_service.constantize.new.call(order: order, line_item: line_item, options: options) end success(line_item) end end end end
Version data entries
78 entries across 78 versions & 1 rubygems