cybersource_rest_client 0.0.48 → 0.0.49

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 (106) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/api/payments_api.rb +71 -0
  3. data/lib/cybersource_rest_client/api/push_funds_api.rb +131 -0
  4. data/lib/cybersource_rest_client/models/invoicingv2invoices_order_information_amount_details_tax_details.rb +2 -2
  5. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1.rb +262 -0
  6. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_risk_information_providers_provider_name.rb → pts_v2_payments_post201_response_1_order_information.rb} +14 -19
  7. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_bill_to.rb +344 -0
  8. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_order_information_ship_to.rb +318 -0
  9. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information.rb +201 -0
  10. data/lib/cybersource_rest_client/models/{pts_v2_payments_post201_response_risk_information_providers.rb → pts_v2_payments_post201_response_1_payment_information_bank.rb} +8 -10
  11. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information_bank_account.rb +184 -0
  12. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information_payment_type.rb +183 -0
  13. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_payment_information_payment_type_method.rb +184 -0
  14. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information.rb +238 -0
  15. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information_avs.rb +190 -0
  16. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_1_processor_information_seller_protection.rb +184 -0
  17. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_processor_information.rb +22 -4
  18. data/lib/cybersource_rest_client/models/pts_v2_payments_post201_response_risk_information.rb +5 -2
  19. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response.rb +1 -1
  20. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_client_reference_information.rb +226 -0
  21. data/lib/cybersource_rest_client/models/pts_v2_payments_refund_post201_response_refund_amount_details.rb +17 -1
  22. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_aggregator_information.rb +215 -0
  23. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_aggregator_information_sub_merchant.rb +318 -0
  24. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_client_reference_information.rb +238 -0
  25. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_defined_information.rb +206 -0
  26. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information.rb +225 -0
  27. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_merchant_information_merchant_descriptor.rb +270 -0
  28. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information.rb +208 -0
  29. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information_amount_details.rb +224 -0
  30. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_order_information_surcharge.rb +190 -0
  31. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_point_of_service_information.rb +236 -0
  32. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information.rb +297 -0
  33. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_payouts_options.rb +206 -0
  34. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_information_recurring_options.rb +184 -0
  35. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_options.rb +183 -0
  36. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_options_funding_options.rb +183 -0
  37. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_processing_options_funding_options_initiator.rb +190 -0
  38. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information.rb +384 -0
  39. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information.rb +183 -0
  40. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card.rb +281 -0
  41. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card_customer.rb +190 -0
  42. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card_instrument_identifier.rb +190 -0
  43. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_payment_information_card_payment_instrument.rb +190 -0
  44. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_recipient_information_personal_identification.rb +206 -0
  45. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information.rb +425 -0
  46. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_account.rb +206 -0
  47. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_payment_information.rb +183 -0
  48. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_payment_information_card.rb +270 -0
  49. data/lib/cybersource_rest_client/models/ptsv1pushfundstransfer_sender_information_personal_identification.rb +222 -0
  50. data/lib/cybersource_rest_client/models/ptsv2payments_device_information.rb +11 -1
  51. data/lib/cybersource_rest_client/models/ptsv2payments_merchant_information.rb +17 -1
  52. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_amount_details_tax_details.rb +2 -2
  53. data/lib/cybersource_rest_client/models/ptsv2payments_order_information_bill_to.rb +30 -4
  54. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information.rb +21 -1
  55. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_bank.rb +20 -4
  56. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type.rb +2 -12
  57. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_payment_type_method.rb +15 -5
  58. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +12 -2
  59. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information.rb +63 -4
  60. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_buyer_information_personal_identification.rb +190 -0
  61. data/lib/cybersource_rest_client/models/ptsv2paymentsidcaptures_order_information_bill_to.rb +65 -1
  62. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_client_reference_information.rb +297 -0
  63. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information.rb +2 -2
  64. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_bank.rb +14 -4
  65. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_card.rb +36 -4
  66. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_e_wallet.rb +190 -0
  67. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_payment_type.rb +203 -0
  68. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_payment_information_payment_type_method.rb +184 -0
  69. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information.rb +35 -4
  70. data/lib/cybersource_rest_client/models/ptsv2paymentsidrefunds_processing_information_refund_options.rb +184 -0
  71. data/lib/cybersource_rest_client/models/ptsv2paymentsidvoids_payment_information.rb +1 -1
  72. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_agreement_information.rb +184 -0
  73. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_client_reference_information.rb +206 -0
  74. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_payment_information.rb +192 -0
  75. data/lib/cybersource_rest_client/models/{tss_v2_transactions_post201_response__embedded_payment_information_customer.rb → ptsv2refreshpaymentstatusid_payment_information_customer.rb} +1 -1
  76. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_payment_information_payment_type.rb +193 -0
  77. data/lib/cybersource_rest_client/models/ptsv2refreshpaymentstatusid_processing_information.rb +186 -0
  78. data/lib/cybersource_rest_client/models/push_funds201_response.rb +301 -0
  79. data/lib/cybersource_rest_client/models/push_funds201_response__links.rb +210 -0
  80. data/lib/cybersource_rest_client/models/push_funds201_response__links_customer.rb +195 -0
  81. data/lib/cybersource_rest_client/models/push_funds201_response__links_instrument_identifier.rb +195 -0
  82. data/lib/cybersource_rest_client/models/push_funds201_response__links_payment_instrument.rb +195 -0
  83. data/lib/cybersource_rest_client/models/push_funds201_response__links_self.rb +195 -0
  84. data/lib/cybersource_rest_client/models/push_funds201_response_client_reference_information.rb +206 -0
  85. data/lib/cybersource_rest_client/models/push_funds201_response_error_information.rb +217 -0
  86. data/lib/cybersource_rest_client/models/push_funds201_response_error_information_details.rb +206 -0
  87. data/lib/cybersource_rest_client/models/push_funds201_response_merchant_information.rb +183 -0
  88. data/lib/cybersource_rest_client/models/push_funds201_response_merchant_information_merchant_descriptor.rb +222 -0
  89. data/lib/cybersource_rest_client/models/push_funds201_response_order_information.rb +183 -0
  90. data/lib/cybersource_rest_client/models/push_funds201_response_order_information_amount_details.rb +247 -0
  91. data/lib/cybersource_rest_client/models/push_funds201_response_processor_information.rb +264 -0
  92. data/lib/cybersource_rest_client/models/push_funds201_response_recipient_information.rb +183 -0
  93. data/lib/cybersource_rest_client/models/push_funds201_response_recipient_information_card.rb +206 -0
  94. data/lib/cybersource_rest_client/models/push_funds400_response.rb +247 -0
  95. data/lib/cybersource_rest_client/models/push_funds400_response_details.rb +194 -0
  96. data/lib/cybersource_rest_client/models/push_funds401_response.rb +226 -0
  97. data/lib/cybersource_rest_client/models/push_funds404_response.rb +226 -0
  98. data/lib/cybersource_rest_client/models/push_funds502_response.rb +236 -0
  99. data/lib/cybersource_rest_client/models/push_funds_request.rb +264 -0
  100. data/lib/cybersource_rest_client/models/refresh_payment_status_request.rb +210 -0
  101. data/lib/cybersource_rest_client/models/refund_capture_request.rb +1 -1
  102. data/lib/cybersource_rest_client/models/refund_payment_request.rb +1 -1
  103. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_payment_information_payment_type.rb +1 -1
  104. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_payment_information.rb +1 -1
  105. data/lib/cybersource_rest_client.rb +77 -3
  106. metadata +79 -5
