quickbooks-ruby icon indicating copy to clipboard operation
quickbooks-ruby copied to clipboard

Introduce ActiveRecord like methods to Quickbooks Models

Open kashif-umair opened this issue 8 years ago • 0 comments

This PR is an improvement to previous PR that was merged but then reverted because of an issue. The previous PR is https://github.com/ruckus/quickbooks-ruby/pull/264

  • This PR introduces some methods i.e. all, where, find_by, find, count, save, first methods to quickbooks models. This change eliminates the requirement of using services to query something from Quickbooks. You can directly call Quickbooks::Models::Invoice.all to get all the invoices.
  • ~~Another setting allow_pagination is introduced in this PR. This is a boolean setting which is set to true by default. If user sets this setting to false then no pagination will be applied and all the records will be returned on any query.~~

  • The golbal setting allow_pagination has been removed which I introduced in my last commit. Instead of that, I've introduced another option to skip pagination on each request basis i.e. skip_pagination. This setting will be available in both the conventional query method and the new methods introduced in this PR.
  • [x] I'm working on updating the README.md file.

kashif-umair avatar Sep 17 '16 12:09 kashif-umair