Skip to content
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

Move Metadata from embedded Params onto specific Params structs #1641

Merged
merged 4 commits into from
Aug 4, 2023

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Apr 13, 2023

Summary

Users occasionally think that Metadata is missing from stripe-go, or don't see how to set it, because it's difficult to find inside the embedded Params struct.

This PR

  1. Adds Metadata explicitly to each Params struct for a part of the API that supports Metadata, along with an AddMetadata method.
  2. Deprecates Metadata and AddMetadata on the embedded params struct.
  3. Causes .Call to error if both the explicit Metadata and the deprecated embedded Metadata are set.

Best to review the first two logic-ful commits first:

I think this is non-breaking, but as we are planning a major release soon it ought to go there.

Fixes #1456, #1599, #1468, #1362, #1251, #1233, ... etc.

@richardm-stripe richardm-stripe requested review from a team and anniel-stripe and removed request for a team April 13, 2023 20:01
@richardm-stripe richardm-stripe force-pushed the richardm-hoist-metadata branch from fc91dfc to d220630 Compare August 4, 2023 22:03
@richardm-stripe richardm-stripe force-pushed the sdk-release/next-major branch from b36d2c2 to b05fb41 Compare August 4, 2023 22:05
@richardm-stripe richardm-stripe merged commit 2266970 into sdk-release/next-major Aug 4, 2023
@richardm-stripe richardm-stripe deleted the richardm-hoist-metadata branch August 4, 2023 22:14
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