Class: ThePlaidApi::UpdateEntityScreeningRequestSearchTerms

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

Overview

Search terms for editing an entity watchlist screening

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: SKIP, document_number: SKIP, email_address: SKIP, country: SKIP, phone_number: SKIP, url: SKIP, additional_properties: nil) ⇒ UpdateEntityScreeningRequestSearchTerms

Returns a new instance of UpdateEntityScreeningRequestSearchTerms.



77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# File 'lib/the_plaid_api/models/update_entity_screening_request_search_terms.rb', line 77

def initialize(entity_watchlist_program_id:, legal_name: SKIP,
               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 unless legal_name == SKIP
  @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

#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/update_entity_screening_request_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/update_entity_screening_request_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/update_entity_screening_request_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/update_entity_screening_request_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/update_entity_screening_request_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/update_entity_screening_request_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/update_entity_screening_request_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.



94
95
96
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
# File 'lib/the_plaid_api/models/update_entity_screening_request_search_terms.rb', line 94

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'] : SKIP
  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.
  UpdateEntityScreeningRequestSearchTerms.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

.namesObject

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/update_entity_screening_request_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

.nullablesObject

An array for nullable fields



73
74
75
# File 'lib/the_plaid_api/models/update_entity_screening_request_search_terms.rb', line 73

def self.nullables
  []
end

.optionalsObject

An array for optional fields



61
62
63
64
65
66
67
68
69
70
# File 'lib/the_plaid_api/models/update_entity_screening_request_search_terms.rb', line 61

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

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



136
137
138
139
140
141
142
143
# File 'lib/the_plaid_api/models/update_entity_screening_request_search_terms.rb', line 136

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_sObject

Provides a human-readable string representation of the object.



127
128
129
130
131
132
133
# File 'lib/the_plaid_api/models/update_entity_screening_request_search_terms.rb', line 127

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