mirror of
https://github.com/stripe/stripe-ruby.git
synced 2025-05-31 00:00:37 -04:00
Add some documentation to NestedResource
module
This commit is contained in:
parent
cf5354cc27
commit
af51af2577
@ -1,5 +1,12 @@
|
||||
module Stripe
|
||||
module APIOperations
|
||||
# Adds methods to help manipulate a subresource from its parent resource so
|
||||
# that it's possible to do so from a static context (i.e. without a
|
||||
# pre-existing collection of subresources on the parent).
|
||||
#
|
||||
# For examle, a transfer gains the static methods for reversals so that the
|
||||
# methods `.create_reversal`, `.retrieve_reversal`, `.update_reversal`,
|
||||
# etc. all become available.
|
||||
module NestedResource
|
||||
def nested_resource_class_methods(resource, path: nil, operations: nil)
|
||||
path ||= "#{resource}s"
|
||||
|
Loading…
x
Reference in New Issue
Block a user