Class: ThePlaidApi::TransferPlatformPersonCreateRequest
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::TransferPlatformPersonCreateRequest
- Defined in:
- lib/the_plaid_api/models/transfer_platform_person_create_request.rb
Overview
Defines the request schema for ‘/transfer/platform/person/create`
Instance Attribute Summary collapse
-
#address ⇒ TransferPlatformPersonAddress
Home address of a person.
-
#client_id ⇒ String
Your Plaid API ‘client_id`.
-
#date_of_birth ⇒ Date
The date of birth of the person.
-
#email_address ⇒ String
A valid email address.
-
#id_number ⇒ TransferPlatformPersonIdNumber
ID number of the person.
-
#name ⇒ TransferPlatformPersonName
The person’s legal name.
-
#originator_client_id ⇒ String
The client ID of the originator.
-
#ownership_percentage ⇒ Integer
The percentage of ownership this person has in the onboarding business.
-
#phone_number ⇒ String
A valid phone number in E.164 format.
-
#relationship_to_originator ⇒ String
The relationship between this person and the originator they are related to.
-
#secret ⇒ String
Your Plaid API ‘secret`.
-
#title ⇒ String
The title of the person at the business.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(originator_client_id:, client_id: SKIP, secret: SKIP, name: SKIP, email_address: SKIP, phone_number: SKIP, address: SKIP, id_number: SKIP, date_of_birth: SKIP, relationship_to_originator: SKIP, ownership_percentage: SKIP, title: SKIP, additional_properties: nil) ⇒ TransferPlatformPersonCreateRequest
constructor
A new instance of TransferPlatformPersonCreateRequest.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(originator_client_id:, client_id: SKIP, secret: SKIP, name: SKIP, email_address: SKIP, phone_number: SKIP, address: SKIP, id_number: SKIP, date_of_birth: SKIP, relationship_to_originator: SKIP, ownership_percentage: SKIP, title: SKIP, additional_properties: nil) ⇒ TransferPlatformPersonCreateRequest
Returns a new instance of TransferPlatformPersonCreateRequest.
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 109 def initialize(originator_client_id:, client_id: SKIP, secret: SKIP, name: SKIP, email_address: SKIP, phone_number: SKIP, address: SKIP, id_number: SKIP, date_of_birth: SKIP, relationship_to_originator: SKIP, ownership_percentage: SKIP, title: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_id = client_id unless client_id == SKIP @secret = secret unless secret == SKIP @originator_client_id = originator_client_id @name = name unless name == SKIP @email_address = email_address unless email_address == SKIP @phone_number = phone_number unless phone_number == SKIP @address = address unless address == SKIP @id_number = id_number unless id_number == SKIP @date_of_birth = date_of_birth unless date_of_birth == SKIP unless relationship_to_originator == SKIP @relationship_to_originator = relationship_to_originator end @ownership_percentage = ownership_percentage unless ownership_percentage == SKIP @title = title unless title == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#address ⇒ TransferPlatformPersonAddress
Home address of a person
44 45 46 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 44 def address @address end |
#client_id ⇒ String
Your Plaid API ‘client_id`. The `client_id` is required and may be provided either in the `PLAID-CLIENT-ID` header or as part of a request body.
16 17 18 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 16 def client_id @client_id end |
#date_of_birth ⇒ Date
The date of birth of the person. Formatted as YYYY-MM-DD.
52 53 54 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 52 def date_of_birth @date_of_birth end |
#email_address ⇒ String
A valid email address. Must not have leading or trailing spaces.
33 34 35 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 33 def email_address @email_address end |
#id_number ⇒ TransferPlatformPersonIdNumber
ID number of the person
48 49 50 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 48 def id_number @id_number end |
#name ⇒ TransferPlatformPersonName
The person’s legal name
29 30 31 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 29 def name @name end |
#originator_client_id ⇒ String
The client ID of the originator
25 26 27 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 25 def originator_client_id @originator_client_id end |
#ownership_percentage ⇒ Integer
The percentage of ownership this person has in the onboarding business. Only applicable to beneficial owners with 25% or more ownership.
62 63 64 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 62 def ownership_percentage @ownership_percentage end |
#phone_number ⇒ String
A valid phone number in E.164 format. Phone number input may be validated against valid number ranges; number strings that do not match a real-world phone numbering scheme may cause the request to fail, even in the Sandbox test environment.
40 41 42 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 40 def phone_number @phone_number end |
#relationship_to_originator ⇒ String
The relationship between this person and the originator they are related to.
57 58 59 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 57 def relationship_to_originator @relationship_to_originator end |
#secret ⇒ String
Your Plaid API ‘secret`. The `secret` is required and may be provided either in the `PLAID-SECRET` header or as part of a request body.
21 22 23 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 21 def secret @secret end |
#title ⇒ String
The title of the person at the business. Only applicable to control persons - for example, “CEO”, “President”, “Owner”, etc.
67 68 69 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 67 def title @title end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 136 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. originator_client_id = hash.key?('originator_client_id') ? hash['originator_client_id'] : nil client_id = hash.key?('client_id') ? hash['client_id'] : SKIP secret = hash.key?('secret') ? hash['secret'] : SKIP name = TransferPlatformPersonName.from_hash(hash['name']) if hash['name'] email_address = hash.key?('email_address') ? hash['email_address'] : SKIP phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP address = TransferPlatformPersonAddress.from_hash(hash['address']) if hash['address'] id_number = TransferPlatformPersonIdNumber.from_hash(hash['id_number']) if hash['id_number'] date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : SKIP relationship_to_originator = hash.key?('relationship_to_originator') ? hash['relationship_to_originator'] : SKIP ownership_percentage = hash.key?('ownership_percentage') ? hash['ownership_percentage'] : SKIP title = hash.key?('title') ? hash['title'] : SKIP # Create a new hash for additional properties, removing known properties. new_hash = hash.reject { |k, _| names.value?(k) } additional_properties = APIHelper.get_additional_properties( new_hash, proc { |value| value } ) # Create object from extracted values. TransferPlatformPersonCreateRequest.new(originator_client_id: originator_client_id, client_id: client_id, secret: secret, name: name, email_address: email_address, phone_number: phone_number, address: address, id_number: id_number, date_of_birth: date_of_birth, relationship_to_originator: relationship_to_originator, ownership_percentage: ownership_percentage, title: title, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 70 def self.names @_hash = {} if @_hash.nil? @_hash['client_id'] = 'client_id' @_hash['secret'] = 'secret' @_hash['originator_client_id'] = 'originator_client_id' @_hash['name'] = 'name' @_hash['email_address'] = 'email_address' @_hash['phone_number'] = 'phone_number' @_hash['address'] = 'address' @_hash['id_number'] = 'id_number' @_hash['date_of_birth'] = 'date_of_birth' @_hash['relationship_to_originator'] = 'relationship_to_originator' @_hash['ownership_percentage'] = 'ownership_percentage' @_hash['title'] = 'title' @_hash end |
.nullables ⇒ Object
An array for nullable fields
105 106 107 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 105 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 88 def self.optionals %w[ client_id secret name email_address phone_number address id_number date_of_birth relationship_to_originator ownership_percentage title ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 191 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id.inspect}, secret: #{@secret.inspect},"\ " originator_client_id: #{@originator_client_id.inspect}, name: #{@name.inspect},"\ " email_address: #{@email_address.inspect}, phone_number: #{@phone_number.inspect}, address:"\ " #{@address.inspect}, id_number: #{@id_number.inspect}, date_of_birth:"\ " #{@date_of_birth.inspect}, relationship_to_originator:"\ " #{@relationship_to_originator.inspect}, ownership_percentage:"\ " #{@ownership_percentage.inspect}, title: #{@title.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
180 181 182 183 184 185 186 187 188 |
# File 'lib/the_plaid_api/models/transfer_platform_person_create_request.rb', line 180 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_id: #{@client_id}, secret: #{@secret}, originator_client_id:"\ " #{@originator_client_id}, name: #{@name}, email_address: #{@email_address}, phone_number:"\ " #{@phone_number}, address: #{@address}, id_number: #{@id_number}, date_of_birth:"\ " #{@date_of_birth}, relationship_to_originator: #{@relationship_to_originator},"\ " ownership_percentage: #{@ownership_percentage}, title: #{@title}, additional_properties:"\ " #{@additional_properties}>" end |