Sha256: c48a1da1f834788c363008e57b0ccb89036ff94bc931706f70ab4ef43561bde9

Contents?: true

Size: 463 Bytes

Versions: 43

Compression:

Stored size: 463 Bytes

Contents

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

  class << self
    def reimburse(reimbursement, return_items, simulate)
      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

43 entries across 43 versions & 1 rubygems

Version Path
solidus_core-1.3.0.rc2 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-1.3.0.rc1 app/models/spree/reimbursement_type/original_payment.rb
solidus_core-1.3.0.beta1 app/models/spree/reimbursement_type/original_payment.rb