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

Import global configuration for options not available on StripeClient options #1512

Merged
merged 6 commits into from
Jan 13, 2025

Conversation

helenye-stripe
Copy link
Contributor

@helenye-stripe helenye-stripe commented Jan 8, 2025

Why?

Raised in #1511 - In our v13 migration guide, we mention that we use global configuration for options that are not available per StripeClient. This was not implemented for that release, this remedies that.

What?

Adds a new fxn and tests to StripeConfiguration to initialize a client configuration with given options, with each option following the priority:

  • If available as a client option:
    • If provided, set as provided option
    • Use StripeConfiguration default
  • If not available as a client option (e.g.enable_telemetry, open_timeout)
    • Use global configuration value

See Also

Changelog

  • Fixes bug where StripeClient was not falling back to global options for options that are not available to be set per-client

@helenye-stripe helenye-stripe changed the title Fix client options not importing global config Import global configuration for options not available on StripeClient options Jan 9, 2025
@helenye-stripe helenye-stripe marked this pull request as ready for review January 9, 2025 18:19
@helenye-stripe helenye-stripe requested review from a team and xavdid-stripe and removed request for a team January 9, 2025 18:20
@helenye-stripe helenye-stripe merged commit 6e39505 into master Jan 13, 2025
14 checks passed
@helenye-stripe helenye-stripe deleted the helenye-fix-options branch January 13, 2025 22:23
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