Sha256: c2e0d745888ed8bf97bdc564cc12f3895797a039f50595b6b87a26de658f8c47

Contents?: true

Size: 336 Bytes

Versions: 27

Compression:

Stored size: 336 Bytes

Contents

# frozen_string_literal: true

class Spree::ReimbursementType::Exchange < Spree::ReimbursementType
  def self.reimburse(reimbursement, return_items, simulate)
    return [] unless return_items.present?

    exchange = Spree::Exchange.new(reimbursement.order, return_items)
    exchange.perform! unless simulate
    [exchange]
  end
end

Version data entries

27 entries across 27 versions & 2 rubygems

Version Path
solidus_core-2.6.6 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.7.4 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.7.3 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.6.5 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.7.2 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.6.4 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.6.3 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.7.1 app/models/spree/reimbursement_type/exchange.rb
solidus_core-2.6.2 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.14 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.13 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.12 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.11 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.10 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.9 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.8 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.7 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.6 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.5 app/models/spree/reimbursement_type/exchange.rb
solidus_core_devise_token_auth-2.8.0.alpha.4 app/models/spree/reimbursement_type/exchange.rb