Class: ThePlaidApi::EntityWatchlistScreeningHit
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::EntityWatchlistScreeningHit
- Defined in:
- lib/the_plaid_api/models/entity_watchlist_screening_hit.rb
Overview
Data from a government watchlist that has been attached to the screening.
Instance Attribute Summary collapse
-
#analysis ⇒ EntityScreeningHitAnalysis
Analysis information describing why a screening hit matched the provided entity information.
-
#data ⇒ EntityScreeningHitData
Information associated with the entity watchlist hit.
-
#first_active ⇒ DateTime
An ISO8601 formatted timestamp.
-
#historical_since ⇒ DateTime
An ISO8601 formatted timestamp.
-
#id ⇒ String
ID of the associated entity screening hit.
-
#inactive_since ⇒ DateTime
An ISO8601 formatted timestamp.
-
#list_code ⇒ EntityWatchlistCode
Shorthand identifier for a specific screening list for entities.
-
#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) ⇒ EntityWatchlistScreeningHit
constructor
A new instance of EntityWatchlistScreeningHit.
-
#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) ⇒ EntityWatchlistScreeningHit
Returns a new instance of EntityWatchlistScreeningHit.
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 113 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 ⇒ EntityScreeningHitAnalysis
Analysis information describing why a screening hit matched the provided entity information
74 75 76 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 74 def analysis @analysis end |
#data ⇒ EntityScreeningHitData
Information associated with the entity watchlist hit
78 79 80 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 78 def data @data end |
#first_active ⇒ DateTime
An ISO8601 formatted timestamp.
29 30 31 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 29 def first_active @first_active end |
#historical_since ⇒ DateTime
An ISO8601 formatted timestamp.
37 38 39 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 37 def historical_since @historical_since end |
#id ⇒ String
ID of the associated entity screening hit.
15 16 17 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 15 def id @id end |
#inactive_since ⇒ DateTime
An ISO8601 formatted timestamp.
33 34 35 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 33 def inactive_since @inactive_since end |
#list_code ⇒ EntityWatchlistCode
Shorthand identifier for a specific screening list for entities.
`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_SOE`: State Owned Enterprise List
`IZ_UNC`: United Nations Consolidated Sanctions
`IZ_WBK`: World Bank Listing of Ineligible Firms and Individuals
`US_CAP`: US OFAC Correspondent Account or Payable-Through Account
Sanctions
`US_FSE`: US OFAC Foreign Sanctions Evaders
`US_MBS`: US Non-SDN Menu-Based Sanctions
`US_SDN`: US Specially Designated Nationals List
`US_SSI`: US OFAC Sectoral Sanctions Identifications
`US_CMC`: US OFAC Non-SDN Chinese Military-Industrial Complex List
`US_UVL`: Bureau of Industry and Security Unverified List
`US_SAM`: US System for Award Management Exclusion List
`US_TEL`: US Terrorist Exclusion List
`UK_HMC`: UK HM Treasury Consolidated List
59 60 61 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 59 def list_code @list_code end |
#plaid_uid ⇒ String
A universal identifier for a watchlist individual that is stable across searches and updates.
64 65 66 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 64 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.
25 26 27 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 25 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`.
69 70 71 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 69 def source_uid @source_uid end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
133 134 135 136 137 138 139 140 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 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 133 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 = EntityScreeningHitAnalysis.from_hash(hash['analysis']) if hash['analysis'] data = EntityScreeningHitData.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. EntityWatchlistScreeningHit.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.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 81 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
105 106 107 108 109 110 111 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 105 def self.nullables %w[ inactive_since historical_since source_uid ] end |
.optionals ⇒ Object
An array for optional fields
97 98 99 100 101 102 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 97 def self.optionals %w[ analysis data ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
198 199 200 201 202 203 204 205 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 198 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
175 176 177 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 175 def to_custom_first_active DateTimeHelper.to_rfc3339(first_active) end |
#to_custom_historical_since ⇒ Object
183 184 185 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 183 def to_custom_historical_since DateTimeHelper.to_rfc3339(historical_since) end |
#to_custom_inactive_since ⇒ Object
179 180 181 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 179 def to_custom_inactive_since DateTimeHelper.to_rfc3339(inactive_since) end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
188 189 190 191 192 193 194 195 |
# File 'lib/the_plaid_api/models/entity_watchlist_screening_hit.rb', line 188 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 |