Class: ThePlaidApi::IndividualWatchlistProgram

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

Overview

A program that configures the active lists, search parameters, and other behavior for initial and ongoing screening of individuals.

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(id:, created_at:, is_rescanning_enabled:, lists_enabled:, name:, name_sensitivity:, audit_trail:, is_archived:, additional_properties: nil) ⇒ IndividualWatchlistProgram

Returns a new instance of IndividualWatchlistProgram.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 91

def initialize(id:, created_at:, is_rescanning_enabled:, lists_enabled:,
               name:, name_sensitivity:, audit_trail:, is_archived:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @id = id
  @created_at = created_at
  @is_rescanning_enabled = is_rescanning_enabled
  @lists_enabled = lists_enabled
  @name = name
  @name_sensitivity = name_sensitivity
  @audit_trail = audit_trail
  @is_archived = is_archived
  @additional_properties = additional_properties
end

Instance Attribute Details

#audit_trailWatchlistScreeningAuditTrail

Information about the last change made to the parent object specifying what caused the change as well as when it occurred.



60
61
62
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 60

def audit_trail
  @audit_trail
end

#created_atDateTime

An ISO8601 formatted timestamp.

Returns:

  • (DateTime)


20
21
22
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 20

def created_at
  @created_at
end

#idString

ID of the associated program.

Returns:

  • (String)


16
17
18
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 16

def id
  @id
end

#is_archivedTrueClass | FalseClass

Archived programs are read-only and cannot screen new customers nor participate in ongoing monitoring.

Returns:

  • (TrueClass | FalseClass)


65
66
67
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 65

def is_archived
  @is_archived
end

#is_rescanning_enabledTrueClass | FalseClass

Indicator specifying whether the program is enabled and will perform daily rescans.

Returns:

  • (TrueClass | FalseClass)


25
26
27
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 25

def is_rescanning_enabled
  @is_rescanning_enabled
end

#lists_enabledArray[IndividualWatchlistCode]

Watchlists enabled for the associated program

Returns:



29
30
31
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 29

def lists_enabled
  @lists_enabled
end

#nameString

A name for the program to define its purpose. For example, “High Risk Individuals”, “US Cardholders”, or “Applicants”.

Returns:

  • (String)


34
35
36
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 34

def name
  @name
end

#name_sensitivityProgramNameSensitivity

The valid name matching sensitivity configurations for a screening program. Note that while certain matching techniques may be more prevalent on less strict settings, all matching algorithms are enabled for every sensitivity. ‘coarse` - See more potential matches. This sensitivity will see more broad phonetic matches across alphabets that make missing a potential hit very unlikely. This setting is noisier and will require more manual review. `balanced` - A good default for most companies. This sensitivity is balanced to show high quality hits with reduced noise. `strict` - Aggressive false positive reduction. This sensitivity will require names to be more similar than `coarse` and `balanced` settings, relying less on phonetics, while still accounting for character transpositions, missing tokens, and other common permutations. `exact` - Matches must be nearly exact. This sensitivity will only show hits with exact or nearly exact name matches with only basic correction such as extraneous symbols and capitalization. This setting is generally not recommended unless you have a very specific use case.



55
56
57
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 55

def name_sensitivity
  @name_sensitivity
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 109

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : nil
  created_at = if hash.key?('created_at')
                 (DateTimeHelper.from_rfc3339(hash['created_at']) if hash['created_at'])
               end
  is_rescanning_enabled =
    hash.key?('is_rescanning_enabled') ? hash['is_rescanning_enabled'] : nil
  lists_enabled = hash.key?('lists_enabled') ? hash['lists_enabled'] : nil
  name = hash.key?('name') ? hash['name'] : nil
  name_sensitivity =
    hash.key?('name_sensitivity') ? hash['name_sensitivity'] : nil
  audit_trail = WatchlistScreeningAuditTrail.from_hash(hash['audit_trail']) if
    hash['audit_trail']
  is_archived = hash.key?('is_archived') ? hash['is_archived'] : nil

  # 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.
  IndividualWatchlistProgram.new(id: id,
                                 created_at: created_at,
                                 is_rescanning_enabled: is_rescanning_enabled,
                                 lists_enabled: lists_enabled,
                                 name: name,
                                 name_sensitivity: name_sensitivity,
                                 audit_trail: audit_trail,
                                 is_archived: is_archived,
                                 additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



68
69
70
71
72
73
74
75
76
77
78
79
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 68

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['created_at'] = 'created_at'
  @_hash['is_rescanning_enabled'] = 'is_rescanning_enabled'
  @_hash['lists_enabled'] = 'lists_enabled'
  @_hash['name'] = 'name'
  @_hash['name_sensitivity'] = 'name_sensitivity'
  @_hash['audit_trail'] = 'audit_trail'
  @_hash['is_archived'] = 'is_archived'
  @_hash
end

.nullablesObject

An array for nullable fields



87
88
89
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 87

def self.nullables
  []
end

.optionalsObject

An array for optional fields



82
83
84
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 82

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



160
161
162
163
164
165
166
167
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 160

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, created_at: #{@created_at.inspect},"\
  " is_rescanning_enabled: #{@is_rescanning_enabled.inspect}, lists_enabled:"\
  " #{@lists_enabled.inspect}, name: #{@name.inspect}, name_sensitivity:"\
  " #{@name_sensitivity.inspect}, audit_trail: #{@audit_trail.inspect}, is_archived:"\
  " #{@is_archived.inspect}, additional_properties: #{@additional_properties}>"
end

#to_custom_created_atObject



146
147
148
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 146

def to_custom_created_at
  DateTimeHelper.to_rfc3339(created_at)
end

#to_sObject

Provides a human-readable string representation of the object.



151
152
153
154
155
156
157
# File 'lib/the_plaid_api/models/individual_watchlist_program.rb', line 151

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id}, created_at: #{@created_at}, is_rescanning_enabled:"\
  " #{@is_rescanning_enabled}, lists_enabled: #{@lists_enabled}, name: #{@name},"\
  " name_sensitivity: #{@name_sensitivity}, audit_trail: #{@audit_trail}, is_archived:"\
  " #{@is_archived}, additional_properties: #{@additional_properties}>"
end