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 can only access a subset of data in a person for an account where [account.controller.requirement_collection](docs.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](docs.stripe.com/connect/standard-accounts) or [Express onboarding](docs.stripe.com/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](docs.stripe.com/connect/handling-api-verification#person-information).

Defined Under Namespace

Classes: AdditionalTosAcceptances, Address, AddressKana, AddressKanji, Dob, FutureRequirements, RegisteredAddress, Relationship, Requirements, SelfReportedIncome, SelfReportedMonthlyHousingPayment, UsCfpbData, 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

#==, #[], #[]=, #_get_inner_class_type, additive_object_param, additive_object_param?, #as_json, construct_from, #deleted?, #dirty!, #each, #eql?, field_encodings, #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.



429
430
431
# File 'lib/stripe/resources/person.rb', line 429

def 
  @account
end

#additional_tos_acceptancesObject (readonly)

Attribute for field additional_tos_acceptances



431
432
433
# File 'lib/stripe/resources/person.rb', line 431

def additional_tos_acceptances
  @additional_tos_acceptances
end

#addressObject (readonly)

Attribute for field address



433
434
435
# File 'lib/stripe/resources/person.rb', line 433

def address
  @address
end

#address_kanaObject (readonly)

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



435
436
437
# File 'lib/stripe/resources/person.rb', line 435

def address_kana
  @address_kana
end

#address_kanjiObject (readonly)

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



437
438
439
# File 'lib/stripe/resources/person.rb', line 437

def address_kanji
  @address_kanji
end

#createdObject (readonly)

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



439
440
441
# File 'lib/stripe/resources/person.rb', line 439

def created
  @created
end

#deletedObject (readonly)

Always true for a deleted object



441
442
443
# File 'lib/stripe/resources/person.rb', line 441

def deleted
  @deleted
end

#dobObject (readonly)

Attribute for field dob



443
444
445
# File 'lib/stripe/resources/person.rb', line 443

def dob
  @dob
end

#emailObject (readonly)

The person’s email address. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.



445
446
447
# File 'lib/stripe/resources/person.rb', line 445

def email
  @email
end

#first_nameObject (readonly)

The person’s first name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.



447
448
449
# File 'lib/stripe/resources/person.rb', line 447

def first_name
  @first_name
end

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



449
450
451
# File 'lib/stripe/resources/person.rb', line 449

def first_name_kana
  @first_name_kana
end

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



451
452
453
# File 'lib/stripe/resources/person.rb', line 451

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. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.



453
454
455
# File 'lib/stripe/resources/person.rb', line 453

def full_name_aliases
  @full_name_aliases
end

#future_requirementsObject (readonly)

Information about the [upcoming new requirements for this person](docs.stripe.com/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when.



455
456
457
# File 'lib/stripe/resources/person.rb', line 455

def future_requirements
  @future_requirements
end

#genderObject (readonly)

The person’s gender.



457
458
459
# File 'lib/stripe/resources/person.rb', line 457

def gender
  @gender
end

#idObject (readonly)

Unique identifier for the object.



459
460
461
# File 'lib/stripe/resources/person.rb', line 459

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



461
462
463
# File 'lib/stripe/resources/person.rb', line 461

def id_number_provided
  @id_number_provided
end

#id_number_secondary_providedObject (readonly)

Whether the person’s ‘id_number_secondary` was provided.



463
464
465
# File 'lib/stripe/resources/person.rb', line 463

def id_number_secondary_provided
  @id_number_secondary_provided
end

#last_nameObject (readonly)

The person’s last name. Also available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is ‘stripe`.



465
466
467
# File 'lib/stripe/resources/person.rb', line 465

def last_name
  @last_name
end

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



467
468
469
# File 'lib/stripe/resources/person.rb', line 467

def last_name_kana
  @last_name_kana
end

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



469
470
471
# File 'lib/stripe/resources/person.rb', line 469

def last_name_kanji
  @last_name_kanji
end

#maiden_nameObject (readonly)

The person’s maiden name.



471
472
473
# File 'lib/stripe/resources/person.rb', line 471

def maiden_name
  @maiden_name
end

#metadataObject (readonly)

Set of [key-value pairs](docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.



473
474
475
# File 'lib/stripe/resources/person.rb', line 473

def 
  @metadata
end

#nationalityObject (readonly)

The country where the person is a national.



475
476
477
# File 'lib/stripe/resources/person.rb', line 475

def nationality
  @nationality
end

#objectObject (readonly)

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



477
478
479
# File 'lib/stripe/resources/person.rb', line 477

def object
  @object
end

#phoneObject (readonly)

The person’s phone number.



479
480
481
# File 'lib/stripe/resources/person.rb', line 479

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.



481
482
483
# File 'lib/stripe/resources/person.rb', line 481

def political_exposure
  @political_exposure
end

#registered_addressObject (readonly)

Attribute for field registered_address



483
484
485
# File 'lib/stripe/resources/person.rb', line 483

def registered_address
  @registered_address
end

#relationshipObject (readonly)

Attribute for field relationship



485
486
487
# File 'lib/stripe/resources/person.rb', line 485

def relationship
  @relationship
end

#requirementsObject (readonly)

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



487
488
489
# File 'lib/stripe/resources/person.rb', line 487

def requirements
  @requirements
end

#self_reported_incomeObject (readonly)

Attribute for field self_reported_income



489
490
491
# File 'lib/stripe/resources/person.rb', line 489

def self_reported_income
  @self_reported_income
end

#self_reported_monthly_housing_paymentObject (readonly)

Attribute for field self_reported_monthly_housing_payment



491
492
493
# File 'lib/stripe/resources/person.rb', line 491

def self_reported_monthly_housing_payment
  @self_reported_monthly_housing_payment
end

#ssn_last_4_providedObject (readonly)

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



493
494
495
# File 'lib/stripe/resources/person.rb', line 493

def ssn_last_4_provided
  @ssn_last_4_provided
end

#us_cfpb_dataObject (readonly)

Demographic data related to the person.



495
496
497
# File 'lib/stripe/resources/person.rb', line 495

def us_cfpb_data
  @us_cfpb_data
end

#verificationObject (readonly)

Attribute for field verification



497
498
499
# File 'lib/stripe/resources/person.rb', line 497

def verification
  @verification
end

Class Method Details

.field_remappingsObject



538
539
540
# File 'lib/stripe/resources/person.rb', line 538

def self.field_remappings
  @field_remappings = {}
end

.inner_class_typesObject



520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
# File 'lib/stripe/resources/person.rb', line 520

def self.inner_class_types
  @inner_class_types = {
    additional_tos_acceptances: AdditionalTosAcceptances,
    address: Address,
    address_kana: AddressKana,
    address_kanji: AddressKanji,
    dob: Dob,
    future_requirements: FutureRequirements,
    registered_address: RegisteredAddress,
    relationship: Relationship,
    requirements: Requirements,
    self_reported_income: SelfReportedIncome,
    self_reported_monthly_housing_payment: SelfReportedMonthlyHousingPayment,
    us_cfpb_data: UsCfpbData,
    verification: Verification,
  }
end

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


507
508
509
510
511
# File 'lib/stripe/resources/person.rb', line 507

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)


513
514
515
516
517
518
# File 'lib/stripe/resources/person.rb', line 513

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



499
500
501
502
503
504
505
# File 'lib/stripe/resources/person.rb', line 499

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