Sha256: 39a2e413fb7eb4fa6a76c8682074da07be9e288b7dfe3d25f2fdbefa7d5eeefc

Contents?: true

Size: 858 Bytes

Versions: 4

Compression:

Stored size: 858 Bytes

Contents

# frozen_string_literal: true

require_relative '../currency/deserializer'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class Transfer
        class Deserializer < QuickBooksOnline::Deserializer
          id

          amount :amount,
                 hash_attribute: 'Amount'

          attribute :memo,
                    hash_attribute: 'PrivateNote'

          attribute 'from_account.ledger_id',
                    hash_attribute: 'FromAccountRef.value'

          attribute 'to_account.ledger_id',
                    hash_attribute: 'ToAccountRef.value'

          date :transaction_date,
               hash_attribute: 'TxnDate'

          references_one :currency,
                         hash_attribute: :CurrencyRef,
                         deserializer: Currency::Deserializer
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ledger_sync-1.4.4 lib/ledger_sync/ledgers/quickbooks_online/transfer/deserializer.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/transfer/deserializer.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/transfer/deserializer.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/transfer/deserializer.rb