We are trying to create a contact (applies to all requests) with the Xero Oauth 2.0 sdk gem.
When we make a request like this xero_client.accounting_api.get_invoices(xero_client.last_connection['tenantId']).invoices
The response we get is XeroRuby::ApiError: Error message: the server returns an error HTTP status code: 404
However when we assign the tenantId first
tenant_id = xero_client.last_connection['tenantId']
and then make the request
xero_client.accounting_api.get_invoices(tenant_id).invoices
The client fetches all the invoices successfully.
Is anyone able to explain how this is happening?