-
Notifications
You must be signed in to change notification settings - Fork 432
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
Nested resource class methods #350
Conversation
Man Olivier you are on a roll here! Nice work — I'm especially loving the really extensive test suite, and the fact that the decorator class has tests directly. I'll wait on a little discussion in stripe/stripe-ruby#597, but LGTM. |
stripe/resource.py
Outdated
if path is None: | ||
path = "%ss" % resource | ||
if operations is None: | ||
operations = ['create', 'retrieve', 'update', 'delete', 'list'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ob-stripe Relating to stripe/stripe-ruby#600, mind if we require an explicit list of supported operations here?
Pushed another commit to require an explicit list of operations. |
Thanks OB! I think you missed one. From CI:
|
bfdca8f
to
872b354
Compare
Oops! Should be fixed now. |
Released as 1.68.0. |
r? @brandur-stripe
cc @stripe/api-libraries
Basically a port of stripe/stripe-ruby#597 for the Python library.
A couple differences:
implemented as a decorator, because Python
the update methods are called
modify_<nested_resource>
instead ofupdate_<nested_resource>
to match the pre-existing naming convention in the library.Everything else should be the same.