Class: Stripe::Person

Inherits:
APIResource show all
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 person for an account where [account.controller.requirement_collection](stripe.com/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding.

See the [Standard onboarding](stripe.com/connect/standard-accounts) or [Express onboarding](stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](stripe.com/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

Attributes inherited from StripeObject

#last_response

Class Method Summary collapse

Instance Method Summary collapse

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

.object_nameObject



14
15
16
# File 'lib/stripe/resources/person.rb', line 14

def self.object_name
  "person"
end

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

Raises:

  • (NotImplementedError)


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

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)


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

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



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

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