2024-06-20 07:26:25 -04:00
|
|
|
class CreditCard < ApplicationRecord
|
|
|
|
include Accountable
|
2024-10-09 17:20:38 -04:00
|
|
|
|
2025-02-21 11:57:59 -05:00
|
|
|
class << self
|
|
|
|
def color
|
|
|
|
"#F13636"
|
|
|
|
end
|
|
|
|
|
|
|
|
def icon
|
|
|
|
"credit-card"
|
|
|
|
end
|
|
|
|
|
|
|
|
def classification
|
|
|
|
"liability"
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2024-10-09 17:20:38 -04:00
|
|
|
def available_credit_money
|
|
|
|
available_credit ? Money.new(available_credit, account.currency) : nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def minimum_payment_money
|
|
|
|
minimum_payment ? Money.new(minimum_payment, account.currency) : nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def annual_fee_money
|
|
|
|
annual_fee ? Money.new(annual_fee, account.currency) : nil
|
|
|
|
end
|
2024-06-20 07:26:25 -04:00
|
|
|
end
|