@@ -0,0 +1,297 @@
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 Ptsv2paymentsidrefundsClientReferenceInformation
17
+ # Merchant-generated order reference or tracking number. It is recommended that you send a unique value for each transaction so that you can perform meaningful searches for the transaction. #### Used by **Authorization** Required field. #### PIN Debit Requests for PIN debit reversals need to use the same merchant reference number that was used in the transaction that is being reversed. Required field for all PIN Debit requests (purchase, credit, and reversal). #### FDC Nashville Global Certain circumstances can cause the processor to truncate this value to 15 or 17 characters for Level II and Level III processing, which can cause a discrepancy between the value you submit and the value included in some processor reports.
18
+ attr_accessor :code
19
+
20
+ # Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response.
21
+ attr_accessor :reconciliation_id
22
+
23
+ # A new ID which is created for refund
24
+ attr_accessor :return_reconciliation_id
25
+
26
+ # Used to resume a transaction that was paused for an order modification rule to allow for payer authentication to complete. To resume and continue with the authorization/decision service flow, call the services and include the request id from the prior decision call.
27
+ attr_accessor :paused_request_id
28
+
29
+ # Identifier that you assign to the transaction. Normally generated by a client server to identify a unique API request. **Note** Use this field only if you want to support merchant-initiated reversal and void operations. #### Used by **Authorization, Authorization Reversal, Capture, Credit, and Void** Optional field. #### PIN Debit For a PIN debit reversal, your request must include a request ID or a merchant transaction identifier. Optional field for PIN debit purchase or credit requests.
30
+ attr_accessor :transaction_id
31
+
32
+ # Comments
33
+ attr_accessor :comments
34
+
35
+ attr_accessor :partner
36
+
37
+ # The name of the Connection Method client (such as Virtual Terminal or SOAP Toolkit API) that the merchant uses to send a transaction request to CyberSource.
38
+ attr_accessor :application_name
39
+
40
+ # Version of the CyberSource application or integration used for a transaction.
41
+ attr_accessor :application_version
42
+
43
+ # 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.
44
+ attr_accessor :application_user
45
+
46
+ # Attribute mapping from ruby-style variable name to JSON key.
47
+ def self.attribute_map
48
+ {
49
+ :'code' => :'code',
50
+ :'reconciliation_id' => :'reconciliationId',
51
+ :'return_reconciliation_id' => :'returnReconciliationId',
52
+ :'paused_request_id' => :'pausedRequestId',
53
+ :'transaction_id' => :'transactionId',
54
+ :'comments' => :'comments',
55
+ :'partner' => :'partner',
56
+ :'application_name' => :'applicationName',
57
+ :'application_version' => :'applicationVersion',
58
+ :'application_user' => :'applicationUser'
59
+ }
60
+ end
61
+
62
+ # Attribute type mapping.
63
+ def self.swagger_types
64
+ {
65
+ :'code' => :'String',
66
+ :'reconciliation_id' => :'String',
67
+ :'return_reconciliation_id' => :'String',
68
+ :'paused_request_id' => :'String',
69
+ :'transaction_id' => :'String',
70
+ :'comments' => :'String',
71
+ :'partner' => :'Ptsv2paymentsClientReferenceInformationPartner',
72
+ :'application_name' => :'String',
73
+ :'application_version' => :'String',
74
+ :'application_user' => :'String'
75
+ }
76
+ end
77
+
78
+ # Initializes the object
79
+ # @param [Hash] attributes Model attributes in the form of hash
80
+ def initialize(attributes = {})
81
+ return unless attributes.is_a?(Hash)
82
+
83
+ # convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
85
+
86
+ if attributes.has_key?(:'code')
87
+ self.code = attributes[:'code']
88
+ end
89
+
90
+ if attributes.has_key?(:'reconciliationId')
91
+ self.reconciliation_id = attributes[:'reconciliationId']
92
+ end
93
+
94
+ if attributes.has_key?(:'returnReconciliationId')
95
+ self.return_reconciliation_id = attributes[:'returnReconciliationId']
96
+ end
97
+
98
+ if attributes.has_key?(:'pausedRequestId')
99
+ self.paused_request_id = attributes[:'pausedRequestId']
100
+ end
101
+
102
+ if attributes.has_key?(:'transactionId')
103
+ self.transaction_id = attributes[:'transactionId']
104
+ end
105
+
106
+ if attributes.has_key?(:'comments')
107
+ self.comments = attributes[:'comments']
108
+ end
109
+
110
+ if attributes.has_key?(:'partner')
111
+ self.partner = attributes[:'partner']
112
+ end
113
+
114
+ if attributes.has_key?(:'applicationName')
115
+ self.application_name = attributes[:'applicationName']
116
+ end
117
+
118
+ if attributes.has_key?(:'applicationVersion')
119
+ self.application_version = attributes[:'applicationVersion']
120
+ end
121
+
122
+ if attributes.has_key?(:'applicationUser')
123
+ self.application_user = attributes[:'applicationUser']
124
+ end
125
+ end
126
+
127
+ # Show invalid properties with the reasons. Usually used together with valid?
128
+ # @return Array for valid properties with the reasons
129
+ def list_invalid_properties
130
+ invalid_properties = Array.new
131
+ invalid_properties
132
+ end
133
+
134
+ # Check to see if the all the properties in the model are valid
135
+ # @return true if the model is valid
136
+ def valid?
137
+ true
138
+ end
139
+
140
+ # Custom attribute writer method with validation
141
+ # @param [Object] code Value to be assigned
142
+ def code=(code)
143
+ @code = code
144
+ end
145
+
146
+ # Custom attribute writer method with validation
147
+ # @param [Object] reconciliation_id Value to be assigned
148
+ def reconciliation_id=(reconciliation_id)
149
+ @reconciliation_id = reconciliation_id
150
+ end
151
+
152
+ # Custom attribute writer method with validation
153
+ # @param [Object] paused_request_id Value to be assigned
154
+ def paused_request_id=(paused_request_id)
155
+ @paused_request_id = paused_request_id
156
+ end
157
+
158
+ # Custom attribute writer method with validation
159
+ # @param [Object] transaction_id Value to be assigned
160
+ def transaction_id=(transaction_id)
161
+ @transaction_id = transaction_id
162
+ end
163
+
164
+ # Checks equality by comparing each attribute.
165
+ # @param [Object] Object to be compared
166
+ def ==(o)
167
+ return true if self.equal?(o)
168
+ self.class == o.class &&
169
+ code == o.code &&
170
+ reconciliation_id == o.reconciliation_id &&
171
+ return_reconciliation_id == o.return_reconciliation_id &&
172
+ paused_request_id == o.paused_request_id &&
173
+ transaction_id == o.transaction_id &&
174
+ comments == o.comments &&
175
+ partner == o.partner &&
176
+ application_name == o.application_name &&
177
+ application_version == o.application_version &&
178
+ application_user == o.application_user
179
+ end
180
+
181
+ # @see the `==` method
182
+ # @param [Object] Object to be compared
183
+ def eql?(o)
184
+ self == o
185
+ end
186
+
187
+ # Calculates hash code according to all attributes.
188
+ # @return [Fixnum] Hash code
189
+ def hash
190
+ [code, reconciliation_id, return_reconciliation_id, paused_request_id, transaction_id, comments, partner, application_name, application_version, application_user].hash
191
+ end
192
+
193
+ # Builds the object from hash
194
+ # @param [Hash] attributes Model attributes in the form of hash
195
+ # @return [Object] Returns the model itself
196
+ def build_from_hash(attributes)
197
+ return nil unless attributes.is_a?(Hash)
198
+ self.class.swagger_types.each_pair do |key, type|
199
+ if type =~ /\AArray<(.*)>/i
200
+ # check to ensure the input is an array given that the the attribute
201
+ # is documented as an array but the input is not
202
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
203
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
204
+ end
205
+ elsif !attributes[self.class.attribute_map[key]].nil?
206
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
207
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
208
+ end
209
+
210
+ self
211
+ end
212
+
213
+ # Deserializes the data based on type
214
+ # @param string type Data type
215
+ # @param string value Value to be deserialized
216
+ # @return [Object] Deserialized data
217
+ def _deserialize(type, value)
218
+ case type.to_sym
219
+ when :DateTime
220
+ DateTime.parse(value)
221
+ when :Date
222
+ Date.parse(value)
223
+ when :String
224
+ value.to_s
225
+ when :Integer
226
+ value.to_i
227
+ when :Float
228
+ value.to_f
229
+ when :BOOLEAN
230
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
231
+ true
232
+ else
233
+ false
234
+ end
235
+ when :Object
236
+ # generic object (usually a Hash), return directly
237
+ value
238
+ when /\AArray<(?<inner_type>.+)>\z/
239
+ inner_type = Regexp.last_match[:inner_type]
240
+ value.map { |v| _deserialize(inner_type, v) }
241
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
242
+ k_type = Regexp.last_match[:k_type]
243
+ v_type = Regexp.last_match[:v_type]
244
+ {}.tap do |hash|
245
+ value.each do |k, v|
246
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
247
+ end
248
+ end
249
+ else # model
250
+ temp_model = CyberSource.const_get(type).new
251
+ temp_model.build_from_hash(value)
252
+ end
253
+ end
254
+
255
+ # Returns the string representation of the object
256
+ # @return [String] String presentation of the object
257
+ def to_s
258
+ to_hash.to_s
259
+ end
260
+
261
+ # to_body is an alias to to_hash (backward compatibility)
262
+ # @return [Hash] Returns the object in the form of hash
263
+ def to_body
264
+ to_hash
265
+ end
266
+
267
+ # Returns the object in the form of hash
268
+ # @return [Hash] Returns the object in the form of hash
269
+ def to_hash
270
+ hash = {}
271
+ self.class.attribute_map.each_pair do |attr, param|
272
+ value = self.send(attr)
273
+ next if value.nil?
274
+ hash[param] = _to_hash(value)
275
+ end
276
+ hash
277
+ end
278
+
279
+ # Outputs non-array value in the form of hash
280
+ # For object, use to_hash. Otherwise, just return the value
281
+ # @param [Object] value Any valid value
282
+ # @return [Hash] Returns the value in the form of hash
283
+ def _to_hash(value)
284
+ if value.is_a?(Array)
285
+ value.compact.map { |v| _to_hash(v) }
286
+ elsif value.is_a?(Hash)
287
+ {}.tap do |hash|
288
+ value.each { |k, v| hash[k] = _to_hash(v) }
289
+ end
290
+ elsif value.respond_to? :to_hash
291
+ value.to_hash
292
+ else
293
+ value
294
+ end
295
+ end
296
+ end
297
+ end
@@ -65,8 +65,8 @@ module CyberSource
65
65
  :'instrument_identifier' => :'Ptsv2paymentsPaymentInformationInstrumentIdentifier',
