Class: Stripe::Person
- Inherits:
-
APIResource
- Object
- StripeObject
- APIResource
- Stripe::Person
- 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 can only access a subset of data in 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).
Defined Under Namespace
Classes: AdditionalTosAcceptances, Address, AddressKana, AddressKanji, Dob, FutureRequirements, RegisteredAddress, Relationship, Requirements, Verification
Constant Summary collapse
- OBJECT_NAME =
"person"
Constants inherited from StripeObject
StripeObject::RESERVED_FIELD_NAMES
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
The account the person is associated with.
-
#additional_tos_acceptances ⇒ Object
readonly
Attribute for field additional_tos_acceptances.
-
#address ⇒ Object
readonly
Attribute for field address.
-
#address_kana ⇒ Object
readonly
The Kana variation of the person’s address (Japan only).
-
#address_kanji ⇒ Object
readonly
The Kanji variation of the person’s address (Japan only).
-
#created ⇒ Object
readonly
Time at which the object was created.
-
#deleted ⇒ Object
readonly
Always true for a deleted object.
-
#dob ⇒ Object
readonly
Attribute for field dob.
-
#email ⇒ Object
readonly
The person’s email address.
-
#first_name ⇒ Object
readonly
The person’s first name.
-
#first_name_kana ⇒ Object
readonly
The Kana variation of the person’s first name (Japan only).
-
#first_name_kanji ⇒ Object
readonly
The Kanji variation of the person’s first name (Japan only).
-
#full_name_aliases ⇒ Object
readonly
A list of alternate names or aliases that the person is known by.
-
#future_requirements ⇒ Object
readonly
Information about the [upcoming new requirements for this person](stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
-
#gender ⇒ Object
readonly
The person’s gender.
-
#id ⇒ Object
readonly
Unique identifier for the object.
-
#id_number_provided ⇒ Object
readonly
Whether the person’s ‘id_number` was provided.
-
#id_number_secondary_provided ⇒ Object
readonly
Whether the person’s ‘id_number_secondary` was provided.
-
#last_name ⇒ Object
readonly
The person’s last name.
-
#last_name_kana ⇒ Object
readonly
The Kana variation of the person’s last name (Japan only).
-
#last_name_kanji ⇒ Object
readonly
The Kanji variation of the person’s last name (Japan only).
-
#maiden_name ⇒ Object
readonly
The person’s maiden name.
-
#metadata ⇒ Object
readonly
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object.
-
#nationality ⇒ Object
readonly
The country where the person is a national.
-
#object ⇒ Object
readonly
String representing the object’s type.
-
#phone ⇒ Object
readonly
The person’s phone number.
-
#political_exposure ⇒ Object
readonly
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
-
#registered_address ⇒ Object
readonly
Attribute for field registered_address.
-
#relationship ⇒ Object
readonly
Attribute for field relationship.
-
#requirements ⇒ Object
readonly
Information about the requirements for this person, including what information needs to be collected, and by when.
-
#ssn_last_4_provided ⇒ Object
readonly
Whether the last four digits of the person’s Social Security number have been provided (U.S. only).
-
#verification ⇒ Object
readonly
Attribute for field verification.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .object_name ⇒ Object
- .retrieve(_id, _opts = {}) ⇒ Object
- .update(_id, _params = nil, _opts = nil) ⇒ Object
Instance Method Summary collapse
Methods included from APIOperations::Save
Methods inherited from APIResource
class_name, custom_method, #refresh, #request_stripe_object, resource_url, save_nested_resource
Methods included from APIOperations::Request
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
Instance Attribute Details
#account ⇒ Object (readonly)
The account the person is associated with.
217 218 219 |
# File 'lib/stripe/resources/person.rb', line 217 def account @account end |
#additional_tos_acceptances ⇒ Object (readonly)
Attribute for field additional_tos_acceptances
219 220 221 |
# File 'lib/stripe/resources/person.rb', line 219 def additional_tos_acceptances @additional_tos_acceptances end |
#address ⇒ Object (readonly)
Attribute for field address
221 222 223 |
# File 'lib/stripe/resources/person.rb', line 221 def address @address end |
#address_kana ⇒ Object (readonly)
The Kana variation of the person’s address (Japan only).
223 224 225 |
# File 'lib/stripe/resources/person.rb', line 223 def address_kana @address_kana end |
#address_kanji ⇒ Object (readonly)
The Kanji variation of the person’s address (Japan only).
225 226 227 |
# File 'lib/stripe/resources/person.rb', line 225 def address_kanji @address_kanji end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
227 228 229 |
# File 'lib/stripe/resources/person.rb', line 227 def created @created end |
#deleted ⇒ Object (readonly)
Always true for a deleted object
279 280 281 |
# File 'lib/stripe/resources/person.rb', line 279 def deleted @deleted end |
#dob ⇒ Object (readonly)
Attribute for field dob
229 230 231 |
# File 'lib/stripe/resources/person.rb', line 229 def dob @dob end |
#email ⇒ Object (readonly)
The person’s email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
231 232 233 |
# File 'lib/stripe/resources/person.rb', line 231 def email @email end |
#first_name ⇒ Object (readonly)
The person’s first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
233 234 235 |
# File 'lib/stripe/resources/person.rb', line 233 def first_name @first_name end |
#first_name_kana ⇒ Object (readonly)
The Kana variation of the person’s first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
235 236 237 |
# File 'lib/stripe/resources/person.rb', line 235 def first_name_kana @first_name_kana end |
#first_name_kanji ⇒ Object (readonly)
The Kanji variation of the person’s first name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
237 238 239 |
# File 'lib/stripe/resources/person.rb', line 237 def first_name_kanji @first_name_kanji end |
#full_name_aliases ⇒ Object (readonly)
A list of alternate names or aliases that the person is known by. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
239 240 241 |
# File 'lib/stripe/resources/person.rb', line 239 def full_name_aliases @full_name_aliases end |
#future_requirements ⇒ Object (readonly)
Information about the [upcoming new requirements for this person](stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.
241 242 243 |
# File 'lib/stripe/resources/person.rb', line 241 def future_requirements @future_requirements end |
#gender ⇒ Object (readonly)
The person’s gender.
243 244 245 |
# File 'lib/stripe/resources/person.rb', line 243 def gender @gender end |
#id ⇒ Object (readonly)
Unique identifier for the object.
245 246 247 |
# File 'lib/stripe/resources/person.rb', line 245 def id @id end |
#id_number_provided ⇒ Object (readonly)
Whether the person’s ‘id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual’s SSN for the US indicated by ‘ssn_last_4_provided`).
247 248 249 |
# File 'lib/stripe/resources/person.rb', line 247 def id_number_provided @id_number_provided end |
#id_number_secondary_provided ⇒ Object (readonly)
Whether the person’s ‘id_number_secondary` was provided.
249 250 251 |
# File 'lib/stripe/resources/person.rb', line 249 def id_number_secondary_provided @id_number_secondary_provided end |
#last_name ⇒ Object (readonly)
The person’s last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
251 252 253 |
# File 'lib/stripe/resources/person.rb', line 251 def last_name @last_name end |
#last_name_kana ⇒ Object (readonly)
The Kana variation of the person’s last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
253 254 255 |
# File 'lib/stripe/resources/person.rb', line 253 def last_name_kana @last_name_kana end |
#last_name_kanji ⇒ Object (readonly)
The Kanji variation of the person’s last name (Japan only). Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.
255 256 257 |
# File 'lib/stripe/resources/person.rb', line 255 def last_name_kanji @last_name_kanji end |
#maiden_name ⇒ Object (readonly)
The person’s maiden name.
257 258 259 |
# File 'lib/stripe/resources/person.rb', line 257 def maiden_name @maiden_name end |
#metadata ⇒ Object (readonly)
Set of [key-value pairs](stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
259 260 261 |
# File 'lib/stripe/resources/person.rb', line 259 def @metadata end |
#nationality ⇒ Object (readonly)
The country where the person is a national.
261 262 263 |
# File 'lib/stripe/resources/person.rb', line 261 def nationality @nationality end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
263 264 265 |
# File 'lib/stripe/resources/person.rb', line 263 def object @object end |
#phone ⇒ Object (readonly)
The person’s phone number.
265 266 267 |
# File 'lib/stripe/resources/person.rb', line 265 def phone @phone end |
#political_exposure ⇒ Object (readonly)
Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction.
267 268 269 |
# File 'lib/stripe/resources/person.rb', line 267 def political_exposure @political_exposure end |
#registered_address ⇒ Object (readonly)
Attribute for field registered_address
269 270 271 |
# File 'lib/stripe/resources/person.rb', line 269 def registered_address @registered_address end |
#relationship ⇒ Object (readonly)
Attribute for field relationship
271 272 273 |
# File 'lib/stripe/resources/person.rb', line 271 def relationship @relationship end |
#requirements ⇒ Object (readonly)
Information about the requirements for this person, including what information needs to be collected, and by when.
273 274 275 |
# File 'lib/stripe/resources/person.rb', line 273 def requirements @requirements end |
#ssn_last_4_provided ⇒ Object (readonly)
Whether the last four digits of the person’s Social Security number have been provided (U.S. only).
275 276 277 |
# File 'lib/stripe/resources/person.rb', line 275 def ssn_last_4_provided @ssn_last_4_provided end |
#verification ⇒ Object (readonly)
Attribute for field verification
277 278 279 |
# File 'lib/stripe/resources/person.rb', line 277 def verification @verification end |
Class Method Details
.object_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/person.rb', line 14 def self.object_name "person" end |
.retrieve(_id, _opts = {}) ⇒ Object
289 290 291 292 293 |
# File 'lib/stripe/resources/person.rb', line 289 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
295 296 297 298 299 300 |
# File 'lib/stripe/resources/person.rb', line 295 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_url ⇒ Object
281 282 283 284 285 286 287 |
# File 'lib/stripe/resources/person.rb', line 281 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 |