-
Notifications
You must be signed in to change notification settings - Fork 55
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
Remove get resource class method #333
Remove get resource class method #333
Conversation
Hi @Bladieblah, thanks for your PR. Due to holidays, we were unable to give you a response any sooner than today. We'll look into your work later this week. |
@Bladieblah Your idea has an interesting, different take on the problem than we already tried in #323. You state that your PR solves the issue with minimal changes. The actual problem with the pagination is that none of it is under test, which is why we never discovered and solved the issue in the first place. Your PR unfortunately doesn't fix that, and we have a different PR in draft that also tries to solve this issue in a different way, with some tests added (but not completed yet). I took your branch and added a few tests on Subscriptions (the original issue) and CustomerSubscriptions (a nested variant of the same endpoint), they pass so your code seems to be okay 👍 Note: your PR mentions removal of |
Hi @whyscream, thanks for looking at the PR! I messed up somewhere because I definitely intended to remove Apologies for the confusion! |
956a2d0
to
31a3f46
Compare
I added all tests I wrote for Subscriptions, and also some new tests for all places where you can list Chargebacks. I think we covered not all, but at least some of the places where pagination happens, so that we can verify that it works now. |
31a3f46
to
547bffe
Compare
I have refactored the
ObjectList
class in order to solve #315 with minimal changes. I completely removed theget_resource_class
method from all theResource
s, which now instead just store the type of the underlying object. TheObjectList
class was being used for (as far as I'm concerned) 2 purposes:list
endpointsThis distinction in function is now explicit with the
PaginationList
andObjectList
classes. Another benefit of this approach, is that paginating an endpoint no longer creates duplicateResource
objects.Let me know what you think!