66
66
  :'shipping_address' => :'Ptsv2paymentsPaymentInformationShippingAddress',
67
67
  :'legacy_token' => :'Ptsv2paymentsPaymentInformationLegacyToken',
68
- :'payment_type' => :'Ptsv2paymentsPaymentInformationPaymentType',
69
- :'e_wallet' => :'Ptsv2paymentsPaymentInformationEWallet'
68
+ :'payment_type' => :'Ptsv2paymentsidrefundsPaymentInformationPaymentType',
69
+ :'e_wallet' => :'Ptsv2paymentsidrefundsPaymentInformationEWallet'
70
70
  }
71
71
  end
72
72
 
@@ -22,12 +22,16 @@ module CyberSource
22
22
  # International Bank Account Number (IBAN) for the bank account. For some countries you can provide this number instead of the traditional bank account information. You can use this field only when scoring a direct debit transaction. For all possible values, see the `bank_iban` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
23
23
  attr_accessor :iban
24
24
 
25
+ # Bank’s SWIFT code. You can use this field only when scoring a direct debit transaction. Required only for crossborder transactions. For all possible values, see the `bank_swiftcode` field description in the _Decision Manager Using the SCMP API Developer Guide_ on the [CyberSource Business Center.](https://ebc2.cybersource.com/ebc2/) Click **Decision Manager** > **Documentation** > **Guides** > _Decision Manager Using the SCMP API Developer Guide_ (PDF link).
26
+ attr_accessor :swift_code
27
+
25
28
  # Attribute mapping from ruby-style variable name to JSON key.
