Class: ThePlaidApi::IdentityVerificationCreateResponse

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/the_plaid_api/models/identity_verification_create_response.rb

Overview

A identity verification attempt represents a customer’s attempt to verify their identity, reflecting the required steps for completing the session, the results for each step, and information collected in the process.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(id:, client_user_id:, created_at:, completed_at:, previous_attempt_id:, shareable_url:, template:, user:, status:, steps:, documentary_verification:, selfie_check:, kyc_check:, risk_check:, verify_sms:, watchlist_screening_id:, beacon_user_id:, user_id:, redacted_at:, request_id:, latest_scored_protect_event: SKIP, additional_properties: nil) ⇒ IdentityVerificationCreateResponse

Returns a new instance of IdentityVerificationCreateResponse.



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 221

def initialize(id:, client_user_id:, created_at:, completed_at:,
               previous_attempt_id:, shareable_url:, template:, user:,
               status:, steps:, documentary_verification:, selfie_check:,
               kyc_check:, risk_check:, verify_sms:,
               watchlist_screening_id:, beacon_user_id:, user_id:,
               redacted_at:, request_id:, latest_scored_protect_event: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @id = id
  @client_user_id = client_user_id
  @created_at = created_at
  @completed_at = completed_at
  @previous_attempt_id = previous_attempt_id
  @shareable_url = shareable_url
  @template = template
  @user = user
  @status = status
  @steps = steps
  @documentary_verification = documentary_verification
  @selfie_check = selfie_check
  @kyc_check = kyc_check
  @risk_check = risk_check
  @verify_sms = verify_sms
  @watchlist_screening_id = watchlist_screening_id
  @beacon_user_id = beacon_user_id
  @user_id = user_id
  @redacted_at = redacted_at
  unless latest_scored_protect_event == SKIP
    @latest_scored_protect_event =
      latest_scored_protect_event
  end
  @request_id = request_id
  @additional_properties = additional_properties
end

Instance Attribute Details

#beacon_user_idString

ID of the associated Beacon User.

Returns:

  • (String)


141
142
143
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 141

def beacon_user_id
  @beacon_user_id
end

#client_user_idString

A unique ID that identifies the end user in your system. Either a ‘user_id` or the `client_user_id` must be provided. This ID can also be used to associate user-specific data from other Plaid products. Financial Account Matching requires this field and the `/link/token/create` `client_user_id` to be consistent. Personally identifiable information, such as an email address or phone number, should not be used in the `client_user_id`.

Returns:

  • (String)


27
28
29
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 27

def client_user_id
  @client_user_id
end

#completed_atDateTime

An ISO8601 formatted timestamp.

Returns:

  • (DateTime)


35
36
37
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 35

def completed_at
  @completed_at
end

#created_atDateTime

An ISO8601 formatted timestamp.

Returns:

  • (DateTime)


31
32
33
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 31

def created_at
  @created_at
end

#documentary_verificationDocumentaryVerification

Data, images, analysis, and results from the ‘documentary_verification` step. This field will be `null` unless `steps.documentary_verification` has reached a terminal state of either `success` or `failed`.



113
114
115
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 113

def documentary_verification
  @documentary_verification
end

#idString

ID of the associated Identity Verification attempt.

Returns:

  • (String)


17
18
19
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 17

def id
  @id
end

#kyc_checkKycCheckDetails

Additional information for the ‘kyc_check` (Data Source Verification) step. This field will be `null` unless `steps.kyc_check` has reached a terminal state of either `success` or `failed`.

Returns:



125
126
127
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 125

def kyc_check
  @kyc_check
end

#latest_scored_protect_eventIdvProtectEvent

Information about a Protect event including Trust Index score and fraud attributes.

Returns:



160
161
162
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 160

def latest_scored_protect_event
  @latest_scored_protect_event
end

#previous_attempt_idString

The ID for the Identity Verification preceding this session. This field will only be filled if the current Identity Verification is a retry of a previous attempt.

Returns:

  • (String)


41
42
43
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 41

def previous_attempt_id
  @previous_attempt_id
end

#redacted_atDateTime

An ISO8601 formatted timestamp.

Returns:

  • (DateTime)


155
156
157
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 155

def redacted_at
  @redacted_at
end

#request_idString

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Returns:

  • (String)


166
167
168
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 166

def request_id
  @request_id
end

#risk_checkRiskCheckDetails

Additional information for the ‘risk_check` step.

Returns:



129
130
131
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 129

def risk_check
  @risk_check
end

#selfie_checkSelfieCheck

Additional information for the ‘selfie_check` step. This field will be `null` unless `steps.selfie_check` has reached a terminal state of either `success` or `failed`.

Returns:



119
120
121
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 119

def selfie_check
  @selfie_check
end

#shareable_urlString

A shareable URL that can be sent directly to the user to complete verification

Returns:

  • (String)


46
47
48
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 46

def shareable_url
  @shareable_url
end

#statusIdentityVerificationStatus

The status of this Identity Verification attempt. ‘active` - The Identity Verification attempt is incomplete. The user may have completed part of the session, but has neither failed or passed. `success` - The Identity Verification attempt has completed, passing all steps defined to the associated Identity Verification template `failed` - The user failed one or more steps in the session and was told to contact support. `expired` - The Identity Verification attempt was active for a long period of time without being completed and was automatically marked as expired. Note that sessions currently do not expire. Automatic expiration is expected to be enabled in the future. `canceled` - The Identity Verification attempt was canceled, either via the dashboard by a user, or via API. The user may have completed part of the session, but has neither failed or passed. `pending_review` - The Identity Verification attempt template was configured to perform a screening that had one or more hits needing review.



76
77
78
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 76

def status
  @status
end

#stepsIdentityVerificationStepSummary

Each step will be one of the following values: ‘active` - This step is the user’s current step. They are either in the process of completing this step, or they recently closed their Identity Verification attempt while in the middle of this step. Only one step will be marked as ‘active` at any given point. `success` - The Identity Verification attempt has completed this step. `failed` - The user failed this step. This can either call the user to fail the session as a whole, or cause them to fallback to another step depending on how the Identity Verification template is configured. A failed step does not imply a failed session. `waiting_for_prerequisite` - The user needs to complete another step first, before they progress to this step. This step may never run, depending on if the user fails an earlier step or if the step is only run as a fallback. `not_applicable` - This step will not be run for this session. `skipped` - The retry instructions that created this Identity Verification attempt specified that this step should be skipped. `expired` - This step had not yet been completed when the Identity Verification attempt as a whole expired. `canceled` - The Identity Verification attempt was canceled before the user completed this step. `pending_review` - The Identity Verification attempt template was configured to perform a screening that had one or more hits needing review. `manually_approved` - The step was manually overridden to pass by a team member in the dashboard. `manually_rejected` - The step was manually overridden to fail by a team member in the dashboard.



107
108
109
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 107

def steps
  @steps
end

#templateIdentityVerificationTemplateReference

The resource ID and version number of the template configuring the behavior of a given Identity Verification.



51
52
53
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 51

def template
  @template
end

#userIdentityVerificationUserData

The identity data that was either collected from the user or provided via API in order to perform an Identity Verification.



56
57
58
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 56

def user
  @user
end

#user_idString

Unique user identifier, created by calling ‘/user/create`. Either a `user_id` or the `client_user_id` must be provided. The `user_id` may only be used instead of the `client_user_id` if you were not a pre-existing user of `/user/create` as of December 10, 2025; for more details, see [New User APIs](plaid.com/docs/api/users/user-apis). If both this field and a `client_user_id` are present in a request, the `user_id` must have been created from the provided `client_user_id`.

Returns:

  • (String)


151
152
153
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 151

def user_id
  @user_id
end

#verify_smsVerifySmsDetails

Additional information for the ‘verify_sms` step.

Returns:



133
134
135
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 133

def verify_sms
  @verify_sms
end

#watchlist_screening_idString

ID of the associated screening.

Returns:

  • (String)


137
138
139
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 137

def watchlist_screening_id
  @watchlist_screening_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 259

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : nil
  client_user_id =
    hash.key?('client_user_id') ? hash['client_user_id'] : nil
  created_at = if hash.key?('created_at')
                 (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
               end
  completed_at = if hash.key?('completed_at')
                   (DateTimeHelper.from_rfc3339(hash['completed_at']) if hash['completed_at'])
                 end
  previous_attempt_id =
    hash.key?('previous_attempt_id') ? hash['previous_attempt_id'] : nil
  shareable_url = hash.key?('shareable_url') ? hash['shareable_url'] : nil
  template = IdentityVerificationTemplateReference.from_hash(hash['template']) if
    hash['template']
  user = IdentityVerificationUserData.from_hash(hash['user']) if hash['user']
  status = hash.key?('status') ? hash['status'] : nil
  steps = IdentityVerificationStepSummary.from_hash(hash['steps']) if hash['steps']
  if hash['documentary_verification']
    documentary_verification = DocumentaryVerification.from_hash(hash['documentary_verification'])
  end
  selfie_check = SelfieCheck.from_hash(hash['selfie_check']) if hash['selfie_check']
  kyc_check = KycCheckDetails.from_hash(hash['kyc_check']) if hash['kyc_check']
  risk_check = RiskCheckDetails.from_hash(hash['risk_check']) if hash['risk_check']
  verify_sms = VerifySmsDetails.from_hash(hash['verify_sms']) if hash['verify_sms']
  watchlist_screening_id =
    hash.key?('watchlist_screening_id') ? hash['watchlist_screening_id'] : nil
  beacon_user_id =
    hash.key?('beacon_user_id') ? hash['beacon_user_id'] : nil
  user_id = hash.key?('user_id') ? hash['user_id'] : nil
  redacted_at = if hash.key?('redacted_at')
                  (DateTimeHelper.from_rfc3339(hash['redacted_at']) if hash['redacted_at'])
                end
  request_id = hash.key?('request_id') ? hash['request_id'] : nil
  if hash['latest_scored_protect_event']
    latest_scored_protect_event = IdvProtectEvent.from_hash(hash['latest_scored_protect_event'])
  end

  # 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.
  IdentityVerificationCreateResponse.new(id: id,
                                         client_user_id: client_user_id,
                                         created_at: created_at,
                                         completed_at: completed_at,
                                         previous_attempt_id: previous_attempt_id,
                                         shareable_url: shareable_url,
                                         template: template,
                                         user: user,
                                         status: status,
                                         steps: steps,
                                         documentary_verification: documentary_verification,
                                         selfie_check: selfie_check,
                                         kyc_check: kyc_check,
                                         risk_check: risk_check,
                                         verify_sms: verify_sms,
                                         watchlist_screening_id: watchlist_screening_id,
                                         beacon_user_id: beacon_user_id,
                                         user_id: user_id,
                                         redacted_at: redacted_at,
                                         request_id: request_id,
                                         latest_scored_protect_event: latest_scored_protect_event,
                                         additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 169

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['client_user_id'] = 'client_user_id'
  @_hash['created_at'] = 'created_at'
  @_hash['completed_at'] = 'completed_at'
  @_hash['previous_attempt_id'] = 'previous_attempt_id'
  @_hash['shareable_url'] = 'shareable_url'
  @_hash['template'] = 'template'
  @_hash['user'] = 'user'
  @_hash['status'] = 'status'
  @_hash['steps'] = 'steps'
  @_hash['documentary_verification'] = 'documentary_verification'
  @_hash['selfie_check'] = 'selfie_check'
  @_hash['kyc_check'] = 'kyc_check'
  @_hash['risk_check'] = 'risk_check'
  @_hash['verify_sms'] = 'verify_sms'
  @_hash['watchlist_screening_id'] = 'watchlist_screening_id'
  @_hash['beacon_user_id'] = 'beacon_user_id'
  @_hash['user_id'] = 'user_id'
  @_hash['redacted_at'] = 'redacted_at'
  @_hash['latest_scored_protect_event'] = 'latest_scored_protect_event'
  @_hash['request_id'] = 'request_id'
  @_hash
end

.nullablesObject

An array for nullable fields



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 203

def self.nullables
  %w[
    completed_at
    previous_attempt_id
    shareable_url
    documentary_verification
    selfie_check
    kyc_check
    risk_check
    verify_sms
    watchlist_screening_id
    beacon_user_id
    user_id
    redacted_at
    latest_scored_protect_event
  ]
end

.optionalsObject

An array for optional fields



196
197
198
199
200
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 196

def self.optionals
  %w[
    latest_scored_protect_event
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



359
360
361
362
363
364
365
366
367
368
369
370
371
372
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 359

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, client_user_id: #{@client_user_id.inspect}, created_at:"\
  " #{@created_at.inspect}, completed_at: #{@completed_at.inspect}, previous_attempt_id:"\
  " #{@previous_attempt_id.inspect}, shareable_url: #{@shareable_url.inspect}, template:"\
  " #{@template.inspect}, user: #{@user.inspect}, status: #{@status.inspect}, steps:"\
  " #{@steps.inspect}, documentary_verification: #{@documentary_verification.inspect},"\
  " selfie_check: #{@selfie_check.inspect}, kyc_check: #{@kyc_check.inspect}, risk_check:"\
  " #{@risk_check.inspect}, verify_sms: #{@verify_sms.inspect}, watchlist_screening_id:"\
  " #{@watchlist_screening_id.inspect}, beacon_user_id: #{@beacon_user_id.inspect}, user_id:"\
  " #{@user_id.inspect}, redacted_at: #{@redacted_at.inspect}, latest_scored_protect_event:"\
  " #{@latest_scored_protect_event.inspect}, request_id: #{@request_id.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_custom_completed_atObject



336
337
338
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 336

def to_custom_completed_at
  DateTimeHelper.to_rfc3339(completed_at)
end

#to_custom_created_atObject



332
333
334
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 332

def to_custom_created_at
  DateTimeHelper.to_rfc3339(created_at)
end

#to_custom_redacted_atObject



340
341
342
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 340

def to_custom_redacted_at
  DateTimeHelper.to_rfc3339(redacted_at)
end

#to_sObject

Provides a human-readable string representation of the object.



345
346
347
348
349
350
351
352
353
354
355
356
# File 'lib/the_plaid_api/models/identity_verification_create_response.rb', line 345

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id}, client_user_id: #{@client_user_id}, created_at: #{@created_at},"\
  " completed_at: #{@completed_at}, previous_attempt_id: #{@previous_attempt_id},"\
  " shareable_url: #{@shareable_url}, template: #{@template}, user: #{@user}, status:"\
  " #{@status}, steps: #{@steps}, documentary_verification: #{@documentary_verification},"\
  " selfie_check: #{@selfie_check}, kyc_check: #{@kyc_check}, risk_check: #{@risk_check},"\
  " verify_sms: #{@verify_sms}, watchlist_screening_id: #{@watchlist_screening_id},"\
  " beacon_user_id: #{@beacon_user_id}, user_id: #{@user_id}, redacted_at: #{@redacted_at},"\
  " latest_scored_protect_event: #{@latest_scored_protect_event}, request_id: #{@request_id},"\
  " additional_properties: #{@additional_properties}>"
end