Skip to content

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

Merged
helenye-stripe merged 6 commits intomasterfrom
helenye-fix-options
Jan 13, 2025
Merged

Import global configuration for options not available on StripeClient options#1512
helenye-stripe merged 6 commits intomasterfrom
helenye-fix-options

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
13 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