Class: VisaAcceptanceMergedSpec::MultiProcessorRouting
- Inherits:
-
BaseModel
- Object
- CoreLibrary::BaseModel
- BaseModel
- VisaAcceptanceMergedSpec::MultiProcessorRouting
- Defined in:
- lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb
Overview
MultiProcessorRouting Model.
Instance Attribute Summary collapse
-
#name ⇒ String
Name of the Processor.
-
#reason_code ⇒ String
Indicates the reason why a request succeeded or failed and possible action to take if a request fails.
-
#response_code ⇒ String
For most processors, this is the error message sent directly from the bank.
-
#sequence ⇒ String
The order in which the transaction was routed to 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(name: SKIP, response_code: SKIP, reason_code: SKIP, sequence: SKIP, additional_properties: nil) ⇒ MultiProcessorRouting
constructor
A new instance of MultiProcessorRouting.
-
#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(name: SKIP, response_code: SKIP, reason_code: SKIP, sequence: SKIP, additional_properties: nil) ⇒ MultiProcessorRouting
Returns a new instance of MultiProcessorRouting.
85 86 87 88 89 90 91 92 93 94 95 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 85 def initialize(name: SKIP, response_code: SKIP, reason_code: SKIP, sequence: SKIP, additional_properties: nil) # Add additional model properties to the instance additional_properties = {} if additional_properties.nil? @name = name unless name == SKIP @response_code = response_code unless response_code == SKIP @reason_code = reason_code unless reason_code == SKIP @sequence = sequence unless sequence == SKIP @additional_properties = additional_properties end |
Instance Attribute Details
#name ⇒ String
Name of the Processor.
14 15 16 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 14 def name @name end |
#reason_code ⇒ String
Indicates the reason why a request succeeded or failed and possible action to take if a request fails. For details, see the appendix of reason codes in the documentation for the relevant payment method.
54 55 56 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 54 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.
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.
47 48 49 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 47 def response_code @response_code end |
#sequence ⇒ String
The order in which the transaction was routed to the processor
58 59 60 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 58 def sequence @sequence end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 98 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. name = hash.key?('name') ? hash['name'] : SKIP response_code = hash.key?('responseCode') ? hash['responseCode'] : SKIP reason_code = hash.key?('reasonCode') ? hash['reasonCode'] : SKIP sequence = hash.key?('sequence') ? hash['sequence'] : 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. MultiProcessorRouting.new(name: name, response_code: response_code, reason_code: reason_code, sequence: sequence, additional_properties: additional_properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
61 62 63 64 65 66 67 68 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 61 def self.names @_hash = {} if @_hash.nil? @_hash['name'] = 'name' @_hash['response_code'] = 'responseCode' @_hash['reason_code'] = 'reasonCode' @_hash['sequence'] = 'sequence' @_hash end |
.nullables ⇒ Object
An array for nullable fields
81 82 83 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 81 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
71 72 73 74 75 76 77 78 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 71 def self.optionals %w[ name response_code reason_code sequence ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
131 132 133 134 135 136 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 131 def inspect class_name = self.class.name.split('::').last "<#{class_name} name: #{@name.inspect}, response_code: #{@response_code.inspect},"\ " reason_code: #{@reason_code.inspect}, sequence: #{@sequence.inspect},"\ " additional_properties: #{@additional_properties}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
123 124 125 126 127 128 |
# File 'lib/visa_acceptance_merged_spec/models/multi_processor_routing.rb', line 123 def to_s class_name = self.class.name.split('::').last "<#{class_name} name: #{@name}, response_code: #{@response_code}, reason_code:"\ " #{@reason_code}, sequence: #{@sequence}, additional_properties:"\ " #{@additional_properties}>" end |