Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: multiple APIs cannot be used in the same expression #284

Open
vlad-pisanov opened this issue Jul 5, 2024 · 2 comments
Open

Bug: multiple APIs cannot be used in the same expression #284

vlad-pisanov opened this issue Jul 5, 2024 · 2 comments

Comments

@vlad-pisanov
Copy link

This works: ✔️

tenant_id = client.connections.first['tenantId']
client.accounting_api.get_organisations(tenant_id)
#<XeroRuby::Accounting::Organisations:0x00007fc485ca4530
# @organisations= ...

But once rewritten as a single expression, it does not: ❌

client.accounting_api.get_organisations(client.connections.first['tenantId'])
# Error message: the server returns an error (XeroRuby::ApiError)
# HTTP status code: 404

This is because client.connections overwrites the @base_url of the client used in client.accounting_api, so the account api ends up making requests to https://api.xero.com instead of https://api.xero.com/api.xro/2.0.

Combining any two or more APIs in the same expression leads to this bug.

Copy link

github-actions bot commented Jul 5, 2024

PETOSS-461

Copy link

github-actions bot commented Jul 5, 2024

Thanks for raising an issue, a ticket has been created to track your request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant