Class: VisaAcceptanceMergedSpec::ProcessorInformation16
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::ProcessorInformation16
- Defined in:
- lib/visa_acceptance_merged_spec/models/processor_information16.rb
Overview
ProcessorInformation16 Model.
Instance Attribute Summary collapse
-
#approval_code ⇒ String
Authorization code.
-
#reason_code ⇒ String
Numeric value corresponding to the result of the request.
-
#response_code ⇒ String
For most processors, this is the error message sent directly from the bank.
-
#response_details ⇒ String
Response code indicating that creating the agreement failed.
-
#transaction_id ⇒ String
Transaction ID assigned by the processor.
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, response_code: SKIP, transaction_id: SKIP, response_details: SKIP, reason_code: SKIP, additional_properties: nil) ⇒ ProcessorInformation16
constructor
A new instance of ProcessorInformation16.
-
#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, response_code: SKIP, transaction_id: SKIP, response_details: SKIP, reason_code: SKIP, additional_properties: nil) ⇒ ProcessorInformation16
Returns a new instance of ProcessorInformation16.
100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 100 def initialize(approval_code: SKIP, response_code: SKIP, transaction_id: SKIP, response_details: SKIP, reason_code: 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 @response_code = response_code unless response_code == SKIP @transaction_id = transaction_id unless transaction_id == SKIP @response_details = response_details unless response_details == SKIP @reason_code = reason_code unless reason_code == 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_information16.rb', line 23 def approval_code @approval_code end |
#reason_code ⇒ String
Numeric value corresponding to the result of the request.
71 72 73 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 71 def reason_code @reason_code 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.
SEPA/BACS
Response code from the processor. Possible values: 00000–99999. See Appendix C, "Reason Codes and Processor Response Codes," on page 42.
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)
59 60 61 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 59 def response_code @response_code end |
#response_details ⇒ String
Response code indicating that creating the agreement failed
67 68 69 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 67 def response_details @response_details end |
#transaction_id ⇒ String
Transaction ID assigned by the processor.
63 64 65 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 63 def transaction_id @transaction_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
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 140 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 115 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. approval_code = hash.key?('approvalCode') ? hash['approvalCode'] : SKIP response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP transaction_id = hash.key?('transactionId') ? hash['transactionId'] : SKIP response_details = hash.key?('responseDetails') ? hash['responseDetails'] : SKIP reason_code = hash.key?('reasonCode') ? hash['reasonCode'] : 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. ProcessorInformation16.new(approval_code: approval_code, response_code: response_code, transaction_id: transaction_id, response_details: response_details, reason_code: reason_code, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
74 75 76 77 78 79 80 81 82 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 74 def self.names @_hash = {} if @_hash.nil? @_hash['approval_code'] = 'approvalCode' @_hash['response_code'] = 'responseCode' @_hash['transaction_id'] = 'transactionId' @_hash['response_details'] = 'responseDetails' @_hash['reason_code'] = 'reasonCode' @_hash end |
.nullables ⇒ Object
An array for nullable fields
96 97 98 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 96 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
85 86 87 88 89 90 91 92 93 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 85 def self.optionals %w[ approval_code response_code transaction_id response_details reason_code ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
151 152 153 154 155 156 157 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 151 def inspect class_name = self.class.name.split('::').last "<#{class_name} approval_code: #{@approval_code.inspect}, response_code:"\ " #{@response_code.inspect}, transaction_id: #{@transaction_id.inspect}, response_details:"\ " #{@response_details.inspect}, reason_code: #{@reason_code.inspect}, additional_properties:"\ " #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
143 144 145 146 147 148 |
# File 'lib/visa_acceptance_merged_spec/models/processor_information16.rb', line 143 def to_s class_name = self.class.name.split('::').last "<#{class_name} approval_code: #{@approval_code}, response_code: #{@response_code},"\ " transaction_id: #{@transaction_id}, response_details: #{@response_details}, reason_code:"\ " #{@reason_code}, additional_properties: #{@additional_properties}>" end |