cybersource_rest_client 0.0.36 → 0.0.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/lib/AuthenticationSDK/authentication/http/GetSignatureParameter.rb +13 -6
  3. data/lib/AuthenticationSDK/authentication/http/HttpSignatureHeader.rb +13 -5
  4. data/lib/AuthenticationSDK/authentication/jwt/JwtToken.rb +26 -11
  5. data/lib/AuthenticationSDK/authentication/oauth/OAuthToken.rb +11 -5
  6. data/lib/AuthenticationSDK/authentication/payloadDigest/digest.rb +2 -2
  7. data/lib/AuthenticationSDK/core/Authorization.rb +28 -20
  8. data/lib/AuthenticationSDK/core/MerchantConfig.rb +72 -78
  9. data/lib/AuthenticationSDK/logging/log_configuration.rb +71 -0
  10. data/lib/AuthenticationSDK/logging/log_factory.rb +65 -0
  11. data/lib/AuthenticationSDK/logging/sensitive_logging.rb +101 -0
  12. data/lib/AuthenticationSDK/util/Cache.rb +1 -1
  13. data/lib/AuthenticationSDK/util/Constants.rb +25 -17
  14. data/lib/AuthenticationSDK/util/ExceptionHandler.rb +26 -0
  15. data/lib/AuthenticationSDK/util/PropertiesUtil.rb +2 -2
  16. data/lib/cybersource_rest_client/api/asymmetric_key_management_api.rb +46 -46
  17. data/lib/cybersource_rest_client/api/capture_api.rb +16 -16
  18. data/lib/cybersource_rest_client/api/chargeback_details_api.rb +16 -16
  19. data/lib/cybersource_rest_client/api/chargeback_summaries_api.rb +16 -16
  20. data/lib/cybersource_rest_client/api/conversion_details_api.rb +16 -16
  21. data/lib/cybersource_rest_client/api/credit_api.rb +16 -16
  22. data/lib/cybersource_rest_client/api/customer_api.rb +61 -61
  23. data/lib/cybersource_rest_client/api/customer_payment_instrument_api.rb +76 -76
  24. data/lib/cybersource_rest_client/api/customer_shipping_address_api.rb +76 -76
  25. data/lib/cybersource_rest_client/api/decision_manager_api.rb +46 -46
  26. data/lib/cybersource_rest_client/api/download_dtd_api.rb +16 -16
  27. data/lib/cybersource_rest_client/api/download_xsd_api.rb +16 -16
  28. data/lib/cybersource_rest_client/api/instrument_identifier_api.rb +91 -91
  29. data/lib/cybersource_rest_client/api/interchange_clearing_level_details_api.rb +16 -16
  30. data/lib/cybersource_rest_client/api/invoice_settings_api.rb +31 -31
  31. data/lib/cybersource_rest_client/api/invoices_api.rb +97 -97
  32. data/lib/cybersource_rest_client/api/key_generation_api.rb +16 -16
  33. data/lib/cybersource_rest_client/api/net_fundings_api.rb +16 -16
  34. data/lib/cybersource_rest_client/api/notification_of_changes_api.rb +16 -16
  35. data/lib/cybersource_rest_client/api/payer_authentication_api.rb +46 -46
  36. data/lib/cybersource_rest_client/api/payment_batch_summaries_api.rb +16 -16
  37. data/lib/cybersource_rest_client/api/payment_instrument_api.rb +61 -61
  38. data/lib/cybersource_rest_client/api/payments_api.rb +33 -33
  39. data/lib/cybersource_rest_client/api/payouts_api.rb +16 -16
  40. data/lib/cybersource_rest_client/api/purchase_and_refund_details_api.rb +16 -16
  41. data/lib/cybersource_rest_client/api/refund_api.rb +31 -31
  42. data/lib/cybersource_rest_client/api/report_definitions_api.rb +31 -31
  43. data/lib/cybersource_rest_client/api/report_downloads_api.rb +16 -16
  44. data/lib/cybersource_rest_client/api/report_subscriptions_api.rb +76 -76
  45. data/lib/cybersource_rest_client/api/reports_api.rb +46 -46
  46. data/lib/cybersource_rest_client/api/retrieval_details_api.rb +16 -16
  47. data/lib/cybersource_rest_client/api/retrieval_summaries_api.rb +16 -16
  48. data/lib/cybersource_rest_client/api/reversal_api.rb +31 -31
  49. data/lib/cybersource_rest_client/api/search_transactions_api.rb +31 -31
  50. data/lib/cybersource_rest_client/api/secure_file_share_api.rb +31 -31
  51. data/lib/cybersource_rest_client/api/symmetric_key_management_api.rb +46 -46
  52. data/lib/cybersource_rest_client/api/taxes_api.rb +31 -31
  53. data/lib/cybersource_rest_client/api/tokenization_api.rb +16 -16
  54. data/lib/cybersource_rest_client/api/transaction_batches_api.rb +46 -46
  55. data/lib/cybersource_rest_client/api/transaction_details_api.rb +16 -16
  56. data/lib/cybersource_rest_client/api/user_management_api.rb +16 -16
  57. data/lib/cybersource_rest_client/api/user_management_search_api.rb +16 -16
  58. data/lib/cybersource_rest_client/api/verification_api.rb +31 -31
  59. data/lib/cybersource_rest_client/api/void_api.rb +76 -76
  60. data/lib/cybersource_rest_client/api_client.rb +7 -8
  61. data/lib/cybersource_rest_client/models/create_adhoc_report_request.rb +2 -5
  62. data/lib/cybersource_rest_client/models/create_payment_request.rb +19 -1
  63. data/lib/cybersource_rest_client/models/create_search_request.rb +1 -1
  64. data/lib/cybersource_rest_client/models/pts_v2_payments_captures_post201_response_order_information_amount_details.rb +20 -4
  65. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response.rb +10 -1
  66. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_buyer_information.rb +243 -0
  67. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information.rb +10 -1
  68. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_issuer_information.rb +206 -0
  69. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_consumer_authentication_information_strong_authentication.rb +183 -0
  70. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +52 -4
  71. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_processor_information.rb +17 -1
  72. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information.rb +33 -1
  73. data/lib/cybersource_rest_client/models/ptsv2payments_buyer_information_personal_identification.rb +15 -5
  74. data/lib/cybersource_rest_client/models/ptsv2payments_client_reference_information.rb +17 -1
  75. data/lib/cybersource_rest_client/models/ptsv2payments_consumer_authentication_information_strong_authentication.rb +17 -1
  76. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +17 -1
  77. data/lib/cybersource_rest_client/models/ptsv2payments_installment_information.rb +24 -4
  78. data/lib/cybersource_rest_client/models/ptsv2payments_invoice_details.rb +191 -0
  79. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +65 -1
  80. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information_merchant_descriptor.rb +1 -1
  81. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details.rb +17 -1
  82. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_invoice_details.rb +20 -4
  83. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_ship_to.rb +33 -1
  84. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +13 -4
  85. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +14 -4
  86. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_e_wallet.rb +190 -0
  87. data/lib/cybersource_rest_client/models/ptsv2payments_processor_information.rb +191 -0
  88. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +17 -1
  89. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +14 -5
  90. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_bank.rb +215 -0
  91. data/lib/cybersource_rest_client/models/ptsv2payouts_processing_information.rb +36 -4
  92. data/lib/cybersource_rest_client/models/ptsv2payouts_recipient_information.rb +17 -1
  93. data/lib/cybersource_rest_client/models/ptsv2payouts_sender_information.rb +17 -1
  94. data/lib/cybersource_rest_client/models/reportingv3reports_report_filters.rb +218 -0
  95. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information_tokenized_card.rb +17 -1
  96. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_tokenized_card.rb +17 -1
  97. data/lib/cybersource_rest_client/models/riskv1decisions_payment_information_tokenized_card.rb +17 -1
  98. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response.rb +10 -11
  99. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information.rb +10 -1
  100. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_client_reference_information_partner.rb +190 -0
  101. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_installment_information.rb +14 -4
  102. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_order_information_amount_details.rb +13 -4
  103. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information.rb +32 -5
  104. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_customer.rb +206 -0
  105. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_instrument_identifier.rb +190 -0
  106. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processor_information.rb +36 -4
  107. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_token_information.rb +210 -0
  108. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response.rb +1 -1
  109. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_client_reference_information.rb +13 -4
  110. data/lib/cybersource_rest_client/utilities/flex/token_verification.rb +4 -4
  111. data/lib/cybersource_rest_client.rb +17 -3
  112. metadata +18 -4
  113. data/lib/AuthenticationSDK/core/Logger.rb +0 -26
  114. data/lib/AuthenticationSDK/util/ApiException.rb +0 -19
