Class: Spree::Refund
- Inherits:
-
Base
- Object
- ApplicationRecord
- Base
- Spree::Refund
show all
- Defined in:
- app/models/spree/refund.rb
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Base
page, spree_base_scopes
#clear_preferences, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference
Class Method Details
.total_amount_reimbursed_for(reimbursement) ⇒ Object
30
31
32
|
# File 'app/models/spree/refund.rb', line 30
def total_amount_reimbursed_for(reimbursement)
reimbursement.refunds.to_a.sum(&:amount)
end
|
Instance Method Details
#description ⇒ Object
35
36
37
|
# File 'app/models/spree/refund.rb', line 35
def description
payment.payment_method.name
end
|
#money ⇒ Object
Also known as:
display_amount
24
25
26
|
# File 'app/models/spree/refund.rb', line 24
def money
Spree::Money.new(amount, { currency: payment.currency })
end
|