Sha256: 0ceeda24230af6a988895ef99c6f365c60ef1489d39f3acc29ac24d148aae6fc

Contents?: true

Size: 966 Bytes

Versions: 4

Compression:

Stored size: 966 Bytes

Contents

# frozen_string_literal: true

require_relative '../expense_line_item/deserializer'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class JournalEntryLineItem
        class Deserializer < QuickBooksOnline::Deserializer
          amount :amount,
                 hash_attribute: 'Amount'

          mapping :entry_type,
                  hash_attribute: 'JournalEntryLineDetail.PostingType',
                  hash: JournalEntryLineItem::TYPES.invert

          attribute 'account.ledger_id',
                    hash_attribute: 'JournalEntryLineDetail.AccountRef.value'

          attribute 'ledger_class.ledger_id',
                    hash_attribute: 'JournalEntryLineDetail.ClassRef.value'

          attribute 'department.ledger_id',
                    hash_attribute: 'JournalEntryLineDetail.DepartmentRef.value'

          attribute :description,
                    hash_attribute: 'Description'
        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_line_item/deserializer.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/deserializer.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/deserializer.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/journal_entry_line_item/deserializer.rb