ruckus/quickeebooks — pull request #33 by MattRogish (2013-02-25 23:28:23+00:00)
Title: Adding basic support for Windows sorting, pagination, and filtering

Note, modified spec_helper per
http://blog.mustmodify.com/2010/04/13/rspec-says-undefined-method-should-receive-for-someclass

# Overview

This adds support for Windows API sorting, pagination/chunksize and filtering.

# Sorting

Adds support per https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0100_Calling_Data_Services/0015_Retrieving_Objects#Sorting

# Pagination/Chunksize

Adds support per
https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0100_Calling_Data_Services/0015_Retrieving_Objects#Paging

Note the previous Quickeebooks::Windows::ServiceBase#fetch_collection implementation would omit the StartPage and ChunkSize parameters in certain Model#list methods, thus you may see unintended behavior, exhibited as only getting the first 20 results, now that the pagination forces PerPage to be 20 (to match Online API).

# Filtering

Added basic support per https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0100_Calling_Data_Services/0015_Retrieving_Objects#Filtering

Note that each Model has its own queryable attributes. An example for the InvoiceQuery Attributes:
https://ipp.developer.intuit.com/0010_Intuit_Partner_Platform/0050_Data_Services/0500_QuickBooks_Windows/0600_Object_Reference/Invoice#section_9

This means you cannot query on an arbitrary attribute (e.g. Name > 'foo'). Note that the current implementation will not attempt to whitelist the queryable attributes, so you will receive an Intuit exception if you attempt to query on an un-queryable attribute.

Also, this implementation does not yet support date attributes.