Class: TrinsicApi::ClearProviderOutputWatchlistHitDetails

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ClearProviderOutputWatchlistHitDetails

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 144

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ClearProviderOutputWatchlistHitDetails` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  acceptable_attribute_map = self.class.acceptable_attribute_map
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `TrinsicApi::ClearProviderOutputWatchlistHitDetails`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'name')
    if (value = attributes[:'name']).is_a?(Array)
      self.name = value
    end
  end

  if attributes.key?(:'_alias')
    if (value = attributes[:'_alias']).is_a?(Array)
      self._alias = value
    end
  end

  if attributes.key?(:'country')
    if (value = attributes[:'country']).is_a?(Array)
      self.country = value
    end
  end

  if attributes.key?(:'address')
    if (value = attributes[:'address']).is_a?(Array)
      self.address = value
    end
  end

  if attributes.key?(:'date_of_birth')
    if (value = attributes[:'date_of_birth']).is_a?(Array)
      self.date_of_birth = value
    end
  end

  if attributes.key?(:'date_of_death')
    if (value = attributes[:'date_of_death']).is_a?(Array)
      self.date_of_death = value
    end
  end

  if attributes.key?(:'place_of_birth')
    if (value = attributes[:'place_of_birth']).is_a?(Array)
      self.place_of_birth = value
    end
  end

  if attributes.key?(:'gender')
    if (value = attributes[:'gender']).is_a?(Array)
      self.gender = value
    end
  end

  if attributes.key?(:'nationality')
    if (value = attributes[:'nationality']).is_a?(Array)
      self.nationality = value
    end
  end

  if attributes.key?(:'position')
    if (value = attributes[:'position']).is_a?(Array)
      self.position = value
    end
  end

  if attributes.key?(:'passport_number')
    if (value = attributes[:'passport_number']).is_a?(Array)
      self.passport_number = value
    end
  end

  if attributes.key?(:'id_number')
    if (value = attributes[:'id_number']).is_a?(Array)
      self.id_number = value
    end
  end

  if attributes.key?(:'notes')
    if (value = attributes[:'notes']).is_a?(Array)
      self.notes = value
    end
  end

  if attributes.key?(:'created_at')
    if (value = attributes[:'created_at']).is_a?(Array)
      self.created_at = value
    end
  end

  if attributes.key?(:'modified_at')
    if (value = attributes[:'modified_at']).is_a?(Array)
      self.modified_at = value
    end
  end

  if attributes.key?(:'source_urls')
    if (value = attributes[:'source_urls']).is_a?(Array)
      self.source_urls = value
    end
  end
end

Instance Attribute Details

#_aliasObject

Aliases associated with the watchlist hit.



22
23
24
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 22

def _alias
  @_alias
end

#addressObject

Addresses associated with the watchlist hit.



28
29
30
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 28

def address
  @address
end

#countryObject

ISO 3166-1 alpha-2 country codes associated with the watchlist hit.



25
26
27
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 25

def country
  @country
end

#created_atObject

Dates when the source entries were created.



58
59
60
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 58

def created_at
  @created_at
end

#date_of_birthObject

Dates of birth associated with the watchlist hit.



31
32
33
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 31

def date_of_birth
  @date_of_birth
end

#date_of_deathObject

Dates of death associated with the watchlist hit.



34
35
36
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 34

def date_of_death
  @date_of_death
end

#genderObject

Genders associated with the watchlist hit, as represented in the source lists.



40
41
42
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 40

def gender
  @gender
end

#id_numberObject

Identification numbers associated with the watchlist hit.



52
53
54
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 52

def id_number
  @id_number
end

#modified_atObject

Dates when the source entries were last modified.



61
62
63
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 61

def modified_at
  @modified_at
end

#nameObject

Names associated with the watchlist hit.



19
20
21
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 19

def name
  @name
end

#nationalityObject

ISO 3166-1 alpha-2 nationalities associated with the watchlist hit.



43
44
45
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 43

def nationality
  @nationality
end

#notesObject

Notes from the watchlist source data.



55
56
57
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 55

def notes
  @notes
end

#passport_numberObject

Passport numbers associated with the watchlist hit.



49
50
51
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 49

def passport_number
  @passport_number
end

#place_of_birthObject

Places of birth associated with the watchlist hit.



37
38
39
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 37

def place_of_birth
  @place_of_birth
end

#positionObject

Positions associated with the watchlist hit.



46
47
48
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 46

def position
  @position
end

#source_urlsObject

Source URLs for the watchlist hit.



64
65
66
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 64

def source_urls
  @source_urls
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



89
90
91
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 89

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



94
95
96
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 94

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 67

def self.attribute_map
  {
    :'name' => :'name',
    :'_alias' => :'alias',
    :'country' => :'country',
    :'address' => :'address',
    :'date_of_birth' => :'dateOfBirth',
    :'date_of_death' => :'dateOfDeath',
    :'place_of_birth' => :'placeOfBirth',
    :'gender' => :'gender',
    :'nationality' => :'nationality',
    :'position' => :'position',
    :'passport_number' => :'passportNumber',
    :'id_number' => :'idNumber',
    :'notes' => :'notes',
    :'created_at' => :'createdAt',
    :'modified_at' => :'modifiedAt',
    :'source_urls' => :'sourceUrls'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 308

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = nil
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_nullableObject

List of attributes with nullable: true



121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 121

def self.openapi_nullable
  Set.new([
    :'name',
    :'_alias',
    :'country',
    :'address',
    :'date_of_birth',
    :'date_of_death',
    :'place_of_birth',
    :'gender',
    :'nationality',
    :'position',
    :'passport_number',
    :'id_number',
    :'notes',
    :'created_at',
    :'modified_at',
    :'source_urls'
  ])
end

.openapi_typesObject

Attribute type mapping.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 99

def self.openapi_types
  {
    :'name' => :'Array<String>',
    :'_alias' => :'Array<String>',
    :'country' => :'Array<String>',
    :'address' => :'Array<ClearProviderOutputAddress>',
    :'date_of_birth' => :'Array<ClearProviderOutputPartialDate>',
    :'date_of_death' => :'Array<ClearProviderOutputPartialDate>',
    :'place_of_birth' => :'Array<String>',
    :'gender' => :'Array<String>',
    :'nationality' => :'Array<String>',
    :'position' => :'Array<String>',
    :'passport_number' => :'Array<String>',
    :'id_number' => :'Array<String>',
    :'notes' => :'Array<String>',
    :'created_at' => :'Array<ClearProviderOutputPartialDate>',
    :'modified_at' => :'Array<ClearProviderOutputPartialDate>',
    :'source_urls' => :'Array<String>'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 272

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      name == o.name &&
      _alias == o._alias &&
      country == o.country &&
      address == o.address &&
      date_of_birth == o.date_of_birth &&
      date_of_death == o.date_of_death &&
      place_of_birth == o.place_of_birth &&
      gender == o.gender &&
      nationality == o.nationality &&
      position == o.position &&
      passport_number == o.passport_number &&
      id_number == o.id_number &&
      notes == o.notes &&
      created_at == o.created_at &&
      modified_at == o.modified_at &&
      source_urls == o.source_urls
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


295
296
297
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 295

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



301
302
303
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 301

def hash
  [name, _alias, country, address, date_of_birth, date_of_death, place_of_birth, gender, nationality, position, passport_number, id_number, notes, created_at, modified_at, source_urls].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



257
258
259
260
261
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 257

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 330

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



265
266
267
268
# File 'lib/trinsic_api/models/clear_provider_output_watchlist_hit_details.rb', line 265

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  true
end