Class: Spree::Returns::Receive

Inherits:
Workflow
  • Object
show all
Includes:
PostSale::Receipt
Defined in:
app/workflows/spree/returns/receive.rb

Overview

Records what the warehouse actually received (see Spree::PostSale::Receipt).

Instance Method Summary collapse

Methods inherited from Workflow

#call, define_argument_readers, #errors, #halt!, hooks, inherited, model_name, #read_attribute_for_validation, #reject!, workflow_key

Methods included from ServiceModule::Base

#call, prepended

Methods included from Workflow::ControlFlow

#failure

Instance Method Details

#perform(return_record:, items: nil, received_by: nil) ⇒ Object

Parameters:

  • return_record (Spree::Return)
  • items (Array<Hash>, nil) (defaults to: nil) —

    [{ return_line_item:, quantity:, resellable: }]; nil receives everything as requested and resellable

  • received_by (Object, nil) (defaults to: nil)


13
14
15
16
# File 'app/workflows/spree/returns/receive.rb', line 13

def perform(return_record:, items: nil, received_by: nil)
  super
  receive
end