Class: Spree::ReimbursementType::Exchange
- Inherits:
-
Spree::ReimbursementType
- Object
- ActiveRecord::Base
- Base
- Spree::ReimbursementType
- Spree::ReimbursementType::Exchange
- Defined in:
- app/models/spree/reimbursement_type/exchange.rb
Constant Summary
Constants inherited from Spree::ReimbursementType
Class Method Summary collapse
Methods inherited from Base
Methods included from Core::Permalinks
#generate_permalink, #save_permalink
Class Method Details
.reimburse(reimbursement, return_items, simulate, *_optional_args) ⇒ Object
4 5 6 7 8 9 10 |
# File 'app/models/spree/reimbursement_type/exchange.rb', line 4 def self.reimburse(reimbursement, return_items, simulate, *_optional_args) return [] unless return_items.present? exchange = Spree::Exchange.new(reimbursement.order, return_items) exchange.perform! unless simulate [exchange] end |