Repository navigation
[RUBY-3894] Rebase fork onto upstream 2-stable branch for Faraday 2 support - #15
Merged
Merged
Conversation
* Replace custom Faraday GZip implementation with `faraday-gzip` gem Credit goes to [Zachary Jones/Zajn](https://github.com/Zajn) Original [PR ruckus#58](ruckus#578)
* Test against Faraday 1.x and 2.x * Faraday 1.x support for Quickbooks::Service::AccessToken#disconnect
match serialization type, fix ruckus#588
* note about 2.0 * clarified version info * Update README.md added note about redirect_uri needs to be publicly accessible * Update README.md * deser tax_inclusive_amt to numeric type (ruckus#589) match serialization type, fix ruckus#588 * bump dependency on faraday-gzip to support JRuby see bodrovis/faraday-gzip#2 * expand CI to cover Ruby 3.2 and JRuby 9.3/9.4 * fix test broken on JRuby due to invalid XML Co-authored-by: cody caughlan <toolbag@gmail.com> Co-authored-by: Brian Henry <brian@bitpan.com>
* Add total_tax_specified xml_accessor to TransactionTaxDetail In a recent update to the QBO API, if a company that uses automated sales tax has an invoice that has no tax amount, we need to specify TotalTaxSpecified = false. Not passing this results in an error from QBO indicating that sales tax was miscalculated. * Accidentally commited a binding.pry * Add condense_logs to quickbooks config & update logs to only log once per request and once per response if enabled * Update variable names & move condense_logs? checks to logging util * Update Quickbooks.log to log without condition & move condition to logging utility to allow per-service-instance logging capability * Update README to include instance configurability demo * Update log settings check to check for ivar definition instead of just memoizing to handle @log explicitly being set to false for an instance --------- Co-authored-by: Daniel Ho <daniel.ho@housecallpro.com>
Co-authored-by: Dave Morehouse <dave@serviceshift.com>
* add ship from address to sales receipt * Add bill_address and ship_address to sales receipt spec --------- Co-authored-by: Rob Chekaluk <rchekaluk@ppolitics.org>
Co-authored-by: Christopher Nelson <chris@chrisnelson.au>
…racking (ruckus#595) (cherry picked from commit dd300ed)
+ Append all non-standard options to the query url + Rely on Faraday's query string encoding Some endpoints (like invoice) require additional parameters on the query URL to get additional attributes (like include=invoiceLink). (cherry picked from commit 5c19c7e)
Added the action that voids a bill payment in gem. (cherry picked from commit 025b733)
jorgefernando1
approved these changes
Sep 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This gem is one of housecall-web's lockfile constraints for faraday v2 upgrade.
oauth2 1.4.11already permitsfaraday >= 0.17.3, < 3.0, so this gem is the entire blocker and nothing else has to move.Upstream's
2-stablesolves it withfaraday < 3.0andoauth2 < 3.0. That second part is why this beats fork PR #14:< 3.0keeps housecall-web'sgem 'oauth2', '~> 1.4'satisfiable, whereas #14'soauth2 ~> 2.0drags Google SSO and 8 unrelated call sites into a QBO ticket.What
Rebased onto upstream
2-stable(67335f4, v2.0.7) with our fork deltas replayed on top. 27 of the 34 commits are upstream's own history.quickbooks-ruby.gemspecandlib/quickbooks-ruby.rbare byte-identical to2-stable.Review these 10 files - the rest is upstream:
lib/quickbooks/model/purchase.rbpayment_method_ref(ruckus#595)lib/quickbooks/service/bill_payment.rb+ spec + fixturevoidactionlib/quickbooks/service/base_service.rblib/quickbooks/service/change_service.rbspec/lib/quickbooks/service/base_service_spec.rb+ fixtureGemfile,.github/workflows/ci.ymlChangeService#url_for_queryarity.fetch_collectionpasses 4 args, the override took 3, so every ChangeService subclass raisesArgumentError (given 4, expected 0..3)on#query- 8 specs are red onmastertoday.2-stablealready declares the wider signature but never passes the 4th arg, so upstream never trips this - our ruckus#592 cherry-pick is what madefetch_collectionstart passing it. CDC endpoints have no pagination, so the extra args are accepted and ignored.Spec rewrite. Three request-hook tests asserted captured stdout and
url_for_queryasserted an escaped query string, both of which break on things unrelated to the behaviour under test: Ruby 3.4 changedHash#inspectspacing, andoauth2 2.xsetsFaraday::Utils.default_space_encoding = "%20"globally. Now asserts theRequestInfoand the decoded query.CI. Was 9 rubies × 2 faraday on
[push, pull_request]= 36 checks, 12 red. Now 4 rubies × faraday × oauth2 = 16 checks, all green. Dropped Ruby 2.6 / JRuby /-head, which cannot resolve (activesupport 6.1 needs arequire "logger"that concurrent-ruby >= 1.3.5 no longer does, andfaraday-gzipcaps Ruby at< 4on the faraday-1 axis). Added Ruby 3.3/3.4 and an oauth2 axis - the old matrix never covered faraday 2 + oauth2 1.4.x, which is exactly what housecall-web runs.Behaviour changes worth knowing
"Name: String length is either shorter or longer...". NewIntuitRequestException#elementaccessor.ExceptionFactoryandExceptionHandleablematch on substrings, so classification is unaffected, but Sentry grouping will shift.nil. Intuit sendselement=""on code-6000 faults and""is truthy in Ruby, so upstream Add element name to IntuitRequestException and message ruckus/quickbooks-ruby#609 prefixed those messages with a bare": ".ReprocessSelfHealingErrorsexact-matchesexception_message IN (...)against 13 full Intuit strings, three of them code-6000 business validation messages, so that prefix would have silently stopped those auto-retries. Fixed here with a regression test. A populated element still prefixes, but none of the 13 are field-level validation errors.rebuild_connection!replaces oauth2's connection instead of rebuilding it, sosite/connection_opts/sslare no longer inherited. A no-op today (we pass none, andtoken_urlis absolute) but a trap if anyone adds timeouts there later. Upstream code, left as-is.Upload#class_for_io, the vendoredGzipmiddleware (now thefaraday-gzipgem), OAuth1 upload support;preferencessection:vendor_and_purchase→:vendor_and_purchases. All verified unused in housecall-web.ref:, so there is no version constraint to update.