26
29
  def self.attribute_map
27
30
  {
28
31
  :'account' => :'account',
29
32
  :'routing_number' => :'routingNumber',
30
- :'iban' => :'iban'
33
+ :'iban' => :'iban',
34
+ :'swift_code' => :'swiftCode'
31
35
  }
32
36
  end
33
37
 
@@ -36,7 +40,8 @@ module CyberSource
36
40
  {
37
41
  :'account' => :'Ptsv2paymentsPaymentInformationBankAccount',
38
42
  :'routing_number' => :'String',
39
- :'iban' => :'String'
43
+ :'iban' => :'String',
44
+ :'swift_code' => :'String'
40
45
  }
41
46
  end
42
47
 
@@ -59,6 +64,10 @@ module CyberSource
59
64
  if attributes.has_key?(:'iban')
60
65
  self.iban = attributes[:'iban']
61
66
  end
67
+
68
+ if attributes.has_key?(:'swiftCode')
69
+ self.swift_code = attributes[:'swiftCode']
70
+ end
62
71
  end
63
72
 
64
73
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -93,7 +102,8 @@ module CyberSource
93
102
  self.class == o.class &&
94
103
  account == o.account &&
95
104
  routing_number == o.routing_number &&
96
- iban == o.iban
105
+ iban == o.iban &&
106
+ swift_code == o.swift_code
97
107
  end
