Class: ThePlaidApi::SelfieCheckSelfie
- Defined in:
- lib/the_plaid_api/models/selfie_check_selfie.rb
Overview
Captures and analysis from a user’s selfie.
Instance Attribute Summary collapse
-
#analysis ⇒ SelfieAnalysis
High level descriptions of how the associated selfie was processed.
-
#attempt ⇒ Integer
The ‘attempt` field begins with 1 and increments with each subsequent selfie upload.
-
#capture ⇒ SelfieCapture
The image or video capture of a selfie.
-
#status ⇒ SelfieStatus
An outcome status for this specific selfie.
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:, attempt:, capture:, analysis:, additional_properties: nil) ⇒ SelfieCheckSelfie
constructor
A new instance of SelfieCheckSelfie.
-
#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:, attempt:, capture:, analysis:, additional_properties: nil) ⇒ SelfieCheckSelfie
Returns a new instance of SelfieCheckSelfie.
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 54 def initialize(status:, attempt:, capture:, analysis:, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @status = status @attempt = attempt @capture = capture @analysis = analysis @additional_properties = additional_properties end |
Instance Attribute Details
#analysis ⇒ SelfieAnalysis
High level descriptions of how the associated selfie was processed. If a selfie fails verification, the details in the ‘analysis` object should help clarify why the selfie was rejected.
32 33 34 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 32 def analysis @analysis end |
#attempt ⇒ Integer
The ‘attempt` field begins with 1 and increments with each subsequent selfie upload.
21 22 23 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 21 def attempt @attempt end |
#capture ⇒ SelfieCapture
The image or video capture of a selfie. Only one of image or video URL will be populated per selfie.
26 27 28 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 26 def capture @capture end |
#status ⇒ SelfieStatus
An outcome status for this specific selfie. Distinct from the overall ‘selfie_check.status` that summarizes the verification outcome from one or more selfies.
16 17 18 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 16 def status @status end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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/selfie_check_selfie.rb', line 67 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. status = hash.key?('status') ? hash['status'] : nil attempt = hash.key?('attempt') ? hash['attempt'] : nil capture = SelfieCapture.from_hash(hash['capture']) if hash['capture'] analysis = SelfieAnalysis.from_hash(hash['analysis']) if hash['analysis'] # 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. SelfieCheckSelfie.new(status: status, attempt: attempt, capture: capture, analysis: analysis, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
35 36 37 38 39 40 41 42 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 35 def self.names @_hash = {} if @_hash.nil? @_hash['status'] = 'status' @_hash['attempt'] = 'attempt' @_hash['capture'] = 'capture' @_hash['analysis'] = 'analysis' @_hash end |
.nullables ⇒ Object
An array for nullable fields
50 51 52 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 50 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
45 46 47 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 45 def self.optionals [] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
99 100 101 102 103 104 |
# File 'lib/the_plaid_api/models/selfie_check_selfie.rb', line 99 def inspect class_name = self.class.name.split('::').last "<#{class_name} status: #{@status.inspect}, attempt: #{@attempt.inspect}, capture:"\ " #{@capture.inspect}, analysis: #{@analysis.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/selfie_check_selfie.rb', line 92 def to_s class_name = self.class.name.split('::').last "<#{class_name} status: #{@status}, attempt: #{@attempt}, capture: #{@capture}, analysis:"\ " #{@analysis}, additional_properties: #{@additional_properties}>" end |