Sha256: 86aacb102d8e607c2535fba9d76ca9ff8667f6689b5e3648723442778605fff6

Contents?: true

Size: 975 Bytes

Versions: 4

Compression:

Stored size: 975 Bytes

Contents

# frozen_string_literal: true

require_relative '../invoice_sales_line_item/serializer'

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

          references_one :CurrencyRef,
                         resource_attribute: :currency,
                         serializer: Currency::Serializer

          date 'TxnDate',
               resource_attribute: :transaction_date

          attribute 'PrivateNote',
                    resource_attribute: :memo

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

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

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