-
Notifications
You must be signed in to change notification settings - Fork 850
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
Could it be that autoPagingIterator is losing initial params? #1055
Comments
@tishma Thanks for reaching out! I tried to reproduce locally but the code is working properly for me. Here's what I'm doing:
When I run that code, I get one invoice per page and I'm properly paginating through all the invoices of my customer and only that one. Would you be able to try something similar on your end with the right customer id to confirm you're seeing the same thing? |
Hey, thanks for the response. I have collected 2 pieces of evidence using your method (limit - 1, so each invoice comes from a separate request). I only have 2 customers (A and B), so I'm virtually dumping all invoices I've got in my test. Customer B has just 2 invoices, and one is the oldest one while the other is the 5th recent.
|
Okay, trying. |
But it sure is fixed now!
|
I'm still gonna go for the max limit in order not to throw so many requests at the API, but this is not going to be another thing to keep me awake at night :) Thank you! @remi-stripe |
Awesome, glad you got unblocked! |
In effect - I'm collecting all invoices for a customer, and since my customer has more than 1 (10-item) page worth of invoices - subsequent requests seem to be collecting other customers' invoices as well, as long as they match
starting_after
condition. If I increase limit to capture all invoices in a single request - I'm only getting single customer's invoices - as expected.I have a reason to believe that in this setup - subsequent requests made thru
autoPagingIterator
are not keeping the parameters. If that's intended - I'd really appreciate the hint on how to achieve the above.php-stripe version: 7.333
php version: 7.4.11
The text was updated successfully, but these errors were encountered: