Sha256: d0b3b173b8bf4e10a3778161c8a5e8a81b0984fb16dfbdf33010a2fe87cd87a3

Contents?: true

Size: 982 Bytes

Versions: 3

Compression:

Stored size: 982 Bytes

Contents

# frozen_string_literal: true

require_relative '../journal_entry_line_item/ledger_serializer'

module LedgerSync
  module Adaptors
    module QuickBooksOnline
      module JournalEntry
        class LedgerSerializer < QuickBooksOnline::LedgerSerializer
          id

          attribute ledger_attribute: 'CurrencyRef.value',
                    resource_attribute: :currency

          attribute ledger_attribute: 'TxnDate',
                    resource_attribute: :transaction_date,
                    type: LedgerSerializerType::DateType

          attribute ledger_attribute: 'PrivateNote',
                    resource_attribute: :memo

          attribute ledger_attribute: 'DocNumber',
                    resource_attribute: :reference_number

          references_many ledger_attribute: 'Line',
                          resource_attribute: :line_items,
                          serializer: JournalEntryLineItem::LedgerSerializer
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.3.1 lib/ledger_sync/adaptors/quickbooks_online/journal_entry/ledger_serializer.rb
ledger_sync-1.1.3 lib/ledger_sync/adaptors/quickbooks_online/journal_entry/ledger_serializer.rb
ledger_sync-1.1.2 lib/ledger_sync/adaptors/quickbooks_online/journal_entry/ledger_serializer.rb