98
108
 
99
109
  # @see the `==` method
@@ -105,7 +115,7 @@ module CyberSource
105
115
  # Calculates hash code according to all attributes.
106
116
  # @return [Fixnum] Hash code
107
117
  def hash
108
- [account, routing_number, iban].hash
118
+ [account, routing_number, iban, swift_code].hash
109
119
  end
110
120
 
111
121
  # Builds the object from hash
@@ -44,6 +44,12 @@ module CyberSource
44
44
  # Type of account that is being used when the value for the override_payment_method field is line of credit (LI) or prepaid card (PP). Possible values for line of credit: - `AGRC`: Visa Agro Custeio - `AGRE`: Visa Agro Electron - `AGRI`: Visa Agro Investimento - `AGRO`: Visa Agro Possible values for prepaid card: - `VVA`: Visa Vale Alimentacao - `VVF`: Visa Vale Flex - `VVR`: Visa Vale Refeicao This field is supported only for combo card transactions in Brazil on CyberSource through VisaNet.
45
45
  attr_accessor :source_account_type_details
46
46
 
47
+ # Card Verification Number. #### FDMS Nashville Required for American Express or if swiped; otherwise, optional. #### Ingenico ePayments Do not include this field when `commerceIndicator=recurring`. **Note** Ingenico ePayments was previously called _Global Collect_. #### TSYS Acquiring Solutions Optional if pointOfSaleInformation.entryMode=keyed; otherwise, not used. #### GPX Optional. #### All other processors: Optional.
48
+ attr_accessor :security_code
49
+
50
+ # Flag that specifies the type of account associated with the card. The cardholder provides this information during the payment process. Possible values: - C: Credit transaction - D: Debit transaction This field is supported only for all card Types on Visa Platform Connect. This field is required for: - Debit transactions on Cielo and Comercio Latino. - Transactions with Brazilian-issued cards on CyberSource through VisaNet. **Note** The value for this field corresponds to the following data in the TC 33 capture file5: - Record: CP07 TCR0 - Position: 51 - Field: Combination Card Transaction Identifier
51
+ attr_accessor :use_as
52
+
47
53
  # Attribute mapping from ruby-style variable name to JSON key.
