Class: Spree::Cart::AddItem
- Inherits:
-
Object
- Object
- Spree::Cart::AddItem
- Includes:
- ServiceModule::Base
- Defined in:
- app/services/spree/cart/add_item.rb
Instance Method Summary collapse
Methods included from ServiceModule::Base
Instance Method Details
#call(order:, variant:, quantity: nil, options: {}) ⇒ Object
6 7 8 9 10 11 |
# File 'app/services/spree/cart/add_item.rb', line 6 def call(order:, variant:, quantity: nil, options: {}) ApplicationRecord.transaction do run :add_to_line_item run Spree::Dependencies.cart_recalculate_service.constantize end end |