rangka / quickbooks

PHP Library for connecting to QuickBooks.
MIT License
8 stars 11 forks source link

Pagination does not seem to work #3

Closed basherr closed 7 years ago

basherr commented 7 years ago

When I try to paginate the customers or vendors something like

try {
          $results = $this->customerService->query()->paginate(0, 1000)->get();
    } catch (\Exception $e) {
         return response()->json([ 'success' => false, 'message' => $e->getMessage() ]);
}

maxresults\" \"MAXRESULTS \"\" at line 1, column 38.\nWas expecting:\n <INTEGER> As we already know that it accepts start and offset as an integer. Please fix it ASAP. Thanks

khairulashraff commented 7 years ago

It does not matter if its integer or a string. It will come out as a URL parameter anyway which have no concept of type.

The error most likely originates from Quickbooks under very specific condition. I went through all Services from my Playground (which always applies pagination) and this error did not come out. https://github.com/rangka/quickbooks-playground/blob/master/query.php

basherr commented 7 years ago

I just solved by setting start value to 1 rather then 0. Now I have been able to retrieve, create Items, Vendors, Accounts and Customers.

Thanks for the response.