Sha256: 8909cab334b2658c2d1c16aedbc7b90342dad60e3d6421edfb3ab98aff2c110d

Contents?: true

Size: 651 Bytes

Versions: 3

Compression:

Stored size: 651 Bytes

Contents

# frozen_string_literal: true
require_relative '../searcher'

module LedgerSync
  module Adaptors
    module QuickBooksOnline
      module Expense
        class Searcher < QuickBooksOnline::Searcher
          def resources
            @resources ||= begin
              adaptor
                .query(
                  resource: 'purchase',
                  limit: limit,
                  offset: offset
                )
                .map do |c|
                  LedgerSync::Expense.new(
                    ledger_id: c.fetch('Id')
                  )
                end
            end
          end
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ledger_sync-1.1.3 lib/ledger_sync/adaptors/quickbooks_online/expense/searcher.rb
ledger_sync-1.1.2 lib/ledger_sync/adaptors/quickbooks_online/expense/searcher.rb
ledger_sync-1.1.1 lib/ledger_sync/adaptors/quickbooks_online/expense/searcher.rb