Sha256: 33874d62580ab35334e6632984cb9170bbe074f5ed0e7e9ebe9fedbf6bbd8155

Contents?: true

Size: 1.23 KB

Versions: 4

Compression:

Stored size: 1.23 KB

Contents

# frozen_string_literal: true

require_relative '../reference/serializer'
require_relative '../payment_line/serializer'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class Payment
        class Serializer < QuickBooksOnline::Serializer
          id

          amount :TotalAmt
          attribute :PaymentRefNum
          attribute :PrivateNote
          attribute :ExchangeRate
          date :TxnDate

          references_one 'CurrencyRef',
                         resource_attribute: :Currency,
                         serializer: Reference::Serializer

          references_one 'CustomerRef',
                         resource_attribute: :Customer,
                         serializer: Reference::Serializer

          references_one 'DepositToAccountRef',
                         resource_attribute: :DepositToAccount,
                         serializer: Reference::Serializer

          references_one 'ARAccountRef',
                         resource_attribute: :ARAccount,
                         serializer: Reference::Serializer

          references_many 'Line',
                          resource_attribute: :Line,
                          serializer: PaymentLine::Serializer
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ledger_sync-1.6.0 lib/ledger_sync/ledgers/quickbooks_online/payment/serializer.rb
ledger_sync-1.5.2 lib/ledger_sync/ledgers/quickbooks_online/payment/serializer.rb
ledger_sync-1.5.1 lib/ledger_sync/ledgers/quickbooks_online/payment/serializer.rb
ledger_sync-1.5.0 lib/ledger_sync/ledgers/quickbooks_online/payment/serializer.rb