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

Explicitly define CRUDL methods in each resource #1030

Merged
merged 2 commits into from
Sep 8, 2023

Conversation

richardm-stripe
Copy link
Contributor

@richardm-stripe richardm-stripe commented Aug 30, 2023

Explicitly defines create, retrieve, update, delete, and list methods in the body of each resource, as an override of the "standard" implementation from UpdateableApiResource etc.

This makes the class definition serve as better documentation and removes indirection. Eventually it would be good to do this for the "nested_resource" methods, too.

Branched off #1046.

Compare the CRUDL methods in coupon.py (left) with the parent class methods (right). They should be identical except for concrete classes instead of the generic T.
image

image image image image

@richardm-stripe richardm-stripe force-pushed the richardm-explicit-methods branch 3 times, most recently from 011e834 to 46afe7b Compare September 7, 2023 00:25
@richardm-stripe richardm-stripe force-pushed the richardm-explicit-methods branch from 46afe7b to 8b6f7d5 Compare September 8, 2023 10:00
@richardm-stripe richardm-stripe changed the base branch from master to richardm-rearrange-imports September 8, 2023 10:01
@richardm-stripe richardm-stripe requested review from pakrym-stripe and removed request for pakrym-stripe September 8, 2023 10:04
@richardm-stripe richardm-stripe force-pushed the richardm-explicit-methods branch 2 times, most recently from 09b4781 to 48cabe1 Compare September 8, 2023 10:33
Base automatically changed from richardm-rearrange-imports to master September 8, 2023 18:31
@richardm-stripe richardm-stripe force-pushed the richardm-explicit-methods branch from 48cabe1 to ba2a9b6 Compare September 8, 2023 18:32
@richardm-stripe richardm-stripe merged commit 71e0e72 into master Sep 8, 2023
@richardm-stripe richardm-stripe deleted the richardm-explicit-methods branch September 11, 2023 16:49
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.

2 participants