Sha256: c9b15a06c7f3a5720cc243c219e15471f48dbd8cf1d8b347b25d32cf9098d2a6

Contents?: true

Size: 287 Bytes

Versions: 4

Compression:

Stored size: 287 Bytes

Contents

class Invoice < MLS::Model
  
  belongs_to :credit_card
  belongs_to :subscription
  
  def amount
    read_attribute(:amount) / 100.0 if read_attribute(:amount)
  end
  
  def status
    return "refunded" if refunded_at
    return "paid" if cleared_at
    return "pending"
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
mls-1.9.0 lib/mls/models/invoice.rb
mls-1.8.0 lib/mls/models/invoice.rb
mls-1.7.0 lib/mls/models/invoice.rb
mls-1.6.0 lib/mls/models/invoice.rb