-
Notifications
You must be signed in to change notification settings - Fork 370
Description
Is your feature request related to a problem? Please describe.
Today we can get the current SDK API version by calling Stripe.API_VERSION
This is defined as a static final string, which resolves to something like 2025-04-30.basil
When comparing messages passed between different services that might be on different versions of the SDK, it's important to understand if they are on different release trains, since the versioning contract states that breaking changes are only introduced for new majors.
To get the release train/major version, we have to do something like
Stripe.API_VERSION.split("\\.", 2)[1]
It would be nice if Stripe provided constants for major/release train (and probably minor version as well)
Describe the solution you'd like
Add a new constants in Stripe.java
With Stripe.API_VERSION
returning 2025-04-30.basil
Something like
Stripe.API_RELEASE_TRAIN
which returns the release train/major version basil
or simply
Stripe.API_MAJOR_VERSION
which returns basil
and
Stripe.API_MINOR_VERSION
which returns 2025-04-30
to avoid forcing users to do string parsing
Describe alternatives you've considered
No response
Additional context
No response