Sha256: d9604822ec69c19a171ffae2eb5c431a22d5c62cd837eaa11f99bb5906c041b2

Contents?: true

Size: 460 Bytes

Versions: 1

Compression:

Stored size: 460 Bytes

Contents

# frozen_string_literal: true

require_relative 'account'

module LedgerSync
  class Transfer < LedgerSync::Resource
    attribute :currency, type: Type::String
    attribute :amount, type: Type::Integer
    attribute :memo, type: Type::String
    attribute :transaction_date, type: Type::Date

    references_one :from_account, to: Account
    references_one :to_account, to: Account

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ledger_sync-1.3.1 lib/ledger_sync/resources/transfer.rb