stripe-openapi[bot] 04792b3ddf
Update generated code (#1274)
* Update generated code for v533

* Update generated code for v536

* Update generated code for v540

---------

Co-authored-by: Stripe OpenAPI <105521251+stripe-openapi[bot]@users.noreply.github.com>
2023-09-21 15:34:58 -07:00

39 lines
1.6 KiB
Ruby

# File generated from our OpenAPI spec
# frozen_string_literal: true
module Stripe
# This is an object representing a person associated with a Stripe account.
#
# A platform cannot access a Standard or Express account's persons after the account starts onboarding, such as after generating an account link for the account.
# See the [Standard onboarding](https://stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](https://stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.
#
# Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/handling-api-verification#person-information)
class Person < APIResource
extend Stripe::APIOperations::List
include Stripe::APIOperations::Save
OBJECT_NAME = "person"
def resource_url
if !respond_to?(:account) || account.nil?
raise NotImplementedError,
"Persons cannot be accessed without an account ID."
end
"#{Account.resource_url}/#{CGI.escape(account)}/persons/#{CGI.escape(id)}"
end
def self.retrieve(_id, _opts = {})
raise NotImplementedError,
"Persons cannot be retrieved without an account ID. Retrieve a " \
"person using `Account.retrieve_person('account_id', 'person_id')`"
end
def self.update(_id, _params = nil, _opts = nil)
raise NotImplementedError,
"Persons cannot be updated without an account ID. Update a " \
"person using `Account.update_person('account_id', 'person_id', " \
"update_params)`"
end
end
end