Class: CyberSourceMergedSpec::ElectronicVerificationResults1
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ElectronicVerificationResults1
- Defined in:
- lib/cyber_source_merged_spec/models/electronic_verification_results1.rb
Overview
ElectronicVerificationResults1 Model.
Instance Attribute Summary collapse
-
#email_raw ⇒ String
Raw Electronic Verification response code from the processor for the customer's email address.
-
#first_name_raw ⇒ String
Raw electronic verification response code from the processor for the customer's first name.
-
#last_name_raw ⇒ String
Raw electronic verification response code from the processor for the customer's last name.
-
#middle_name_raw ⇒ String
Raw electronic verification response code from the processor for the customer's middle name.
-
#name_raw ⇒ String
Raw Electronic Verification response code from the processor for the customer's name.
-
#phone_number_raw ⇒ String
Raw Electronic Verification response code from the processor for the customer's phone number.
Class Method Summary collapse
- .from_element(root) ⇒ Object
-
.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(email_raw: SKIP, first_name_raw: SKIP, last_name_raw: SKIP, middle_name_raw: SKIP, name_raw: SKIP, phone_number_raw: SKIP, additional_properties: nil) ⇒ ElectronicVerificationResults1
constructor
A new instance of ElectronicVerificationResults1.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
- #to_xml_element(doc, root_name) ⇒ 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(email_raw: SKIP, first_name_raw: SKIP, last_name_raw: SKIP, middle_name_raw: SKIP, name_raw: SKIP, phone_number_raw: SKIP, additional_properties: nil) ⇒ ElectronicVerificationResults1
Returns a new instance of ElectronicVerificationResults1.
95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 95 def initialize(email_raw: SKIP, first_name_raw: SKIP, last_name_raw: SKIP, middle_name_raw: SKIP, name_raw: SKIP, phone_number_raw: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @email_raw = email_raw unless email_raw == SKIP @first_name_raw = first_name_raw unless first_name_raw == SKIP @last_name_raw = last_name_raw unless last_name_raw == SKIP @middle_name_raw = middle_name_raw unless middle_name_raw == SKIP @name_raw = name_raw unless name_raw == SKIP @phone_number_raw = phone_number_raw unless phone_number_raw == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#email_raw ⇒ String
Raw Electronic Verification response code from the processor for the customer's email address. Valid values:
- '1': Verified
- '2': Failed
- '3': Not performed
19 20 21 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 19 def email_raw @email_raw end |
#first_name_raw ⇒ String
Raw electronic verification response code from the processor for the customer's first name. Valid values:
- '01': Match
- '50': Partial Match
- '99': No Match
28 29 30 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 28 def first_name_raw @first_name_raw end |
#last_name_raw ⇒ String
Raw electronic verification response code from the processor for the customer's last name. Valid values:
- '01': Match
- '50': Partial Match
- '99': No Match
37 38 39 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 37 def last_name_raw @last_name_raw end |
#middle_name_raw ⇒ String
Raw electronic verification response code from the processor for the customer's middle name. Valid values:
- '01': Match
- '50': Partial Match
- '99': No Match
46 47 48 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 46 def middle_name_raw @middle_name_raw end |
#name_raw ⇒ String
Raw Electronic Verification response code from the processor for the customer's name. Valid values:
- '01': Match
- '50': Partial Match
- '99': No Match
55 56 57 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 55 def name_raw @name_raw end |
#phone_number_raw ⇒ String
Raw Electronic Verification response code from the processor for the customer's phone number. Valid values:
- '1': Verified
- '2': Failed
- '3': Not performed
64 65 66 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 64 def phone_number_raw @phone_number_raw end |
Class Method Details
.from_element(root) ⇒ Object
141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 141 def self.from_element(root) email_raw = XmlUtilities.from_element(root, 'emailRaw', String) first_name_raw = XmlUtilities.from_element(root, 'firstNameRaw', String) last_name_raw = XmlUtilities.from_element(root, 'lastNameRaw', String) middle_name_raw = XmlUtilities.from_element(root, 'middleNameRaw', String) name_raw = XmlUtilities.from_element(root, 'nameRaw', String) phone_number_raw = XmlUtilities.from_element(root, 'phoneNumberRaw', String) new(email_raw: email_raw, first_name_raw: first_name_raw, last_name_raw: last_name_raw, middle_name_raw: middle_name_raw, name_raw: name_raw, phone_number_raw: phone_number_raw, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 111 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. email_raw = hash.key?('emailRaw') ? hash['emailRaw'] : SKIP first_name_raw = hash.key?('firstNameRaw') ? hash['firstNameRaw'] : SKIP last_name_raw = hash.key?('lastNameRaw') ? hash['lastNameRaw'] : SKIP middle_name_raw = hash.key?('middleNameRaw') ? hash['middleNameRaw'] : SKIP name_raw = hash.key?('nameRaw') ? hash['nameRaw'] : SKIP phone_number_raw = hash.key?('phoneNumberRaw') ? hash['phoneNumberRaw'] : 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. ElectronicVerificationResults1.new(email_raw: email_raw, first_name_raw: first_name_raw, last_name_raw: last_name_raw, middle_name_raw: middle_name_raw, name_raw: name_raw, phone_number_raw: phone_number_raw, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
67 68 69 70 71 72 73 74 75 76 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 67 def self.names @_hash = {} if @_hash.nil? @_hash['email_raw'] = 'emailRaw' @_hash['first_name_raw'] = 'firstNameRaw' @_hash['last_name_raw'] = 'lastNameRaw' @_hash['middle_name_raw'] = 'middleNameRaw' @_hash['name_raw'] = 'nameRaw' @_hash['phone_number_raw'] = 'phoneNumberRaw' @_hash end |
.nullables ⇒ Object
An array for nullable fields
91 92 93 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 91 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
79 80 81 82 83 84 85 86 87 88 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 79 def self.optionals %w[ email_raw first_name_raw last_name_raw middle_name_raw name_raw phone_number_raw ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
186 187 188 189 190 191 192 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 186 def inspect class_name = self.class.name.split('::').last "<#{class_name} email_raw: #{@email_raw.inspect}, first_name_raw:"\ " #{@first_name_raw.inspect}, last_name_raw: #{@last_name_raw.inspect}, middle_name_raw:"\ " #{@middle_name_raw.inspect}, name_raw: #{@name_raw.inspect}, phone_number_raw:"\ " #{@phone_number_raw.inspect}, additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
177 178 179 180 181 182 183 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 177 def to_s class_name = self.class.name.split('::').last "<#{class_name} email_raw: #{@email_raw}, first_name_raw: #{@first_name_raw},"\ " last_name_raw: #{@last_name_raw}, middle_name_raw: #{@middle_name_raw}, name_raw:"\ " #{@name_raw}, phone_number_raw: #{@phone_number_raw}, additional_properties:"\ " #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 |
# File 'lib/cyber_source_merged_spec/models/electronic_verification_results1.rb', line 159 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'emailRaw', email_raw) XmlUtilities.add_as_subelement(doc, root, 'firstNameRaw', first_name_raw) XmlUtilities.add_as_subelement(doc, root, 'lastNameRaw', last_name_raw) XmlUtilities.add_as_subelement(doc, root, 'middleNameRaw', middle_name_raw) XmlUtilities.add_as_subelement(doc, root, 'nameRaw', name_raw) XmlUtilities.add_as_subelement(doc, root, 'phoneNumberRaw', phone_number_raw) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |