Class: ThePlaidApi::WatchlistScreeningEntityUpdateResponse

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

Overview

The entity screening object allows you to represent an entity in your system, update its profile, and search for it on various watchlists. Note: Rejected entity screenings will not receive new hits, regardless of entity program configuration.

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:, search_terms:, assignee:, status:, client_user_id:, audit_trail:, request_id:, additional_properties: nil) ⇒ WatchlistScreeningEntityUpdateResponse

Returns a new instance of WatchlistScreeningEntityUpdateResponse.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 81

def initialize(id:, search_terms:, assignee:, status:, client_user_id:,
               audit_trail:, request_id:, additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @id = id
  @search_terms = search_terms
  @assignee = assignee
  @status = status
  @client_user_id = client_user_id
  @audit_trail = audit_trail
  @request_id = request_id
  @additional_properties = additional_properties
end

Instance Attribute Details

#assigneeString

ID of the associated user. To retrieve the email address or other details of the person corresponding to this id, use ‘/dashboard_user/get`.

Returns:

  • (String)


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

def assignee
  @assignee
end

#audit_trailWatchlistScreeningAuditTrail

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



47
48
49
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 47

def audit_trail
  @audit_trail
end

#client_user_idString

A unique ID that identifies the end user in your system. Either a ‘user_id` or the `client_user_id` must be provided. This ID can also be used to associate user-specific data from other Plaid products. Financial Account Matching requires this field and the `/link/token/create` `client_user_id` to be consistent. Personally identifiable information, such as an email address or phone number, should not be used in the `client_user_id`.

Returns:

  • (String)


42
43
44
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 42

def client_user_id
  @client_user_id
end

#idString

ID of the associated entity screening.

Returns:

  • (String)


17
18
19
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 17

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)


53
54
55
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 53

def request_id
  @request_id
end

#search_termsEntityWatchlistScreeningSearchTerms

Search terms associated with an entity used for searching against watchlists



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

def search_terms
  @search_terms
end

#statusWatchlistScreeningStatus

A status enum indicating whether a screening is still pending review, has been rejected, or has been cleared.



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

def status
  @status
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 97

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  id = hash.key?('id') ? hash['id'] : nil
  search_terms = EntityWatchlistScreeningSearchTerms.from_hash(hash['search_terms']) if
    hash['search_terms']
  assignee = hash.key?('assignee') ? hash['assignee'] : nil
  status = hash.key?('status') ? hash['status'] : nil
  client_user_id =
    hash.key?('client_user_id') ? hash['client_user_id'] : 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.
  WatchlistScreeningEntityUpdateResponse.new(id: id,
                                             search_terms: search_terms,
                                             assignee: assignee,
                                             status: status,
                                             client_user_id: client_user_id,
                                             audit_trail: audit_trail,
                                             request_id: request_id,
                                             additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



56
57
58
59
60
61
62
63
64
65
66
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 56

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['id'] = 'id'
  @_hash['search_terms'] = 'search_terms'
  @_hash['assignee'] = 'assignee'
  @_hash['status'] = 'status'
  @_hash['client_user_id'] = 'client_user_id'
  @_hash['audit_trail'] = 'audit_trail'
  @_hash['request_id'] = 'request_id'
  @_hash
end

.nullablesObject

An array for nullable fields



74
75
76
77
78
79
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 74

def self.nullables
  %w[
    assignee
    client_user_id
  ]
end

.optionalsObject

An array for optional fields



69
70
71
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 69

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



139
140
141
142
143
144
145
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 139

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} id: #{@id.inspect}, search_terms: #{@search_terms.inspect}, assignee:"\
  " #{@assignee.inspect}, status: #{@status.inspect}, client_user_id:"\
  " #{@client_user_id.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.



131
132
133
134
135
136
# File 'lib/the_plaid_api/models/watchlist_screening_entity_update_response.rb', line 131

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