Class: ThePlaidApi::EntityWatchlistScreeningSearchTerms

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

Overview

Search terms associated with an entity used for searching against watchlists

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(entity_watchlist_program_id:, legal_name:, document_number:, email_address:, country:, phone_number:, url:, version:, additional_properties: nil) ⇒ EntityWatchlistScreeningSearchTerms

Returns a new instance of EntityWatchlistScreeningSearchTerms.



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

def initialize(entity_watchlist_program_id:, legal_name:, document_number:,
               email_address:, country:, phone_number:, url:, version:,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @entity_watchlist_program_id = entity_watchlist_program_id
  @legal_name = legal_name
  @document_number = document_number
  @email_address = email_address
  @country = country
  @phone_number = phone_number
  @url = url
  @version = version
  @additional_properties = additional_properties
end

Instance Attribute Details

#countryString

Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form.

Returns:

  • (String)


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

def country
  @country
end

#document_numberString

The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces.

Returns:

  • (String)


26
27
28
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 26

def document_number
  @document_number
end

#email_addressString

A valid email address. Must not have leading or trailing spaces and address must be RFC compliant. For more information, see [RFC 3696](datatracker.ietf.org/doc/html/rfc3696).

Returns:

  • (String)


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

def email_address
  @email_address
end

#entity_watchlist_program_idString

ID of the associated entity program.

Returns:

  • (String)


14
15
16
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 14

def entity_watchlist_program_id
  @entity_watchlist_program_id
end

The name of the organization being screened. Must have at least one alphabetical character, have a maximum length of 100 characters, and not include leading or trailing spaces.

Returns:

  • (String)


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

def legal_name
  @legal_name
end

#phone_numberString

A phone number in E.164 format.

Returns:

  • (String)


41
42
43
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 41

def phone_number
  @phone_number
end

#urlString

An ‘http’ or ‘https’ URL (must begin with either of those).

Returns:

  • (String)


45
46
47
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 45

def url
  @url
end

#versionInteger

The current version of the search terms. Starts at ‘1` and increments with each edit to `search_terms`.

Returns:

  • (Integer)


50
51
52
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 50

def version
  @version
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
129
130
131
132
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 100

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  entity_watchlist_program_id =
    hash.key?('entity_watchlist_program_id') ? hash['entity_watchlist_program_id'] : nil
  legal_name = hash.key?('legal_name') ? hash['legal_name'] : nil
  document_number =
    hash.key?('document_number') ? hash['document_number'] : nil
  email_address = hash.key?('email_address') ? hash['email_address'] : nil
  country = hash.key?('country') ? hash['country'] : nil
  phone_number = hash.key?('phone_number') ? hash['phone_number'] : nil
  url = hash.key?('url') ? hash['url'] : nil
  version = hash.key?('version') ? hash['version'] : 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.
  EntityWatchlistScreeningSearchTerms.new(entity_watchlist_program_id: entity_watchlist_program_id,
                                          legal_name: legal_name,
                                          document_number: document_number,
                                          email_address: email_address,
                                          country: country,
                                          phone_number: phone_number,
                                          url: url,
                                          version: version,
                                          additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



53
54
55
56
57
58
59
60
61
62
63
64
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 53

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['entity_watchlist_program_id'] = 'entity_watchlist_program_id'
  @_hash['legal_name'] = 'legal_name'
  @_hash['document_number'] = 'document_number'
  @_hash['email_address'] = 'email_address'
  @_hash['country'] = 'country'
  @_hash['phone_number'] = 'phone_number'
  @_hash['url'] = 'url'
  @_hash['version'] = 'version'
  @_hash
end

.nullablesObject

An array for nullable fields



72
73
74
75
76
77
78
79
80
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 72

def self.nullables
  %w[
    document_number
    email_address
    country
    phone_number
    url
  ]
end

.optionalsObject

An array for optional fields



67
68
69
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 67

def self.optionals
  []
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



144
145
146
147
148
149
150
151
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 144

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} entity_watchlist_program_id: #{@entity_watchlist_program_id.inspect},"\
  " legal_name: #{@legal_name.inspect}, document_number: #{@document_number.inspect},"\
  " email_address: #{@email_address.inspect}, country: #{@country.inspect}, phone_number:"\
  " #{@phone_number.inspect}, url: #{@url.inspect}, version: #{@version.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



135
136
137
138
139
140
141
# File 'lib/the_plaid_api/models/entity_watchlist_screening_search_terms.rb', line 135

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} entity_watchlist_program_id: #{@entity_watchlist_program_id}, legal_name:"\
  " #{@legal_name}, document_number: #{@document_number}, email_address: #{@email_address},"\
  " country: #{@country}, phone_number: #{@phone_number}, url: #{@url}, version: #{@version},"\
  " additional_properties: #{@additional_properties}>"
end