Class: ThePlaidApi::WatchlistScreeningHit
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::WatchlistScreeningHit
- Defined in:
- lib/the_plaid_api/models/watchlist_screening_hit.rb
Overview
Data from a government watchlist or PEP list that has been attached to the screening.
Instance Attribute Summary collapse
-
#analysis ⇒ ScreeningHitAnalysis
Analysis information describing why a screening hit matched the provided user information.
-
#data ⇒ ScreeningHitData
Information associated with the watchlist hit.
-
#first_active ⇒ DateTime
An ISO8601 formatted timestamp.
-
#historical_since ⇒ DateTime
An ISO8601 formatted timestamp.
-
#id ⇒ String
ID of the associated screening hit.
-
#inactive_since ⇒ DateTime
An ISO8601 formatted timestamp.
-
#list_code ⇒ IndividualWatchlistCode
Shorthand identifier for a specific screening list for individuals.
-
#plaid_uid ⇒ String
A universal identifier for a watchlist individual that is stable across searches and updates.
-
#review_status ⇒ WatchlistScreeningHitStatus
The current state of review.
-
#source_uid ⇒ String
The identifier provided by the source sanction or watchlist.
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(id:, review_status:, first_active:, inactive_since:, historical_since:, list_code:, plaid_uid:, source_uid:, analysis: SKIP, data: SKIP, additional_properties: nil) ⇒ WatchlistScreeningHit
constructor
A new instance of WatchlistScreeningHit.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
- #to_custom_first_active ⇒ Object
- #to_custom_historical_since ⇒ Object
- #to_custom_inactive_since ⇒ 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(id:, review_status:, first_active:, inactive_since:, historical_since:, list_code:, plaid_uid:, source_uid:, analysis: SKIP, data: SKIP, additional_properties: nil) ⇒ WatchlistScreeningHit
Returns a new instance of WatchlistScreeningHit.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 121 def initialize(id:, review_status:, first_active:, inactive_since:, historical_since:, list_code:, plaid_uid:, source_uid:, analysis: SKIP, data: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @id = id @review_status = review_status @first_active = first_active @inactive_since = inactive_since @historical_since = historical_since @list_code = list_code @plaid_uid = plaid_uid @source_uid = source_uid @analysis = analysis unless analysis == SKIP @data = data unless data == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#analysis ⇒ ScreeningHitAnalysis
Analysis information describing why a screening hit matched the provided user information
82 83 84 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 82 def analysis @analysis end |
#data ⇒ ScreeningHitData
Information associated with the watchlist hit
86 87 88 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 86 def data @data end |
#first_active ⇒ DateTime
An ISO8601 formatted timestamp.
30 31 32 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 30 def first_active @first_active end |
#historical_since ⇒ DateTime
An ISO8601 formatted timestamp.
38 39 40 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 38 def historical_since @historical_since end |
#id ⇒ String
ID of the associated screening hit.
16 17 18 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 16 def id @id end |
#inactive_since ⇒ DateTime
An ISO8601 formatted timestamp.
34 35 36 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 34 def inactive_since @inactive_since end |
#list_code ⇒ IndividualWatchlistCode
Shorthand identifier for a specific screening list for individuals.
`AU_CON`: Australia Department of Foreign Affairs and Trade Consolidated
List
`CA_CON`: Government of Canada Consolidated List of Sanctions
`EU_CON`: European External Action Service Consolidated List
`IZ_CIA`: CIA List of Chiefs of State and Cabinet Members
`IZ_IPL`: Interpol Red Notices for Wanted Persons List
`IZ_PEP`: Politically Exposed Persons List
`IZ_UNC`: United Nations Consolidated Sanctions
`IZ_WBK`: World Bank Listing of Ineligible Firms and Individuals
`UK_HMC`: UK HM Treasury Consolidated List
`US_DPL`: Bureau of Industry and Security Denied Persons List
`US_DTC`: US Department of State AECA Debarred
`US_FBI`: US Department of Justice FBI Wanted List
`US_FSE`: US OFAC Foreign Sanctions Evaders
`US_ISN`: US Department of State Nonproliferation Sanctions
`US_PLC`: US OFAC Palestinian Legislative Council
`US_SAM`: US System for Award Management Exclusion List
`US_SDN`: US OFAC Specially Designated Nationals List
`US_SSI`: US OFAC Sectoral Sanctions Identifications
`SG_SOF`: Government of Singapore Terrorists and Terrorist Entities
`TR_TWL`: Government of Turkey Terrorist Wanted List
`TR_DFD`: Government of Turkey Domestic Freezing Decisions
`TR_FOR`: Government of Turkey Foreign Freezing Requests
`TR_WMD`: Government of Turkey Weapons of Mass Destruction
`TR_CMB`: Government of Turkey Capital Markets Board
67 68 69 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 67 def list_code @list_code end |
#plaid_uid ⇒ String
A universal identifier for a watchlist individual that is stable across searches and updates.
72 73 74 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 72 def plaid_uid @plaid_uid end |
#review_status ⇒ WatchlistScreeningHitStatus
The current state of review. All watchlist screening hits begin in a ‘pending_review` state but can be changed by creating a review. When a hit is in the `pending_review` state, it will always show the latest version of the watchlist data Plaid has available and be compared against the latest customer information saved in the watchlist screening. Once a hit has been marked as `confirmed` or `dismissed` it will no longer be updated so that the state is as it was when the review was first conducted.
26 27 28 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 26 def review_status @review_status end |
#source_uid ⇒ String
The identifier provided by the source sanction or watchlist. When one is not provided by the source, this is ‘null`.
77 78 79 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 77 def source_uid @source_uid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 141 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. id = hash.key?('id') ? hash['id'] : nil review_status = hash.key?('review_status') ? hash['review_status'] : nil first_active = if hash.key?('first_active') (DateTimeHelper.from_rfc3339(hash['first_active']) if hash['first_active']) end inactive_since = if hash.key?('inactive_since') (DateTimeHelper.from_rfc3339(hash['inactive_since']) if hash['inactive_since']) end historical_since = if hash.key?('historical_since') (DateTimeHelper.from_rfc3339(hash['historical_since']) if hash['historical_since']) end list_code = hash.key?('list_code') ? hash['list_code'] : nil plaid_uid = hash.key?('plaid_uid') ? hash['plaid_uid'] : nil source_uid = hash.key?('source_uid') ? hash['source_uid'] : nil analysis = ScreeningHitAnalysis.from_hash(hash['analysis']) if hash['analysis'] data = ScreeningHitData.from_hash(hash['data']) if hash['data'] # 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. WatchlistScreeningHit.new(id: id, review_status: review_status, first_active: first_active, inactive_since: inactive_since, historical_since: historical_since, list_code: list_code, plaid_uid: plaid_uid, source_uid: source_uid, analysis: analysis, data: data, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 89 def self.names @_hash = {} if @_hash.nil? @_hash['id'] = 'id' @_hash['review_status'] = 'review_status' @_hash['first_active'] = 'first_active' @_hash['inactive_since'] = 'inactive_since' @_hash['historical_since'] = 'historical_since' @_hash['list_code'] = 'list_code' @_hash['plaid_uid'] = 'plaid_uid' @_hash['source_uid'] = 'source_uid' @_hash['analysis'] = 'analysis' @_hash['data'] = 'data' @_hash end |
.nullables ⇒ Object
An array for nullable fields
113 114 115 116 117 118 119 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 113 def self.nullables %w[ inactive_since historical_since source_uid ] end |
.optionals ⇒ Object
An array for optional fields
105 106 107 108 109 110 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 105 def self.optionals %w[ analysis data ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
206 207 208 209 210 211 212 213 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 206 def inspect class_name = self.class.name.split('::').last "<#{class_name} id: #{@id.inspect}, review_status: #{@review_status.inspect}, first_active:"\ " #{@first_active.inspect}, inactive_since: #{@inactive_since.inspect}, historical_since:"\ " #{@historical_since.inspect}, list_code: #{@list_code.inspect}, plaid_uid:"\ " #{@plaid_uid.inspect}, source_uid: #{@source_uid.inspect}, analysis: #{@analysis.inspect},"\ " data: #{@data.inspect}, additional_properties: #{@additional_properties}>" end |
#to_custom_first_active ⇒ Object
183 184 185 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 183 def to_custom_first_active DateTimeHelper.to_rfc3339(first_active) end |
#to_custom_historical_since ⇒ Object
191 192 193 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 191 def to_custom_historical_since DateTimeHelper.to_rfc3339(historical_since) end |
#to_custom_inactive_since ⇒ Object
187 188 189 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 187 def to_custom_inactive_since DateTimeHelper.to_rfc3339(inactive_since) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
196 197 198 199 200 201 202 203 |
# File 'lib/the_plaid_api/models/watchlist_screening_hit.rb', line 196 def to_s class_name = self.class.name.split('::').last "<#{class_name} id: #{@id}, review_status: #{@review_status}, first_active:"\ " #{@first_active}, inactive_since: #{@inactive_since}, historical_since:"\ " #{@historical_since}, list_code: #{@list_code}, plaid_uid: #{@plaid_uid}, source_uid:"\ " #{@source_uid}, analysis: #{@analysis}, data: #{@data}, additional_properties:"\ " #{@additional_properties}>" end |