Class: ThePlaidApi::EntityWatchlistSearchTerms
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- ThePlaidApi::EntityWatchlistSearchTerms
- Defined in:
- lib/the_plaid_api/models/entity_watchlist_search_terms.rb
Overview
Search inputs for creating an entity watchlist screening
Instance Attribute Summary collapse
-
#country ⇒ String
Valid, capitalized, two-letter ISO code representing the country of this object.
-
#document_number ⇒ String
The numeric or alphanumeric identifier associated with this document.
-
#email_address ⇒ String
A valid email address.
-
#entity_watchlist_program_id ⇒ String
ID of the associated entity program.
-
#legal_name ⇒ String
The name of the organization being screened.
-
#phone_number ⇒ String
A phone number in E.164 format.
-
#url ⇒ String
An ‘http’ or ‘https’ URL (must begin with either of those).
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(entity_watchlist_program_id:, legal_name:, document_number: SKIP, email_address: SKIP, country: SKIP, phone_number: SKIP, url: SKIP, additional_properties: nil) ⇒ EntityWatchlistSearchTerms
constructor
A new instance of EntityWatchlistSearchTerms.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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: SKIP, email_address: SKIP, country: SKIP, phone_number: SKIP, url: SKIP, additional_properties: nil) ⇒ EntityWatchlistSearchTerms
Returns a new instance of EntityWatchlistSearchTerms.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 82 def initialize(entity_watchlist_program_id:, legal_name:, document_number: SKIP, email_address: SKIP, country: SKIP, phone_number: SKIP, url: SKIP, 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 unless document_number == SKIP @email_address = email_address unless email_address == SKIP @country = country unless country == SKIP @phone_number = phone_number unless phone_number == SKIP @url = url unless url == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#country ⇒ String
Valid, capitalized, two-letter ISO code representing the country of this object. Must be in ISO 3166-1 alpha-2 form.
37 38 39 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 37 def country @country end |
#document_number ⇒ String
The numeric or alphanumeric identifier associated with this document. Must be between 4 and 32 characters long, and cannot have leading or trailing spaces.
26 27 28 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 26 def document_number @document_number end |
#email_address ⇒ String
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).
32 33 34 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 32 def email_address @email_address end |
#entity_watchlist_program_id ⇒ String
ID of the associated entity program.
14 15 16 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 14 def entity_watchlist_program_id @entity_watchlist_program_id end |
#legal_name ⇒ String
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.
20 21 22 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 20 def legal_name @legal_name end |
#phone_number ⇒ String
A phone number in E.164 format.
41 42 43 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 41 def phone_number @phone_number end |
#url ⇒ String
An ‘http’ or ‘https’ URL (must begin with either of those).
45 46 47 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 45 def url @url end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 129 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 99 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'] : SKIP email_address = hash.key?('email_address') ? hash['email_address'] : SKIP country = hash.key?('country') ? hash['country'] : SKIP phone_number = hash.key?('phone_number') ? hash['phone_number'] : SKIP url = hash.key?('url') ? hash['url'] : SKIP # 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. EntityWatchlistSearchTerms.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, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 48 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 end |
.nullables ⇒ Object
An array for nullable fields
72 73 74 75 76 77 78 79 80 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 72 def self.nullables %w[ document_number email_address country phone_number url ] end |
.optionals ⇒ Object
An array for optional fields
61 62 63 64 65 66 67 68 69 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 61 def self.optionals %w[ document_number email_address country phone_number url ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
141 142 143 144 145 146 147 148 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 141 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}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
132 133 134 135 136 137 138 |
# File 'lib/the_plaid_api/models/entity_watchlist_search_terms.rb', line 132 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}, additional_properties:"\ " #{@additional_properties}>" end |