Class: Spree::Refund

Inherits:
Base
  • Object
show all
Defined in:
core/app/models/spree/refund.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

display_includes, #initialize_preference_defaults, page, preference

Class Method Details

.total_amount_reimbursed_for(reimbursement) ⇒ Object



31
32
33
# File 'core/app/models/spree/refund.rb', line 31

def total_amount_reimbursed_for(reimbursement)
  reimbursement.refunds.to_a.sum(&:amount)
end

Instance Method Details

#descriptionObject



36
37
38
# File 'core/app/models/spree/refund.rb', line 36

def description
  payment.payment_method.name
end

#moneyObject Also known as: display_amount



25
26
27
# File 'core/app/models/spree/refund.rb', line 25

def money
  Spree::Money.new(amount, { currency: currency })
end