Class: VisaAcceptanceMergedSpec::ProcessorInformation2
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::ProcessorInformation2
- Defined in:
- lib/visa_acceptance_merged_spec/models/processor_information2.rb
Overview
ProcessorInformation2 Model.
Instance Attribute Summary collapse
-
#approval_code ⇒ String
Authorization code.
-
#merchant_advice ⇒ MerchantAdvice
This field might contain information about a decline.
-
#merchant_risk_prediction ⇒ String
Mastercard is introducing the Merchant Risk Predict Service in the middle East/Africa Region.
-
#network_transaction_id ⇒ String
Same value as
processorInformation.transactionId. -
#response_code ⇒ String
For most processors, this is the error message sent directly from the bank.
-
#response_details ⇒ String
This field might contain information about a decline.
-
#seller_protection ⇒ SellerProtection
Mastercard is introducing the Merchant Risk Predict Service in the middle East/Africa Region.
-
#system_trace_audit_number ⇒ String
This field is returned only for American Express Direct and Visa Acceptance through VisaNet.
-
#transaction_id ⇒ String
Network transaction identifier (TID).
Class Method Summary collapse
-
.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(approval_code: SKIP, transaction_id: SKIP, network_transaction_id: SKIP, response_code: SKIP, system_trace_audit_number: SKIP, response_details: SKIP, merchant_advice: SKIP, merchant_risk_prediction: SKIP, seller_protection: SKIP, additional_properties: nil) ⇒ ProcessorInformation2
constructor
A new instance of ProcessorInformation2.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the 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(approval_code: SKIP, transaction_id: SKIP, network_transaction_id: SKIP, response_code: SKIP, system_trace_audit_number: SKIP, response_details: SKIP, merchant_advice: SKIP, merchant_risk_prediction: SKIP, seller_protection: SKIP, additional_properties: nil) ⇒ ProcessorInformation2
Returns a new instance of ProcessorInformation2.
175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 175 def initialize(approval_code: SKIP, transaction_id: SKIP, network_transaction_id: SKIP, response_code: SKIP, system_trace_audit_number: SKIP, response_details: SKIP, merchant_advice: SKIP, merchant_risk_prediction: SKIP, seller_protection: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @approval_code = approval_code unless approval_code == SKIP @transaction_id = transaction_id unless transaction_id == SKIP @network_transaction_id = network_transaction_id unless network_transaction_id == SKIP @response_code = response_code unless response_code == SKIP unless system_trace_audit_number == SKIP @system_trace_audit_number = system_trace_audit_number end @response_details = response_details unless response_details == SKIP @merchant_advice = merchant_advice unless merchant_advice == SKIP @merchant_risk_prediction = merchant_risk_prediction unless merchant_risk_prediction == SKIP @seller_protection = seller_protection unless seller_protection == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#approval_code ⇒ String
Authorization code. Returned only when the processor returns this value. The length of this value depends on your processor. Returned by authorization service.
PIN debit
Authorization code that is returned by the processor. Returned by PIN debit credit.
Elavon Encrypted Account Number Program
The returned value is OFFLINE.
TSYS Acquiring Solutions
The returned value for a successful zero amount authorization is 000000.
23 24 25 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 23 def approval_code @approval_code end |
#merchant_advice ⇒ MerchantAdvice
This field might contain information about a decline. This field is supported only for Visa Acceptance through VisaNet.
122 123 124 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 122 def merchant_advice @merchant_advice end |
#merchant_risk_prediction ⇒ String
Mastercard is introducing the Merchant Risk Predict Service in the middle East/Africa Region. A newly launched service comprised of seven independent artificial intelligence (AI)-powered scores intended to augment existing merchant risk management practices.
130 131 132 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 130 def merchant_risk_prediction @merchant_risk_prediction end |
#network_transaction_id ⇒ String
Same value as processorInformation.transactionId
65 66 67 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 65 def network_transaction_id @network_transaction_id end |
#response_code ⇒ String
For most processors, this is the error message sent directly from the bank. Returned only when the processor returns this value. Important Do not use this field to evaluate the result of the authorization.
PIN debit
Response value that is returned by the processor or bank. Important Do not use this field to evaluate the results of the transaction request. Returned by PIN debit credit, PIN debit purchase, and PIN debit reversal.
AIBMS
If this value is 08, you can accept the transaction if the customer
provides you with identification.
Atos
This value is the response code sent from Atos and it might also include
the response code from the bank.
Format: aa,bb with the two values separated by a comma and where:
aais the two-digit error message from Atos.bbis the optional two-digit error message from the bank.
Comercio Latino
This value is the status code and the error or response code received from
the processor separated by a colon.
Format: [status code]:E[error code] or [status code]:R[response code]
Example 2:R06
JCN Gateway
Processor-defined detail error code. The associated response category code
is in the processorInformation.responseCategoryCode field.
String (3)
paypalgateway
Processor generated ID for the itemized detail.
98 99 100 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 98 def response_code @response_code end |
#response_details ⇒ String
This field might contain information about a decline. This field is supported only for Visa Acceptance through VisaNet.
116 117 118 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 116 def response_details @response_details end |
#seller_protection ⇒ SellerProtection
Mastercard is introducing the Merchant Risk Predict Service in the middle East/Africa Region. A newly launched service comprised of seven independent artificial intelligence (AI)-powered scores intended to augment existing merchant risk management practices.
138 139 140 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 138 def seller_protection @seller_protection end |
#system_trace_audit_number ⇒ String
This field is returned only for American Express Direct and Visa Acceptance through VisaNet. Returned by authorization and incremental authorization services.
American Express Direct
System trace audit number (STAN). This value identifies the transaction and is useful when investigating a chargeback dispute.
Visa Acceptance through VisaNet
System trace number that must be printed on the customer’s receipt.
110 111 112 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 110 def system_trace_audit_number @system_trace_audit_number end |
#transaction_id ⇒ String
Network transaction identifier (TID). You can use this value to identify a specific transaction when you are discussing the transaction with your processor. Not all processors provide this value. Returned by the authorization service.
PIN debit
Transaction identifier generated by the processor. Returned by PIN debit credit.
GPX
Processor transaction ID.
Cielo
For Cielo, this value is the non-sequential unit (NSU) and is supported for all transactions. The value is generated by Cielo or the issuing bank.
Comercio Latino
For Comercio Latino, this value is the proof of sale or non-sequential unit (NSU) number generated by the acquirers Cielo and Rede, or the issuing bank.
Visa Acceptance through VisaNet and GPN
For details about this value for Visa Acceptance through VisaNet and GPN, see "processorInformation.networkTransactionId" in [REST API Fields](
Moneris
This value identifies the transaction on a host system. It contains the following information:
- Terminal used to process the transaction
- Shift during which the transaction took place
- Batch number
- Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003:
- Terminal ID = 66012345
- Shift number = 001
- Batch number = 069
- Transaction number = 003
61 62 63 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 61 def transaction_id @transaction_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 199 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. approval_code = hash.key?('approvalCode') ? hash['approvalCode'] : SKIP transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP network_transaction_id = hash.key?('networkTransactionId') ? hash['networkTransactionId'] : SKIP response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP system_trace_audit_number = hash.key?('systemTraceAuditNumber') ? hash['systemTraceAuditNumber'] : SKIP response_details = hash.key?('responseDetails') ? hash['responseDetails'] : SKIP merchant_advice = MerchantAdvice.from_hash(hash['merchantAdvice']) if hash['merchantAdvice'] merchant_risk_prediction = hash.key?('merchantRiskPrediction') ? hash['merchantRiskPrediction'] : SKIP seller_protection = SellerProtection.from_hash(hash['sellerProtection']) if hash['sellerProtection'] # 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. ProcessorInformation2.new(approval_code: approval_code, transaction_id: transaction_id, network_transaction_id: network_transaction_id, response_code: response_code, system_trace_audit_number: system_trace_audit_number, response_details: response_details, merchant_advice: merchant_advice, merchant_risk_prediction: merchant_risk_prediction, seller_protection: seller_protection, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
141 142 143 144 145 146 147 148 149 150 151 152 153 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 141 def self.names @_hash = {} if @_hash.nil? @_hash['approval_code'] = 'approvalCode' @_hash['transaction_id'] = 'transactionId' @_hash['network_transaction_id'] = 'networkTransactionId' @_hash['response_code'] = 'responseCode' @_hash['system_trace_audit_number'] = 'systemTraceAuditNumber' @_hash['response_details'] = 'responseDetails' @_hash['merchant_advice'] = 'merchantAdvice' @_hash['merchant_risk_prediction'] = 'merchantRiskPrediction' @_hash['seller_protection'] = 'sellerProtection' @_hash end |
.nullables ⇒ Object
An array for nullable fields
171 172 173 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 171 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 156 def self.optionals %w[ approval_code transaction_id network_transaction_id response_code system_trace_audit_number response_details merchant_advice merchant_risk_prediction seller_protection ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
250 251 252 253 254 255 256 257 258 259 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 250 def inspect class_name = self.class.name.split('::').last "<#{class_name} approval_code: #{@approval_code.inspect}, transaction_id:"\ " #{@transaction_id.inspect}, network_transaction_id: #{@network_transaction_id.inspect},"\ " response_code: #{@response_code.inspect}, system_trace_audit_number:"\ " #{@system_trace_audit_number.inspect}, response_details: #{@response_details.inspect},"\ " merchant_advice: #{@merchant_advice.inspect}, merchant_risk_prediction:"\ " #{@merchant_risk_prediction.inspect}, seller_protection: #{@seller_protection.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
239 240 241 242 243 244 245 246 247 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information2.rb', line 239 def to_s class_name = self.class.name.split('::').last "<#{class_name} approval_code: #{@approval_code}, transaction_id: #{@transaction_id},"\ " network_transaction_id: #{@network_transaction_id}, response_code: #{@response_code},"\ " system_trace_audit_number: #{@system_trace_audit_number}, response_details:"\ " #{@response_details}, merchant_advice: #{@merchant_advice}, merchant_risk_prediction:"\ " #{@merchant_risk_prediction}, seller_protection: #{@seller_protection},"\ " additional_properties: #{@additional_properties}>" end |