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).

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

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

Instance Attribute Details

#accountObject (readonly)

The account the person is associated with.



276
277
278
# File 'lib/stripe/resources/person.rb', line 276

def 
  @account
end

#additional_tos_acceptancesObject (readonly)

Attribute for field additional_tos_acceptances



279
280
281
# File 'lib/stripe/resources/person.rb', line 279

def additional_tos_acceptances
  @additional_tos_acceptances
end

#addressObject (readonly)

Attribute for field address



282
283
284
# File 'lib/stripe/resources/person.rb', line 282

def address
  @address
end

#address_kanaObject (readonly)

The Kana variation of the person’s address (Japan only).



285
286
287
# File 'lib/stripe/resources/person.rb', line 285

def address_kana
  @address_kana
end

#address_kanjiObject (readonly)

The Kanji variation of the person’s address (Japan only).



288
289
290
# File 'lib/stripe/resources/person.rb', line 288

def address_kanji
  @address_kanji
end

#createdObject (readonly)

Time at which the object was created. Measured in seconds since the Unix epoch.



291
292
293
# File 'lib/stripe/resources/person.rb', line 291

def created
  @created
end

#deletedObject (readonly)

Always true for a deleted object



369
370
371
# File 'lib/stripe/resources/person.rb', line 369

def deleted
  @deleted
end

#dobObject (readonly)

Attribute for field dob



294
295
296
# File 'lib/stripe/resources/person.rb', line 294

def dob
  @dob
end

#emailObject (readonly)

The person’s email address.



297
298
299
# File 'lib/stripe/resources/person.rb', line 297

def email
  @email
end

#first_nameObject (readonly)

The person’s first name.



300
301
302
# File 'lib/stripe/resources/person.rb', line 300

def first_name
  @first_name
end

#first_name_kanaObject (readonly)

The Kana variation of the person’s first name (Japan only).



303
304
305
# File 'lib/stripe/resources/person.rb', line 303

def first_name_kana
  @first_name_kana
end

#first_name_kanjiObject (readonly)

The Kanji variation of the person’s first name (Japan only).



306
307
308
# File 'lib/stripe/resources/person.rb', line 306

def first_name_kanji
  @first_name_kanji
end

#full_name_aliasesObject (readonly)

A list of alternate names or aliases that the person is known by.



309
310
311
# File 'lib/stripe/resources/person.rb', line 309

def full_name_aliases
  @full_name_aliases
end

#future_requirementsObject (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.



312
313
314
# File 'lib/stripe/resources/person.rb', line 312

def future_requirements
  @future_requirements
end

#genderObject (readonly)

The person’s gender.



315
316
317
# File 'lib/stripe/resources/person.rb', line 315

def gender
  @gender
end

#idObject (readonly)

Unique identifier for the object.



318
319
320
# File 'lib/stripe/resources/person.rb', line 318

def id
  @id
end

#id_number_providedObject (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`).



321
322
323
# File 'lib/stripe/resources/person.rb', line 321

def id_number_provided
  @id_number_provided
end

#id_number_secondary_providedObject (readonly)

Whether the person’s ‘id_number_secondary` was provided.



324
325
326
# File 'lib/stripe/resources/person.rb', line 324

def id_number_secondary_provided
  @id_number_secondary_provided
end

#last_nameObject (readonly)

The person’s last name.



327
328
329
# File 'lib/stripe/resources/person.rb', line 327

def last_name
  @last_name
end

#last_name_kanaObject (readonly)

The Kana variation of the person’s last name (Japan only).



330
331
332
# File 'lib/stripe/resources/person.rb', line 330

def last_name_kana
  @last_name_kana
end

#last_name_kanjiObject (readonly)

The Kanji variation of the person’s last name (Japan only).



333
334
335
# File 'lib/stripe/resources/person.rb', line 333

def last_name_kanji
  @last_name_kanji
end

#maiden_nameObject (readonly)

The person’s maiden name.



336
337
338
# File 'lib/stripe/resources/person.rb', line 336

def maiden_name
  @maiden_name
end

#metadataObject (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.



339
340
341
# File 'lib/stripe/resources/person.rb', line 339

def 
  @metadata
end

#nationalityObject (readonly)

The country where the person is a national.



342
343
344
# File 'lib/stripe/resources/person.rb', line 342

def nationality
  @nationality
end

#objectObject (readonly)

String representing the object’s type. Objects of the same type share the same value.



345
346
347
# File 'lib/stripe/resources/person.rb', line 345

def object
  @object
end

#phoneObject (readonly)

The person’s phone number.



348
349
350
# File 'lib/stripe/resources/person.rb', line 348

def phone
  @phone
end

#political_exposureObject (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.



351
352
353
# File 'lib/stripe/resources/person.rb', line 351

def political_exposure
  @political_exposure
end

#registered_addressObject (readonly)

Attribute for field registered_address



354
355
356
# File 'lib/stripe/resources/person.rb', line 354

def registered_address
  @registered_address
end

#relationshipObject (readonly)

Attribute for field relationship



357
358
359
# File 'lib/stripe/resources/person.rb', line 357

def relationship
  @relationship
end

#requirementsObject (readonly)

Information about the requirements for this person, including what information needs to be collected, and by when.



360
361
362
# File 'lib/stripe/resources/person.rb', line 360

def requirements
  @requirements
end

#ssn_last_4_providedObject (readonly)

Whether the last four digits of the person’s Social Security number have been provided (U.S. only).



363
364
365
# File 'lib/stripe/resources/person.rb', line 363

def ssn_last_4_provided
  @ssn_last_4_provided
end

#verificationObject (readonly)

Attribute for field verification



366
367
368
# File 'lib/stripe/resources/person.rb', line 366

def verification
  @verification
end

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)


379
380
381
382
383
# File 'lib/stripe/resources/person.rb', line 379

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)


385
386
387
388
389
390
# File 'lib/stripe/resources/person.rb', line 385

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



371
372
373
374
375
376
377
# File 'lib/stripe/resources/person.rb', line 371

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