Class: SwaggerClient::TransactionErrorResponse
- Inherits:
-
Object
- Object
- SwaggerClient::TransactionErrorResponse
- Defined in:
- lib/swagger_client/models/transaction_error_response.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#api_trace_id ⇒ Object
Echoes back the value in the Request header.
-
#approved_amount ⇒ Object
Returns the value of attribute approved_amount.
-
#authentication_redirect ⇒ Object
Returns the value of attribute authentication_redirect.
-
#authorization_code ⇒ Object
The processor approval code for compliance.
-
#avs_response ⇒ Object
The processor address validation response for compliance.
-
#brand ⇒ Object
Card brand of the payment instrument.
-
#client_request_id ⇒ Object
Echoes back the value in the Request header.
-
#client_transaction_id ⇒ Object
The unique client Transaction ID from the Request header, if supplied.
-
#country ⇒ Object
Country of the card issuer.
-
#error ⇒ Object
Returns the value of attribute error.
-
#ipg_transaction_id ⇒ Object
The Response Transaction ID.
-
#order_id ⇒ Object
Client Order ID if supplied by client, otherwise the Order ID.
-
#processor ⇒ Object
Returns the value of attribute processor.
-
#response_type ⇒ Object
The schema type returned in the response.
-
#scheme_transaction_id ⇒ Object
The transaction id received from schemes for the initial transaction, returned for the transactions marked as "FIRST".
-
#security_code_response ⇒ Object
The processor card verification validation response for compliance.
-
#terminal_id ⇒ Object
The terminal that is processing the transaction.
-
#transaction_state ⇒ Object
The state of the transaction.
-
#transaction_status ⇒ Object
The status of the transaction.
-
#transaction_time ⇒ Object
The transaction time in seconds since Epoch.
-
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TransactionErrorResponse
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ TransactionErrorResponse
Initializes the object
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 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 237 238 239 240 241 242 243 244 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 154 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v} if attributes.has_key?(:'responseType') self.response_type = attributes[:'responseType'] end if attributes.has_key?(:'clientRequestId') self.client_request_id = attributes[:'clientRequestId'] end if attributes.has_key?(:'apiTraceId') self.api_trace_id = attributes[:'apiTraceId'] end if attributes.has_key?(:'ipgTransactionId') self.ipg_transaction_id = attributes[:'ipgTransactionId'] end if attributes.has_key?(:'orderId') self.order_id = attributes[:'orderId'] end if attributes.has_key?(:'transactionType') self.transaction_type = attributes[:'transactionType'] end if attributes.has_key?(:'authorizationCode') self. = attributes[:'authorizationCode'] end if attributes.has_key?(:'avsResponse') self.avs_response = attributes[:'avsResponse'] end if attributes.has_key?(:'securityCodeResponse') self.security_code_response = attributes[:'securityCodeResponse'] end if attributes.has_key?(:'brand') self.brand = attributes[:'brand'] end if attributes.has_key?(:'country') self.country = attributes[:'country'] end if attributes.has_key?(:'terminalId') self.terminal_id = attributes[:'terminalId'] end if attributes.has_key?(:'clientTransactionId') self.client_transaction_id = attributes[:'clientTransactionId'] end if attributes.has_key?(:'transactionTime') self.transaction_time = attributes[:'transactionTime'] end if attributes.has_key?(:'approvedAmount') self.approved_amount = attributes[:'approvedAmount'] end if attributes.has_key?(:'transactionStatus') self.transaction_status = attributes[:'transactionStatus'] end if attributes.has_key?(:'transactionState') self.transaction_state = attributes[:'transactionState'] end if attributes.has_key?(:'authenticationRedirect') self.authentication_redirect = attributes[:'authenticationRedirect'] end if attributes.has_key?(:'schemeTransactionId') self.scheme_transaction_id = attributes[:'schemeTransactionId'] end if attributes.has_key?(:'processor') self.processor = attributes[:'processor'] end if attributes.has_key?(:'error') self.error = attributes[:'error'] end end |
Instance Attribute Details
#api_trace_id ⇒ Object
Echoes back the value in the Request header
25 26 27 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 25 def api_trace_id @api_trace_id end |
#approved_amount ⇒ Object
Returns the value of attribute approved_amount.
59 60 61 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 59 def approved_amount @approved_amount end |
#authentication_redirect ⇒ Object
Returns the value of attribute authentication_redirect.
67 68 69 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 67 def authentication_redirect @authentication_redirect end |
#authorization_code ⇒ Object
The processor approval code for compliance.
36 37 38 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 36 def @authorization_code end |
#avs_response ⇒ Object
The processor address validation response for compliance.
39 40 41 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 39 def avs_response @avs_response end |
#brand ⇒ Object
Card brand of the payment instrument
45 46 47 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 45 def brand @brand end |
#client_request_id ⇒ Object
Echoes back the value in the Request header
22 23 24 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 22 def client_request_id @client_request_id end |
#client_transaction_id ⇒ Object
The unique client Transaction ID from the Request header, if supplied
54 55 56 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 54 def client_transaction_id @client_transaction_id end |
#country ⇒ Object
Country of the card issuer
48 49 50 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 48 def country @country end |
#error ⇒ Object
Returns the value of attribute error.
74 75 76 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 74 def error @error end |
#ipg_transaction_id ⇒ Object
The Response Transaction ID
28 29 30 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 28 def ipg_transaction_id @ipg_transaction_id end |
#order_id ⇒ Object
Client Order ID if supplied by client, otherwise the Order ID
31 32 33 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 31 def order_id @order_id end |
#processor ⇒ Object
Returns the value of attribute processor.
72 73 74 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 72 def processor @processor end |
#response_type ⇒ Object
The schema type returned in the response.
19 20 21 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 19 def response_type @response_type end |
#scheme_transaction_id ⇒ Object
The transaction id received from schemes for the initial transaction, returned for the transactions marked as "FIRST"
70 71 72 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 70 def scheme_transaction_id @scheme_transaction_id end |
#security_code_response ⇒ Object
The processor card verification validation response for compliance.
42 43 44 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 42 def security_code_response @security_code_response end |
#terminal_id ⇒ Object
The terminal that is processing the transaction
51 52 53 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 51 def terminal_id @terminal_id end |
#transaction_state ⇒ Object
The state of the transaction.
65 66 67 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 65 def transaction_state @transaction_state end |
#transaction_status ⇒ Object
The status of the transaction. APPROVED/WAITING are returned by the endpoints. VALIDATION_FAILED/DECLINED are errors. See ErrorResponse object for details.
62 63 64 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 62 def transaction_status @transaction_status end |
#transaction_time ⇒ Object
The transaction time in seconds since Epoch
57 58 59 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 57 def transaction_time @transaction_time end |
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
33 34 35 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 33 def transaction_type @transaction_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 99 def self.attribute_map { :'response_type' => :'responseType', :'client_request_id' => :'clientRequestId', :'api_trace_id' => :'apiTraceId', :'ipg_transaction_id' => :'ipgTransactionId', :'order_id' => :'orderId', :'transaction_type' => :'transactionType', :'authorization_code' => :'authorizationCode', :'avs_response' => :'avsResponse', :'security_code_response' => :'securityCodeResponse', :'brand' => :'brand', :'country' => :'country', :'terminal_id' => :'terminalId', :'client_transaction_id' => :'clientTransactionId', :'transaction_time' => :'transactionTime', :'approved_amount' => :'approvedAmount', :'transaction_status' => :'transactionStatus', :'transaction_state' => :'transactionState', :'authentication_redirect' => :'authenticationRedirect', :'scheme_transaction_id' => :'schemeTransactionId', :'processor' => :'processor', :'error' => :'error' } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 126 def self.swagger_types { :'response_type' => :'ResponseType', :'client_request_id' => :'String', :'api_trace_id' => :'String', :'ipg_transaction_id' => :'String', :'order_id' => :'String', :'transaction_type' => :'TransactionType', :'authorization_code' => :'String', :'avs_response' => :'String', :'security_code_response' => :'String', :'brand' => :'String', :'country' => :'String', :'terminal_id' => :'String', :'client_transaction_id' => :'String', :'transaction_time' => :'Integer', :'approved_amount' => :'Amount', :'transaction_status' => :'String', :'transaction_state' => :'String', :'authentication_redirect' => :'TransactionResponseAuthenticationRedirect', :'scheme_transaction_id' => :'String', :'processor' => :'ProcessorData', :'error' => :'Error' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 301 def ==(o) return true if self.equal?(o) self.class == o.class && response_type == o.response_type && client_request_id == o.client_request_id && api_trace_id == o.api_trace_id && ipg_transaction_id == o.ipg_transaction_id && order_id == o.order_id && transaction_type == o.transaction_type && == o. && avs_response == o.avs_response && security_code_response == o.security_code_response && brand == o.brand && country == o.country && terminal_id == o.terminal_id && client_transaction_id == o.client_transaction_id && transaction_time == o.transaction_time && approved_amount == o.approved_amount && transaction_status == o.transaction_status && transaction_state == o.transaction_state && authentication_redirect == o.authentication_redirect && scheme_transaction_id == o.scheme_transaction_id && processor == o.processor && error == o.error end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 363 def _deserialize(type, value) case type.to_sym when :DateTime DateTime.parse(value) when :Date Date.parse(value) when :String value.to_s when :Integer value.to_i when :Float value.to_f when :BOOLEAN if value.to_s =~ /\A(true|t|yes|y|1)\z/i true else false end when :Object # generic object (usually a Hash), return directly value when /\AArray<(?<inner_type>.+)>\z/ inner_type = Regexp.last_match[:inner_type] value.map { |v| _deserialize(inner_type, v) } when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/ k_type = Regexp.last_match[:k_type] v_type = Regexp.last_match[:v_type] {}.tap do |hash| value.each do |k, v| hash[_deserialize(k_type, k)] = _deserialize(v_type, v) end end else # model temp_model = SwaggerClient.const_get(type).new temp_model.build_from_hash(value) end end |
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value
429 430 431 432 433 434 435 436 437 438 439 440 441 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 429 def _to_hash(value) if value.is_a?(Array) value.compact.map{ |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 342 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]])) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(o) ⇒ Boolean
329 330 331 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 329 def eql?(o) self == o end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
335 336 337 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 335 def hash [response_type, client_request_id, api_trace_id, ipg_transaction_id, order_id, transaction_type, , avs_response, security_code_response, brand, country, terminal_id, client_transaction_id, transaction_time, approved_amount, transaction_status, transaction_state, authentication_redirect, scheme_transaction_id, processor, error].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
248 249 250 251 252 253 254 255 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 248 def list_invalid_properties invalid_properties = Array.new if !@scheme_transaction_id.nil? && @scheme_transaction_id.to_s.length > 40 invalid_properties.push("invalid value for 'scheme_transaction_id', the character length must be smaller than or equal to 40.") end return invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
409 410 411 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 409 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
415 416 417 418 419 420 421 422 423 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 415 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) next if value.nil? hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
403 404 405 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 403 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
259 260 261 262 263 264 265 266 |
# File 'lib/swagger_client/models/transaction_error_response.rb', line 259 def valid? transaction_status_validator = EnumAttributeValidator.new('String', ["APPROVED", "WAITING", "VALIDATION_FAILED", "DECLINED"]) return false unless transaction_status_validator.valid?(@transaction_status) transaction_state_validator = EnumAttributeValidator.new('String', ["AUTHORIZED", "CAPTURED", "COMPLETED_GET", "DECLINED", "CHECKED", "INITIALIZED", "PENDING_AUTHORIZATION", "PENDING_AUTOVOID", "PENDING_CAPTURE", "PENDING_CREDIT", "PENDING_GIROPAY_INIT", "PENDING_IDEAL_INIT", "PENDING_INIT", "PENDING_READY", "PENDING_RETURN", "PENDING_SETTLEMENT", "PENDING_SOFORT_INIT", "PENDING_VOID", "READY", "SETTLED", "VOIDED", "WAITING", "WAITING_AUTHENTICATION", "WAITING_3D_SECURE", "WAITING_CLICK_AND_BUY", "WAITING_GIROPAY", "WAITING_IDEAL", "WAITING_KLARNA", "WAITING_PAYPAL", "WAITING_PAYPAL_EVENT", "WAITING_PPRO_LONG_WAITING", "WAITING_SOFORT", "WAITING_T_PAY", "WAITING_ALIPAY_PAYSECURE"]) return false unless transaction_state_validator.valid?(@transaction_state) return false if !@scheme_transaction_id.nil? && @scheme_transaction_id.to_s.length > 40 return true end |