You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
It can be annoying to be dynamically setting the app info based on the execution context for every http request, as you need to take care to reset it to what it was before. Before, you need to do something along the lines of:
def xyz
previous_app_info = Stripe.app_info
some_condition = Foo.condition?
Stripe.set_app_info("bar") if some_condition
stripe_client.request do
return block.call
end
ensure
Stripe.app_info = previous_app_info if some_condition
end
and then wrap your requests, in the case of an app info changing dynamically.
Describe the solution you'd like
Allow a StripeClient initializer to take in an optional app_info param, that will override the global app_info for that instance of the client. This allows you to decide the app info in a certain execution context in a way that is isolated from any other contexts and doesn't have to take care to reset the app info to what it may have been before.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
It can be annoying to be dynamically setting the app info based on the execution context for every http request, as you need to take care to reset it to what it was before. Before, you need to do something along the lines of:
and then wrap your requests, in the case of an app info changing dynamically.
Describe the solution you'd like
Allow a StripeClient initializer to take in an optional app_info param, that will override the global app_info for that instance of the client. This allows you to decide the app info in a certain execution context in a way that is isolated from any other contexts and doesn't have to take care to reset the app info to what it may have been before.
Describe alternatives you've considered
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: