Fix issue where auto_paging_iter failed on nested list objects. #855
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
r? @pakrym-stripe
Summary
Update
convert_to_stripe_object
to only override_retrieve_params
is anyparams
were passed. Otherwise, the class constructor will instantiate its own.Fixes #854
Today when we create a
StripeObject
it says_retrieve_params
to the value of theparams
kwarg. In this case, that means list objects always have_retrieve_params = {}
(or any key/values passed to params).This issue applied specifically to nested listing objects. We would invoke
convert_to_stripe_object
withparams=None
for the child list object. We then overrode the_retrieve_params
to beNone
which causedauto_paging_iter
to fail.