Class: Donation
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Donation
- Includes:
- Itemable
- Defined in:
- app/models/donation.rb
Overview
This is the donation represented in a user’s cart.
This is NOT the persisted item that is attached to the order
Class Method Summary collapse
Instance Method Summary collapse
- #exchangeable? ⇒ Boolean
- #expired? ⇒ Boolean
- #price ⇒ Object (also: #cart_price)
- #refundable? ⇒ Boolean
- #returnable? ⇒ Boolean
Methods included from Itemable
Class Method Details
.fee ⇒ Object
18 19 20 |
# File 'app/models/donation.rb', line 18 def self.fee 0 # $0 fee end |
Instance Method Details
#exchangeable? ⇒ Boolean
30 31 32 |
# File 'app/models/donation.rb', line 30 def exchangeable? false end |
#expired? ⇒ Boolean
22 23 24 |
# File 'app/models/donation.rb', line 22 def expired? false end |
#price ⇒ Object Also known as: cart_price
13 14 15 |
# File 'app/models/donation.rb', line 13 def price amount end |
#refundable? ⇒ Boolean
26 27 28 |
# File 'app/models/donation.rb', line 26 def refundable? true end |
#returnable? ⇒ Boolean
34 35 36 |
# File 'app/models/donation.rb', line 34 def returnable? false end |