Class: OpenapiClient::TransactionResponse
- Inherits:
-
Object
- Object
- OpenapiClient::TransactionResponse
- Defined in:
- lib/openapi_client/models/transaction_response.rb
Overview
Common object for primary and secondary payment request responses.
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#account_updater_response ⇒ Object
Returns the value of attribute account_updater_response.
-
#ach_response ⇒ Object
Returns the value of attribute ach_response.
-
#additional_details ⇒ Object
Returns the value of attribute additional_details.
-
#api_trace_id ⇒ Object
Request identifier in API, can be used to request logs from the support team.
-
#approved_amount ⇒ Object
Returns the value of attribute approved_amount.
-
#authentication_response ⇒ Object
Returns the value of attribute authentication_response.
-
#client_request_id ⇒ Object
Echoes back the value in the request header for tracking.
-
#country ⇒ Object
Country of the card issuer.
-
#currency_conversion_response ⇒ Object
Returns the value of attribute currency_conversion_response.
-
#ipg_transaction_id ⇒ Object
The response transaction ID.
-
#merchant_id ⇒ Object
The unique (on Acquirer level) mechant ID.
-
#merchant_transaction_id ⇒ Object
The unique merchant transaction ID from the request header, if supplied.
-
#order_id ⇒ Object
Note - Client Order ID if supplied by client.
-
#payment_account_reference_number ⇒ Object
Payment Account Reference Number from response, if supplied.
-
#payment_method_details ⇒ Object
Returns the value of attribute payment_method_details.
-
#payment_token ⇒ Object
Returns the value of attribute payment_token.
-
#processor ⇒ Object
Returns the value of attribute processor.
-
#redirect_url ⇒ Object
The endpoint redirection URL.
-
#response_type ⇒ Object
Returns the value of attribute response_type.
-
#scheme_transaction_id ⇒ Object
The transaction ID received from schemes for the initial transaction of card on file flows.
-
#secure3d_response ⇒ Object
Returns the value of attribute secure3d_response.
-
#standin_response_details ⇒ Object
Returns the value of attribute standin_response_details.
-
#steps ⇒ Object
Steps to be performed by the payer.
-
#terminal_id ⇒ Object
The terminal that is processing the transaction.
-
#transaction_origin ⇒ Object
Returns the value of attribute transaction_origin.
-
#transaction_state ⇒ Object
Shows the state of the current transaction.
-
#transaction_status ⇒ Object
Represents the status of a transaction immediately following the original processing request.
-
#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.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3).
-
.openapi_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, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ TransactionResponse
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(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) ⇒ 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 = {}) ⇒ TransactionResponse
Initializes the object
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 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 |
# File 'lib/openapi_client/models/transaction_response.rb', line 192 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `OpenapiClient::TransactionResponse` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `OpenapiClient::TransactionResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'client_request_id') self.client_request_id = attributes[:'client_request_id'] end if attributes.key?(:'api_trace_id') self.api_trace_id = attributes[:'api_trace_id'] end if attributes.key?(:'response_type') self.response_type = attributes[:'response_type'] end if attributes.key?(:'ipg_transaction_id') self.ipg_transaction_id = attributes[:'ipg_transaction_id'] end if attributes.key?(:'order_id') self.order_id = attributes[:'order_id'] end if attributes.key?(:'transaction_type') self.transaction_type = attributes[:'transaction_type'] end if attributes.key?(:'payment_token') self.payment_token = attributes[:'payment_token'] end if attributes.key?(:'transaction_origin') self.transaction_origin = attributes[:'transaction_origin'] end if attributes.key?(:'payment_method_details') self.payment_method_details = attributes[:'payment_method_details'] end if attributes.key?(:'country') self.country = attributes[:'country'] end if attributes.key?(:'terminal_id') self.terminal_id = attributes[:'terminal_id'] end if attributes.key?(:'merchant_id') self.merchant_id = attributes[:'merchant_id'] end if attributes.key?(:'merchant_transaction_id') self.merchant_transaction_id = attributes[:'merchant_transaction_id'] end if attributes.key?(:'transaction_time') self.transaction_time = attributes[:'transaction_time'] end if attributes.key?(:'approved_amount') self.approved_amount = attributes[:'approved_amount'] end if attributes.key?(:'transaction_status') self.transaction_status = attributes[:'transaction_status'] end if attributes.key?(:'transaction_state') self.transaction_state = attributes[:'transaction_state'] end if attributes.key?(:'payment_account_reference_number') self.payment_account_reference_number = attributes[:'payment_account_reference_number'] end if attributes.key?(:'secure3d_response') self.secure3d_response = attributes[:'secure3d_response'] end if attributes.key?(:'standin_response_details') self.standin_response_details = attributes[:'standin_response_details'] end if attributes.key?(:'redirect_url') self.redirect_url = attributes[:'redirect_url'] end if attributes.key?(:'authentication_response') self.authentication_response = attributes[:'authentication_response'] end if attributes.key?(:'scheme_transaction_id') self.scheme_transaction_id = attributes[:'scheme_transaction_id'] end if attributes.key?(:'processor') self.processor = attributes[:'processor'] end if attributes.key?(:'additional_details') self.additional_details = attributes[:'additional_details'] end if attributes.key?(:'account_updater_response') self.account_updater_response = attributes[:'account_updater_response'] end if attributes.key?(:'ach_response') self.ach_response = attributes[:'ach_response'] end if attributes.key?(:'currency_conversion_response') self.currency_conversion_response = attributes[:'currency_conversion_response'] end if attributes.key?(:'steps') if (value = attributes[:'steps']).is_a?(Array) self.steps = value end end end |
Instance Attribute Details
#account_updater_response ⇒ Object
Returns the value of attribute account_updater_response.
82 83 84 |
# File 'lib/openapi_client/models/transaction_response.rb', line 82 def account_updater_response @account_updater_response end |
#ach_response ⇒ Object
Returns the value of attribute ach_response.
84 85 86 |
# File 'lib/openapi_client/models/transaction_response.rb', line 84 def ach_response @ach_response end |
#additional_details ⇒ Object
Returns the value of attribute additional_details.
80 81 82 |
# File 'lib/openapi_client/models/transaction_response.rb', line 80 def additional_details @additional_details end |
#api_trace_id ⇒ Object
Request identifier in API, can be used to request logs from the support team.
22 23 24 |
# File 'lib/openapi_client/models/transaction_response.rb', line 22 def api_trace_id @api_trace_id end |
#approved_amount ⇒ Object
Returns the value of attribute approved_amount.
55 56 57 |
# File 'lib/openapi_client/models/transaction_response.rb', line 55 def approved_amount @approved_amount end |
#authentication_response ⇒ Object
Returns the value of attribute authentication_response.
73 74 75 |
# File 'lib/openapi_client/models/transaction_response.rb', line 73 def authentication_response @authentication_response end |
#client_request_id ⇒ Object
Echoes back the value in the request header for tracking.
19 20 21 |
# File 'lib/openapi_client/models/transaction_response.rb', line 19 def client_request_id @client_request_id end |
#country ⇒ Object
Country of the card issuer.
41 42 43 |
# File 'lib/openapi_client/models/transaction_response.rb', line 41 def country @country end |
#currency_conversion_response ⇒ Object
Returns the value of attribute currency_conversion_response.
86 87 88 |
# File 'lib/openapi_client/models/transaction_response.rb', line 86 def currency_conversion_response @currency_conversion_response end |
#ipg_transaction_id ⇒ Object
The response transaction ID.
27 28 29 |
# File 'lib/openapi_client/models/transaction_response.rb', line 27 def ipg_transaction_id @ipg_transaction_id end |
#merchant_id ⇒ Object
The unique (on Acquirer level) mechant ID. Usually this value has been chosen from the merchant itself and will be used in communication with the endpoint.
47 48 49 |
# File 'lib/openapi_client/models/transaction_response.rb', line 47 def merchant_id @merchant_id end |
#merchant_transaction_id ⇒ Object
The unique merchant transaction ID from the request header, if supplied.
50 51 52 |
# File 'lib/openapi_client/models/transaction_response.rb', line 50 def merchant_transaction_id @merchant_transaction_id end |
#order_id ⇒ Object
Note - Client Order ID if supplied by client. If not supplied by client, IPG will generate. The first 12 alphanumeric digits are passed down to Fiserv Enterprise reporting tool, Clientline and Data File Manager (DFM).
30 31 32 |
# File 'lib/openapi_client/models/transaction_response.rb', line 30 def order_id @order_id end |
#payment_account_reference_number ⇒ Object
Payment Account Reference Number from response, if supplied.
64 65 66 |
# File 'lib/openapi_client/models/transaction_response.rb', line 64 def payment_account_reference_number @payment_account_reference_number end |
#payment_method_details ⇒ Object
Returns the value of attribute payment_method_details.
38 39 40 |
# File 'lib/openapi_client/models/transaction_response.rb', line 38 def payment_method_details @payment_method_details end |
#payment_token ⇒ Object
Returns the value of attribute payment_token.
34 35 36 |
# File 'lib/openapi_client/models/transaction_response.rb', line 34 def payment_token @payment_token end |
#processor ⇒ Object
Returns the value of attribute processor.
78 79 80 |
# File 'lib/openapi_client/models/transaction_response.rb', line 78 def processor @processor end |
#redirect_url ⇒ Object
The endpoint redirection URL.
71 72 73 |
# File 'lib/openapi_client/models/transaction_response.rb', line 71 def redirect_url @redirect_url end |
#response_type ⇒ Object
Returns the value of attribute response_type.
24 25 26 |
# File 'lib/openapi_client/models/transaction_response.rb', line 24 def response_type @response_type end |
#scheme_transaction_id ⇒ Object
The transaction ID received from schemes for the initial transaction of card on file flows.
76 77 78 |
# File 'lib/openapi_client/models/transaction_response.rb', line 76 def scheme_transaction_id @scheme_transaction_id end |
#secure3d_response ⇒ Object
Returns the value of attribute secure3d_response.
66 67 68 |
# File 'lib/openapi_client/models/transaction_response.rb', line 66 def secure3d_response @secure3d_response end |
#standin_response_details ⇒ Object
Returns the value of attribute standin_response_details.
68 69 70 |
# File 'lib/openapi_client/models/transaction_response.rb', line 68 def standin_response_details @standin_response_details end |
#steps ⇒ Object
Steps to be performed by the payer.
89 90 91 |
# File 'lib/openapi_client/models/transaction_response.rb', line 89 def steps @steps end |
#terminal_id ⇒ Object
The terminal that is processing the transaction.
44 45 46 |
# File 'lib/openapi_client/models/transaction_response.rb', line 44 def terminal_id @terminal_id end |
#transaction_origin ⇒ Object
Returns the value of attribute transaction_origin.
36 37 38 |
# File 'lib/openapi_client/models/transaction_response.rb', line 36 def transaction_origin @transaction_origin end |
#transaction_state ⇒ Object
Shows the state of the current transaction.
61 62 63 |
# File 'lib/openapi_client/models/transaction_response.rb', line 61 def transaction_state @transaction_state end |
#transaction_status ⇒ Object
Represents the status of a transaction immediately following the original processing request. This value is not stored for the transaction and is only available in the response when the transaction is processed. TransactionStatus is not returned on either the transaction inquiry or on the order inquiry.
58 59 60 |
# File 'lib/openapi_client/models/transaction_response.rb', line 58 def transaction_status @transaction_status end |
#transaction_time ⇒ Object
The transaction time in seconds since epoch.
53 54 55 |
# File 'lib/openapi_client/models/transaction_response.rb', line 53 def transaction_time @transaction_time end |
#transaction_type ⇒ Object
Returns the value of attribute transaction_type.
32 33 34 |
# File 'lib/openapi_client/models/transaction_response.rb', line 32 def transaction_type @transaction_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
114 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 141 142 143 144 145 146 |
# File 'lib/openapi_client/models/transaction_response.rb', line 114 def self.attribute_map { :'client_request_id' => :'clientRequestId', :'api_trace_id' => :'apiTraceId', :'response_type' => :'responseType', :'ipg_transaction_id' => :'ipgTransactionId', :'order_id' => :'orderId', :'transaction_type' => :'transactionType', :'payment_token' => :'paymentToken', :'transaction_origin' => :'transactionOrigin', :'payment_method_details' => :'paymentMethodDetails', :'country' => :'country', :'terminal_id' => :'terminalId', :'merchant_id' => :'merchantId', :'merchant_transaction_id' => :'merchantTransactionId', :'transaction_time' => :'transactionTime', :'approved_amount' => :'approvedAmount', :'transaction_status' => :'transactionStatus', :'transaction_state' => :'transactionState', :'payment_account_reference_number' => :'paymentAccountReferenceNumber', :'secure3d_response' => :'secure3dResponse', :'standin_response_details' => :'standinResponseDetails', :'redirect_url' => :'redirectURL', :'authentication_response' => :'authenticationResponse', :'scheme_transaction_id' => :'schemeTransactionId', :'processor' => :'processor', :'additional_details' => :'additionalDetails', :'account_updater_response' => :'accountUpdaterResponse', :'ach_response' => :'achResponse', :'currency_conversion_response' => :'currencyConversionResponse', :'steps' => :'steps' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
472 473 474 |
# File 'lib/openapi_client/models/transaction_response.rb', line 472 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_all_of ⇒ Object
List of class defined in allOf (OpenAPI v3)
184 185 186 187 188 |
# File 'lib/openapi_client/models/transaction_response.rb', line 184 def self.openapi_all_of [ :'BasicResponse' ] end |
.openapi_types ⇒ Object
Attribute type mapping.
149 150 151 152 153 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 |
# File 'lib/openapi_client/models/transaction_response.rb', line 149 def self.openapi_types { :'client_request_id' => :'String', :'api_trace_id' => :'String', :'response_type' => :'ResponseType', :'ipg_transaction_id' => :'String', :'order_id' => :'String', :'transaction_type' => :'TransactionType', :'payment_token' => :'PaymentTokenDetails', :'transaction_origin' => :'TransactionOrigin', :'payment_method_details' => :'PaymentMethodDetails', :'country' => :'String', :'terminal_id' => :'String', :'merchant_id' => :'String', :'merchant_transaction_id' => :'String', :'transaction_time' => :'Integer', :'approved_amount' => :'Amount', :'transaction_status' => :'String', :'transaction_state' => :'String', :'payment_account_reference_number' => :'String', :'secure3d_response' => :'Secure3dResponse', :'standin_response_details' => :'StandinResponseDetails', :'redirect_url' => :'String', :'authentication_response' => :'Secure3DAuthenticationResponse', :'scheme_transaction_id' => :'String', :'processor' => :'ProcessorData', :'additional_details' => :'AdditionalTransactionDetails', :'account_updater_response' => :'AccountUpdaterResponse', :'ach_response' => :'AchResponse', :'currency_conversion_response' => :'CurrencyConversionResponse', :'steps' => :'Array<PaymentStepRequest>' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 |
# File 'lib/openapi_client/models/transaction_response.rb', line 423 def ==(o) return true if self.equal?(o) self.class == o.class && client_request_id == o.client_request_id && api_trace_id == o.api_trace_id && response_type == o.response_type && ipg_transaction_id == o.ipg_transaction_id && order_id == o.order_id && transaction_type == o.transaction_type && payment_token == o.payment_token && transaction_origin == o.transaction_origin && payment_method_details == o.payment_method_details && country == o.country && terminal_id == o.terminal_id && merchant_id == o.merchant_id && merchant_transaction_id == o.merchant_transaction_id && transaction_time == o.transaction_time && approved_amount == o.approved_amount && transaction_status == o.transaction_status && transaction_state == o.transaction_state && payment_account_reference_number == o.payment_account_reference_number && secure3d_response == o.secure3d_response && standin_response_details == o.standin_response_details && redirect_url == o.redirect_url && authentication_response == o.authentication_response && scheme_transaction_id == o.scheme_transaction_id && processor == o.processor && additional_details == o.additional_details && account_updater_response == o.account_updater_response && ach_response == o.ach_response && currency_conversion_response == o.currency_conversion_response && steps == o.steps end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 |
# File 'lib/openapi_client/models/transaction_response.rb', line 500 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 klass = OpenapiClient.const_get(type) if klass.respond_to?(:openapi_discriminator_name) klass = OpenapiClient.const_get(value[klass.attribute_map[klass.openapi_discriminator_name]]) end klass.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
574 575 576 577 578 579 580 581 582 583 584 585 586 |
# File 'lib/openapi_client/models/transaction_response.rb', line 574 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, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) ⇒ Object
Builds the object from hash
479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
# File 'lib/openapi_client/models/transaction_response.rb', line 479 def build_from_hash(attributes, attribute_map = self.class.attribute_map, openapi_types = self.class.openapi_types) return nil unless attributes.is_a?(Hash) openapi_types.each_pair do |key, type| if type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) self.send("#{key}=", attributes[attribute_map[key]].map { |v| _deserialize($1, v) }) end elsif !attributes[attribute_map[key]].nil? self.send("#{key}=", _deserialize(type, attributes[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
459 460 461 |
# File 'lib/openapi_client/models/transaction_response.rb', line 459 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
465 466 467 |
# File 'lib/openapi_client/models/transaction_response.rb', line 465 def hash [client_request_id, api_trace_id, response_type, ipg_transaction_id, order_id, transaction_type, payment_token, transaction_origin, payment_method_details, country, terminal_id, merchant_id, merchant_transaction_id, transaction_time, approved_amount, transaction_status, transaction_state, payment_account_reference_number, secure3d_response, standin_response_details, redirect_url, authentication_response, scheme_transaction_id, processor, additional_details, account_updater_response, ach_response, currency_conversion_response, steps].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 |
# File 'lib/openapi_client/models/transaction_response.rb', line 326 def list_invalid_properties invalid_properties = Array.new if !@merchant_id.nil? && @merchant_id.to_s.length > 30 invalid_properties.push('invalid value for "merchant_id", the character length must be smaller than or equal to 30.') end if !@merchant_transaction_id.nil? && @merchant_transaction_id.to_s.length > 40 invalid_properties.push('invalid value for "merchant_transaction_id", the character length must be smaller than or equal to 40.') end if !@payment_account_reference_number.nil? && @payment_account_reference_number.to_s.length > 30 invalid_properties.push('invalid value for "payment_account_reference_number", the character length must be smaller than or equal to 30.') end 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 invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
550 551 552 |
# File 'lib/openapi_client/models/transaction_response.rb', line 550 def to_body to_hash end |
#to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) ⇒ Hash
Returns the object in the form of hash
556 557 558 559 560 561 562 563 564 565 566 567 568 |
# File 'lib/openapi_client/models/transaction_response.rb', line 556 def to_hash(attribute_map = self.class.attribute_map, openapi_nullable = Set.new([])) hash = {} attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
544 545 546 |
# File 'lib/openapi_client/models/transaction_response.rb', line 544 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/openapi_client/models/transaction_response.rb', line 349 def valid? return false if !@merchant_id.nil? && @merchant_id.to_s.length > 30 return false if !@merchant_transaction_id.nil? && @merchant_transaction_id.to_s.length > 40 transaction_status_validator = EnumAttributeValidator.new('String', ["APPROVED", "WAITING", "PARTIAL", "VALIDATION_FAILED", "PROCESSING_FAILED", "DECLINED"]) return false unless transaction_status_validator.valid?(@transaction_status) transaction_state_validator = EnumAttributeValidator.new('String', ["AUTHORIZED", "CAPTURED", "DECLINED", "CHECKED", "COMPLETED_GET", "INITIALIZED", "PENDING", "READY", "TEMPLATE", "SETTLED", "VOIDED", "WAITING"]) return false unless transaction_state_validator.valid?(@transaction_state) return false if !@payment_account_reference_number.nil? && @payment_account_reference_number.to_s.length > 30 return false if !@scheme_transaction_id.nil? && @scheme_transaction_id.to_s.length > 40 true end |