Class: Spree::Refund
- Includes:
- Metadata, Security::Refunds, Webhooks::HasWebhooks
- Defined in:
- app/models/spree/refund.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
Returns the value of attribute response.
Class Method Summary collapse
Instance Method Summary collapse
- #description ⇒ Object
- #money ⇒ Object (also: #display_amount)
Methods inherited from Base
belongs_to_required_by_default, for_store, has_many_inversing, json_api_columns, json_api_permitted_attributes, json_api_type, page, spree_base_scopes, spree_base_uniqueness_scope
Methods included from Preferences::Preferable
#clear_preferences, #default_preferences, #defined_preferences, #deprecated_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_deprecated, #preference_type, #set_preference
Instance Attribute Details
#response ⇒ Object (readonly)
Returns the value of attribute response.
32 33 34 |
# File 'app/models/spree/refund.rb', line 32 def response @response end |
Class Method Details
.total_amount_reimbursed_for(reimbursement) ⇒ Object
40 41 42 |
# File 'app/models/spree/refund.rb', line 40 def total_amount_reimbursed_for(reimbursement) reimbursement.refunds.to_a.sum(&:amount) end |
Instance Method Details
#description ⇒ Object
45 46 47 |
# File 'app/models/spree/refund.rb', line 45 def description payment.payment_method.name end |