@@ -0,0 +1,190 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class TssV2TransactionsGet200ResponsePaymentInformationInstrumentIdentifier
17
+ # Unique identifier for the Instrument Identifier token that was created as part of a bundled TOKEN_CREATE action.
18
+ attr_accessor :id
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'id' => :'id'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'id' => :'String'
31
+ }
32
+ end
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ def initialize(attributes = {})
37
+ return unless attributes.is_a?(Hash)
38
+
39
+ # convert string to symbol for hash key
40
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
41
+
42
+ if attributes.has_key?(:'id')
43
+ self.id = attributes[:'id']
44
+ end
45
+ end
46
+
47
+ # Show invalid properties with the reasons. Usually used together with valid?
48
+ # @return Array for valid properties with the reasons
49
+ def list_invalid_properties
50
+ invalid_properties = Array.new
51
+ invalid_properties
52
+ end
53
+
54
+ # Check to see if the all the properties in the model are valid
55
+ # @return true if the model is valid
56
+ def valid?
57
+ true
58
+ end
59
+
60
+ # Custom attribute writer method with validation
61
+ # @param [Object] id Value to be assigned
62
+ def id=(id)
63
+ @id = id
64
+ end
65
+
66
+ # Checks equality by comparing each attribute.
67
+ # @param [Object] Object to be compared
68
+ def ==(o)
69
+ return true if self.equal?(o)
70
+ self.class == o.class &&
71
+ id == o.id
72
+ end
73
+
74
+ # @see the `==` method
75
+ # @param [Object] Object to be compared
76
+ def eql?(o)
77
+ self == o
78
+ end
79
+
80
+ # Calculates hash code according to all attributes.
81
+ # @return [Fixnum] Hash code
82
+ def hash
83
+ [id].hash
84
+ end
85
+
86
+ # Builds the object from hash
87
+ # @param [Hash] attributes Model attributes in the form of hash
88
+ # @return [Object] Returns the model itself
89
+ def build_from_hash(attributes)
90
+ return nil unless attributes.is_a?(Hash)
91
+ self.class.swagger_types.each_pair do |key, type|
92
+ if type =~ /\AArray<(.*)>/i
93
+ # check to ensure the input is an array given that the the attribute
94
+ # is documented as an array but the input is not
95
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
96
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
97
+ end
98
+ elsif !attributes[self.class.attribute_map[key]].nil?
99
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
100
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
101
+ end
102
+
103
+ self
104
+ end
105
+
106
+ # Deserializes the data based on type
107
+ # @param string type Data type
108
+ # @param string value Value to be deserialized
109
+ # @return [Object] Deserialized data
110
+ def _deserialize(type, value)
111
+ case type.to_sym
112
+ when :DateTime
113
+ DateTime.parse(value)
114
+ when :Date
115
+ Date.parse(value)
116
+ when :String
117
+ value.to_s
118
+ when :Integer
119
+ value.to_i
120
+ when :Float
121
+ value.to_f
122
+ when :BOOLEAN
123
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
124
+ true
125
+ else
126
+ false
127
+ end
128
+ when :Object
129
+ # generic object (usually a Hash), return directly
130
+ value
131
+ when /\AArray<(?<inner_type>.+)>\z/
132
+ inner_type = Regexp.last_match[:inner_type]
133
+ value.map { |v| _deserialize(inner_type, v) }
134
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
135
+ k_type = Regexp.last_match[:k_type]
136
+ v_type = Regexp.last_match[:v_type]
137
+ {}.tap do |hash|
138
+ value.each do |k, v|
139
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
140
+ end
141
+ end
142
+ else # model
143
+ temp_model = CyberSource.const_get(type).new
144
+ temp_model.build_from_hash(value)
145
+ end
146
+ end
147
+
148
+ # Returns the string representation of the object
149
+ # @return [String] String presentation of the object
150
+ def to_s
151
+ to_hash.to_s
152
+ end
153
+
154
+ # to_body is an alias to to_hash (backward compatibility)
155
+ # @return [Hash] Returns the object in the form of hash
156
+ def to_body
157
+ to_hash
158
+ end
159
+
160
+ # Returns the object in the form of hash
161
+ # @return [Hash] Returns the object in the form of hash
162
+ def to_hash
163
+ hash = {}
164
+ self.class.attribute_map.each_pair do |attr, param|
165
+ value = self.send(attr)
166
+ next if value.nil?
167
+ hash[param] = _to_hash(value)
168
+ end
169
+ hash
170
+ end
171
+
172
+ # Outputs non-array value in the form of hash
173
+ # For object, use to_hash. Otherwise, just return the value
174
+ # @param [Object] value Any valid value
175
+ # @return [Hash] Returns the value in the form of hash
176
+ def _to_hash(value)
177
+ if value.is_a?(Array)
178
+ value.compact.map { |v| _to_hash(v) }
179
+ elsif value.is_a?(Hash)
180
+ {}.tap do |hash|
181
+ value.each { |k, v| hash[k] = _to_hash(v) }
182
+ end
183
+ elsif value.respond_to? :to_hash
184
+ value.to_hash
185
+ else
186
+ value
187
+ end
188
+ end
189
+ end
190
+ end
@@ -25,6 +25,9 @@ module CyberSource
25
25
  # Same value as `processorInformation.transactionId`
