diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index 53e96d0df..f94af1545 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -12,6 +12,7 @@ class Account < APIResource OBJECT_NAME = "account" + custom_method :persons, http_verb: :get custom_method :reject, http_verb: :post nested_resource_class_methods :capability, @@ -20,6 +21,15 @@ class Account < APIResource nested_resource_class_methods :person, operations: %i[create retrieve update delete list] + def persons(params = {}, opts = {}) + request_stripe_object( + method: :get, + path: resource_url + "/persons", + params: params, + opts: opts + ) + end + def reject(params = {}, opts = {}) request_stripe_object( method: :post, @@ -60,11 +70,6 @@ def self.retrieve(id = nil, opts = {}) super(id, opts) end - def persons(params = {}, opts = {}) - resp, opts = execute_resource_request(:get, resource_url + "/persons", params, opts) - Util.convert_to_stripe_object(resp.data, opts) - end - # We are not adding a helper for capabilities here as the Account object # already has a capabilities property which is a hash and not the sub-list # of capabilities.