Sha256: 57d4c7c25517d2756cf3afcbc6c2967b004becbecdcd6831d423cc377b62a99e

Contents?: true

Size: 537 Bytes

Versions: 1

Compression:

Stored size: 537 Bytes

Contents

module LedgerSync
  class Expense < LedgerSync::Resource
    attribute :currency, type: Type::String
    attribute :amount, type: Type::Integer
    attribute :memo, type: Type::String
    attribute :payment_type, type: Type::String
    attribute :transaction_date, type: Type::Date
    attribute :exchange_rate, type: Type::Float

    references_one :vendor, to: Vendor
    references_one :account, to: Account

    references_many :line_items, to: ExpenseLineItem

    def name
      "Purchase: #{amount} #{currency}"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ledger_sync-1.1.1 lib/ledger_sync/resources/expense.rb