26
26
  attr_accessor :network_transaction_id
27
27
 
28
+ # #### 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.
29
+ attr_accessor :retrieval_reference_number
30
+
28
31
  # Response ID sent from the processor.
29
32
  attr_accessor :response_id
30
33
 
@@ -48,6 +51,9 @@ module CyberSource
48
51
  # Used by Visa only and contains the response source/reason code that identifies the source of the response decision.
49
52
  attr_accessor :response_code_source
50
53
 
54
+ # Visa-generated reference number that identifies a card-present transaction for which you provided one of the following: - Visa primary account number (PAN) - Visa-generated token for a PAN This reference number serves as a link to the cardholder account and to all transactions for that account. This reply field is returned only for CyberSource through VisaNet. **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.
55
+ attr_accessor :payment_account_reference_number
56
+
51
57
  # Attribute mapping from ruby-style variable name to JSON key.
52
58
  def self.attribute_map
53
59
  {
@@ -55,6 +61,7 @@ module CyberSource
55
61
  :'multi_processor_routing' => :'multiProcessorRouting',
56
62
  :'transaction_id' => :'transactionId',
57
63
  :'network_transaction_id' => :'networkTransactionId',
64
+ :'retrieval_reference_number' => :'retrievalReferenceNumber',
58
65
  :'response_id' => :'responseId',
59
66
  :'approval_code' => :'approvalCode',
60
67
  :'response_code' => :'responseCode',
@@ -63,7 +70,8 @@ module CyberSource
63
70
  :'ach_verification' => :'achVerification',
64
71
  :'electronic_verification_results' => :'electronicVerificationResults',
65
72
  :'system_trace_audit_number' => :'systemTraceAuditNumber',
66
- :'response_code_source' => :'responseCodeSource'
73
+ :'response_code_source' => :'responseCodeSource',
74
+ :'payment_account_reference_number' => :'paymentAccountReferenceNumber'
67
75
  }
