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

Introduce custom listing methods on objects. #756

Merged
merged 1 commit into from
Dec 21, 2021

Conversation

dcr-stripe
Copy link
Contributor

r? @yejia-stripe

Summary

Updates the implementation for custom methods which return list objects to:

  1. Create a new StripeObject rather than attempting to refresh - this is necessary as the returned object will be of a different type (now list) and fails to refresh.
  2. Set _retrieve_params to make sure iteration continues with the same input set of parameters.

Motivation

Partially fixes #755. We still need to do this for the static custom methods.

Test plan

I added a test which previously failed and now passes.

@dcr-stripe dcr-stripe changed the title Introduce custom listing methods. Introduce custom listing methods on objects. Dec 20, 2021
Copy link
Contributor

@yejia-stripe yejia-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!

@stripe-ci stripe-ci assigned dcr-stripe and unassigned yejia-stripe Dec 20, 2021
@dcr-stripe dcr-stripe merged commit 031b0d0 into master Dec 21, 2021
@dcr-stripe dcr-stripe deleted the dcr-inline-custom-methods branch December 21, 2021 14:35
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.

Customer.list_payment_methods with auto_paging_iter does not respect initial parameters
2 participants