Class: ThePlaidApi::ScreeningHitAnalysis

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

Overview

Analysis information describing why a screening hit matched the provided user information

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(search_terms_version:, dates_of_birth: SKIP, documents: SKIP, locations: SKIP, names: SKIP, additional_properties: nil) ⇒ ScreeningHitAnalysis

Returns a new instance of ScreeningHitAnalysis.



107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 107

def initialize(search_terms_version:, dates_of_birth: SKIP, documents: SKIP,
               locations: SKIP, names: SKIP, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @dates_of_birth = dates_of_birth unless dates_of_birth == SKIP
  @documents = documents unless documents == SKIP
  @locations = locations unless locations == SKIP
  @names = names unless names == SKIP
  @search_terms_version = search_terms_version
  @additional_properties = additional_properties
end

Instance Attribute Details

#dates_of_birthMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



26
27
28
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 26

def dates_of_birth
  @dates_of_birth
end

#documentsMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



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

def documents
  @documents
end

#locationsMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



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

def locations
  @locations
end

#namesMatchSummaryCode1

An enum indicating the match type between data provided by user and data checked against an external data source. ‘match` indicates that the provided input data was a strong match against external data. `partial_match` indicates the data approximately matched against external data. For example, “Knope” vs. “Knope-Wyatt” for last name. `no_match` indicates that Plaid was able to perform a check against an external data source and it did not match the provided input data. `no_data` indicates that Plaid was unable to find external data to compare against the provided input data. `no_input` indicates that Plaid was unable to perform a check because no information was provided for this field by the end user.

Returns:



71
72
73
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 71

def names
  @names
end

#search_terms_versionInteger

The version of the screening’s ‘search_terms` that were compared when the screening hit was added. screening hits are immutable once they have been reviewed. If changes are detected due to updates to the screening’s ‘search_terms`, the associated program, or the list’s source data prior to review, the screening hit will be updated to reflect those changes.

Returns:

  • (Integer)


79
80
81
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 79

def search_terms_version
  @search_terms_version
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 121

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  search_terms_version =
    hash.key?('search_terms_version') ? hash['search_terms_version'] : nil
  dates_of_birth =
    hash.key?('dates_of_birth') ? hash['dates_of_birth'] : SKIP
  documents = hash.key?('documents') ? hash['documents'] : SKIP
  locations = hash.key?('locations') ? hash['locations'] : SKIP
  names = hash.key?('names') ? hash['names'] : 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.
  ScreeningHitAnalysis.new(search_terms_version: search_terms_version,
                           dates_of_birth: dates_of_birth,
                           documents: documents,
                           locations: locations,
                           names: names,
                           additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



82
83
84
85
86
87
88
89
90
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 82

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dates_of_birth'] = 'dates_of_birth'
  @_hash['documents'] = 'documents'
  @_hash['locations'] = 'locations'
  @_hash['names'] = 'names'
  @_hash['search_terms_version'] = 'search_terms_version'
  @_hash
end

.nullablesObject

An array for nullable fields



103
104
105
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 103

def self.nullables
  []
end

.optionalsObject

An array for optional fields



93
94
95
96
97
98
99
100
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 93

def self.optionals
  %w[
    dates_of_birth
    documents
    locations
    names
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



158
159
160
161
162
163
164
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 158

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} dates_of_birth: #{@dates_of_birth.inspect}, documents:"\
  " #{@documents.inspect}, locations: #{@locations.inspect}, names: #{@names.inspect},"\
  " search_terms_version: #{@search_terms_version.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



150
151
152
153
154
155
# File 'lib/the_plaid_api/models/screening_hit_analysis.rb', line 150

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} dates_of_birth: #{@dates_of_birth}, documents: #{@documents}, locations:"\
  " #{@locations}, names: #{@names}, search_terms_version: #{@search_terms_version},"\
  " additional_properties: #{@additional_properties}>"
end