Class: CyberSourceMergedSpec::ProcessorInformation31
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- CyberSourceMergedSpec::ProcessorInformation31
- Defined in:
- lib/cyber_source_merged_spec/models/processor_information31.rb
Overview
ProcessorInformation31 Model.
Instance Attribute Summary collapse
-
#approval_code ⇒ String
Issuer-generated approval code for the transaction.
-
#avs ⇒ Avs4
This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set.
-
#card_verification ⇒ CardVerification1
This field might contain information about a decline.
-
#consumer_authentication_response ⇒ ConsumerAuthenticationResponse1
Network transaction identifier (TID).
-
#customer ⇒ Customer54
This field might contain information about a decline.
-
#electronic_verification_results ⇒ ElectronicVerificationResults1
This field might contain information about a decline.
-
#response_code ⇒ String
Transaction status from the processor.
-
#response_details ⇒ String
This field might contain information about a decline.
-
#retrieval_reference_number ⇒ String
This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set.
-
#system_trace_audit_number ⇒ String
This field is returned by authorization and incremental authorization services.
-
#transaction_id ⇒ String
Network transaction identifier (TID).
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(system_trace_audit_number: SKIP, approval_code: SKIP, response_code: SKIP, transaction_id: SKIP, consumer_authentication_response: SKIP, retrieval_reference_number: SKIP, avs: SKIP, response_details: SKIP, customer: SKIP, electronic_verification_results: SKIP, card_verification: SKIP, additional_properties: nil) ⇒ ProcessorInformation31
constructor
A new instance of ProcessorInformation31.
-
#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(system_trace_audit_number: SKIP, approval_code: SKIP, response_code: SKIP, transaction_id: SKIP, consumer_authentication_response: SKIP, retrieval_reference_number: SKIP, avs: SKIP, response_details: SKIP, customer: SKIP, electronic_verification_results: SKIP, card_verification: SKIP, additional_properties: nil) ⇒ ProcessorInformation31
Returns a new instance of ProcessorInformation31.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 117 def initialize(system_trace_audit_number: SKIP, approval_code: SKIP, response_code: SKIP, transaction_id: SKIP, consumer_authentication_response: SKIP, retrieval_reference_number: SKIP, avs: SKIP, response_details: SKIP, customer: SKIP, electronic_verification_results: SKIP, card_verification: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? unless system_trace_audit_number == SKIP @system_trace_audit_number = system_trace_audit_number end @approval_code = approval_code unless approval_code == SKIP @response_code = response_code unless response_code == SKIP @transaction_id = transaction_id unless transaction_id == SKIP unless consumer_authentication_response == SKIP @consumer_authentication_response = consumer_authentication_response end unless retrieval_reference_number == SKIP @retrieval_reference_number = retrieval_reference_number end @avs = avs unless avs == SKIP @response_details = response_details unless response_details == SKIP @customer = customer unless customer == SKIP unless electronic_verification_results == SKIP @electronic_verification_results = electronic_verification_results end @card_verification = card_verification unless card_verification == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#approval_code ⇒ String
Issuer-generated approval code for the transaction.
20 21 22 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 20 def approval_code @approval_code end |
#avs ⇒ Avs4
This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. Recommended format: ydddhhnnnnnn Positions 1-4: The yddd equivalent of the date, where y = 0-9 and ddd = 001 – 366. Positions 5-12: A unique identification number generated by the merchant or assigned by Cybersource.
58 59 60 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 58 def avs @avs end |
#card_verification ⇒ CardVerification1
This field might contain information about a decline.
74 75 76 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 74 def card_verification @card_verification end |
#consumer_authentication_response ⇒ ConsumerAuthenticationResponse1
Network transaction identifier (TID). This value can be used to identify a specific transaction when you are discussing the transaction with your processor.
36 37 38 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 36 def consumer_authentication_response @consumer_authentication_response end |
#customer ⇒ Customer54
This field might contain information about a decline.
66 67 68 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 66 def customer @customer end |
#electronic_verification_results ⇒ ElectronicVerificationResults1
This field might contain information about a decline.
70 71 72 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 70 def electronic_verification_results @electronic_verification_results end |
#response_code ⇒ String
Transaction status from the processor.
24 25 26 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 24 def response_code @response_code end |
#response_details ⇒ String
This field might contain information about a decline.
62 63 64 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 62 def response_details @response_details end |
#retrieval_reference_number ⇒ String
This field contains a number that is used with other data elements as a key to identify and track all messages related to a given cardholder transaction; that is, to a given transaction set. Recommended format: ydddhhnnnnnn Positions 1-4: The yddd equivalent of the date, where y = 0-9 and ddd = 001 – 366. Positions 5-12: A unique identification number generated by the merchant or assigned by Cybersource.
47 48 49 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 47 def retrieval_reference_number @retrieval_reference_number end |
#system_trace_audit_number ⇒ String
This field is returned by authorization and incremental authorization services. System trace number that must be printed on the customer’s receipt.
16 17 18 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 16 def system_trace_audit_number @system_trace_audit_number end |
#transaction_id ⇒ String
Network transaction identifier (TID). This value can be used to identify a specific transaction when you are discussing the transaction with your processor.
30 31 32 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 30 def transaction_id @transaction_id end |
Class Method Details
.from_element(root) ⇒ Object
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 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 200 def self.from_element(root) system_trace_audit_number = XmlUtilities.from_element( root, 'systemTraceAuditNumber', String ) approval_code = XmlUtilities.from_element(root, 'approvalCode', String) response_code = XmlUtilities.from_element(root, 'responseCode', String) transaction_id = XmlUtilities.from_element(root, 'transactionId', String) consumer_authentication_response = XmlUtilities.from_element( root, 'ConsumerAuthenticationResponse1', ConsumerAuthenticationResponse1 ) retrieval_reference_number = XmlUtilities.from_element( root, 'retrievalReferenceNumber', String ) avs = XmlUtilities.from_element(root, 'Avs4', Avs4) response_details = XmlUtilities.from_element(root, 'responseDetails', String) customer = XmlUtilities.from_element(root, 'Customer54', Customer54) electronic_verification_results = XmlUtilities.from_element( root, 'ElectronicVerificationResults1', ElectronicVerificationResults1 ) card_verification = XmlUtilities.from_element(root, 'CardVerification1', CardVerification1) new(system_trace_audit_number: system_trace_audit_number, approval_code: approval_code, response_code: response_code, transaction_id: transaction_id, consumer_authentication_response: consumer_authentication_response, retrieval_reference_number: retrieval_reference_number, avs: avs, response_details: response_details, customer: customer, electronic_verification_results: electronic_verification_results, card_verification: card_verification, additional_properties: additional_properties) end |
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 154 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. system_trace_audit_number = hash.key?('systemTraceAuditNumber') ? hash['systemTraceAuditNumber'] : SKIP approval_code = hash.key?('approvalCode') ? hash['approvalCode'] : SKIP response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP if hash['consumerAuthenticationResponse'] consumer_authentication_response = ConsumerAuthenticationResponse1.from_hash(hash['consumerAuthenticationResponse']) end retrieval_reference_number = hash.key?('retrievalReferenceNumber') ? hash['retrievalReferenceNumber'] : SKIP avs = Avs4.from_hash(hash['avs']) if hash['avs'] response_details = hash.key?('responseDetails') ? hash['responseDetails'] : SKIP customer = Customer54.from_hash(hash['customer']) if hash['customer'] if hash['electronicVerificationResults'] electronic_verification_results = ElectronicVerificationResults1.from_hash(hash['electronicVerificationResults']) end card_verification = CardVerification1.from_hash(hash['cardVerification']) if hash['cardVerification'] # 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. ProcessorInformation31.new(system_trace_audit_number: system_trace_audit_number, approval_code: approval_code, response_code: response_code, transaction_id: transaction_id, consumer_authentication_response: consumer_authentication_response, retrieval_reference_number: retrieval_reference_number, avs: avs, response_details: response_details, customer: customer, electronic_verification_results: electronic_verification_results, card_verification: card_verification, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 77 def self.names @_hash = {} if @_hash.nil? @_hash['system_trace_audit_number'] = 'systemTraceAuditNumber' @_hash['approval_code'] = 'approvalCode' @_hash['response_code'] = 'responseCode' @_hash['transaction_id'] = 'transactionId' @_hash['consumer_authentication_response'] = 'consumerAuthenticationResponse' @_hash['retrieval_reference_number'] = 'retrievalReferenceNumber' @_hash['avs'] = 'avs' @_hash['response_details'] = 'responseDetails' @_hash['customer'] = 'customer' @_hash['electronic_verification_results'] = 'electronicVerificationResults' @_hash['card_verification'] = 'cardVerification' @_hash end |
.nullables ⇒ Object
An array for nullable fields
113 114 115 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 113 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 96 def self.optionals %w[ system_trace_audit_number approval_code response_code transaction_id consumer_authentication_response retrieval_reference_number avs response_details customer electronic_verification_results card_verification ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 280 def inspect class_name = self.class.name.split('::').last "<#{class_name} system_trace_audit_number: #{@system_trace_audit_number.inspect},"\ " approval_code: #{@approval_code.inspect}, response_code: #{@response_code.inspect},"\ " transaction_id: #{@transaction_id.inspect}, consumer_authentication_response:"\ " #{@consumer_authentication_response.inspect}, retrieval_reference_number:"\ " #{@retrieval_reference_number.inspect}, avs: #{@avs.inspect}, response_details:"\ " #{@response_details.inspect}, customer: #{@customer.inspect},"\ " electronic_verification_results: #{@electronic_verification_results.inspect},"\ " card_verification: #{@card_verification.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
268 269 270 271 272 273 274 275 276 277 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 268 def to_s class_name = self.class.name.split('::').last "<#{class_name} system_trace_audit_number: #{@system_trace_audit_number}, approval_code:"\ " #{@approval_code}, response_code: #{@response_code}, transaction_id: #{@transaction_id},"\ " consumer_authentication_response: #{@consumer_authentication_response},"\ " retrieval_reference_number: #{@retrieval_reference_number}, avs: #{@avs},"\ " response_details: #{@response_details}, customer: #{@customer},"\ " electronic_verification_results: #{@electronic_verification_results}, card_verification:"\ " #{@card_verification}, additional_properties: #{@additional_properties}>" end |
#to_xml_element(doc, root_name) ⇒ Object
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 |
# File 'lib/cyber_source_merged_spec/models/processor_information31.rb', line 239 def to_xml_element(doc, root_name) root = doc.create_element(root_name) XmlUtilities.add_as_subelement(doc, root, 'systemTraceAuditNumber', system_trace_audit_number) XmlUtilities.add_as_subelement(doc, root, 'approvalCode', approval_code) XmlUtilities.add_as_subelement(doc, root, 'responseCode', response_code) XmlUtilities.add_as_subelement(doc, root, 'transactionId', transaction_id) XmlUtilities.add_as_subelement(doc, root, 'ConsumerAuthenticationResponse1', consumer_authentication_response) XmlUtilities.add_as_subelement(doc, root, 'retrievalReferenceNumber', retrieval_reference_number) XmlUtilities.add_as_subelement(doc, root, 'Avs4', avs) XmlUtilities.add_as_subelement(doc, root, 'responseDetails', response_details) XmlUtilities.add_as_subelement(doc, root, 'Customer54', customer) XmlUtilities.add_as_subelement(doc, root, 'ElectronicVerificationResults1', electronic_verification_results) XmlUtilities.add_as_subelement(doc, root, 'CardVerification1', card_verification) XmlUtilities.add_as_subelement(doc, root, 'additional_properties', additional_properties) root end |