Class: Spree::Refund

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

Class Method Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from Base

display_includes, #initialize_preference_defaults, page, preference

Methods included from Preferences::Preferable

#default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

Class Method Details

+ (Object) total_amount_reimbursed_for(reimbursement)



27
28
29
# File 'app/models/spree/refund.rb', line 27

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

Instance Method Details

- (Object) description



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

def description
  payment.payment_method.name
end

- (Object) money Also known as: display_amount



21
22
23
# File 'app/models/spree/refund.rb', line 21

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