68
76
  end
69
77
 
@@ -74,6 +82,7 @@ module CyberSource
74
82
  :'multi_processor_routing' => :'Array<TssV2TransactionsGet200ResponseProcessorInformationMultiProcessorRouting>',
75
83
  :'transaction_id' => :'String',
76
84
  :'network_transaction_id' => :'String',
85
+ :'retrieval_reference_number' => :'String',
77
86
  :'response_id' => :'String',
78
87
  :'approval_code' => :'String',
79
88
  :'response_code' => :'String',
@@ -82,7 +91,8 @@ module CyberSource
82
91
  :'ach_verification' => :'PtsV2PaymentsPost201ResponseProcessorInformationAchVerification',
83
92
  :'electronic_verification_results' => :'TssV2TransactionsGet200ResponseProcessorInformationElectronicVerificationResults',
84
93
  :'system_trace_audit_number' => :'String',
85
- :'response_code_source' => :'String'
94
+ :'response_code_source' => :'String',
95
+ :'payment_account_reference_number' => :'String'
86
96
  }
87
97
  end
88
98
 
@@ -112,6 +122,10 @@ module CyberSource
112
122
  self.network_transaction_id = attributes[:'networkTransactionId']
113
123
  end
114
124
 
125
+ if attributes.has_key?(:'retrievalReferenceNumber')
126
+ self.retrieval_reference_number = attributes[:'retrievalReferenceNumber']
127
+ end
128
+
115
129
  if attributes.has_key?(:'responseId')
116
130
  self.response_id = attributes[:'responseId']
117
131
  end
@@ -147,6 +161,10 @@ module CyberSource
147
161
  if attributes.has_key?(:'responseCodeSource')
148
162
  self.response_code_source = attributes[:'responseCodeSource']
149
163
  end
164
+
165
+ if attributes.has_key?(:'paymentAccountReferenceNumber')
166
+ self.payment_account_reference_number = attributes[:'paymentAccountReferenceNumber']
167
+ end
150
168
  end
151
169
 
152
170
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -168,6 +186,12 @@ module CyberSource
168
186
  @transaction_id = transaction_id
169
187
  end
170
188
 
189
+ # Custom attribute writer method with validation
190
+ # @param [Object] retrieval_reference_number Value to be assigned
191
+ def retrieval_reference_number=(retrieval_reference_number)
192
+ @retrieval_reference_number = retrieval_reference_number
193
+ end
194
+
171
195
  # Custom attribute writer method with validation
172
196
  # @param [Object] approval_code Value to be assigned
173
197
  def approval_code=(approval_code)
@@ -192,6 +216,12 @@ module CyberSource
192
216
  @response_code_source = response_code_source
193
217
  end
194
218
 
219
+ # Custom attribute writer method with validation
220
+ # @param [Object] payment_account_reference_number Value to be assigned
221
+ def payment_account_reference_number=(payment_account_reference_number)
222
+ @payment_account_reference_number = payment_account_reference_number
223
+ end
224
+
195
225
  # Checks equality by comparing each attribute.
196
226
  # @param [Object] Object to be compared
197
227
  def ==(o)
@@ -201,6 +231,7 @@ module CyberSource
201
231
  multi_processor_routing == o.multi_processor_routing &&
202
232
  transaction_id == o.transaction_id &&
203
233
  network_transaction_id == o.network_transaction_id &&
234
+ retrieval_reference_number == o.retrieval_reference_number &&
204
235
  response_id == o.response_id &&
205
236
  approval_code == o.approval_code &&
206
237
  response_code == o.response_code &&
@@ -209,7 +240,8 @@ module CyberSource
209
240
  ach_verification == o.ach_verification &&
210
241
  electronic_verification_results == o.electronic_verification_results &&
211
242
  system_trace_audit_number == o.system_trace_audit_number &&
212
- response_code_source == o.response_code_source
243
+ response_code_source == o.response_code_source &&
244
+ payment_account_reference_number == o.payment_account_reference_number
213
245
  end
214
246
 
215
247
  # @see the `==` method
@@ -221,7 +253,7 @@ module CyberSource
221
253
  # Calculates hash code according to all attributes.
222
254
  # @return [Fixnum] Hash code
223
255
  def hash
224
- [processor, multi_processor_routing, transaction_id, network_transaction_id, response_id, approval_code, response_code, avs, card_verification, ach_verification, electronic_verification_results, system_trace_audit_number, response_code_source].hash
256
+ [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
225
257
  end
226
258
 
227
259
  # Builds the object from hash
@@ -0,0 +1,210 @@
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.2.3
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module CyberSource
16
+ class TssV2TransactionsGet200ResponseTokenInformation
17
+ attr_accessor :customer
18
+
19
+ attr_accessor :payment_instrument
20
+
21
+ attr_accessor :shipping_address
22
+
23
+ attr_accessor :instrument_identifier
24
+
25
+ # Attribute mapping from ruby-style variable name to JSON key.
26
+ def self.attribute_map
27
+ {
28
+ :'customer' => :'customer',
29
+ :'payment_instrument' => :'paymentInstrument',
30
+ :'shipping_address' => :'shippingAddress',
31
+ :'instrument_identifier' => :'instrumentIdentifier'
32
+ }
33
+ end
34
+
35
+ # Attribute type mapping.
36
+ def self.swagger_types
37
+ {
38
+ :'customer' => :'PtsV2PaymentsPost201ResponseTokenInformationCustomer',
39
+ :'payment_instrument' => :'PtsV2PaymentsPost201ResponseTokenInformationPaymentInstrument',
40
+ :'shipping_address' => :'PtsV2PaymentsPost201ResponseTokenInformationShippingAddress',
41
+ :'instrument_identifier' => :'TssV2TransactionsGet200ResponsePaymentInformationInstrumentIdentifier'
42
+ }
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ return unless attributes.is_a?(Hash)
49
+
50
+ # convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
52
+
53
+ if attributes.has_key?(:'customer')
54
+ self.customer = attributes[:'customer']
55
+ end
56
+
57
+ if attributes.has_key?(:'paymentInstrument')
58
+ self.payment_instrument = attributes[:'paymentInstrument']
59
+ end
60
+
61
+ if attributes.has_key?(:'shippingAddress')
62
+ self.shipping_address = attributes[:'shippingAddress']
63
+ end
64
+
65
+ if attributes.has_key?(:'instrumentIdentifier')
66
+ self.instrument_identifier = attributes[:'instrumentIdentifier']
67
+ end
68
+ end
69
+
70
+ # Show invalid properties with the reasons. Usually used together with valid?
71
+ # @return Array for valid properties with the reasons
72
+ def list_invalid_properties
73
+ invalid_properties = Array.new
74
+ invalid_properties
75
+ end
76
+
77
+ # Check to see if the all the properties in the model are valid
78
+ # @return true if the model is valid
79
+ def valid?
80
+ true
81
+ end
82
+
83
+ # Checks equality by comparing each attribute.
84
+ # @param [Object] Object to be compared
85
+ def ==(o)
86
+ return true if self.equal?(o)
87
+ self.class == o.class &&
88
+ customer == o.customer &&
89
+ payment_instrument == o.payment_instrument &&
90
+ shipping_address == o.shipping_address &&
91
+ instrument_identifier == o.instrument_identifier
92
+ end
93
+
94
+ # @see the `==` method
95
+ # @param [Object] Object to be compared
96
+ def eql?(o)
97
+ self == o
98
+ end
99
+
100
+ # Calculates hash code according to all attributes.
101
+ # @return [Fixnum] Hash code
102
+ def hash
103
+ [customer, payment_instrument, shipping_address, instrument_identifier].hash
104
+ end
105
+
106
+ # Builds the object from hash
107
+ # @param [Hash] attributes Model attributes in the form of hash
108
+ # @return [Object] Returns the model itself
109
+ def build_from_hash(attributes)
110
+ return nil unless attributes.is_a?(Hash)
111
+ self.class.swagger_types.each_pair do |key, type|
112
+ if type =~ /\AArray<(.*)>/i
113
+ # check to ensure the input is an array given that the the attribute
114
+ # is documented as an array but the input is not
115
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
116
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
117
+ end
118
+ elsif !attributes[self.class.attribute_map[key]].nil?
119
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
120
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
121
+ end
122
+
123
+ self
124
+ end
125
+
126
+ # Deserializes the data based on type
127
+ # @param string type Data type
128
+ # @param string value Value to be deserialized
129
+ # @return [Object] Deserialized data
130
+ def _deserialize(type, value)
131
+ case type.to_sym
132
+ when :DateTime
133
+ DateTime.parse(value)
134
+ when :Date
135
+ Date.parse(value)
136
+ when :String
137
+ value.to_s
138
+ when :Integer
139
+ value.to_i
140
+ when :Float
141
+ value.to_f
142
+ when :BOOLEAN
143
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
144
+ true
145
+ else
146
+ false
147
+ end
148
+ when :Object
149
+ # generic object (usually a Hash), return directly
150
+ value
151
+ when /\AArray<(?<inner_type>.+)>\z/
152
+ inner_type = Regexp.last_match[:inner_type]
153
+ value.map { |v| _deserialize(inner_type, v) }
154
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
155
+ k_type = Regexp.last_match[:k_type]
156
+ v_type = Regexp.last_match[:v_type]
157
+ {}.tap do |hash|
158
+ value.each do |k, v|
159
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
160
+ end
161
+ end
162
+ else # model
163
+ temp_model = CyberSource.const_get(type).new
164
+ temp_model.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ next if value.nil?
187
+ hash[param] = _to_hash(value)
188
+ end
189
+ hash
190
+ end
191
+
192
+ # Outputs non-array value in the form of hash
193
+ # For object, use to_hash. Otherwise, just return the value
194
+ # @param [Object] value Any valid value
195
+ # @return [Hash] Returns the value in the form of hash
196
+ def _to_hash(value)
197
+ if value.is_a?(Array)
198
+ value.compact.map { |v| _to_hash(v) }
199
+ elsif value.is_a?(Hash)
200
+ {}.tap do |hash|
201
+ value.each { |k, v| hash[k] = _to_hash(v) }
202
+ end
203
+ elsif value.respond_to? :to_hash
204
+ value.to_hash
205
+ else
206
+ value
207
+ end
208
+ end
209
+ end
210
+ end
@@ -26,7 +26,7 @@ module CyberSource
26
26
  # Merchant’s time zone in ISO standard, using the TZ database format. For example: `America/Chicago`
27
27
  attr_accessor :timezone
28
28
 
29
- # String that contains the filters and variables for which you want to search. For information about supported field-filters and operators, see the [Query Filters]( https://developer.cybersource.com/api/developer-guides/dita-txn-search-details-rest-api-dev-guide-102718/txn_search_api/creating_txn_search_request.html) section of the Transaction Search Developer Guide.
29
+ # String that contains the filters and variables for which you want to search. For information about supported field-filters and operators, see the [Query Filters]( https://developer.cybersource.com/api/developer-guides/dita-txn-search-details-rest-api-dev-guide-102718/txn-search-intro/txn-filtering.html) section of the Transaction Search Developer Guide.
30
30
  attr_accessor :query
31
31
 
32
32
  # Controls the starting point within the collection of results, which defaults to 0. The first item in the collection is retrieved by setting a zero offset. For example, if you have a collection of 15 items to be retrieved from a resource and you specify limit=5, you can retrieve the entire set of results in 3 successive requests by varying the offset value like this: `offset=0` `offset=5` `offset=10` **Note:** If an offset larger than the number of results is provided, this will result in no embedded object being returned.
@@ -23,12 +23,15 @@ module CyberSource
23
23
  # The entity that is responsible for running the transaction and submitting the processing request to CyberSource. This could be a person, a system, or a connection method.
24
24
  attr_accessor :application_user
25
25
 
26
+ attr_accessor :partner
27
+
26
28
  # Attribute mapping from ruby-style variable name to JSON key.
27
29
  def self.attribute_map
28
30
  {
29
31
  :'code' => :'code',
30
32
  :'application_name' => :'applicationName',
31
- :'application_user' => :'applicationUser'
33
+ :'application_user' => :'applicationUser',
34
+ :'partner' => :'partner'
32
35
  }
33
36
  end
34
37
 
@@ -37,7 +40,8 @@ module CyberSource
37
40
  {
38
41
  :'code' => :'String',
39
42
  :'application_name' => :'String',
40
- :'application_user' => :'String'
43
+ :'application_user' => :'String',
44
+ :'partner' => :'TssV2TransactionsGet200ResponseClientReferenceInformationPartner'
41
45
  }
42
46
  end
43
47
 
@@ -60,6 +64,10 @@ module CyberSource
60
64
  if attributes.has_key?(:'applicationUser')
61
65
  self.application_user = attributes[:'applicationUser']
62
66
  end
67
+
68
+ if attributes.has_key?(:'partner')
69
+ self.partner = attributes[:'partner']
70
+ end
63
71
  end
64
72
 
65
73
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -88,7 +96,8 @@ module CyberSource
88
96
  self.class == o.class &&
89
97
  code == o.code &&
90
98
  application_name == o.application_name &&
91
- application_user == o.application_user
99
+ application_user == o.application_user &&
100
+ partner == o.partner
92
101
  end
93
102
 
94
103
  # @see the `==` method
@@ -100,7 +109,7 @@ module CyberSource
100
109
  # Calculates hash code according to all attributes.
101
110
  # @return [Fixnum] Hash code
102
111
  def hash
103
- [code, application_name, application_user].hash
112
+ [code, application_name, application_user, partner].hash
104
113
  end
105
114
 
106
115
  # Builds the object from hash
@@ -1,4 +1,4 @@
1
- module CyberSource
1
+ module CyberSource
2
2
  class TokenVerification
3
3
  def verifyToken(public_key, post_param)
4
4
  post_param = JSON.parse(post_param)
@@ -26,10 +26,10 @@ module CyberSource
26
26
  string_to_pem = Base64.decode64(public_key)
27
27
  public_key_to_pem = OpenSSL::PKey::RSA.new(string_to_pem)
28
28
  verify = public_key_to_pem.verify(OpenSSL::Digest::SHA512.new, Base64.decode64(signature), signed_values)
29
- rescue StandardError => err
30
- puts err.message
29
+ rescue StandardError => err
30
+ raise err
31
31
  end
32
-
32
+
33
33
  # Converting response field from camelCase to Underscore
34
34
  def CamelCasetoUnderscore(str)
35
35
  str.gsub(/::/, '/').