48
54
  def self.attribute_map
49
55
  {
@@ -56,7 +62,9 @@ module CyberSource
56
62
  :'start_month' => :'startMonth',
57
63
  :'start_year' => :'startYear',
58
64
  :'source_account_type' => :'sourceAccountType',
59
- :'source_account_type_details' => :'sourceAccountTypeDetails'
65
+ :'source_account_type_details' => :'sourceAccountTypeDetails',
66
+ :'security_code' => :'securityCode',
67
+ :'use_as' => :'useAs'
60
68
  }
61
69
  end
62
70
 
@@ -72,7 +80,9 @@ module CyberSource
72
80
  :'start_month' => :'String',
73
81
  :'start_year' => :'String',
74
82
  :'source_account_type' => :'String',
75
- :'source_account_type_details' => :'String'
83
+ :'source_account_type_details' => :'String',
84
+ :'security_code' => :'String',
85
+ :'use_as' => :'String'
76
86
  }
77
87
  end
78
88
 
@@ -123,6 +133,14 @@ module CyberSource
123
133
  if attributes.has_key?(:'sourceAccountTypeDetails')
124
134
  self.source_account_type_details = attributes[:'sourceAccountTypeDetails']
125
135
  end
136
+
137
+ if attributes.has_key?(:'securityCode')
138
+ self.security_code = attributes[:'securityCode']
139
+ end
140
+
141
+ if attributes.has_key?(:'useAs')
142
+ self.use_as = attributes[:'useAs']
143
+ end
126
144
  end
