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](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, BirthAddress, 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
-
#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).
-
#birth_address ⇒ Object
readonly
Attribute for field birth_address.
-
#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](docs.stripe.com/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](docs.stripe.com/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.
-
#self_reported_income ⇒ Object
readonly
Attribute for field self_reported_income.
-
#self_reported_monthly_housing_payment ⇒ Object
readonly
Attribute for field self_reported_monthly_housing_payment.
-
#ssn_last_4_provided ⇒ Object
readonly
Whether the last four digits of the person’s Social Security number have been provided (U.S. only).
-
#us_cfpb_data ⇒ Object
readonly
Demographic data related to the person.
-
#verification ⇒ Object
readonly
Attribute for field verification.
Attributes inherited from APIResource
Attributes inherited from StripeObject
Class Method Summary collapse
- .field_remappings ⇒ Object
- .inner_class_types ⇒ Object
- .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
#==, #[], #[]=, #_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
#account ⇒ Object (readonly)
The account the person is associated with.
452 453 454 |
# File 'lib/stripe/resources/person.rb', line 452 def account @account end |
#additional_tos_acceptances ⇒ Object (readonly)
Attribute for field additional_tos_acceptances
454 455 456 |
# File 'lib/stripe/resources/person.rb', line 454 def additional_tos_acceptances @additional_tos_acceptances end |
#address ⇒ Object (readonly)
Attribute for field address
456 457 458 |
# File 'lib/stripe/resources/person.rb', line 456 def address @address end |
#address_kana ⇒ Object (readonly)
The Kana variation of the person’s address (Japan only).
458 459 460 |
# File 'lib/stripe/resources/person.rb', line 458 def address_kana @address_kana end |
#address_kanji ⇒ Object (readonly)
The Kanji variation of the person’s address (Japan only).
460 461 462 |
# File 'lib/stripe/resources/person.rb', line 460 def address_kanji @address_kanji end |
#birth_address ⇒ Object (readonly)
Attribute for field birth_address
462 463 464 |
# File 'lib/stripe/resources/person.rb', line 462 def birth_address @birth_address end |
#created ⇒ Object (readonly)
Time at which the object was created. Measured in seconds since the Unix epoch.
464 465 466 |
# File 'lib/stripe/resources/person.rb', line 464 def created @created end |
#deleted ⇒ Object (readonly)
Always true for a deleted object
466 467 468 |
# File 'lib/stripe/resources/person.rb', line 466 def deleted @deleted end |
#dob ⇒ Object (readonly)
Attribute for field dob
468 469 470 |
# File 'lib/stripe/resources/person.rb', line 468 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`.
470 471 472 |
# File 'lib/stripe/resources/person.rb', line 470 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`.
472 473 474 |
# File 'lib/stripe/resources/person.rb', line 472 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`.
474 475 476 |
# File 'lib/stripe/resources/person.rb', line 474 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`.
476 477 478 |
# File 'lib/stripe/resources/person.rb', line 476 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`.
478 479 480 |
# File 'lib/stripe/resources/person.rb', line 478 def full_name_aliases @full_name_aliases end |
#future_requirements ⇒ Object (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.
480 481 482 |
# File 'lib/stripe/resources/person.rb', line 480 def future_requirements @future_requirements end |
#gender ⇒ Object (readonly)
The person’s gender.
482 483 484 |
# File 'lib/stripe/resources/person.rb', line 482 def gender @gender end |
#id ⇒ Object (readonly)
Unique identifier for the object.
484 485 486 |
# File 'lib/stripe/resources/person.rb', line 484 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`).
486 487 488 |
# File 'lib/stripe/resources/person.rb', line 486 def id_number_provided @id_number_provided end |
#id_number_secondary_provided ⇒ Object (readonly)
Whether the person’s ‘id_number_secondary` was provided.
488 489 490 |
# File 'lib/stripe/resources/person.rb', line 488 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`.
490 491 492 |
# File 'lib/stripe/resources/person.rb', line 490 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`.
492 493 494 |
# File 'lib/stripe/resources/person.rb', line 492 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`.
494 495 496 |
# File 'lib/stripe/resources/person.rb', line 494 def last_name_kanji @last_name_kanji end |
#maiden_name ⇒ Object (readonly)
The person’s maiden name.
496 497 498 |
# File 'lib/stripe/resources/person.rb', line 496 def maiden_name @maiden_name end |
#metadata ⇒ Object (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.
498 499 500 |
# File 'lib/stripe/resources/person.rb', line 498 def @metadata end |
#nationality ⇒ Object (readonly)
The country where the person is a national.
500 501 502 |
# File 'lib/stripe/resources/person.rb', line 500 def nationality @nationality end |
#object ⇒ Object (readonly)
String representing the object’s type. Objects of the same type share the same value.
502 503 504 |
# File 'lib/stripe/resources/person.rb', line 502 def object @object end |
#phone ⇒ Object (readonly)
The person’s phone number.
504 505 506 |
# File 'lib/stripe/resources/person.rb', line 504 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.
506 507 508 |
# File 'lib/stripe/resources/person.rb', line 506 def political_exposure @political_exposure end |
#registered_address ⇒ Object (readonly)
Attribute for field registered_address
508 509 510 |
# File 'lib/stripe/resources/person.rb', line 508 def registered_address @registered_address end |
#relationship ⇒ Object (readonly)
Attribute for field relationship
510 511 512 |
# File 'lib/stripe/resources/person.rb', line 510 def relationship @relationship end |
#requirements ⇒ Object (readonly)
Information about the requirements for this person, including what information needs to be collected, and by when.
512 513 514 |
# File 'lib/stripe/resources/person.rb', line 512 def requirements @requirements end |
#self_reported_income ⇒ Object (readonly)
Attribute for field self_reported_income
514 515 516 |
# File 'lib/stripe/resources/person.rb', line 514 def self_reported_income @self_reported_income end |
#self_reported_monthly_housing_payment ⇒ Object (readonly)
Attribute for field self_reported_monthly_housing_payment
516 517 518 |
# File 'lib/stripe/resources/person.rb', line 516 def self_reported_monthly_housing_payment @self_reported_monthly_housing_payment 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).
518 519 520 |
# File 'lib/stripe/resources/person.rb', line 518 def ssn_last_4_provided @ssn_last_4_provided end |
#us_cfpb_data ⇒ Object (readonly)
Demographic data related to the person.
520 521 522 |
# File 'lib/stripe/resources/person.rb', line 520 def us_cfpb_data @us_cfpb_data end |
#verification ⇒ Object (readonly)
Attribute for field verification
522 523 524 |
# File 'lib/stripe/resources/person.rb', line 522 def verification @verification end |
Class Method Details
.field_remappings ⇒ Object
564 565 566 |
# File 'lib/stripe/resources/person.rb', line 564 def self.field_remappings @field_remappings = {} end |
.inner_class_types ⇒ Object
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 |
# File 'lib/stripe/resources/person.rb', line 545 def self.inner_class_types @inner_class_types = { additional_tos_acceptances: AdditionalTosAcceptances, address: Address, address_kana: AddressKana, address_kanji: AddressKanji, birth_address: BirthAddress, 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_name ⇒ Object
14 15 16 |
# File 'lib/stripe/resources/person.rb', line 14 def self.object_name "person" end |
.retrieve(_id, _opts = {}) ⇒ Object
532 533 534 535 536 |
# File 'lib/stripe/resources/person.rb', line 532 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
538 539 540 541 542 543 |
# File 'lib/stripe/resources/person.rb', line 538 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
524 525 526 527 528 529 530 |
# File 'lib/stripe/resources/person.rb', line 524 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 |