Skip to content
New issue

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

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

Already on GitHub? # to your account

sandbox URL #2

Open
gedw99 opened this issue Mar 10, 2021 · 2 comments
Open

sandbox URL #2

gedw99 opened this issue Mar 10, 2021 · 2 comments

Comments

@gedw99
Copy link

gedw99 commented Mar 10, 2021

Hey

Currently the URL is hardcoded to this in the code.
// DefaultAPIBaseURL is the default base URL for API requests
const DefaultAPIBaseURL = "https://api.transferwise.com"

Would it be useful to also be able to tell it to use the sandbox URL ?
https://api.sandbox.transferwise.tech/

Maybe best way is to have a config boolean called "useSandbox", and then in pkg/client.go pick the right URL.


Also i noticed that there use different versions in the URL depending on the operation.
https://api-docs.transferwise.com/#exchange-rates-list

https://api-docs.transferwise.com/#quotes-create

saw that your using the old one "/v1/quotes/" for some reason. Maybe the Sandbox and Production use different versions ?

@jtrotsky
Copy link
Owner

jtrotsky commented Sep 8, 2021

Good idea @gedw99 , sorry I took ages to see this. Have upgraded to v2 quotes , and will consider adding the env toggle as a config like you suggest (shouldn't be too hard)

@gedw99
Copy link
Author

gedw99 commented Sep 13, 2021

Thanks @jtrotsky.

Repository owner locked and limited conversation to collaborators Oct 17, 2021
Repository owner unlocked this conversation Oct 17, 2021
Repository owner locked and limited conversation to collaborators Oct 17, 2021
@jtrotsky jtrotsky pinned this issue Oct 17, 2021
Repository owner unlocked this conversation Oct 17, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants