Class: Spree::LineItems::Destroy
- Inherits:
-
Object
- Object
- Spree::LineItems::Destroy
- Includes:
- Helper, ServiceModule::Base
- Defined in:
- app/services/spree/line_items/destroy.rb
Instance Method Summary collapse
Methods included from ServiceModule::Base
Instance Method Details
#call(line_item:, options: {}) ⇒ Object
7 8 9 10 11 12 13 14 15 |
# File 'app/services/spree/line_items/destroy.rb', line 7 def call(line_item:, options: {}) order = line_item.order ActiveRecord::Base.transaction do line_item.destroy! recalculate_service.call(order: order, line_item: line_item, options: ) end success(line_item) end |