stripe / stripe-go

Go library for the Stripe API.
https://stripe.com
MIT License
2.17k stars 460 forks source link

Do not allow setting API Version directly #1941

Closed ramya-stripe closed 1 month ago

ramya-stripe commented 1 month ago

Why?

When we introduced beta SDKs, we allowed users to directly update the global configuration for API Version since they needed to pass beta headers in #1529. We soon realized that was not safe and was error prone if users didnt pass in the right format and so introduced a helper method in #1819 and advertised that as the right way of doing things in the README

Proper deserialization of classes from Events can be guaranteed only when the Webhook API version matches the API version used to generate the SDKs. Therefore, in this PR we are dropping the ability to directly update the API version.

What?

Changelog