Sha256: 9623413bfe2aa1e65299fbf85e5f462d8b5bb72e7022acb19c81c25c85289b06

Contents?: true

Size: 1.62 KB

Versions: 5

Compression:

Stored size: 1.62 KB

Contents

# 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 pre-filling and account onboarding steps.
  #
  # Related guide: [Handling identity verification with the API](https://stripe.com/docs/connect/identity-verification-api#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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
stripe-8.7.0.pre.beta.1 lib/stripe/resources/person.rb
stripe-8.6.0 lib/stripe/resources/person.rb
stripe-8.6.0.pre.beta.6 lib/stripe/resources/person.rb
stripe-8.6.0.pre.beta.5 lib/stripe/resources/person.rb
stripe-8.6.0.pre.beta.4 lib/stripe/resources/person.rb