Class: ThePlaidApi::WatchlistScreeningHitStatus

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

Overview

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.

Constant Summary collapse

WATCHLIST_SCREENING_HIT_STATUS =
[
  # TODO: Write general description for CONFIRMED
  CONFIRMED = 'confirmed'.freeze,

  # TODO: Write general description for PENDING_REVIEW
  PENDING_REVIEW = 'pending_review'.freeze,

  # TODO: Write general description for DISMISSED
  DISMISSED = 'dismissed'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = CONFIRMED) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/the_plaid_api/models/watchlist_screening_hit_status.rb', line 32

def self.from_value(value, default_value = CONFIRMED)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'confirmed' then CONFIRMED
  when 'pending_review' then PENDING_REVIEW
  when 'dismissed' then DISMISSED
  else
    default_value
  end
end

.validate(value) ⇒ Object



26
27
28
29
30
# File 'lib/the_plaid_api/models/watchlist_screening_hit_status.rb', line 26

def self.validate(value)
  return false if value.nil?

  WATCHLIST_SCREENING_HIT_STATUS.include?(value)
end