Sha256: bfd369603df6119e982223675faff63afe99bf000db1beb7b127f8878ae49c1c

Contents?: true

Size: 1.66 KB

Versions: 13

Compression:

Stored size: 1.66 KB

Contents

# frozen_string_literal: true

require_relative '../reference/deserializer'
require_relative '../bill_payment_line/deserializer'
require_relative '../credit_card_payment/deserializer'
require_relative '../check_payment/deserializer'

module LedgerSync
  module QuickBooksOnline
    class BillPayment
      class Deserializer < QuickBooksOnline::Deserializer
        id

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

        mapping :PayType,
                hash: BillPayment::PAYMENT_TYPES.invert

        references_one :Currency,
                       hash_attribute: 'CurrencyRef',
                       deserializer: Reference::Deserializer

        references_one :Vendor,
                       hash_attribute: 'VendorRef',
                       deserializer: Reference::Deserializer

        references_one :APAccount,
                       hash_attribute: 'APAccountRef',
                       deserializer: Reference::Deserializer

        references_one :Department,
                       hash_attribute: 'DepartmentRef',
                       deserializer: Reference::Deserializer

        references_one :CreditCardPayment,
                       hash_attribute: 'CreditCardPayment',
                       deserializer: CreditCardPayment::Deserializer

        references_one :CheckPayment,
                       hash_attribute: 'CheckPayment',
                       deserializer: CheckPayment::Deserializer

        references_many :Line,
                        hash_attribute: 'Line',
                        deserializer: BillPaymentLine::Deserializer
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
ledger_sync-quickbooks_online-2.0.0 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-1.0.1 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-1.0.0 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.4.0 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.3.1 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.3.0 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.2.6 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.2.5 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.2.4 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.2.2 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.2.1 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.2.0 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb
ledger_sync-quickbooks_online-0.1.1 lib/ledger_sync/quickbooks_online/bill_payment/deserializer.rb