Class: LedgerSync::Adaptors::QuickBooksOnline::Searcher
- Defined in:
- lib/ledger_sync/adaptors/quickbooks_online/searcher.rb
Direct Known Subclasses
Account::Searcher, Bill::Searcher, Customer::Searcher, Deposit::Searcher, Expense::Searcher, JournalEntry::Searcher
Instance Attribute Summary
Attributes inherited from Searcher
#adaptor, #pagination, #query, #resources
Instance Method Summary collapse
Methods inherited from Searcher
Constructor Details
This class inherits a constructor from LedgerSync::Adaptors::Searcher
Instance Method Details
#next_searcher ⇒ Object
7 8 9 |
# File 'lib/ledger_sync/adaptors/quickbooks_online/searcher.rb', line 7 def next_searcher paginate(limit: limit, offset: offset + limit) end |
#previous_searcher ⇒ Object
11 12 13 14 15 |
# File 'lib/ledger_sync/adaptors/quickbooks_online/searcher.rb', line 11 def previous_searcher return nil if offset <= 1 paginate(limit: limit, offset: offset - limit) end |
#search ⇒ Object
17 18 19 20 21 22 |
# File 'lib/ledger_sync/adaptors/quickbooks_online/searcher.rb', line 17 def search super rescue OAuth2::Error => e @response = e # TODO: Better catch/raise errors as LedgerSync::Error failure end |