Class: ThePlaidApi::WatchlistScreeningEntityReviewCreateResponse

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

Overview

A review submitted by a team member for an entity watchlist screening. A review can be either a comment on the current screening state, actions taken against hits attached to the watchlist screening, or both.

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:, confirmed_hits:, dismissed_hits:, comment:, audit_trail:, request_id:, additional_properties: nil) ⇒ WatchlistScreeningEntityReviewCreateResponse

Returns a new instance of WatchlistScreeningEntityReviewCreateResponse.



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

def initialize(id:, confirmed_hits:, dismissed_hits:, comment:,
               audit_trail:, request_id:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @id = id
  @confirmed_hits = confirmed_hits
  @dismissed_hits = dismissed_hits
  @comment = comment
  @audit_trail = audit_trail
  @request_id = request_id
  @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.



37
38
39
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 37

def audit_trail
  @audit_trail
end

#commentString

A comment submitted by a team member as part of reviewing a watchlist screening.

Returns:

  • (String)


32
33
34
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 32

def comment
  @comment
end

#confirmed_hitsArray[String]

Hits marked as a true positive after thorough manual review. These hits will never recur or be updated once dismissed. In most cases, confirmed hits indicate that the customer should be rejected.

Returns:

  • (Array[String])


22
23
24
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 22

def confirmed_hits
  @confirmed_hits
end

#dismissed_hitsArray[String]

Hits marked as a false positive after thorough manual review. These hits will never recur or be updated once dismissed.

Returns:

  • (Array[String])


27
28
29
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 27

def dismissed_hits
  @dismissed_hits
end

#idString

ID of the associated entity review.

Returns:

  • (String)


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

def id
  @id
end

#request_idString

A unique identifier for the request, which can be used for troubleshooting. This identifier, like all Plaid identifiers, is case sensitive.

Returns:

  • (String)


43
44
45
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 43

def request_id
  @request_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 84

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : nil
  confirmed_hits =
    hash.key?('confirmed_hits') ? hash['confirmed_hits'] : nil
  dismissed_hits =
    hash.key?('dismissed_hits') ? hash['dismissed_hits'] : nil
  comment = hash.key?('comment') ? hash['comment'] : nil
  audit_trail = WatchlistScreeningAuditTrail.from_hash(hash['audit_trail']) if
    hash['audit_trail']
  request_id = hash.key?('request_id') ? hash['request_id'] : 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.
  WatchlistScreeningEntityReviewCreateResponse.new(id: id,
                                                   confirmed_hits: confirmed_hits,
                                                   dismissed_hits: dismissed_hits,
                                                   comment: comment,
                                                   audit_trail: audit_trail,
                                                   request_id: request_id,
                                                   additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



46
47
48
49
50
51
52
53
54
55
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 46

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['confirmed_hits'] = 'confirmed_hits'
  @_hash['dismissed_hits'] = 'dismissed_hits'
  @_hash['comment'] = 'comment'
  @_hash['audit_trail'] = 'audit_trail'
  @_hash['request_id'] = 'request_id'
  @_hash
end

.nullablesObject

An array for nullable fields



63
64
65
66
67
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 63

def self.nullables
  %w[
    comment
  ]
end

.optionalsObject

An array for optional fields



58
59
60
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 58

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



124
125
126
127
128
129
130
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 124

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, confirmed_hits: #{@confirmed_hits.inspect},"\
  " dismissed_hits: #{@dismissed_hits.inspect}, comment: #{@comment.inspect}, audit_trail:"\
  " #{@audit_trail.inspect}, request_id: #{@request_id.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



116
117
118
119
120
121
# File 'lib/the_plaid_api/models/watchlist_screening_entity_review_create_response.rb', line 116

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id}, confirmed_hits: #{@confirmed_hits}, dismissed_hits:"\
  " #{@dismissed_hits}, comment: #{@comment}, audit_trail: #{@audit_trail}, request_id:"\
  " #{@request_id}, additional_properties: #{@additional_properties}>"
end