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

Use ListObject properties as default values in request methods #612

Merged
merged 1 commit into from
Sep 11, 2019

Conversation

ob-stripe
Copy link
Contributor

r? @brandur-stripe
cc @stripe/api-libraries

I caused a regression in #610. Previously, when calling a request method on a ListObject, the ListObject's properties for headers (api_key, stripe_account, stripe_version) would be used.

In #610, I added parameters for headers to request methods, but if the parameters are not passed, we would default to None instead of using the ListObject's properties for the headers.

This PR fixes this by using the parameter if provided, and falling back to the ListObject properties if not.

Fixes #611.

@therefromhere
Copy link

I can confirm this fixes the issue for me, thanks.

Copy link
Contributor

@brandur-stripe brandur-stripe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for adding the extra test too!

@ob-stripe ob-stripe merged commit dec7b5d into master Sep 11, 2019
@ob-stripe ob-stripe deleted the ob-fix-611 branch September 11, 2019 18:48
@ob-stripe
Copy link
Contributor Author

Released as 2.36.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

api_key param no longer passed to nested objects?
4 participants