Sha256: a6490b4119640bf5b97292678995729f6c6321b6a5d1f70f6f0a70324bfa9c9f

Contents?: true

Size: 507 Bytes

Versions: 106

Compression:

Stored size: 507 Bytes

Contents

# frozen_string_literal: true

class Spree::ReimbursementType::OriginalPayment < Spree::ReimbursementType
  extend Spree::ReimbursementType::ReimbursementHelpers

  class << self
    def reimburse(reimbursement, return_items, simulate, _created_by)
      unpaid_amount = return_items.sum(&:total).round(2, :down)
      payments = reimbursement.order.payments.completed

      refund_list, _unpaid_amount = create_refunds(reimbursement, payments, unpaid_amount, simulate)
      refund_list
    end
  end
end

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
solidus_core-4.4.2 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.4.1 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.4.0 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.3.4 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.2.4 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.1.5 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.3.3 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.3.2 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.1.4 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.3.1 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.3.0 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.2.3 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.1.3 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.0.4 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-3.4.6 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.0.3 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.1.2 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.2.2 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-3.4.5 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-4.2.1 app/models/spree/reimbursement_type/original_payment.rb