Class: Donation

Inherits:
ActiveRecord::Base
  • Object
show all
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

Methods included from Itemable

#sold_price

Class Method Details

.feeObject



18
19
20
# File 'app/models/donation.rb', line 18

def self.fee
  0 # $0 fee
end

Instance Method Details

#exchangeable?Boolean

Returns:

  • (Boolean)


30
31
32
# File 'app/models/donation.rb', line 30

def exchangeable?
  false
end

#expired?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/models/donation.rb', line 22

def expired?
  false
end

#priceObject Also known as: cart_price



13
14
15
# File 'app/models/donation.rb', line 13

def price
  amount
end

#refundable?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/models/donation.rb', line 26

def refundable?
  true
end

#returnable?Boolean

Returns:

  • (Boolean)


34
35
36
# File 'app/models/donation.rb', line 34

def returnable?
  false
end