Class: CyberSourceMergedSpec::ElectronicVerificationResults

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/cyber_source_merged_spec/models/electronic_verification_results.rb

Overview

ElectronicVerificationResults Model.

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(code: SKIP, code_raw: SKIP, email: SKIP, email_raw: SKIP, phone_number: SKIP, phone_number_raw: SKIP, postal_code: SKIP, postal_code_raw: SKIP, street: SKIP, street_raw: SKIP, name: SKIP, name_raw: SKIP, first_name_raw: SKIP, first_name: SKIP, middle_name_raw: SKIP, middle_name: SKIP, last_name_raw: SKIP, last_name: SKIP, additional_properties: nil) ⇒ ElectronicVerificationResults

Returns a new instance of ElectronicVerificationResults.



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
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 193

def initialize(code: SKIP, code_raw: SKIP, email: SKIP, email_raw: SKIP,
               phone_number: SKIP, phone_number_raw: SKIP,
               postal_code: SKIP, postal_code_raw: SKIP, street: SKIP,
               street_raw: SKIP, name: SKIP, name_raw: SKIP,
               first_name_raw: SKIP, first_name: SKIP,
               middle_name_raw: SKIP, middle_name: SKIP,
               last_name_raw: SKIP, last_name: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @code = code unless code == SKIP
  @code_raw = code_raw unless code_raw == SKIP
  @email = email unless email == SKIP
  @email_raw = email_raw unless email_raw == SKIP
  @phone_number = phone_number unless phone_number == SKIP
  @phone_number_raw = phone_number_raw unless phone_number_raw == SKIP
  @postal_code = postal_code unless postal_code == SKIP
  @postal_code_raw = postal_code_raw unless postal_code_raw == SKIP
  @street = street unless street == SKIP
  @street_raw = street_raw unless street_raw == SKIP
  @name = name unless name == SKIP
  @name_raw = name_raw unless name_raw == SKIP
  @first_name_raw = first_name_raw unless first_name_raw == SKIP
  @first_name = first_name unless first_name == SKIP
  @middle_name_raw = middle_name_raw unless middle_name_raw == SKIP
  @middle_name = middle_name unless middle_name == SKIP
  @last_name_raw = last_name_raw unless last_name_raw == SKIP
  @last_name = last_name unless last_name == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#codeString

Mapped Electronic Verification response code for the customer’s name.

Returns:

  • (String)


14
15
16
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 14

def code
  @code
end

#code_rawString

Raw Electronic Verification response code from the processor for the customer’s last name

Returns:

  • (String)


19
20
21
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 19

def code_raw
  @code_raw
end

#emailString

Mapped Electronic Verification response code for the customer’s email address.

Returns:

  • (String)


24
25
26
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 24

def email
  @email
end

#email_rawString

Raw Electronic Verification response code from the processor for the customer’s email address.

Returns:

  • (String)


29
30
31
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 29

def email_raw
  @email_raw
end

#first_nameString

Visa Platform Connect

Mapped electronic verification response code from the processor for the customer’s first name. Valid values : 'Y' Yes, the data Matches 'N' No Match 'O' Partial Match

Returns:

  • (String)


98
99
100
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 98

def first_name
  @first_name
end

#first_name_rawString

Visa Platform Connect

Raw electronic verification response code from the processor for the customer’s first name. Valid values : '01' Match '50' Partial Match '99' No Match

Returns:

  • (String)


88
89
90
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 88

def first_name_raw
  @first_name_raw
end

#last_nameString

Visa Platform Connect

Mapped electronic verification response code from the processor for the customer’s last name. Valid values : 'Y' Yes, the data Matches 'N' No Match 'O' Partial Match

Returns:

  • (String)


138
139
140
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 138

def last_name
  @last_name
end

#last_name_rawString

Visa Platform Connect

Raw electronic verification response code from the processor for the customer’s last name. Valid values : '01' Match '50' Partial Match '99' No Match

Returns:

  • (String)


128
129
130
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 128

def last_name_raw
  @last_name_raw
end

#middle_nameString

Visa Platform Connect

Mapped electronic verification response code from the processor for the customer’s middle name. Valid values : 'Y' Yes, the data Matches 'N' No Match 'O' Partial Match

Returns:

  • (String)


118
119
120
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 118

def middle_name
  @middle_name
end

#middle_name_rawString

Visa Platform Connect

Raw electronic verification response code from the processor for the customer’s middle name. Valid values : '01' Match '50' Partial Match '99' No Match

Returns:

  • (String)


108
109
110
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 108

def middle_name_raw
  @middle_name_raw
end

#nameString

Visa Platform Connect

Mapped Electronic Verification response code for the customer’s name. Valid values : 'Y' Yes, the data Matches 'N' No Match 'O' Partial Match

Returns:

  • (String)


68
69
70
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 68

def name
  @name
end

#name_rawString

Visa Platform Connect

Raw Electronic Verification response code from the processor for the customer’s name. Valid values : '01' Match '50' Partial Match '99' No Match

Returns:

  • (String)


78
79
80
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 78

def name_raw
  @name_raw
end

#phone_numberString

Mapped Electronic Verification response code for the customer’s phone number.

Returns:

  • (String)


34
35
36
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 34

def phone_number
  @phone_number
end

#phone_number_rawString

Raw Electronic Verification response code from the processor for the customer’s phone number.

Returns:

  • (String)


39
40
41
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 39

def phone_number_raw
  @phone_number_raw
end

#postal_codeString

Mapped Electronic Verification response code for the customer’s postal code.

Returns:

  • (String)


44
45
46
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 44

def postal_code
  @postal_code
end

#postal_code_rawString

Raw Electronic Verification response code from the processor for the customer’s postal code.

Returns:

  • (String)


49
50
51
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 49

def postal_code_raw
  @postal_code_raw
end

#streetString

Mapped Electronic Verification response code for the customer’s street address.

Returns:

  • (String)


54
55
56
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 54

def street
  @street
end

#street_rawString

Raw Electronic Verification response code from the processor for the customer’s street address.

Returns:

  • (String)


59
60
61
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 59

def street_raw
  @street_raw
end

Class Method Details

.from_element(root) ⇒ Object



281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 281

def self.from_element(root)
  code = XmlUtilities.from_element(root, 'code', String)
  code_raw = XmlUtilities.from_element(root, 'codeRaw', String)
  email = XmlUtilities.from_element(root, 'email', String)
  email_raw = XmlUtilities.from_element(root, 'emailRaw', String)
  phone_number = XmlUtilities.from_element(root, 'phoneNumber', String)
  phone_number_raw = XmlUtilities.from_element(root, 'phoneNumberRaw',
                                               String)
  postal_code = XmlUtilities.from_element(root, 'postalCode', String)
  postal_code_raw = XmlUtilities.from_element(root, 'postalCodeRaw', String)
  street = XmlUtilities.from_element(root, 'street', String)
  street_raw = XmlUtilities.from_element(root, 'streetRaw', String)
  name = XmlUtilities.from_element(root, 'name', String)
  name_raw = XmlUtilities.from_element(root, 'nameRaw', String)
  first_name_raw = XmlUtilities.from_element(root, 'firstNameRaw', String)
  first_name = XmlUtilities.from_element(root, 'firstName', String)
  middle_name_raw = XmlUtilities.from_element(root, 'middleNameRaw', String)
  middle_name = XmlUtilities.from_element(root, 'middleName', String)
  last_name_raw = XmlUtilities.from_element(root, 'lastNameRaw', String)
  last_name = XmlUtilities.from_element(root, 'lastName', String)

  new(code: code,
      code_raw: code_raw,
      email: email,
      email_raw: email_raw,
      phone_number: phone_number,
      phone_number_raw: phone_number_raw,
      postal_code: postal_code,
      postal_code_raw: postal_code_raw,
      street: street,
      street_raw: street_raw,
      name: name,
      name_raw: name_raw,
      first_name_raw: first_name_raw,
      first_name: first_name,
      middle_name_raw: middle_name_raw,
      middle_name: middle_name,
      last_name_raw: last_name_raw,
      last_name: last_name,
      additional_properties: additional_properties)
end

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 226

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  code = hash.key?('code') ? hash['code'] : SKIP
  code_raw = hash.key?('codeRaw') ? hash['codeRaw'] : SKIP
  email = hash.key?('email') ? hash['email'] : SKIP
  email_raw = hash.key?('emailRaw') ? hash['emailRaw'] : SKIP
  phone_number = hash.key?('phoneNumber') ? hash['phoneNumber'] : SKIP
  phone_number_raw =
    hash.key?('phoneNumberRaw') ? hash['phoneNumberRaw'] : SKIP
  postal_code = hash.key?('postalCode') ? hash['postalCode'] : SKIP
  postal_code_raw =
    hash.key?('postalCodeRaw') ? hash['postalCodeRaw'] : SKIP
  street = hash.key?('street') ? hash['street'] : SKIP
  street_raw = hash.key?('streetRaw') ? hash['streetRaw'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  name_raw = hash.key?('nameRaw') ? hash['nameRaw'] : SKIP
  first_name_raw = hash.key?('firstNameRaw') ? hash['firstNameRaw'] : SKIP
  first_name = hash.key?('firstName') ? hash['firstName'] : SKIP
  middle_name_raw =
    hash.key?('middleNameRaw') ? hash['middleNameRaw'] : SKIP
  middle_name = hash.key?('middleName') ? hash['middleName'] : SKIP
  last_name_raw = hash.key?('lastNameRaw') ? hash['lastNameRaw'] : SKIP
  last_name = hash.key?('lastName') ? hash['lastName'] : 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.
  ElectronicVerificationResults.new(code: code,
                                    code_raw: code_raw,
                                    email: email,
                                    email_raw: email_raw,
                                    phone_number: phone_number,
                                    phone_number_raw: phone_number_raw,
                                    postal_code: postal_code,
                                    postal_code_raw: postal_code_raw,
                                    street: street,
                                    street_raw: street_raw,
                                    name: name,
                                    name_raw: name_raw,
                                    first_name_raw: first_name_raw,
                                    first_name: first_name,
                                    middle_name_raw: middle_name_raw,
                                    middle_name: middle_name,
                                    last_name_raw: last_name_raw,
                                    last_name: last_name,
                                    additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 141

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['code'] = 'code'
  @_hash['code_raw'] = 'codeRaw'
  @_hash['email'] = 'email'
  @_hash['email_raw'] = 'emailRaw'
  @_hash['phone_number'] = 'phoneNumber'
  @_hash['phone_number_raw'] = 'phoneNumberRaw'
  @_hash['postal_code'] = 'postalCode'
  @_hash['postal_code_raw'] = 'postalCodeRaw'
  @_hash['street'] = 'street'
  @_hash['street_raw'] = 'streetRaw'
  @_hash['name'] = 'name'
  @_hash['name_raw'] = 'nameRaw'
  @_hash['first_name_raw'] = 'firstNameRaw'
  @_hash['first_name'] = 'firstName'
  @_hash['middle_name_raw'] = 'middleNameRaw'
  @_hash['middle_name'] = 'middleName'
  @_hash['last_name_raw'] = 'lastNameRaw'
  @_hash['last_name'] = 'lastName'
  @_hash
end

.nullablesObject

An array for nullable fields



189
190
191
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 189

def self.nullables
  []
end

.optionalsObject

An array for optional fields



165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 165

def self.optionals
  %w[
    code
    code_raw
    email
    email_raw
    phone_number
    phone_number_raw
    postal_code
    postal_code_raw
    street
    street_raw
    name
    name_raw
    first_name_raw
    first_name
    middle_name_raw
    middle_name
    last_name_raw
    last_name
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



366
367
368
369
370
371
372
373
374
375
376
377
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 366

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code.inspect}, code_raw: #{@code_raw.inspect}, email:"\
  " #{@email.inspect}, email_raw: #{@email_raw.inspect}, phone_number:"\
  " #{@phone_number.inspect}, phone_number_raw: #{@phone_number_raw.inspect}, postal_code:"\
  " #{@postal_code.inspect}, postal_code_raw: #{@postal_code_raw.inspect}, street:"\
  " #{@street.inspect}, street_raw: #{@street_raw.inspect}, name: #{@name.inspect}, name_raw:"\
  " #{@name_raw.inspect}, first_name_raw: #{@first_name_raw.inspect}, first_name:"\
  " #{@first_name.inspect}, middle_name_raw: #{@middle_name_raw.inspect}, middle_name:"\
  " #{@middle_name.inspect}, last_name_raw: #{@last_name_raw.inspect}, last_name:"\
  " #{@last_name.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



354
355
356
357
358
359
360
361
362
363
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 354

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} code: #{@code}, code_raw: #{@code_raw}, email: #{@email}, email_raw:"\
  " #{@email_raw}, phone_number: #{@phone_number}, phone_number_raw: #{@phone_number_raw},"\
  " postal_code: #{@postal_code}, postal_code_raw: #{@postal_code_raw}, street: #{@street},"\
  " street_raw: #{@street_raw}, name: #{@name}, name_raw: #{@name_raw}, first_name_raw:"\
  " #{@first_name_raw}, first_name: #{@first_name}, middle_name_raw: #{@middle_name_raw},"\
  " middle_name: #{@middle_name}, last_name_raw: #{@last_name_raw}, last_name: #{@last_name},"\
  " additional_properties: #{@additional_properties}>"
end

#to_xml_element(doc, root_name) ⇒ Object



323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results.rb', line 323

def to_xml_element(doc, root_name)
  root = doc.create_element(root_name)

  XmlUtilities.add_as_subelement(doc, root, 'code', code)
  XmlUtilities.add_as_subelement(doc, root, 'codeRaw', code_raw)
  XmlUtilities.add_as_subelement(doc, root, 'email', email)
  XmlUtilities.add_as_subelement(doc, root, 'emailRaw', email_raw)
  XmlUtilities.add_as_subelement(doc, root, 'phoneNumber', phone_number)
  XmlUtilities.add_as_subelement(doc, root, 'phoneNumberRaw',
                                 phone_number_raw)
  XmlUtilities.add_as_subelement(doc, root, 'postalCode', postal_code)
  XmlUtilities.add_as_subelement(doc, root, 'postalCodeRaw',
                                 postal_code_raw)
  XmlUtilities.add_as_subelement(doc, root, 'street', street)
  XmlUtilities.add_as_subelement(doc, root, 'streetRaw', street_raw)
  XmlUtilities.add_as_subelement(doc, root, 'name', name)
  XmlUtilities.add_as_subelement(doc, root, 'nameRaw', name_raw)
  XmlUtilities.add_as_subelement(doc, root, 'firstNameRaw', first_name_raw)
  XmlUtilities.add_as_subelement(doc, root, 'firstName', first_name)
  XmlUtilities.add_as_subelement(doc, root, 'middleNameRaw',
                                 middle_name_raw)
  XmlUtilities.add_as_subelement(doc, root, 'middleName', middle_name)
  XmlUtilities.add_as_subelement(doc, root, 'lastNameRaw', last_name_raw)
  XmlUtilities.add_as_subelement(doc, root, 'lastName', last_name)
  XmlUtilities.add_as_subelement(doc, root, 'additional_properties',
                                 additional_properties)

  root
end