Class: Plaid::LinkTokenCreateRequestUser
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- Plaid::LinkTokenCreateRequestUser
- Defined in:
- lib/plaid/models/link_token_create_request_user.rb
Overview
An object specifying information about the end user who will be linking their account.
Instance Attribute Summary collapse
-
#client_user_id ⇒ String
A unique ID representing the end user.
-
#date_of_birth ⇒ Date
To be provided in the format “yyyy-mm-dd”.
-
#email_address ⇒ String
The user’s email address.
-
#email_address_verified_time ⇒ DateTime
The date and time the email address was verified in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDThh:mm:ssZ`).
-
#legal_name ⇒ String
The user’s full legal name.
-
#phone_number ⇒ String
The user’s phone number in [E.164](en.wikipedia.org/wiki/E.164) format.
-
#phone_number_verified_time ⇒ DateTime
The date and time the phone number was verified in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDThh:mm:ssZ`).
-
#ssn ⇒ String
To be provided in the format “ddd-dd-dddd”.
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(client_user_id:, legal_name: SKIP, phone_number: SKIP, phone_number_verified_time: SKIP, email_address: SKIP, email_address_verified_time: SKIP, ssn: SKIP, date_of_birth: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestUser
constructor
A new instance of LinkTokenCreateRequestUser.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_email_address_verified_time ⇒ Object
- #to_custom_phone_number_verified_time ⇒ Object
-
#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(client_user_id:, legal_name: SKIP, phone_number: SKIP, phone_number_verified_time: SKIP, email_address: SKIP, email_address_verified_time: SKIP, ssn: SKIP, date_of_birth: SKIP, additional_properties: nil) ⇒ LinkTokenCreateRequestUser
Returns a new instance of LinkTokenCreateRequestUser.
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 106 def initialize(client_user_id:, legal_name: SKIP, phone_number: SKIP, phone_number_verified_time: SKIP, email_address: SKIP, email_address_verified_time: SKIP, ssn: SKIP, date_of_birth: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @client_user_id = client_user_id @legal_name = legal_name unless legal_name == SKIP @phone_number = phone_number unless phone_number == SKIP unless phone_number_verified_time == SKIP @phone_number_verified_time = phone_number_verified_time end @email_address = email_address unless email_address == SKIP unless email_address_verified_time == SKIP @email_address_verified_time = email_address_verified_time end @ssn = ssn unless ssn == SKIP @date_of_birth = date_of_birth unless date_of_birth == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#client_user_id ⇒ String
A unique ID representing the end user. Typically this will be a user ID number from your application. Personally identifiable information, such as an email address or phone number, should not be used in the ‘client_user_id`. It is currently used as a means of searching logs for the given user in the Plaid Dashboard.
20 21 22 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 20 def client_user_id @client_user_id end |
#date_of_birth ⇒ Date
To be provided in the format “yyyy-mm-dd”. This field is optional and will support not-yet-implemented functionality for new products.
72 73 74 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 72 def date_of_birth @date_of_birth end |
#email_address ⇒ String
The user’s email address. This field is optional, but required to enable the [pre-authenticated returning user flow](plaid.com/docs/link/returning-user/#enabling-the-returning-u ser-experience).
51 52 53 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 51 def email_address @email_address end |
#email_address_verified_time ⇒ DateTime
The date and time the email address was verified in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDThh:mm:ssZ`). This is an optional field used in the [returning user experience](plaid.com/docs/link/returning-user).
Only pass a verification time for an email address that you have
verified. If you have performed verification but don’t have the time, you may supply a signal value of the start of the UNIX epoch.
Example: `2020-01-01T00:00:00Z`
62 63 64 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 62 def email_address_verified_time @email_address_verified_time end |
#legal_name ⇒ String
The user’s full legal name. This is an optional field used in the [returning user experience](plaid.com/docs/link/returning-user) to associate Items to the user.
26 27 28 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 26 def legal_name @legal_name end |
#phone_number ⇒ String
The user’s phone number in [E.164](en.wikipedia.org/wiki/E.164) format. This field is optional, but required to enable the [returning user experience](plaid.com/docs/link/returning-user).
32 33 34 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 32 def phone_number @phone_number end |
#phone_number_verified_time ⇒ DateTime
The date and time the phone number was verified in [ISO 8601](wikipedia.org/wiki/ISO_8601) format (‘YYYY-MM-DDThh:mm:ssZ`). This field is optional, but required to enable any [returning user experience](plaid.com/docs/link/returning-user).
Only pass a verification time for a phone number that you have verified.
If you have performed verification but don’t have the time, you may supply a signal value of the start of the UNIX epoch.
Example: `2020-01-01T00:00:00Z`
44 45 46 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 44 def phone_number_verified_time @phone_number_verified_time end |
#ssn ⇒ String
To be provided in the format “ddd-dd-dddd”. This field is optional and will support not-yet-implemented functionality for new products.
67 68 69 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 67 def ssn @ssn end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
131 132 133 134 135 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 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 131 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. client_user_id = hash.key?('client_user_id') ? hash['client_user_id'] : nil legal_name = hash.key?('legal_name') ? hash['legal_name'] : SKIP phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP phone_number_verified_time = if hash.key?('phone_number_verified_time') (DateTimeHelper.from_rfc3339(hash['phone_number_verified_time']) if hash['phone_number_verified_time']) else SKIP end email_address = hash.key?('email_address') ? hash['email_address'] : SKIP email_address_verified_time = if hash.key?('email_address_verified_time') (DateTimeHelper.from_rfc3339(hash['email_address_verified_time']) if hash['email_address_verified_time']) else SKIP end ssn = hash.key?('ssn') ? hash['ssn'] : SKIP date_of_birth = hash.key?('date_of_birth') ? hash['date_of_birth'] : 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. LinkTokenCreateRequestUser.new(client_user_id: client_user_id, legal_name: legal_name, phone_number: phone_number, phone_number_verified_time: phone_number_verified_time, email_address: email_address, email_address_verified_time: email_address_verified_time, ssn: ssn, date_of_birth: date_of_birth, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 75 def self.names @_hash = {} if @_hash.nil? @_hash['client_user_id'] = 'client_user_id' @_hash['legal_name'] = 'legal_name' @_hash['phone_number'] = 'phone_number' @_hash['phone_number_verified_time'] = 'phone_number_verified_time' @_hash['email_address'] = 'email_address' @_hash['email_address_verified_time'] = 'email_address_verified_time' @_hash['ssn'] = 'ssn' @_hash['date_of_birth'] = 'date_of_birth' @_hash end |
.nullables ⇒ Object
An array for nullable fields
102 103 104 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 102 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 89 def self.optionals %w[ legal_name phone_number phone_number_verified_time email_address email_address_verified_time ssn date_of_birth ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
191 192 193 194 195 196 197 198 199 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 191 def inspect class_name = self.class.name.split('::').last "<#{class_name} client_user_id: #{@client_user_id.inspect}, legal_name:"\ " #{@legal_name.inspect}, phone_number: #{@phone_number.inspect},"\ " phone_number_verified_time: #{@phone_number_verified_time.inspect}, email_address:"\ " #{@email_address.inspect}, email_address_verified_time:"\ " #{@email_address_verified_time.inspect}, ssn: #{@ssn.inspect}, date_of_birth:"\ " #{@date_of_birth.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_email_address_verified_time ⇒ Object
176 177 178 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 176 def to_custom_email_address_verified_time DateTimeHelper.to_rfc3339(email_address_verified_time) end |
#to_custom_phone_number_verified_time ⇒ Object
172 173 174 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 172 def to_custom_phone_number_verified_time DateTimeHelper.to_rfc3339(phone_number_verified_time) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
181 182 183 184 185 186 187 188 |
# File 'lib/plaid/models/link_token_create_request_user.rb', line 181 def to_s class_name = self.class.name.split('::').last "<#{class_name} client_user_id: #{@client_user_id}, legal_name: #{@legal_name},"\ " phone_number: #{@phone_number}, phone_number_verified_time:"\ " #{@phone_number_verified_time}, email_address: #{@email_address},"\ " email_address_verified_time: #{@email_address_verified_time}, ssn: #{@ssn}, date_of_birth:"\ " #{@date_of_birth}, additional_properties: #{@additional_properties}>" end |