Class: Spree::Exchanges::Cancel

Inherits:
Workflow
  • Object
show all
Includes:
PostSale::Cancellation
Defined in:
app/workflows/spree/exchanges/cancel.rb

Overview

Withdraws an exchange before the goods arrive. Once received, the merchant holds the customer's items and must either fulfill the replacement or refund.

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(exchange:, reason: nil) ⇒ Object

Parameters:



13
14
15
16
# File 'app/workflows/spree/exchanges/cancel.rb', line 13

def perform(exchange:, reason: nil)
  super
  cancel
end