Class: Stripe::Person

Inherits:
APIResource show all
Extended by:
APIOperations::List
Includes:
APIOperations::Save
Defined in:
lib/stripe/resources/person.rb

Overview

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](stripe.com/docs/connect/standard-accounts) or [Express onboarding documentation](stripe.com/docs/connect/express-accounts) for information about platform prefilling and account onboarding steps.

Related guide: [Handling identity verification with the API](stripe.com/docs/connect/handling-api-verification#person-information)

Constant Summary collapse

OBJECT_NAME =
"person"

Constants inherited from StripeObject

StripeObject::RESERVED_FIELD_NAMES

Instance Attribute Summary

Attributes inherited from APIResource

#save_with_parent

Class Method Summary collapse

Instance Method Summary collapse

Methods included from APIOperations::List

list

Methods included from APIOperations::Save

included, #save

Methods inherited from APIResource

class_name, custom_method, #refresh, #request_stripe_object, resource_url, save_nested_resource

Methods included from APIOperations::Request

included

Methods inherited from StripeObject

#==, #[], #[]=, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, #hash, #initialize, #inspect, #keys, #marshal_dump, #marshal_load, protected_fields, #serialize_params, #to_hash, #to_json, #to_s, #update_attributes, #values

Constructor Details

This class inherits a constructor from Stripe::StripeObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Stripe::StripeObject

Class Method Details

.retrieve(_id, _opts = {}) ⇒ Object

Raises:

  • (NotImplementedError)


25
26
27
28
29
# File 'lib/stripe/resources/person.rb', line 25

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

.update(_id, _params = nil, _opts = nil) ⇒ Object

Raises:

  • (NotImplementedError)


31
32
33
34
35
36
# File 'lib/stripe/resources/person.rb', line 31

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

Instance Method Details

#resource_urlObject



17
18
19
20
21
22
23
# File 'lib/stripe/resources/person.rb', line 17

def resource_url
  if !respond_to?(:account) || .nil?
    raise NotImplementedError,
          "Persons cannot be accessed without an account ID."
  end
  "#{Account.resource_url}/#{CGI.escape()}/persons/#{CGI.escape(id)}"
end