Sha256: 1d221efdf53931cc532688c6c8b8b0841a444fabd36b4f7cbe046088d56195e8

Contents?: true

Size: 965 Bytes

Versions: 4

Compression:

Stored size: 965 Bytes

Contents

# frozen_string_literal: true

require_relative '../invoice_sales_line_item/deserializer'

module LedgerSync
  module Ledgers
    module QuickBooksOnline
      class Invoice
        class Deserializer < QuickBooksOnline::Deserializer
          id

          references_one :currency,
                         hash_attribute: :CurrencyRef,
                         deserializer: Currency::Deserializer

          date :transaction_date,
               hash_attribute: 'TxnDate'

          attribute :memo,
                    hash_attribute: 'PrivateNote'

          attribute 'customer.ledger_id',
                    hash_attribute: 'CustomerRef.value'

          attribute 'account.ledger_id',
                    hash_attribute: 'DepositToAccountRef.value'

          references_many :line_items,
                          hash_attribute: 'Line',
                          deserializer: InvoiceSalesLineItem::Deserializer
        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/invoice/deserializer.rb
ledger_sync-1.4.2 lib/ledger_sync/ledgers/quickbooks_online/invoice/deserializer.rb
ledger_sync-1.4.1 lib/ledger_sync/ledgers/quickbooks_online/invoice/deserializer.rb
ledger_sync-1.4.0 lib/ledger_sync/ledgers/quickbooks_online/invoice/deserializer.rb