127
145
 
128
146
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -192,6 +210,18 @@ module CyberSource
192
210
  @source_account_type_details = source_account_type_details
193
211
  end
194
212
 
213
+ # Custom attribute writer method with validation
214
+ # @param [Object] security_code Value to be assigned
215
+ def security_code=(security_code)
216
+ @security_code = security_code
217
+ end
218
+
219
+ # Custom attribute writer method with validation
220
+ # @param [Object] use_as Value to be assigned
221
+ def use_as=(use_as)
222
+ @use_as = use_as
223
+ end
224
+
195
225
  # Checks equality by comparing each attribute.
196
226
  # @param [Object] Object to be compared
197
227
  def ==(o)
@@ -206,7 +236,9 @@ module CyberSource
206
236
  start_month == o.start_month &&
207
237
  start_year == o.start_year &&
208
238
  source_account_type == o.source_account_type &&
209
- source_account_type_details == o.source_account_type_details
239
+ source_account_type_details == o.source_account_type_details &&
240
+ security_code == o.security_code &&
241
+ use_as == o.use_as
210
242
  end
211
243
 
212
244
  # @see the `==` method
@@ -218,7 +250,7 @@ module CyberSource
218
250
  # Calculates hash code according to all attributes.
219
251
  # @return [Fixnum] Hash code
220
252
  def hash
221
- [number, expiration_month, expiration_year, type, account_encoder_id, issue_number, start_month, start_year, source_account_type, source_account_type_details].hash
253
+ [number, expiration_month, expiration_year, type, account_encoder_id, issue_number, start_month, start_year, source_account_type, source_account_type_details, security_code, use_as].hash
222
254
  end
223
255
 
224
256
  # Builds the object from hash
@@ -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 Ptsv2paymentsidrefundsPaymentInformationEWallet
17
+ # Payment mode for the authorization or order transaction.  INSTANT_TRANSFER  MANUAL_BANK_TRANSFER  DELAYED_TRANSFER  ECHECK
18
+ attr_accessor :funding_source
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'funding_source' => :'fundingSource'
24
+ }
25
+ end
26
+
27
+ # Attribute type mapping.
28
+ def self.swagger_types
29
+ {
30
+ :'funding_source' => :'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?(:'fundingSource')
43
+ self.funding_source = attributes[:'fundingSource']
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] funding_source Value to be assigned
62
+ def funding_source=(funding_source)
63
+ @funding_source = funding_source
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
+ funding_source == o.funding_source
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
+ [funding_source].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