fix: wire Payroll AU v2 client routing - #383
Open
ryanduguid wants to merge 2 commits into
Open
Conversation
ryanduguid
marked this pull request as ready for review
August 18, 2026 15:07
…shared state
call_api picked method_base_url from the API class, but build_request_url built
an absolute URL from @config.base_url, and Faraday's build_exclusive_url lets an
absolute request URL win over the connection prefix. Payroll AU v1 and v2 share
that single mutable base_url and expose byte-identical relative paths, so
v2 = client.payroll_au_v2_api
client.payroll_au_api
v2.get_timesheets(tenant_id)
GET payroll.xro/1.0//Timesheets and deserialised a v1 payload through
XeroRuby::PayrollAuV2. The PayrollAuV2Api branch in call_api was inert.
Thread method_base_url through build_request into build_request_url so the base
URL comes from the API class that issued the call. The no-API-class branch now
honours @config.base_url before falling back to accounting_url, which keeps
connections and disconnect pointed at https://api.xero.com.
Durability: the v2 wiring lives entirely in OpenAPI-Generator-owned files and
regeneration has rewritten api_client.rb before (d400b01). The repo keeps no PR
body file, so the "do not hand-edit, update the template" warning is in-file
next to each hand-maintained addition, and spec/configuration_spec.rb and
spec/api_client_spec.rb now fail if the accessor or config entry disappears.
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.
Summary
payroll_au_v2_apifromXeroRuby::ApiClientXeroRuby::PayrollAuV2Validation
lib/andspec/git diff --checkThe full RSpec run is left to exact-head Linux CI. The portable Windows Ruby install cannot build the lockfile's native gems because MSYS2 is unavailable (
byebug,json,raccandbigdecimalstop installation).The affected runtime files carry OpenAPI Generator headers, while the generator/template repository is private. This is therefore a narrow interim SDK correction; please apply the same routing/configuration mapping to the owning Ruby templates and regenerate so a later SDK release does not overwrite it.