Skip to content
This repository has been archived by the owner on Dec 5, 2023. It is now read-only.

Support configuration for sandbox + production? #12

Closed
subimage opened this issue Aug 25, 2022 · 1 comment
Closed

Support configuration for sandbox + production? #12

subimage opened this issue Aug 25, 2022 · 1 comment

Comments

@subimage
Copy link

Hello! Thank you for providing this wonderful SDK for go users. I'm curious if you would consider making it possible to pass an auth configuration to switch between production and sandbox environments for testing? On configuration.go:63 the value for the production service is hardcoded. Yet, in swagger.yaml:23 there seems to be the ability to switch based on environment.

If this is possible, could you please provide documentation on how to make that happen? If not possible, may I please file a feature request? Thank you!

@subimage subimage changed the title Please support configuration for sandbox + production Support configuration for sandbox + production? Aug 25, 2022
@subimage
Copy link
Author

Sorry, I found a way!

cfg := sw.NewConfiguration()
cfg.BasePath = "https://connect.squareupsandbox.com"
apiClient := sw.NewAPIClient(cfg)

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

No branches or pull requests

1 participant