cybersource_rest_client 0.0.67 → 0.0.68
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.
- checksums.yaml +4 -4
- data/lib/cybersource_rest_client/models/card_processing_config_common_acquirer.rb +257 -257
- data/lib/cybersource_rest_client/models/card_processing_config_common_merchant_descriptor_information.rb +279 -279
- data/lib/cybersource_rest_client/models/commerce_solutions_products_token_management_configuration_information_configurations.rb +200 -190
- data/lib/cybersource_rest_client/models/commerce_solutions_products_token_management_configuration_information_configurations_vault.rb +251 -0
- data/lib/cybersource_rest_client/models/e_check_config_common_internal_only_processors.rb +267 -263
- data/lib/cybersource_rest_client/models/e_check_config_common_processors.rb +273 -271
- data/lib/cybersource_rest_client/models/e_check_config_features_account_validation_service_internal_only_processors.rb +193 -191
- data/lib/cybersource_rest_client/models/e_check_config_features_account_validation_service_processors.rb +285 -283
- data/lib/cybersource_rest_client/models/flexv2sessions_fields.rb +199 -199
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information.rb +209 -209
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_amount_details.rb +199 -199
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_amount_details_total_amount.rb +189 -189
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_bill_to.rb +309 -309
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_ship_to.rb +289 -289
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_payment_information.rb +189 -189
- data/lib/cybersource_rest_client/models/flexv2sessions_fields_payment_information_card.rb +229 -229
- data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +13 -13
- data/lib/cybersource_rest_client/models/generate_flex_api_capture_context_request.rb +189 -189
- data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +13 -13
- data/lib/cybersource_rest_client/models/inline_response_400_1_details.rb +199 -199
- data/lib/cybersource_rest_client/models/inline_response_400_2.rb +235 -235
- data/lib/cybersource_rest_client/models/inline_response_400_3.rb +235 -235
- data/lib/cybersource_rest_client/models/inline_response_400_4.rb +235 -235
- data/lib/cybersource_rest_client/models/inline_response_400_5.rb +258 -258
- data/lib/cybersource_rest_client/models/inline_response_400_5_fields.rb +213 -213
- data/lib/cybersource_rest_client/models/inline_response_400_6_details.rb +201 -201
- data/lib/cybersource_rest_client/models/patch_instrument_identifier_request.rb +313 -313
- data/lib/cybersource_rest_client/models/post_instrument_identifier_enrollment_request.rb +313 -313
- data/lib/cybersource_rest_client/models/post_instrument_identifier_request.rb +313 -313
- data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +305 -305
- data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +445 -428
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_japan_payment_options.rb +339 -411
- data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_japan_payment_options_bonuses.rb +213 -0
- data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +383 -383
- data/lib/cybersource_rest_client/models/ptsv2payments_recurring_payment_information.rb +363 -363
- data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +298 -298
- data/lib/cybersource_rest_client/models/ptsv2paymentsid_client_reference_information.rb +256 -256
- data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +219 -219
- data/lib/cybersource_rest_client/models/riskv1authentications_payment_information.rb +219 -219
- data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_customer.rb +222 -222
- data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_customer.rb +205 -205
- data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +795 -795
- data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_order_information_line_items.rb +305 -314
- data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier.rb +313 -313
- data/lib/cybersource_rest_client/models/tms_network_token_services.rb +239 -0
- data/lib/cybersource_rest_client/models/tms_network_token_services_american_express_token_service.rb +253 -0
- data/lib/cybersource_rest_client/models/tms_network_token_services_mastercard_digital_enablement_service.rb +227 -0
- data/lib/cybersource_rest_client/models/tms_network_token_services_notifications.rb +190 -0
- data/lib/cybersource_rest_client/models/tms_network_token_services_payment_credentials.rb +190 -0
- data/lib/cybersource_rest_client/models/tms_network_token_services_synchronous_provisioning.rb +190 -0
- data/lib/cybersource_rest_client/models/tms_network_token_services_visa_token_service.rb +244 -0
- data/lib/cybersource_rest_client/models/tms_nullify.rb +212 -0
- data/lib/cybersource_rest_client/models/tms_sensitive_privileges.rb +190 -0
- data/lib/cybersource_rest_client/models/tms_token_formats.rb +223 -0
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card.rb +321 -321
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_card.rb +225 -225
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art.rb +250 -250
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset.rb +200 -200
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset__links.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset__links_self.rb +190 -190
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset.rb +200 -200
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset__links.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset__links_self.rb +190 -190
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset.rb +200 -200
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset__links.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset__links_self.rb +190 -190
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset.rb +200 -200
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset__links.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset__links_self.rb +190 -190
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset.rb +200 -200
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset__links.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset__links_self.rb +190 -190
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset.rb +200 -200
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset__links.rb +189 -189
- data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset__links_self.rb +190 -190
- data/lib/cybersource_rest_client/models/token_permissions.rb +223 -0
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +326 -326
- data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_japan_payment_options.rb +322 -247
- data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +241 -241
- data/lib/cybersource_rest_client.rb +13 -0
- metadata +16 -3
@@ -1,411 +1,339 @@
|
|
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 Ptsv2paymentsProcessingInformationJapanPaymentOptions
|
16
|
-
# This value is a 2-digit code indicating the payment method. Use Payment Method Code value that applies to the tranasction. - 10 (One-time payment) - 21, 22, 23, 24 (Bonus(one-time)payment) - 61 (Installment payment) - 31, 32, 33, 34 (Integrated (Bonus + Installment)payment) - 80 (Revolving payment)
|
17
|
-
attr_accessor :payment_method
|
18
|
-
|
19
|
-
#
|
20
|
-
attr_accessor :bonuses
|
21
|
-
|
22
|
-
# This
|
23
|
-
attr_accessor :
|
24
|
-
|
25
|
-
#
|
26
|
-
attr_accessor :
|
27
|
-
|
28
|
-
#
|
29
|
-
attr_accessor :
|
30
|
-
|
31
|
-
#
|
32
|
-
attr_accessor :
|
33
|
-
|
34
|
-
#
|
35
|
-
attr_accessor :
|
36
|
-
|
37
|
-
#
|
38
|
-
attr_accessor :
|
39
|
-
|
40
|
-
#
|
41
|
-
attr_accessor :
|
42
|
-
|
43
|
-
#
|
44
|
-
attr_accessor :
|
45
|
-
|
46
|
-
#
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
:'
|
66
|
-
:'
|
67
|
-
:'preapproval_type' => :'
|
68
|
-
:'installments' => :'installments',
|
69
|
-
:'terminal_id' => :'
|
70
|
-
:'first_billing_month' => :'
|
71
|
-
:'business_name' => :'
|
72
|
-
:'business_name_katakana' => :'
|
73
|
-
:'jis2_track_data' => :'
|
74
|
-
:'business_name_alpha_numeric' => :'
|
75
|
-
}
|
76
|
-
end
|
77
|
-
|
78
|
-
# Attribute mapping
|
79
|
-
def self.
|
80
|
-
{
|
81
|
-
:'payment_method' => :'
|
82
|
-
:'bonuses' => :'
|
83
|
-
:'
|
84
|
-
:'
|
85
|
-
:'
|
86
|
-
:'
|
87
|
-
:'
|
88
|
-
:'
|
89
|
-
:'
|
90
|
-
:'
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
{
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
#
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
#
|
257
|
-
# @param
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
#
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
value.to_i
|
341
|
-
when :Float
|
342
|
-
value.to_f
|
343
|
-
when :BOOLEAN
|
344
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
345
|
-
true
|
346
|
-
else
|
347
|
-
false
|
348
|
-
end
|
349
|
-
when :Object
|
350
|
-
# generic object (usually a Hash), return directly
|
351
|
-
value
|
352
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
353
|
-
inner_type = Regexp.last_match[:inner_type]
|
354
|
-
value.map { |v| _deserialize(inner_type, v) }
|
355
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
356
|
-
k_type = Regexp.last_match[:k_type]
|
357
|
-
v_type = Regexp.last_match[:v_type]
|
358
|
-
{}.tap do |hash|
|
359
|
-
value.each do |k, v|
|
360
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
361
|
-
end
|
362
|
-
end
|
363
|
-
else # model
|
364
|
-
temp_model = CyberSource.const_get(type).new
|
365
|
-
temp_model.build_from_hash(value)
|
366
|
-
end
|
367
|
-
end
|
368
|
-
|
369
|
-
# Returns the string representation of the object
|
370
|
-
# @return [String] String presentation of the object
|
371
|
-
def to_s
|
372
|
-
to_hash.to_s
|
373
|
-
end
|
374
|
-
|
375
|
-
# to_body is an alias to to_hash (backward compatibility)
|
376
|
-
# @return [Hash] Returns the object in the form of hash
|
377
|
-
def to_body
|
378
|
-
to_hash
|
379
|
-
end
|
380
|
-
|
381
|
-
# Returns the object in the form of hash
|
382
|
-
# @return [Hash] Returns the object in the form of hash
|
383
|
-
def to_hash
|
384
|
-
hash = {}
|
385
|
-
self.class.attribute_map.each_pair do |attr, param|
|
386
|
-
value = self.send(attr)
|
387
|
-
next if value.nil?
|
388
|
-
hash[param] = _to_hash(value)
|
389
|
-
end
|
390
|
-
hash
|
391
|
-
end
|
392
|
-
|
393
|
-
# Outputs non-array value in the form of hash
|
394
|
-
# For object, use to_hash. Otherwise, just return the value
|
395
|
-
# @param [Object] value Any valid value
|
396
|
-
# @return [Hash] Returns the value in the form of hash
|
397
|
-
def _to_hash(value)
|
398
|
-
if value.is_a?(Array)
|
399
|
-
value.compact.map { |v| _to_hash(v) }
|
400
|
-
elsif value.is_a?(Hash)
|
401
|
-
{}.tap do |hash|
|
402
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
403
|
-
end
|
404
|
-
elsif value.respond_to? :to_hash
|
405
|
-
value.to_hash
|
406
|
-
else
|
407
|
-
value
|
408
|
-
end
|
409
|
-
end
|
410
|
-
end
|
411
|
-
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 Ptsv2paymentsProcessingInformationJapanPaymentOptions
|
16
|
+
# This value is a 2-digit code indicating the payment method. Use Payment Method Code value that applies to the tranasction. - 10 (One-time payment) - 21, 22, 23, 24 (Bonus(one-time)payment) - 61 (Installment payment) - 31, 32, 33, 34 (Integrated (Bonus + Installment)payment) - 80 (Revolving payment)
|
17
|
+
attr_accessor :payment_method
|
18
|
+
|
19
|
+
# An array of objects, each of which contains a bonus month and bonus amount. Length of bonuses array is equal to the number of bonuses. Max length = 6. In case of bonus month and amount not specified, null objects to be returned in the array. Example: bonuses : [ {\"month\": \"1\",\"amount\": \"200\"}, {\"month\": \"3\",\"amount\": \"2500\"}, null]
|
20
|
+
attr_accessor :bonuses
|
21
|
+
|
22
|
+
# This will contain the details of the kind of transaction that has been processe. Used only for Japan. Possible Values: - 0 = Normal (authorization with amount and clearing/settlement; data capture or paper draft) - 1 = Negative card authorization (authorization-only with 0 or 1 amount) - 2 = Reservation of authorization (authorization-only with amount) - 3 = Cancel transaction - 4 = Merchant-initiated reversal/refund transactions - 5 = Cancel reservation of authorization - 6 = Post authorization
|
23
|
+
attr_accessor :preapproval_type
|
24
|
+
|
25
|
+
# Number of Installments.
|
26
|
+
attr_accessor :installments
|
27
|
+
|
28
|
+
# Unique Japan Credit Card Association (JCCA) terminal identifier. The difference between this field and the `pointOfSaleInformation.terminalID` field is that you can define `pointOfSaleInformation.terminalID`, but `processingInformation.japanPaymentOptions.terminalId` is defined by the JCCA and is used only in Japan. This field is supported only on CyberSource through VisaNet and JCN Gateway. Optional field.
|
29
|
+
attr_accessor :terminal_id
|
30
|
+
|
31
|
+
# Billing month in MM format.
|
32
|
+
attr_accessor :first_billing_month
|
33
|
+
|
34
|
+
# Business name in Japanese characters. This field is supported only on JCN Gateway and for the Sumitomo Mitsui Card Co. acquirer on CyberSource through VisaNet.
|
35
|
+
attr_accessor :business_name
|
36
|
+
|
37
|
+
# Business name in Katakana characters. This field is supported only on JCN Gateway and for the Sumitomo Mitsui Card Co. acquirer on CyberSource through VisaNet.
|
38
|
+
attr_accessor :business_name_katakana
|
39
|
+
|
40
|
+
# Japanese Industrial Standard Type 2 (JIS2) track data from the front of the card. This field is supported only on CyberSource through VisaNet and JCN Gateway. Optional field.
|
41
|
+
attr_accessor :jis2_track_data
|
42
|
+
|
43
|
+
# Business name in alphanumeric characters. This field is supported only on JCN Gateway and for the Sumitomo Mitsui Card Co. acquirer on CyberSource through VisaNet.
|
44
|
+
attr_accessor :business_name_alpha_numeric
|
45
|
+
|
46
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
47
|
+
def self.attribute_map
|
48
|
+
{
|
49
|
+
:'payment_method' => :'paymentMethod',
|
50
|
+
:'bonuses' => :'bonuses',
|
51
|
+
:'preapproval_type' => :'preapprovalType',
|
52
|
+
:'installments' => :'installments',
|
53
|
+
:'terminal_id' => :'terminalId',
|
54
|
+
:'first_billing_month' => :'firstBillingMonth',
|
55
|
+
:'business_name' => :'businessName',
|
56
|
+
:'business_name_katakana' => :'businessNameKatakana',
|
57
|
+
:'jis2_track_data' => :'jis2TrackData',
|
58
|
+
:'business_name_alpha_numeric' => :'businessNameAlphaNumeric'
|
59
|
+
}
|
60
|
+
end
|
61
|
+
|
62
|
+
# Attribute mapping from JSON key to ruby-style variable name.
|
63
|
+
def self.json_map
|
64
|
+
{
|
65
|
+
:'payment_method' => :'payment_method',
|
66
|
+
:'bonuses' => :'bonuses',
|
67
|
+
:'preapproval_type' => :'preapproval_type',
|
68
|
+
:'installments' => :'installments',
|
69
|
+
:'terminal_id' => :'terminal_id',
|
70
|
+
:'first_billing_month' => :'first_billing_month',
|
71
|
+
:'business_name' => :'business_name',
|
72
|
+
:'business_name_katakana' => :'business_name_katakana',
|
73
|
+
:'jis2_track_data' => :'jis2_track_data',
|
74
|
+
:'business_name_alpha_numeric' => :'business_name_alpha_numeric'
|
75
|
+
}
|
76
|
+
end
|
77
|
+
|
78
|
+
# Attribute type mapping.
|
79
|
+
def self.swagger_types
|
80
|
+
{
|
81
|
+
:'payment_method' => :'String',
|
82
|
+
:'bonuses' => :'Array<Ptsv2paymentsProcessingInformationJapanPaymentOptionsBonuses>',
|
83
|
+
:'preapproval_type' => :'String',
|
84
|
+
:'installments' => :'String',
|
85
|
+
:'terminal_id' => :'String',
|
86
|
+
:'first_billing_month' => :'String',
|
87
|
+
:'business_name' => :'String',
|
88
|
+
:'business_name_katakana' => :'String',
|
89
|
+
:'jis2_track_data' => :'String',
|
90
|
+
:'business_name_alpha_numeric' => :'String'
|
91
|
+
}
|
92
|
+
end
|
93
|
+
|
94
|
+
# Initializes the object
|
95
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
96
|
+
def initialize(attributes = {})
|
97
|
+
return unless attributes.is_a?(Hash)
|
98
|
+
|
99
|
+
# convert string to symbol for hash key
|
100
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
101
|
+
|
102
|
+
if attributes.has_key?(:'paymentMethod')
|
103
|
+
self.payment_method = attributes[:'paymentMethod']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'bonuses')
|
107
|
+
if (value = attributes[:'bonuses']).is_a?(Array)
|
108
|
+
self.bonuses = value
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
if attributes.has_key?(:'preapprovalType')
|
113
|
+
self.preapproval_type = attributes[:'preapprovalType']
|
114
|
+
end
|
115
|
+
|
116
|
+
if attributes.has_key?(:'installments')
|
117
|
+
self.installments = attributes[:'installments']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'terminalId')
|
121
|
+
self.terminal_id = attributes[:'terminalId']
|
122
|
+
end
|
123
|
+
|
124
|
+
if attributes.has_key?(:'firstBillingMonth')
|
125
|
+
self.first_billing_month = attributes[:'firstBillingMonth']
|
126
|
+
end
|
127
|
+
|
128
|
+
if attributes.has_key?(:'businessName')
|
129
|
+
self.business_name = attributes[:'businessName']
|
130
|
+
end
|
131
|
+
|
132
|
+
if attributes.has_key?(:'businessNameKatakana')
|
133
|
+
self.business_name_katakana = attributes[:'businessNameKatakana']
|
134
|
+
end
|
135
|
+
|
136
|
+
if attributes.has_key?(:'jis2TrackData')
|
137
|
+
self.jis2_track_data = attributes[:'jis2TrackData']
|
138
|
+
end
|
139
|
+
|
140
|
+
if attributes.has_key?(:'businessNameAlphaNumeric')
|
141
|
+
self.business_name_alpha_numeric = attributes[:'businessNameAlphaNumeric']
|
142
|
+
end
|
143
|
+
end
|
144
|
+
|
145
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
146
|
+
# @return Array for valid properties with the reasons
|
147
|
+
def list_invalid_properties
|
148
|
+
invalid_properties = Array.new
|
149
|
+
invalid_properties
|
150
|
+
end
|
151
|
+
|
152
|
+
# Check to see if the all the properties in the model are valid
|
153
|
+
# @return true if the model is valid
|
154
|
+
def valid?
|
155
|
+
true
|
156
|
+
end
|
157
|
+
|
158
|
+
# Custom attribute writer method with validation
|
159
|
+
# @param [Object] payment_method Value to be assigned
|
160
|
+
def payment_method=(payment_method)
|
161
|
+
@payment_method = payment_method
|
162
|
+
end
|
163
|
+
|
164
|
+
# Custom attribute writer method with validation
|
165
|
+
# @param [Object] preapproval_type Value to be assigned
|
166
|
+
def preapproval_type=(preapproval_type)
|
167
|
+
@preapproval_type = preapproval_type
|
168
|
+
end
|
169
|
+
|
170
|
+
# Custom attribute writer method with validation
|
171
|
+
# @param [Object] terminal_id Value to be assigned
|
172
|
+
def terminal_id=(terminal_id)
|
173
|
+
@terminal_id = terminal_id
|
174
|
+
end
|
175
|
+
|
176
|
+
# Custom attribute writer method with validation
|
177
|
+
# @param [Object] first_billing_month Value to be assigned
|
178
|
+
def first_billing_month=(first_billing_month)
|
179
|
+
@first_billing_month = first_billing_month
|
180
|
+
end
|
181
|
+
|
182
|
+
# Custom attribute writer method with validation
|
183
|
+
# @param [Object] business_name Value to be assigned
|
184
|
+
def business_name=(business_name)
|
185
|
+
@business_name = business_name
|
186
|
+
end
|
187
|
+
|
188
|
+
# Custom attribute writer method with validation
|
189
|
+
# @param [Object] business_name_katakana Value to be assigned
|
190
|
+
def business_name_katakana=(business_name_katakana)
|
191
|
+
@business_name_katakana = business_name_katakana
|
192
|
+
end
|
193
|
+
|
194
|
+
# Custom attribute writer method with validation
|
195
|
+
# @param [Object] jis2_track_data Value to be assigned
|
196
|
+
def jis2_track_data=(jis2_track_data)
|
197
|
+
@jis2_track_data = jis2_track_data
|
198
|
+
end
|
199
|
+
|
200
|
+
# Custom attribute writer method with validation
|
201
|
+
# @param [Object] business_name_alpha_numeric Value to be assigned
|
202
|
+
def business_name_alpha_numeric=(business_name_alpha_numeric)
|
203
|
+
@business_name_alpha_numeric = business_name_alpha_numeric
|
204
|
+
end
|
205
|
+
|
206
|
+
# Checks equality by comparing each attribute.
|
207
|
+
# @param [Object] Object to be compared
|
208
|
+
def ==(o)
|
209
|
+
return true if self.equal?(o)
|
210
|
+
self.class == o.class &&
|
211
|
+
payment_method == o.payment_method &&
|
212
|
+
bonuses == o.bonuses &&
|
213
|
+
preapproval_type == o.preapproval_type &&
|
214
|
+
installments == o.installments &&
|
215
|
+
terminal_id == o.terminal_id &&
|
216
|
+
first_billing_month == o.first_billing_month &&
|
217
|
+
business_name == o.business_name &&
|
218
|
+
business_name_katakana == o.business_name_katakana &&
|
219
|
+
jis2_track_data == o.jis2_track_data &&
|
220
|
+
business_name_alpha_numeric == o.business_name_alpha_numeric
|
221
|
+
end
|
222
|
+
|
223
|
+
# @see the `==` method
|
224
|
+
# @param [Object] Object to be compared
|
225
|
+
def eql?(o)
|
226
|
+
self == o
|
227
|
+
end
|
228
|
+
|
229
|
+
# Calculates hash code according to all attributes.
|
230
|
+
# @return [Fixnum] Hash code
|
231
|
+
def hash
|
232
|
+
[payment_method, bonuses, preapproval_type, installments, terminal_id, first_billing_month, business_name, business_name_katakana, jis2_track_data, business_name_alpha_numeric].hash
|
233
|
+
end
|
234
|
+
|
235
|
+
# Builds the object from hash
|
236
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
237
|
+
# @return [Object] Returns the model itself
|
238
|
+
def build_from_hash(attributes)
|
239
|
+
return nil unless attributes.is_a?(Hash)
|
240
|
+
self.class.swagger_types.each_pair do |key, type|
|
241
|
+
if type =~ /\AArray<(.*)>/i
|
242
|
+
# check to ensure the input is an array given that the the attribute
|
243
|
+
# is documented as an array but the input is not
|
244
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
245
|
+
self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
246
|
+
end
|
247
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
248
|
+
self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
249
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
250
|
+
end
|
251
|
+
|
252
|
+
self
|
253
|
+
end
|
254
|
+
|
255
|
+
# Deserializes the data based on type
|
256
|
+
# @param string type Data type
|
257
|
+
# @param string value Value to be deserialized
|
258
|
+
# @return [Object] Deserialized data
|
259
|
+
def _deserialize(type, value)
|
260
|
+
case type.to_sym
|
261
|
+
when :DateTime
|
262
|
+
DateTime.parse(value)
|
263
|
+
when :Date
|
264
|
+
Date.parse(value)
|
265
|
+
when :String
|
266
|
+
value.to_s
|
267
|
+
when :Integer
|
268
|
+
value.to_i
|
269
|
+
when :Float
|
270
|
+
value.to_f
|
271
|
+
when :BOOLEAN
|
272
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
273
|
+
true
|
274
|
+
else
|
275
|
+
false
|
276
|
+
end
|
277
|
+
when :Object
|
278
|
+
# generic object (usually a Hash), return directly
|
279
|
+
value
|
280
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
281
|
+
inner_type = Regexp.last_match[:inner_type]
|
282
|
+
value.map { |v| _deserialize(inner_type, v) }
|
283
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
284
|
+
k_type = Regexp.last_match[:k_type]
|
285
|
+
v_type = Regexp.last_match[:v_type]
|
286
|
+
{}.tap do |hash|
|
287
|
+
value.each do |k, v|
|
288
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
289
|
+
end
|
290
|
+
end
|
291
|
+
else # model
|
292
|
+
temp_model = CyberSource.const_get(type).new
|
293
|
+
temp_model.build_from_hash(value)
|
294
|
+
end
|
295
|
+
end
|
296
|
+
|
297
|
+
# Returns the string representation of the object
|
298
|
+
# @return [String] String presentation of the object
|
299
|
+
def to_s
|
300
|
+
to_hash.to_s
|
301
|
+
end
|
302
|
+
|
303
|
+
# to_body is an alias to to_hash (backward compatibility)
|
304
|
+
# @return [Hash] Returns the object in the form of hash
|
305
|
+
def to_body
|
306
|
+
to_hash
|
307
|
+
end
|
308
|
+
|
309
|
+
# Returns the object in the form of hash
|
310
|
+
# @return [Hash] Returns the object in the form of hash
|
311
|
+
def to_hash
|
312
|
+
hash = {}
|
313
|
+
self.class.attribute_map.each_pair do |attr, param|
|
314
|
+
value = self.send(attr)
|
315
|
+
next if value.nil?
|
316
|
+
hash[param] = _to_hash(value)
|
317
|
+
end
|
318
|
+
hash
|
319
|
+
end
|
320
|
+
|
321
|
+
# Outputs non-array value in the form of hash
|
322
|
+
# For object, use to_hash. Otherwise, just return the value
|
323
|
+
# @param [Object] value Any valid value
|
324
|
+
# @return [Hash] Returns the value in the form of hash
|
325
|
+
def _to_hash(value)
|
326
|
+
if value.is_a?(Array)
|
327
|
+
value.compact.map { |v| _to_hash(v) }
|
328
|
+
elsif value.is_a?(Hash)
|
329
|
+
{}.tap do |hash|
|
330
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
331
|
+
end
|
332
|
+
elsif value.respond_to? :to_hash
|
333
|
+
value.to_hash
|
334
|
+
else
|
335
|
+
value
|
336
|
+
end
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|