quickbooks-ruby
quickbooks-ruby copied to clipboard
Introduce ActiveRecord like methods to Quickbooks Models
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 callQuickbooks::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 totrue
by default. If user sets this setting tofalse
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.