Class: ThePlaidApi::DocumentaryVerification
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::DocumentaryVerification
- Defined in:
- lib/the_plaid_api/models/documentary_verification.rb
Overview
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`.
Instance Attribute Summary collapse
-
#documents ⇒ Array[DocumentaryVerificationDocument]
An array of documents submitted to the ‘documentary_verification` step.
-
#status ⇒ String
The outcome status for the associated Identity Verification attempt’s ‘documentary_verification` step.
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(status:, documents:, additional_properties: nil) ⇒ DocumentaryVerification
constructor
A new instance of DocumentaryVerification.
-
#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(status:, documents:, additional_properties: nil) ⇒ DocumentaryVerification
Returns a new instance of DocumentaryVerification.
52 53 54 55 56 57 58 59 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 52 def initialize(status:, documents:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @documents = documents @additional_properties = additional_properties end |
Instance Attribute Details
#documents ⇒ Array[DocumentaryVerificationDocument]
An array of documents submitted to the ‘documentary_verification` step. Each entry represents one user submission, where each submission will contain both a front and back image, or just a front image, depending on the document type. Note: Plaid will automatically let a user submit a new set of document images up to three times if we detect that a previous attempt might have failed due to user error. For example, if the first set of document images are blurry or obscured by glare, the user will be asked to capture their documents again, resulting in at least two separate entries within `documents`. If the overall `documentary_verification` is `failed`, the user has exhausted their retry attempts.
32 33 34 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 32 def documents @documents end |
#status ⇒ String
The outcome status for the associated Identity Verification attempt’s ‘documentary_verification` step. This field will always have the same value as `steps.documentary_verification`.
18 19 20 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 18 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 62 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil # Parameter is an array, so we need to iterate through it documents = nil unless hash['documents'].nil? documents = [] hash['documents'].each do |structure| documents << (DocumentaryVerificationDocument.from_hash(structure) if structure) end end documents = nil unless hash.key?('documents') # 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. DocumentaryVerification.new(status: status, documents: documents, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['documents'] = 'documents' @_hash end |
.nullables ⇒ Object
An array for nullable fields
48 49 50 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 48 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
43 44 45 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 43 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, documents: #{@documents.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
92 93 94 95 96 |
# File 'lib/the_plaid_api/models/documentary_verification.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, documents: #{@documents}, additional_properties:"\ " #{@additional_properties}>" end |