cybersource_rest_client 0.0.73 → 0.0.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/batches_api.rb +9 -9
  3. data/lib/cybersource_rest_client/api/device_de_association_api.rb +168 -0
  4. data/lib/cybersource_rest_client/api/device_search_api.rb +78 -5
  5. data/lib/cybersource_rest_client/api/subscriptions_api.rb +5 -2
  6. data/lib/cybersource_rest_client/models/{inline_response_200_7__links.rb → de_association_request_body.rb} +190 -200
  7. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +240 -240
  8. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +303 -303
  9. data/lib/cybersource_rest_client/models/get_subscription_response.rb +267 -257
  10. data/lib/cybersource_rest_client/models/get_subscription_response_reactivation_information.rb +213 -0
  11. data/lib/cybersource_rest_client/models/inline_response_200_10.rb +292 -0
  12. data/lib/cybersource_rest_client/models/{inline_response_200_9_records.rb → inline_response_200_10_records.rb} +209 -209
  13. data/lib/cybersource_rest_client/models/{inline_response_200_9_response_record.rb → inline_response_200_10_response_record.rb} +307 -307
  14. data/lib/cybersource_rest_client/models/{inline_response_200_9_response_record_additional_updates.rb → inline_response_200_10_response_record_additional_updates.rb} +242 -242
  15. data/lib/cybersource_rest_client/models/{inline_response_200_9_source_record.rb → inline_response_200_10_source_record.rb} +295 -295
  16. data/lib/cybersource_rest_client/models/inline_response_200_5.rb +247 -202
  17. data/lib/cybersource_rest_client/models/inline_response_200_5_devices.rb +357 -0
  18. data/lib/cybersource_rest_client/models/inline_response_200_6.rb +202 -247
  19. data/lib/cybersource_rest_client/models/inline_response_200_7.rb +247 -251
  20. data/lib/cybersource_rest_client/models/{inline_response_200_6_devices.rb → inline_response_200_7_devices.rb} +371 -371
  21. data/lib/cybersource_rest_client/models/{inline_response_200_6_payment_processor_to_terminal_map.rb → inline_response_200_7_payment_processor_to_terminal_map.rb} +200 -200
  22. data/lib/cybersource_rest_client/models/inline_response_200_8.rb +251 -290
  23. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded.rb → inline_response_200_8__embedded.rb} +191 -191
  24. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded__links.rb → inline_response_200_8__embedded__links.rb} +191 -191
  25. data/lib/cybersource_rest_client/models/{inline_response_200_8__links_report.rb → inline_response_200_8__embedded__links_reports.rb} +190 -189
  26. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded_batches.rb → inline_response_200_8__embedded_batches.rb} +295 -295
  27. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded_totals.rb → inline_response_200_8__embedded_totals.rb} +229 -229
  28. data/lib/cybersource_rest_client/models/inline_response_200_8__links.rb +200 -201
  29. data/lib/cybersource_rest_client/models/inline_response_200_9.rb +290 -292
  30. data/lib/cybersource_rest_client/models/inline_response_200_9__links.rb +201 -0
  31. data/lib/cybersource_rest_client/models/{inline_response_200_7__embedded__links_reports.rb → inline_response_200_9__links_report.rb} +189 -190
  32. data/lib/cybersource_rest_client/models/{inline_response_200_8_billing.rb → inline_response_200_9_billing.rb} +219 -219
  33. data/lib/cybersource_rest_client/models/payments_products.rb +379 -379
  34. data/lib/cybersource_rest_client/models/payments_products_unified_checkout.rb +199 -0
  35. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information.rb +189 -0
  36. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations.rb +189 -0
  37. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations_features.rb +189 -0
  38. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_configuration_information_configurations_features_paze.rb +213 -0
  39. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information.rb +225 -0
  40. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features.rb +189 -0
  41. data/lib/cybersource_rest_client/models/payments_products_unified_checkout_subscription_information_features_paze_for_unified_checkout.rb +190 -0
  42. data/lib/cybersource_rest_client/models/post_device_search_request.rb +223 -0
  43. data/lib/cybersource_rest_client/models/riskv1decisions_travel_information_legs.rb +252 -241
  44. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +394 -383
  45. data/lib/cybersource_rest_client/models/upv1capturecontexts_capture_mandate.rb +297 -286
  46. data/lib/cybersource_rest_client/models/upv1capturecontexts_complete_mandate.rb +219 -208
  47. data/lib/cybersource_rest_client.rb +28 -15
  48. metadata +30 -17
  49. data/lib/cybersource_rest_client/api/device_de_association_v3_api.rb +0 -96
