Skip to content

Add new GLS shipit API support - #190

Open
DylannCordel wants to merge 2 commits into
akretion:masterfrom
webu:gls_shipit
Open

DylannCordel wants to merge 2 commits into
akretion:masterfrom
webu:gls_shipit

Conversation

@DylannCordel

Copy link
Copy Markdown
Contributor

@DylannCordel

Copy link
Copy Markdown
Contributor Author

Tests fail because GLS does not provide a testing AppKey / Secret associated with a test ContactId.

@florian-dacosta I dunno how you want to manage it ? Maybe akretion could create a test account and ask GLS to associate it with a test Contact ID ? In this case, you'll just have to update credential_demo.py with valid data.

@florian-dacosta

Copy link
Copy Markdown
Member

Hello,
Thanks for the additon.
I can't see the doc (need to login I think). Do you know what is the difference between this shipit api and the already implemented here https://github.com/akretion/roulier/tree/master/roulier/carriers/gls_fr/rest ?

About the implementation, we were now trying to switch on the pydantic way to implement it (example here : https://github.com/akretion/roulier/tree/master/roulier/carriers/dpd_fr )
No plan to deprecate the other way, but I think it is worth you to have a look to decide if it make the code clearer/easier to maintain with pydantic, or not.

About the tests, I am not sure the best way to go is to test the real api. We had a lot of issue in the past because the api was not accessible, blocking randomly the CI... Maybe we can just test the method and mock the call when needed ?

@DylannCordel

Copy link
Copy Markdown
Contributor Author

"Ship-it" appears to be the new API from GLS; they plan to phase out the older ones, if I understood correctly what a representative from the GLS team indicated to us—as well as to our mutual clients.

Ok I'll recode tests with mocking or real API depending credentials set, and refactor with pydantic 👍

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

2 participants