Class: Invoice

Inherits:
MLS::Model show all
Defined in:
lib/mls/models/invoice.rb

Instance Method Summary collapse

Instance Method Details

#amountObject



6
7
8
# File 'lib/mls/models/invoice.rb', line 6

def amount
  read_attribute(:amount) / 100.0 if read_attribute(:amount)
end

#statusObject



10
11
12
13
14
# File 'lib/mls/models/invoice.rb', line 10

def status
  return "refunded" if refunded_at
  return "paid" if cleared_at
  return "pending"
end