Sha256: 440d1210739cb986522d21e14b7f3fbd547799ec44fcb004433ca7f736dfa71c

Contents?: true

Size: 1 KB

Versions: 3

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

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

          attribute ledger_attribute: 'Amount',
                    resource_attribute: :amount,
                    type: LedgerSerializerType::AmountType

          attribute ledger_attribute: 'PrivateNote',
                    resource_attribute: :memo

          attribute ledger_attribute: 'FromAccountRef.value',
                    resource_attribute: 'from_account.ledger_id'

          attribute ledger_attribute: 'ToAccountRef.value',
                    resource_attribute: 'to_account.ledger_id'

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

          attribute ledger_attribute: 'CurrencyRef.value',
                    resource_attribute: 'currency'
        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/transfer/ledger_serializer.rb
ledger_sync-1.1.3 lib/ledger_sync/adaptors/quickbooks_online/transfer/ledger_serializer.rb
ledger_sync-1.1.2 lib/ledger_sync/adaptors/quickbooks_online/transfer/ledger_serializer.rb