Class: TrinsicApi::ClearProviderOutputTraits

Inherits:
ApiModelBase show all
Defined in:
lib/trinsic_api/models/clear_provider_output_traits.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 = {}) ⇒ ClearProviderOutputTraits

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 150

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `TrinsicApi::ClearProviderOutputTraits` 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::ClearProviderOutputTraits`. 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?(:'address')
    self.address = attributes[:'address']
  end

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

  if attributes.key?(:'email')
    self.email = attributes[:'email']
  end

  if attributes.key?(:'first_name')
    self.first_name = attributes[:'first_name']
  end

  if attributes.key?(:'last_name')
    self.last_name = attributes[:'last_name']
  end

  if attributes.key?(:'middle_name')
    self.middle_name = attributes[:'middle_name']
  end

  if attributes.key?(:'second_family_name')
    self.second_family_name = attributes[:'second_family_name']
  end

  if attributes.key?(:'full_last_name')
    self.full_last_name = attributes[:'full_last_name']
  end

  if attributes.key?(:'phone')
    self.phone = attributes[:'phone']
  end

  if attributes.key?(:'ssn4')
    self.ssn4 = attributes[:'ssn4']
  end

  if attributes.key?(:'ssn9')
    self.ssn9 = attributes[:'ssn9']
  end

  if attributes.key?(:'identification_number')
    self.identification_number = attributes[:'identification_number']
  end

  if attributes.key?(:'identification_type')
    self.identification_type = attributes[:'identification_type']
  end

  if attributes.key?(:'document')
    self.document = attributes[:'document']
  end

  if attributes.key?(:'health_insurance')
    self.health_insurance = attributes[:'health_insurance']
  end

  if attributes.key?(:'verified_email')
    self.verified_email = attributes[:'verified_email']
  end

  if attributes.key?(:'historical_data')
    self.historical_data = attributes[:'historical_data']
  end
end

Instance Attribute Details

#addressObject

The individual's address.



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

def address
  @address
end

#date_of_birthObject

The individual's date of birth.



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

def date_of_birth
  @date_of_birth
end

#documentObject

Parsed data from the individual's scanned document.



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

def document
  @document
end

#emailObject

The individual's email address.



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

def email
  @email
end

#first_nameObject

The individual's first name.



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

def first_name
  @first_name
end

#full_last_nameObject

The individual's full last name.



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

def full_last_name
  @full_last_name
end

#health_insuranceObject

Health insurance information.



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

def health_insurance
  @health_insurance
end

#historical_dataObject

Historical identity traits.



67
68
69
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 67

def historical_data
  @historical_data
end

#identification_numberObject

The national identification number.



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

def identification_number
  @identification_number
end

#identification_typeObject

The national identification number type.



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

def identification_type
  @identification_type
end

#last_nameObject

The individual's last name.



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

def last_name
  @last_name
end

#middle_nameObject

The individual's middle name.



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

def middle_name
  @middle_name
end

#phoneObject

The individual's phone number, normalized to international E.164 format.



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

def phone
  @phone
end

#second_family_nameObject

The individual's second family name.



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

def second_family_name
  @second_family_name
end

#ssn4Object

The last four digits of the individual's SSN.



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

def ssn4
  @ssn4
end

#ssn9Object

The individual's SSN.



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

def ssn9
  @ssn9
end

#verified_emailObject

Verified email information.



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

def verified_email
  @verified_email
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



93
94
95
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 93

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



98
99
100
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 98

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 70

def self.attribute_map
  {
    :'address' => :'address',
    :'date_of_birth' => :'dateOfBirth',
    :'email' => :'email',
    :'first_name' => :'firstName',
    :'last_name' => :'lastName',
    :'middle_name' => :'middleName',
    :'second_family_name' => :'secondFamilyName',
    :'full_last_name' => :'fullLastName',
    :'phone' => :'phone',
    :'ssn4' => :'ssn4',
    :'ssn9' => :'ssn9',
    :'identification_number' => :'identificationNumber',
    :'identification_type' => :'identificationType',
    :'document' => :'document',
    :'health_insurance' => :'healthInsurance',
    :'verified_email' => :'verifiedEmail',
    :'historical_data' => :'historicalData'
  }
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



287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 287

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



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 126

def self.openapi_nullable
  Set.new([
    :'address',
    :'date_of_birth',
    :'email',
    :'first_name',
    :'last_name',
    :'middle_name',
    :'second_family_name',
    :'full_last_name',
    :'phone',
    :'ssn4',
    :'ssn9',
    :'identification_number',
    :'identification_type',
    :'document',
    :'health_insurance',
    :'verified_email',
    :'historical_data'
  ])
end

.openapi_typesObject

Attribute type mapping.



103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 103

def self.openapi_types
  {
    :'address' => :'ClearProviderOutputAddress',
    :'date_of_birth' => :'Date',
    :'email' => :'String',
    :'first_name' => :'String',
    :'last_name' => :'String',
    :'middle_name' => :'String',
    :'second_family_name' => :'String',
    :'full_last_name' => :'String',
    :'phone' => :'String',
    :'ssn4' => :'String',
    :'ssn9' => :'String',
    :'identification_number' => :'String',
    :'identification_type' => :'String',
    :'document' => :'ClearProviderOutputDocument',
    :'health_insurance' => :'ClearProviderOutputHealthInsurance',
    :'verified_email' => :'ClearProviderOutputVerifiedEmail',
    :'historical_data' => :'ClearProviderOutputHistoricalData'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 250

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      address == o.address &&
      date_of_birth == o.date_of_birth &&
      email == o.email &&
      first_name == o.first_name &&
      last_name == o.last_name &&
      middle_name == o.middle_name &&
      second_family_name == o.second_family_name &&
      full_last_name == o.full_last_name &&
      phone == o.phone &&
      ssn4 == o.ssn4 &&
      ssn9 == o.ssn9 &&
      identification_number == o.identification_number &&
      identification_type == o.identification_type &&
      document == o.document &&
      health_insurance == o.health_insurance &&
      verified_email == o.verified_email &&
      historical_data == o.historical_data
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


274
275
276
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 274

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



280
281
282
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 280

def hash
  [address, date_of_birth, email, first_name, last_name, middle_name, second_family_name, full_last_name, phone, ssn4, ssn9, identification_number, identification_type, document, health_insurance, verified_email, historical_data].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



235
236
237
238
239
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 235

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



309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 309

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



243
244
245
246
# File 'lib/trinsic_api/models/clear_provider_output_traits.rb', line 243

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