Sha256: 3656aae4baa533ca074bf95427e8b1252e939b636d476cc815a16ee0924adfec

Contents?: true

Size: 401 Bytes

Versions: 3

Compression:

Stored size: 401 Bytes

Contents

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

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.1.3 lib/ledger_sync/resources/transfer.rb
ledger_sync-1.1.2 lib/ledger_sync/resources/transfer.rb
ledger_sync-1.1.1 lib/ledger_sync/resources/transfer.rb