@@ -1,383 +1,394 @@
1
- =begin
2
- #CyberSource Merged Spec
3
-
4
- #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
-
6
- OpenAPI spec version: 0.0.1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.38
10
- =end
11
-
12
- require 'date'
13
-
14
- module CyberSource
15
- class TssV2TransactionsGet200ResponseProcessorInformation
16
- attr_accessor :processor
17
-
18
- # An array of object that contains the list of acquirer response codes & reasons if a transaction is routed to multiple acquirers.
19
- attr_accessor :multi_processor_routing
20
-
21
- # 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. #### CyberSource through VisaNet and GPN For details about this value for CyberSource through VisaNet and GPN, see \"processorInformation.networkTransactionId\" in [REST API Fields](https://developer.cybersource.com/content/dam/docs/cybs/en-us/apifields/reference/all/rest/api-fields.pdf) #### 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
22
- attr_accessor :transaction_id
23
-
24
- # Same value as `processorInformation.transactionId`
25
- attr_accessor :network_transaction_id
26
-
27
- # #### Ingenico ePayments Unique number that CyberSource generates to identify the transaction. You can use this value to identify transactions in the Ingenico ePayments Collections Report, which provides settlement information. Contact customer support for information about the report. ### CyberSource through VisaNet Retrieval request number.
28
- attr_accessor :retrieval_reference_number
29
-
30
- # Response ID sent from the processor.
31
- attr_accessor :response_id
32
-
33
- # 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.
34
- attr_accessor :approval_code
35
-
36
- # 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: - `aa` is the two-digit error message from Atos. - `bb` is 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.
37
- attr_accessor :response_code
38
-
39
- attr_accessor :avs
40
-
41
- attr_accessor :card_verification
42
-
43
- attr_accessor :ach_verification
44
-
45
- attr_accessor :electronic_verification_results
46
-
47
- # This field is returned only for **American Express Direct** and **CyberSource 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. #### CyberSource through VisaNet System trace number that must be printed on the customer's receipt.
48
- attr_accessor :system_trace_audit_number
49
-
50
- # Used by Visa only and contains the response source/reason code that identifies the source of the response decision.
51
- attr_accessor :response_code_source
52
-
53
- # Payment Account Reference (PAR) is a non-financial reference assigned to each unique payment account and used to link a payment account to associated network tokens, i.e. the same PAR is returned for PAN-based and tokenized transactions, such as from digital wallets. PAR can be returned in authorisation responses for requests initiated with both real PANs and tokenized PANs. PAR can be used by merchants for fraud detection and regulatory compliance across different channels and digital wallets. PAR allows all participants in the payments chain to have a single, non-sensitive value assigned to a consumer. This value can be used in place of sensitive card holder identification fields, and transmitted across the payments ecosystem to facilitate card holder identification. **Note** On CyberSource through VisaNet, the value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR8 - Position: 79-110 - Field: Payment Account Reference The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment networks.
54
- attr_accessor :payment_account_reference_number
55
-
56
- # Attribute mapping from ruby-style variable name to JSON key.
57
- def self.attribute_map
58
- {
59
- :'processor' => :'processor',
60
- :'multi_processor_routing' => :'multiProcessorRouting',
61
- :'transaction_id' => :'transactionId',
62
- :'network_transaction_id' => :'networkTransactionId',
63
- :'retrieval_reference_number' => :'retrievalReferenceNumber',
64
- :'response_id' => :'responseId',
65
- :'approval_code' => :'approvalCode',
66
- :'response_code' => :'responseCode',
67
- :'avs' => :'avs',
68
- :'card_verification' => :'cardVerification',
69
- :'ach_verification' => :'achVerification',
70
- :'electronic_verification_results' => :'electronicVerificationResults',
71
- :'system_trace_audit_number' => :'systemTraceAuditNumber',
72
- :'response_code_source' => :'responseCodeSource',
73
- :'payment_account_reference_number' => :'paymentAccountReferenceNumber'
74
- }
75
- end
76
-
77
- # Attribute mapping from JSON key to ruby-style variable name.
78
- def self.json_map
79
- {
80
- :'processor' => :'processor',
81
- :'multi_processor_routing' => :'multi_processor_routing',
82
- :'transaction_id' => :'transaction_id',
83
- :'network_transaction_id' => :'network_transaction_id',
84
- :'retrieval_reference_number' => :'retrieval_reference_number',
85
- :'response_id' => :'response_id',
86
- :'approval_code' => :'approval_code',
87
- :'response_code' => :'response_code',
88
- :'avs' => :'avs',
89
- :'card_verification' => :'card_verification',
90
- :'ach_verification' => :'ach_verification',
91
- :'electronic_verification_results' => :'electronic_verification_results',
92
- :'system_trace_audit_number' => :'system_trace_audit_number',
93
- :'response_code_source' => :'response_code_source',
94
- :'payment_account_reference_number' => :'payment_account_reference_number'
95
- }
96
- end
97
-
98
- # Attribute type mapping.
99
- def self.swagger_types
100
- {
101
- :'processor' => :'TssV2TransactionsGet200ResponseProcessorInformationProcessor',
102
- :'multi_processor_routing' => :'Array<TssV2TransactionsGet200ResponseProcessorInformationMultiProcessorRouting>',
103
- :'transaction_id' => :'String',
104
- :'network_transaction_id' => :'String',
105
- :'retrieval_reference_number' => :'String',
106
- :'response_id' => :'String',
107
- :'approval_code' => :'String',
108
- :'response_code' => :'String',
109
- :'avs' => :'PtsV2PaymentsPost201ResponseProcessorInformationAvs',
110
- :'card_verification' => :'Riskv1decisionsProcessorInformationCardVerification',
111
- :'ach_verification' => :'PtsV2PaymentsPost201ResponseProcessorInformationAchVerification',
112
- :'electronic_verification_results' => :'TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults',
113
- :'system_trace_audit_number' => :'String',
114
- :'response_code_source' => :'String',
115
- :'payment_account_reference_number' => :'String'
116
- }
117
- end
118
-
119
- # Initializes the object
120
- # @param [Hash] attributes Model attributes in the form of hash
121
- def initialize(attributes = {})
122
- return unless attributes.is_a?(Hash)
123
-
124
- # convert string to symbol for hash key
125
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
126
-
127
- if attributes.has_key?(:'processor')
128
- self.processor = attributes[:'processor']
129
- end
130
-
131
- if attributes.has_key?(:'multiProcessorRouting')
132
- if (value = attributes[:'multiProcessorRouting']).is_a?(Array)
133
- self.multi_processor_routing = value
134
- end
135
- end
136
-
137
- if attributes.has_key?(:'transactionId')
138
- self.transaction_id = attributes[:'transactionId']
139
- end
140
-
141
- if attributes.has_key?(:'networkTransactionId')
142
- self.network_transaction_id = attributes[:'networkTransactionId']
143
- end
144
-
145
- if attributes.has_key?(:'retrievalReferenceNumber')
146
- self.retrieval_reference_number = attributes[:'retrievalReferenceNumber']
147
- end
148
-
149
- if attributes.has_key?(:'responseId')
150
- self.response_id = attributes[:'responseId']
151
- end
152
-
153
- if attributes.has_key?(:'approvalCode')
154
- self.approval_code = attributes[:'approvalCode']
155
- end
156
-
157
- if attributes.has_key?(:'responseCode')
158
- self.response_code = attributes[:'responseCode']
159
- end
160
-
161
- if attributes.has_key?(:'avs')
162
- self.avs = attributes[:'avs']
163
- end
164
-
165
- if attributes.has_key?(:'cardVerification')
166
- self.card_verification = attributes[:'cardVerification']
167
- end
168
-
169
- if attributes.has_key?(:'achVerification')
170
- self.ach_verification = attributes[:'achVerification']
171
- end
172
-
173
- if attributes.has_key?(:'electronicVerificationResults')
174
- self.electronic_verification_results = attributes[:'electronicVerificationResults']
175
- end
176
-
177
- if attributes.has_key?(:'systemTraceAuditNumber')
178
- self.system_trace_audit_number = attributes[:'systemTraceAuditNumber']
179
- end
180
-
181
- if attributes.has_key?(:'responseCodeSource')
182
- self.response_code_source = attributes[:'responseCodeSource']
183
- end
184
-
185
- if attributes.has_key?(:'paymentAccountReferenceNumber')
186
- self.payment_account_reference_number = attributes[:'paymentAccountReferenceNumber']
187
- end
188
- end
189
-
190
- # Show invalid properties with the reasons. Usually used together with valid?
191
- # @return Array for valid properties with the reasons
192
- def list_invalid_properties
193
- invalid_properties = Array.new
194
- invalid_properties
195
- end
196
-
197
- # Check to see if the all the properties in the model are valid
198
- # @return true if the model is valid
199
- def valid?
200
- true
201
- end
202
-
203
- # Custom attribute writer method with validation
204
- # @param [Object] transaction_id Value to be assigned
205
- def transaction_id=(transaction_id)
206
- @transaction_id = transaction_id
207
- end
208
-
209
- # Custom attribute writer method with validation
210
- # @param [Object] retrieval_reference_number Value to be assigned
211
- def retrieval_reference_number=(retrieval_reference_number)
212
- @retrieval_reference_number = retrieval_reference_number
213
- end
214
-
215
- # Custom attribute writer method with validation
216
- # @param [Object] approval_code Value to be assigned
217
- def approval_code=(approval_code)
218
- @approval_code = approval_code
219
- end
220
-
221
- # Custom attribute writer method with validation
222
- # @param [Object] response_code Value to be assigned
223
- def response_code=(response_code)
224
- @response_code = response_code
225
- end
226
-
227
- # Custom attribute writer method with validation
228
- # @param [Object] system_trace_audit_number Value to be assigned
229
- def system_trace_audit_number=(system_trace_audit_number)
230
- @system_trace_audit_number = system_trace_audit_number
231
- end
232
-
233
- # Custom attribute writer method with validation
234
- # @param [Object] response_code_source Value to be assigned
235
- def response_code_source=(response_code_source)
236
- @response_code_source = response_code_source
237
- end
238
-
239
- # Custom attribute writer method with validation
240
- # @param [Object] payment_account_reference_number Value to be assigned
241
- def payment_account_reference_number=(payment_account_reference_number)
242
- @payment_account_reference_number = payment_account_reference_number
243
- end
244
-
245
- # Checks equality by comparing each attribute.
246
- # @param [Object] Object to be compared
247
- def ==(o)
248
- return true if self.equal?(o)
249
- self.class == o.class &&
250
- processor == o.processor &&
251
- multi_processor_routing == o.multi_processor_routing &&
252
- transaction_id == o.transaction_id &&
253
- network_transaction_id == o.network_transaction_id &&
254
- retrieval_reference_number == o.retrieval_reference_number &&
255
- response_id == o.response_id &&
256
- approval_code == o.approval_code &&
257
- response_code == o.response_code &&
258
- avs == o.avs &&
259
- card_verification == o.card_verification &&
260
- ach_verification == o.ach_verification &&
261
- electronic_verification_results == o.electronic_verification_results &&
262
- system_trace_audit_number == o.system_trace_audit_number &&
263
- response_code_source == o.response_code_source &&
264
- payment_account_reference_number == o.payment_account_reference_number
265
- end
266
-
267
- # @see the `==` method
268
- # @param [Object] Object to be compared
269
- def eql?(o)
270
- self == o
271
- end
272
-
273
- # Calculates hash code according to all attributes.
274
- # @return [Fixnum] Hash code
275
- def hash
276
- [processor, multi_processor_routing, transaction_id, network_transaction_id, retrieval_reference_number, response_id, approval_code, response_code, avs, card_verification, ach_verification, electronic_verification_results, system_trace_audit_number, response_code_source, payment_account_reference_number].hash
277
- end
278
-
279
- # Builds the object from hash
280
- # @param [Hash] attributes Model attributes in the form of hash
281
- # @return [Object] Returns the model itself
282
- def build_from_hash(attributes)
283
- return nil unless attributes.is_a?(Hash)
284
- self.class.swagger_types.each_pair do |key, type|
285
- if type =~ /\AArray<(.*)>/i
286
- # check to ensure the input is an array given that the the attribute
287
- # is documented as an array but the input is not
288
- if attributes[self.class.attribute_map[key]].is_a?(Array)
289
- self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
290
- end
291
- elsif !attributes[self.class.attribute_map[key]].nil?
292
- self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
293
- end # or else data not found in attributes(hash), not an issue as the data can be optional
294
- end
295
-
296
- self
297
- end
298
-
299
- # Deserializes the data based on type
300
- # @param string type Data type
301
- # @param string value Value to be deserialized
302
- # @return [Object] Deserialized data
303
- def _deserialize(type, value)
304
- case type.to_sym
305
- when :DateTime
306
- DateTime.parse(value)
307
- when :Date
308
- Date.parse(value)
309
- when :String
310
- value.to_s
311
- when :Integer
312
- value.to_i
313
- when :Float
314
- value.to_f
315
- when :BOOLEAN
316
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
317
- true
318
- else
319
- false
320
- end
321
- when :Object
322
- # generic object (usually a Hash), return directly
323
- value
324
- when /\AArray<(?<inner_type>.+)>\z/
325
- inner_type = Regexp.last_match[:inner_type]
326
- value.map { |v| _deserialize(inner_type, v) }
327
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
328
- k_type = Regexp.last_match[:k_type]
329
- v_type = Regexp.last_match[:v_type]
330
- {}.tap do |hash|
331
- value.each do |k, v|
332
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
333
- end
334
- end
335
- else # model
336
- temp_model = CyberSource.const_get(type).new
337
- temp_model.build_from_hash(value)
338
- end
339
- end
340
-
341
- # Returns the string representation of the object
342
- # @return [String] String presentation of the object
343
- def to_s
344
- to_hash.to_s
345
- end
346
-
347
- # to_body is an alias to to_hash (backward compatibility)
348
- # @return [Hash] Returns the object in the form of hash
349
- def to_body
350
- to_hash
351
- end
352
-
353
- # Returns the object in the form of hash
354
- # @return [Hash] Returns the object in the form of hash
355
- def to_hash
356
- hash = {}
357
- self.class.attribute_map.each_pair do |attr, param|
358
- value = self.send(attr)
359
- next if value.nil?
360
- hash[param] = _to_hash(value)
361
- end
362
- hash
363
- end
364
-
365
- # Outputs non-array value in the form of hash
366
- # For object, use to_hash. Otherwise, just return the value
367
- # @param [Object] value Any valid value
368
- # @return [Hash] Returns the value in the form of hash
369
- def _to_hash(value)
370
- if value.is_a?(Array)
371
- value.compact.map { |v| _to_hash(v) }
372
- elsif value.is_a?(Hash)
373
- {}.tap do |hash|
374
- value.each { |k, v| hash[k] = _to_hash(v) }
375
- end
376
- elsif value.respond_to? :to_hash
377
- value.to_hash
378
- else
379
- value
380
- end
381
- end
382
- end
383
- end
1
+ =begin
2
+ #CyberSource Merged Spec
3
+
4
+ #All CyberSource API specs merged together. These are available at https://developer.cybersource.com/api/reference/api-reference.html
5
+
6
+ OpenAPI spec version: 0.0.1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.38
10
+ =end
11
+
12
+ require 'date'
13
+
14
+ module CyberSource
15
+ class TssV2TransactionsGet200ResponseProcessorInformation
16
+ attr_accessor :processor
17
+
18
+ # An array of object that contains the list of acquirer response codes & reasons if a transaction is routed to multiple acquirers.
19
+ attr_accessor :multi_processor_routing
20
+
21
+ # 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. #### CyberSource through VisaNet and GPN For details about this value for CyberSource through VisaNet and GPN, see \"processorInformation.networkTransactionId\" in [REST API Fields](https://developer.cybersource.com/content/dam/docs/cybs/en-us/apifields/reference/all/rest/api-fields.pdf) #### 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
22
+ attr_accessor :transaction_id
23
+
24
+ # Same value as `processorInformation.transactionId`
25
+ attr_accessor :network_transaction_id
26
+
27
+ # #### Ingenico ePayments Unique number that CyberSource generates to identify the transaction. You can use this value to identify transactions in the Ingenico ePayments Collections Report, which provides settlement information. Contact customer support for information about the report. ### CyberSource through VisaNet Retrieval request number.
28
+ attr_accessor :retrieval_reference_number
29
+
30
+ # Response ID sent from the processor.
31
+ attr_accessor :response_id
32
+
33
+ # 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.
34
+ attr_accessor :approval_code
35
+
36
+ # 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: - `aa` is the two-digit error message from Atos. - `bb` is 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.
37
+ attr_accessor :response_code
38
+
39
+ attr_accessor :avs
40
+
41
+ attr_accessor :card_verification
42
+
43
+ attr_accessor :ach_verification
44
+
45
+ attr_accessor :electronic_verification_results
46
+
47
+ # The event status.
48
+ attr_accessor :event_status
49
+
50
+ # This field is returned only for **American Express Direct** and **CyberSource 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. #### CyberSource through VisaNet System trace number that must be printed on the customer's receipt.
51
+ attr_accessor :system_trace_audit_number
52
+
53
+ # Used by Visa only and contains the response source/reason code that identifies the source of the response decision.
54
+ attr_accessor :response_code_source
55
+
56
+ # Payment Account Reference (PAR) is a non-financial reference assigned to each unique payment account and used to link a payment account to associated network tokens, i.e. the same PAR is returned for PAN-based and tokenized transactions, such as from digital wallets. PAR can be returned in authorisation responses for requests initiated with both real PANs and tokenized PANs. PAR can be used by merchants for fraud detection and regulatory compliance across different channels and digital wallets. PAR allows all participants in the payments chain to have a single, non-sensitive value assigned to a consumer. This value can be used in place of sensitive card holder identification fields, and transmitted across the payments ecosystem to facilitate card holder identification. **Note** On CyberSource through VisaNet, the value for this field corresponds to the following data in the TC 33 capture file: - Record: CP01 TCR8 - Position: 79-110 - Field: Payment Account Reference The TC 33 Capture file contains information about the purchases and refunds that a merchant submits to CyberSource. CyberSource through VisaNet creates the TC 33 Capture file at the end of the day and sends it to the merchant's acquirer, who uses this information to facilitate end-of-day clearing processing with payment networks.
57
+ attr_accessor :payment_account_reference_number
58
+
59
+ # Attribute mapping from ruby-style variable name to JSON key.
60
+ def self.attribute_map
61
+ {
62
+ :'processor' => :'processor',
63
+ :'multi_processor_routing' => :'multiProcessorRouting',
64
+ :'transaction_id' => :'transactionId',
65
+ :'network_transaction_id' => :'networkTransactionId',
66
+ :'retrieval_reference_number' => :'retrievalReferenceNumber',
67
+ :'response_id' => :'responseId',
68
+ :'approval_code' => :'approvalCode',
69
+ :'response_code' => :'responseCode',
70
+ :'avs' => :'avs',
71
+ :'card_verification' => :'cardVerification',
72
+ :'ach_verification' => :'achVerification',
73
+ :'electronic_verification_results' => :'electronicVerificationResults',
74
+ :'event_status' => :'eventStatus',
75
+ :'system_trace_audit_number' => :'systemTraceAuditNumber',
76
+ :'response_code_source' => :'responseCodeSource',
77
+ :'payment_account_reference_number' => :'paymentAccountReferenceNumber'
78
+ }
79
+ end
80
+
81
+ # Attribute mapping from JSON key to ruby-style variable name.
82
+ def self.json_map
83
+ {
84
+ :'processor' => :'processor',
85
+ :'multi_processor_routing' => :'multi_processor_routing',
86
+ :'transaction_id' => :'transaction_id',
87
+ :'network_transaction_id' => :'network_transaction_id',
88
+ :'retrieval_reference_number' => :'retrieval_reference_number',
89
+ :'response_id' => :'response_id',
90
+ :'approval_code' => :'approval_code',
91
+ :'response_code' => :'response_code',
92
+ :'avs' => :'avs',
93
+ :'card_verification' => :'card_verification',
94
+ :'ach_verification' => :'ach_verification',
95
+ :'electronic_verification_results' => :'electronic_verification_results',
96
+ :'event_status' => :'event_status',
97
+ :'system_trace_audit_number' => :'system_trace_audit_number',
98
+ :'response_code_source' => :'response_code_source',
99
+ :'payment_account_reference_number' => :'payment_account_reference_number'
100
+ }
101
+ end
102
+
103
+ # Attribute type mapping.
104
+ def self.swagger_types
105
+ {
106
+ :'processor' => :'TssV2TransactionsGet200ResponseProcessorInformationProcessor',
107
+ :'multi_processor_routing' => :'Array<TssV2TransactionsGet200ResponseProcessorInformationMultiProcessorRouting>',
108
+ :'transaction_id' => :'String',
109
+ :'network_transaction_id' => :'String',
110
+ :'retrieval_reference_number' => :'String',
111
+ :'response_id' => :'String',
112
+ :'approval_code' => :'String',
113
+ :'response_code' => :'String',
114
+ :'avs' => :'PtsV2PaymentsPost201ResponseProcessorInformationAvs',
115
+ :'card_verification' => :'Riskv1decisionsProcessorInformationCardVerification',
116
+ :'ach_verification' => :'PtsV2PaymentsPost201ResponseProcessorInformationAchVerification',
117
+ :'electronic_verification_results' => :'TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults',
118
+ :'event_status' => :'String',
119
+ :'system_trace_audit_number' => :'String',
120
+ :'response_code_source' => :'String',
121
+ :'payment_account_reference_number' => :'String'
122
+ }
123
+ end
124
+
125
+ # Initializes the object
126
+ # @param [Hash] attributes Model attributes in the form of hash
127
+ def initialize(attributes = {})
128
+ return unless attributes.is_a?(Hash)
129
+
130
+ # convert string to symbol for hash key
131
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
132
+
133
+ if attributes.has_key?(:'processor')
134
+ self.processor = attributes[:'processor']
135
+ end
136
+
137
+ if attributes.has_key?(:'multiProcessorRouting')
138
+ if (value = attributes[:'multiProcessorRouting']).is_a?(Array)
139
+ self.multi_processor_routing = value
140
+ end
141
+ end
142
+
143
+ if attributes.has_key?(:'transactionId')
144
+ self.transaction_id = attributes[:'transactionId']
145
+ end
146
+
147
+ if attributes.has_key?(:'networkTransactionId')
148
+ self.network_transaction_id = attributes[:'networkTransactionId']
149
+ end
150
+
151
+ if attributes.has_key?(:'retrievalReferenceNumber')
152
+ self.retrieval_reference_number = attributes[:'retrievalReferenceNumber']
153
+ end
154
+
155
+ if attributes.has_key?(:'responseId')
156
+ self.response_id = attributes[:'responseId']
157
+ end
158
+
159
+ if attributes.has_key?(:'approvalCode')
160
+ self.approval_code = attributes[:'approvalCode']
161
+ end
162
+
163
+ if attributes.has_key?(:'responseCode')
164
+ self.response_code = attributes[:'responseCode']
165
+ end
166
+
167
+ if attributes.has_key?(:'avs')
168
+ self.avs = attributes[:'avs']
169
+ end
170
+
171
+ if attributes.has_key?(:'cardVerification')
172
+ self.card_verification = attributes[:'cardVerification']
173
+ end
174
+
175
+ if attributes.has_key?(:'achVerification')
176
+ self.ach_verification = attributes[:'achVerification']
177
+ end
178
+
179
+ if attributes.has_key?(:'electronicVerificationResults')
180
+ self.electronic_verification_results = attributes[:'electronicVerificationResults']
181
+ end
182
+
183
+ if attributes.has_key?(:'eventStatus')
184
+ self.event_status = attributes[:'eventStatus']
185
+ end
186
+
187
+ if attributes.has_key?(:'systemTraceAuditNumber')
188
+ self.system_trace_audit_number = attributes[:'systemTraceAuditNumber']
189
+ end
190
+
191
+ if attributes.has_key?(:'responseCodeSource')
192
+ self.response_code_source = attributes[:'responseCodeSource']
193
+ end
194
+
195
+ if attributes.has_key?(:'paymentAccountReferenceNumber')
196
+ self.payment_account_reference_number = attributes[:'paymentAccountReferenceNumber']
197
+ end
198
+ end
199
+
200
+ # Show invalid properties with the reasons. Usually used together with valid?
201
+ # @return Array for valid properties with the reasons
202
+ def list_invalid_properties
203
+ invalid_properties = Array.new
204
+ invalid_properties
205
+ end
206
+
207
+ # Check to see if the all the properties in the model are valid
208
+ # @return true if the model is valid
209
+ def valid?
210
+ true
211
+ end
212
+
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] transaction_id Value to be assigned
215
+ def transaction_id=(transaction_id)
216
+ @transaction_id = transaction_id
217
+ end
218
+
219
+ # Custom attribute writer method with validation
220
+ # @param [Object] retrieval_reference_number Value to be assigned
221
+ def retrieval_reference_number=(retrieval_reference_number)
222
+ @retrieval_reference_number = retrieval_reference_number
223
+ end
224
+
225
+ # Custom attribute writer method with validation
226
+ # @param [Object] approval_code Value to be assigned
227
+ def approval_code=(approval_code)
228
+ @approval_code = approval_code
229
+ end
230
+
231
+ # Custom attribute writer method with validation
232
+ # @param [Object] response_code Value to be assigned
233
+ def response_code=(response_code)
234
+ @response_code = response_code
235
+ end
236
+
237
+ # Custom attribute writer method with validation
238
+ # @param [Object] system_trace_audit_number Value to be assigned
239
+ def system_trace_audit_number=(system_trace_audit_number)
240
+ @system_trace_audit_number = system_trace_audit_number
241
+ end
242
+
243
+ # Custom attribute writer method with validation
244
+ # @param [Object] response_code_source Value to be assigned
245
+ def response_code_source=(response_code_source)
246
+ @response_code_source = response_code_source
247
+ end
248
+
249
+ # Custom attribute writer method with validation
250
+ # @param [Object] payment_account_reference_number Value to be assigned
251
+ def payment_account_reference_number=(payment_account_reference_number)
252
+ @payment_account_reference_number = payment_account_reference_number
253
+ end
254
+
255
+ # Checks equality by comparing each attribute.
256
+ # @param [Object] Object to be compared
257
+ def ==(o)
258
+ return true if self.equal?(o)
259
+ self.class == o.class &&
260
+ processor == o.processor &&
261
+ multi_processor_routing == o.multi_processor_routing &&
262
+ transaction_id == o.transaction_id &&
263
+ network_transaction_id == o.network_transaction_id &&
264
+ retrieval_reference_number == o.retrieval_reference_number &&
265
+ response_id == o.response_id &&
266
+ approval_code == o.approval_code &&
267
+ response_code == o.response_code &&
268
+ avs == o.avs &&
269
+ card_verification == o.card_verification &&
270
+ ach_verification == o.ach_verification &&
271
+ electronic_verification_results == o.electronic_verification_results &&
272
+ event_status == o.event_status &&
273
+ system_trace_audit_number == o.system_trace_audit_number &&
274
+ response_code_source == o.response_code_source &&
275
+ payment_account_reference_number == o.payment_account_reference_number
276
+ end
277
+
278
+ # @see the `==` method
279
+ # @param [Object] Object to be compared
280
+ def eql?(o)
281
+ self == o
282
+ end
283
+
284
+ # Calculates hash code according to all attributes.
285
+ # @return [Fixnum] Hash code
286
+ def hash
287
+ [processor, multi_processor_routing, transaction_id, network_transaction_id, retrieval_reference_number, response_id, approval_code, response_code, avs, card_verification, ach_verification, electronic_verification_results, event_status, system_trace_audit_number, response_code_source, payment_account_reference_number].hash
288
+ end
289
+
290
+ # Builds the object from hash
291
+ # @param [Hash] attributes Model attributes in the form of hash
292
+ # @return [Object] Returns the model itself
293
+ def build_from_hash(attributes)
294
+ return nil unless attributes.is_a?(Hash)
295
+ self.class.swagger_types.each_pair do |key, type|
296
+ if type =~ /\AArray<(.*)>/i
297
+ # check to ensure the input is an array given that the the attribute
298
+ # is documented as an array but the input is not
299
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
300
+ self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
301
+ end
302
+ elsif !attributes[self.class.attribute_map[key]].nil?
303
+ self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
304
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
305
+ end
306
+
307
+ self
308
+ end
309
+
310
+ # Deserializes the data based on type
311
+ # @param string type Data type
312
+ # @param string value Value to be deserialized
313
+ # @return [Object] Deserialized data
314
+ def _deserialize(type, value)
315
+ case type.to_sym
316
+ when :DateTime
317
+ DateTime.parse(value)
318
+ when :Date
319
+ Date.parse(value)
320
+ when :String
321
+ value.to_s
322
+ when :Integer
323
+ value.to_i
324
+ when :Float
325
+ value.to_f
326
+ when :BOOLEAN
327
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
328
+ true
329
+ else
330
+ false
331
+ end
332
+ when :Object
333
+ # generic object (usually a Hash), return directly
334
+ value
335
+ when /\AArray<(?<inner_type>.+)>\z/
336
+ inner_type = Regexp.last_match[:inner_type]
337
+ value.map { |v| _deserialize(inner_type, v) }
338
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
339
+ k_type = Regexp.last_match[:k_type]
340
+ v_type = Regexp.last_match[:v_type]
341
+ {}.tap do |hash|
342
+ value.each do |k, v|
343
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
344
+ end
345
+ end
346
+ else # model
347
+ temp_model = CyberSource.const_get(type).new
348
+ temp_model.build_from_hash(value)
349
+ end
350
+ end
351
+
352
+ # Returns the string representation of the object
353
+ # @return [String] String presentation of the object
354
+ def to_s
355
+ to_hash.to_s
356
+ end
357
+
358
+ # to_body is an alias to to_hash (backward compatibility)
359
+ # @return [Hash] Returns the object in the form of hash
360
+ def to_body
361
+ to_hash
362
+ end
363
+
364
+ # Returns the object in the form of hash
365
+ # @return [Hash] Returns the object in the form of hash
366
+ def to_hash
367
+ hash = {}
368
+ self.class.attribute_map.each_pair do |attr, param|
369
+ value = self.send(attr)
370
+ next if value.nil?
371
+ hash[param] = _to_hash(value)
372
+ end
373
+ hash
374
+ end
375
+
376
+ # Outputs non-array value in the form of hash
377
+ # For object, use to_hash. Otherwise, just return the value
378
+ # @param [Object] value Any valid value
379
+ # @return [Hash] Returns the value in the form of hash
380
+ def _to_hash(value)
381
+ if value.is_a?(Array)
382
+ value.compact.map { |v| _to_hash(v) }
383
+ elsif value.is_a?(Hash)
384
+ {}.tap do |hash|
385
+ value.each { |k, v| hash[k] = _to_hash(v) }
386
+ end
387
+ elsif value.respond_to? :to_hash
388
+ value.to_hash
389
+ else
390
+ value
391
+ end
392
+ end
393
+ end
394
+ end