Class: Spree::Shipments::Create

Inherits:
Object
  • Object
show all
Includes:
Spree::ServiceModule::Base, Helper
Defined in:
app/services/spree/shipments/create.rb

Instance Method Summary collapse

Methods included from Helper

#add_item_service, #add_or_update_line_item, #remove_item_service

Methods included from Spree::ServiceModule::Base

prepended

Instance Method Details

#call(store:, shipment_attributes:) ⇒ Object



10
11
12
13
14
15
16
# File 'app/services/spree/shipments/create.rb', line 10

def call(store:, shipment_attributes:)
  ActiveRecord::Base.transaction do
    run :prepare_arguments
    run :create_shipment
    run :add_or_update_line_item
  end
end