Skip to content

Use Oauth2 access_token and xero tenant id to instantiate connection#17

Merged
abreckner merged 8 commits intomasterfrom
connection-access-token
Apr 29, 2020
Merged

Use Oauth2 access_token and xero tenant id to instantiate connection#17
abreckner merged 8 commits intomasterfrom
connection-access-token

Conversation

@abreckner
Copy link
Contributor

@abreckner abreckner commented Apr 29, 2020

Also, use practice manager endpoint.

Because we managed to get Oauth2 working, we need to update this gem to use the new credentials applied (as well as the new endpoint).

In our conversation with Xero, their devs informed us they think most of our customers are probably XPM instead of WFM (though this is TBD).

At the moment we are thinking we will let the main app handle the oauth2 setup and expiring access tokens (but we may bring them into the gem eventually if it makes sense).

end

def current(api_key:, account_key:, api_url:)
def current(access_token:, xero_tenant_id:)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this could just be tenant_id?

In the context of xpm I'm not sure the xero_ prefix adds much?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmm, what we send to the API though is xero-tenant-id and I thought we should keep it consistent with the docs...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah okay that makes sense

Copy link
Contributor

@bedrock-adam bedrock-adam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work 🚀 👍

Preference would be to drop the xero_ prefix more to type but you can make the final call on that.

@bedrock-adam
Copy link
Contributor

🚢

@abreckner abreckner merged commit 40cab17 into master Apr 29, 2020
@abreckner abreckner deleted the connection-access-token branch May 1, 2020 05:14
lankz pushed a commit that referenced this pull request Jun 10, 2025
…17)

* Refactor connection to use access token and xero_tenant_id

* Fix job spec

* use access_token for staff

* template fix

* rubocop fixes

* Use new connection settings for client

* Rubocop fix
lankz pushed a commit that referenced this pull request Jun 10, 2025
…17)

* Refactor connection to use access token and xero_tenant_id

* Fix job spec

* use access_token for staff

* template fix

* rubocop fixes

* Use new connection settings for client

* Rubocop fix
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants