Sha256: 147bdd8b9756ab96496b833767f797a9bb93cd19a87c9791f719ab1246601c4f

Contents?: true

Size: 897 Bytes

Versions: 4

Compression:

Stored size: 897 Bytes

Contents

# frozen_string_literal: true

require_relative '../currency/deserializer'
require_relative '../journal_entry_line_item/deserializer'

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

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

          date :transaction_date,
               hash_attribute: 'TxnDate'

          attribute :memo,
                    hash_attribute: 'PrivateNote'

          attribute :reference_number,
                    hash_attribute: 'DocNumber'

          references_many :line_items,
                          hash_attribute: 'Line',
                          deserializer: JournalEntryLineItem::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/journal_entry/deserializer.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/journal_entry/deserializer.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/journal_entry/deserializer.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/journal_entry/deserializer.rb