-
Notifications
You must be signed in to change notification settings - Fork 28
feat: Add Context Support and Improve Readability by jamieaitken #156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
3647be0 to
f015738
Compare
f015738 to
e9d71b4
Compare
e9d71b4 to
91f3712
Compare
|
@jamieaitken next week we will release this version, thank you. |
|
@armando-rodriguez-cko great, thanks for keeping me in the loop! |
91f3712 to
b6f1402
Compare
|
After reviewing and evaluating this PR, it is closed for now due to the need to add more context tests and better cover all areas and endpoints with context. The branch will remain active to add these fixes; we apologise for the inconvenience. |
* Add Context to HTTP layer * Add Context to Customers client * Add Context to Disputes client * Add Context to Events client * Add Context to Hosted client * Add Context to Instruments client * Add Context to Links client * Add Context to Payments client * Add Context to Reconciliation client * Add Context to Sources client * Add Context to Tokens client * Add Context to Webhook client * Add Context to iDEAL client * Add Context to Klarna client * Add Context to SEPA client * Update tests * Add Context to NAS Payments --------- Co-authored-by: Armando Rodríguez <[email protected]>
8631a7c to
8386d75
Compare
|
|
@jamieaitken reopened and rebased, we will work on this soon. |



feat: Add Context Support and Improve Readability
Description:
This PR introduces
WithContextvariants for all publicly exposed methods in the Go SDK clients. These changes provide developers with fine-grained control over timeouts and cancellations using Go’s nativecontext.Context. Additionally, method signatures and calls have been refactored for improved readability and consistency.Key Changes:
Context Support
WithContextversions of all public methods across SDK clients.CreateWithContext,GetWithContext,UpdateWithContext,DeleteWithContext, etc.WithContextcounterparts usingcontext.Background().Improved Readability
No Functional Changes
Impact
Testing
WithContextversions internally delegate to the correct context-aware HTTP client functions (PostWithContext,GetWithContext, etc.).Notes
WithContextversions going forward.