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.
Files changed (84) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cybersource_rest_client/models/card_processing_config_common_acquirer.rb +257 -257
  3. data/lib/cybersource_rest_client/models/card_processing_config_common_merchant_descriptor_information.rb +279 -279
  4. data/lib/cybersource_rest_client/models/commerce_solutions_products_token_management_configuration_information_configurations.rb +200 -190
  5. data/lib/cybersource_rest_client/models/commerce_solutions_products_token_management_configuration_information_configurations_vault.rb +251 -0
  6. data/lib/cybersource_rest_client/models/e_check_config_common_internal_only_processors.rb +267 -263
  7. data/lib/cybersource_rest_client/models/e_check_config_common_processors.rb +273 -271
  8. data/lib/cybersource_rest_client/models/e_check_config_features_account_validation_service_internal_only_processors.rb +193 -191
  9. data/lib/cybersource_rest_client/models/e_check_config_features_account_validation_service_processors.rb +285 -283
  10. data/lib/cybersource_rest_client/models/flexv2sessions_fields.rb +199 -199
  11. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information.rb +209 -209
  12. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_amount_details.rb +199 -199
  13. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_amount_details_total_amount.rb +189 -189
  14. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_bill_to.rb +309 -309
  15. data/lib/cybersource_rest_client/models/flexv2sessions_fields_order_information_ship_to.rb +289 -289
  16. data/lib/cybersource_rest_client/models/flexv2sessions_fields_payment_information.rb +189 -189
  17. data/lib/cybersource_rest_client/models/flexv2sessions_fields_payment_information_card.rb +229 -229
  18. data/lib/cybersource_rest_client/models/generate_capture_context_request.rb +13 -13
  19. data/lib/cybersource_rest_client/models/generate_flex_api_capture_context_request.rb +189 -189
  20. data/lib/cybersource_rest_client/models/generate_unified_checkout_capture_context_request.rb +13 -13
  21. data/lib/cybersource_rest_client/models/inline_response_400_1_details.rb +199 -199
  22. data/lib/cybersource_rest_client/models/inline_response_400_2.rb +235 -235
  23. data/lib/cybersource_rest_client/models/inline_response_400_3.rb +235 -235
  24. data/lib/cybersource_rest_client/models/inline_response_400_4.rb +235 -235
  25. data/lib/cybersource_rest_client/models/inline_response_400_5.rb +258 -258
  26. data/lib/cybersource_rest_client/models/inline_response_400_5_fields.rb +213 -213
  27. data/lib/cybersource_rest_client/models/inline_response_400_6_details.rb +201 -201
  28. data/lib/cybersource_rest_client/models/patch_instrument_identifier_request.rb +313 -313
  29. data/lib/cybersource_rest_client/models/post_instrument_identifier_enrollment_request.rb +313 -313
  30. data/lib/cybersource_rest_client/models/post_instrument_identifier_request.rb +313 -313
  31. data/lib/cybersource_rest_client/models/pts_v2_payments_reversals_post201_response.rb +305 -305
  32. data/lib/cybersource_rest_client/models/ptsv2payments_payment_information_card.rb +445 -428
  33. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information.rb +1 -1
  34. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_japan_payment_options.rb +339 -411
  35. data/lib/cybersource_rest_client/models/ptsv2payments_processing_information_japan_payment_options_bonuses.rb +213 -0
  36. data/lib/cybersource_rest_client/models/ptsv2payments_recipient_information.rb +383 -383
  37. data/lib/cybersource_rest_client/models/ptsv2payments_recurring_payment_information.rb +363 -363
  38. data/lib/cybersource_rest_client/models/ptsv2payments_sender_information.rb +298 -298
  39. data/lib/cybersource_rest_client/models/ptsv2paymentsid_client_reference_information.rb +256 -256
  40. data/lib/cybersource_rest_client/models/riskv1authenticationresults_payment_information.rb +219 -219
  41. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information.rb +219 -219
  42. data/lib/cybersource_rest_client/models/riskv1authentications_payment_information_customer.rb +222 -222
  43. data/lib/cybersource_rest_client/models/riskv1authenticationsetups_payment_information_customer.rb +205 -205
  44. data/lib/cybersource_rest_client/models/riskv1decisions_consumer_authentication_information.rb +795 -795
  45. data/lib/cybersource_rest_client/models/riskv1exportcomplianceinquiries_order_information_line_items.rb +305 -314
  46. data/lib/cybersource_rest_client/models/tms_embedded_instrument_identifier.rb +313 -313
  47. data/lib/cybersource_rest_client/models/tms_network_token_services.rb +239 -0
  48. data/lib/cybersource_rest_client/models/tms_network_token_services_american_express_token_service.rb +253 -0
  49. data/lib/cybersource_rest_client/models/tms_network_token_services_mastercard_digital_enablement_service.rb +227 -0
  50. data/lib/cybersource_rest_client/models/tms_network_token_services_notifications.rb +190 -0
  51. data/lib/cybersource_rest_client/models/tms_network_token_services_payment_credentials.rb +190 -0
  52. data/lib/cybersource_rest_client/models/tms_network_token_services_synchronous_provisioning.rb +190 -0
  53. data/lib/cybersource_rest_client/models/tms_network_token_services_visa_token_service.rb +244 -0
  54. data/lib/cybersource_rest_client/models/tms_nullify.rb +212 -0
  55. data/lib/cybersource_rest_client/models/tms_sensitive_privileges.rb +190 -0
  56. data/lib/cybersource_rest_client/models/tms_token_formats.rb +223 -0
  57. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card.rb +321 -321
  58. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_card.rb +225 -225
  59. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata.rb +189 -189
  60. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art.rb +250 -250
  61. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset.rb +200 -200
  62. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset__links.rb +189 -189
  63. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_background_asset__links_self.rb +190 -190
  64. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset.rb +200 -200
  65. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset__links.rb +189 -189
  66. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_brand_logo_asset__links_self.rb +190 -190
  67. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset.rb +200 -200
  68. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset__links.rb +189 -189
  69. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_co_brand_logo_asset__links_self.rb +190 -190
  70. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset.rb +200 -200
  71. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset__links.rb +189 -189
  72. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_combined_asset__links_self.rb +190 -190
  73. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset.rb +200 -200
  74. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset__links.rb +189 -189
  75. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_icon_asset__links_self.rb +190 -190
  76. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset.rb +200 -200
  77. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset__links.rb +189 -189
  78. data/lib/cybersource_rest_client/models/tmsv2_tokenized_card_metadata_card_art_issuer_logo_asset__links_self.rb +190 -190
  79. data/lib/cybersource_rest_client/models/token_permissions.rb +223 -0
  80. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information.rb +326 -326
  81. data/lib/cybersource_rest_client/models/tss_v2_transactions_get200_response_processing_information_japan_payment_options.rb +322 -247
  82. data/lib/cybersource_rest_client/models/tss_v2_transactions_post201_response__embedded_processing_information.rb +241 -241
  83. data/lib/cybersource_rest_client.rb +13 -0
  84. 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
- # This value is a 2-digit code indicating the Number of Bonuses. Valid value from 1 to 6.
20
- attr_accessor :bonuses
21
-
22
- # This value is a 2-digit code indicating the first bonus month. Valid value from 1 to 12.
23
- attr_accessor :bonus_month
24
-
25
- # This value is a 2-digit code indicating the second bonus month. Valid value from 1 to 12.
26
- attr_accessor :second_bonus_month
27
-
28
- # This value contains the bonus amount of the first month. Maximum value without decimal 99999999.
29
- attr_accessor :bonus_amount
30
-
31
- # This value contains the bonus amount of the second month. Maximum value without decimal 99999999.
32
- attr_accessor :second_bonus_amount
33
-
34
- # 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
35
- attr_accessor :preapproval_type
36
-
37
- # Number of Installments.
38
- attr_accessor :installments
39
-
40
- # 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.
41
- attr_accessor :terminal_id
42
-
43
- # Billing month in MM format.
44
- attr_accessor :first_billing_month
45
-
46
- # 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.
47
- attr_accessor :business_name
48
-
49
- # 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.
50
- attr_accessor :business_name_katakana
51
-
52
- # 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.
53
- attr_accessor :jis2_track_data
54
-
55
- # 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.
56
- attr_accessor :business_name_alpha_numeric
57
-
58
- # Attribute mapping from ruby-style variable name to JSON key.
59
- def self.attribute_map
60
- {
61
- :'payment_method' => :'paymentMethod',
62
- :'bonuses' => :'bonuses',
63
- :'bonus_month' => :'bonusMonth',
64
- :'second_bonus_month' => :'secondBonusMonth',
65
- :'bonus_amount' => :'bonusAmount',
66
- :'second_bonus_amount' => :'secondBonusAmount',
67
- :'preapproval_type' => :'preapprovalType',
68
- :'installments' => :'installments',
69
- :'terminal_id' => :'terminalId',
70
- :'first_billing_month' => :'firstBillingMonth',
71
- :'business_name' => :'businessName',
72
- :'business_name_katakana' => :'businessNameKatakana',
73
- :'jis2_track_data' => :'jis2TrackData',
74
- :'business_name_alpha_numeric' => :'businessNameAlphaNumeric'
75
- }
76
- end
77
-
78
- # Attribute mapping from JSON key to ruby-style variable name.
79
- def self.json_map
80
- {
81
- :'payment_method' => :'payment_method',
82
- :'bonuses' => :'bonuses',
83
- :'bonus_month' => :'bonus_month',
84
- :'second_bonus_month' => :'second_bonus_month',
85
- :'bonus_amount' => :'bonus_amount',
86
- :'second_bonus_amount' => :'second_bonus_amount',
87
- :'preapproval_type' => :'preapproval_type',
88
- :'installments' => :'installments',
89
- :'terminal_id' => :'terminal_id',
90
- :'first_billing_month' => :'first_billing_month',
91
- :'business_name' => :'business_name',
92
- :'business_name_katakana' => :'business_name_katakana',
93
- :'jis2_track_data' => :'jis2_track_data',
94
- :'business_name_alpha_numeric' => :'business_name_alpha_numeric'
95
- }
96
- end
97
-
98
- # Attribute type mapping.
99
- def self.swagger_types
100
- {
101
- :'payment_method' => :'String',
102
- :'bonuses' => :'String',
103
- :'bonus_month' => :'String',
104
- :'second_bonus_month' => :'String',
105
- :'bonus_amount' => :'String',
106
- :'second_bonus_amount' => :'String',
107
- :'preapproval_type' => :'String',
108
- :'installments' => :'String',
109
- :'terminal_id' => :'String',
110
- :'first_billing_month' => :'String',
111
- :'business_name' => :'String',
112
- :'business_name_katakana' => :'String',
113
- :'jis2_track_data' => :'String',
114
- :'business_name_alpha_numeric' => :'String'
115
- }
116
- end
117
-
118
- # Initializes the object
119
- # @param [Hash] attributes Model attributes in the form of hash
120
- def initialize(attributes = {})
121
- return unless attributes.is_a?(Hash)
122
-
123
- # convert string to symbol for hash key
124
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
125
-
126
- if attributes.has_key?(:'paymentMethod')
127
- self.payment_method = attributes[:'paymentMethod']
128
- end
129
-
130
- if attributes.has_key?(:'bonuses')
131
- self.bonuses = attributes[:'bonuses']
132
- end
133
-
134
- if attributes.has_key?(:'bonusMonth')
135
- self.bonus_month = attributes[:'bonusMonth']
136
- end
137
-
138
- if attributes.has_key?(:'secondBonusMonth')
139
- self.second_bonus_month = attributes[:'secondBonusMonth']
140
- end
141
-
142
- if attributes.has_key?(:'bonusAmount')
143
- self.bonus_amount = attributes[:'bonusAmount']
144
- end
145
-
146
- if attributes.has_key?(:'secondBonusAmount')
147
- self.second_bonus_amount = attributes[:'secondBonusAmount']
148
- end
149
-
150
- if attributes.has_key?(:'preapprovalType')
151
- self.preapproval_type = attributes[:'preapprovalType']
152
- end
153
-
154
- if attributes.has_key?(:'installments')
155
- self.installments = attributes[:'installments']
156
- end
157
-
158
- if attributes.has_key?(:'terminalId')
159
- self.terminal_id = attributes[:'terminalId']
160
- end
161
-
162
- if attributes.has_key?(:'firstBillingMonth')
163
- self.first_billing_month = attributes[:'firstBillingMonth']
164
- end
165
-
166
- if attributes.has_key?(:'businessName')
167
- self.business_name = attributes[:'businessName']
168
- end
169
-
170
- if attributes.has_key?(:'businessNameKatakana')
171
- self.business_name_katakana = attributes[:'businessNameKatakana']
172
- end
173
-
174
- if attributes.has_key?(:'jis2TrackData')
175
- self.jis2_track_data = attributes[:'jis2TrackData']
176
- end
177
-
178
- if attributes.has_key?(:'businessNameAlphaNumeric')
179
- self.business_name_alpha_numeric = attributes[:'businessNameAlphaNumeric']
180
- end
181
- end
182
-
183
- # Show invalid properties with the reasons. Usually used together with valid?
184
- # @return Array for valid properties with the reasons
185
- def list_invalid_properties
186
- invalid_properties = Array.new
187
- invalid_properties
188
- end
189
-
190
- # Check to see if the all the properties in the model are valid
191
- # @return true if the model is valid
192
- def valid?
193
- true
194
- end
195
-
196
- # Custom attribute writer method with validation
197
- # @param [Object] payment_method Value to be assigned
198
- def payment_method=(payment_method)
199
- @payment_method = payment_method
200
- end
201
-
202
- # Custom attribute writer method with validation
203
- # @param [Object] bonuses Value to be assigned
204
- def bonuses=(bonuses)
205
- @bonuses = bonuses
206
- end
207
-
208
- # Custom attribute writer method with validation
209
- # @param [Object] bonus_month Value to be assigned
210
- def bonus_month=(bonus_month)
211
- @bonus_month = bonus_month
212
- end
213
-
214
- # Custom attribute writer method with validation
215
- # @param [Object] second_bonus_month Value to be assigned
216
- def second_bonus_month=(second_bonus_month)
217
- @second_bonus_month = second_bonus_month
218
- end
219
-
220
- # Custom attribute writer method with validation
221
- # @param [Object] bonus_amount Value to be assigned
222
- def bonus_amount=(bonus_amount)
223
- @bonus_amount = bonus_amount
224
- end
225
-
226
- # Custom attribute writer method with validation
227
- # @param [Object] second_bonus_amount Value to be assigned
228
- def second_bonus_amount=(second_bonus_amount)
229
- @second_bonus_amount = second_bonus_amount
230
- end
231
-
232
- # Custom attribute writer method with validation
233
- # @param [Object] preapproval_type Value to be assigned
234
- def preapproval_type=(preapproval_type)
235
- @preapproval_type = preapproval_type
236
- end
237
-
238
- # Custom attribute writer method with validation
239
- # @param [Object] terminal_id Value to be assigned
240
- def terminal_id=(terminal_id)
241
- @terminal_id = terminal_id
242
- end
243
-
244
- # Custom attribute writer method with validation
245
- # @param [Object] first_billing_month Value to be assigned
246
- def first_billing_month=(first_billing_month)
247
- @first_billing_month = first_billing_month
248
- end
249
-
250
- # Custom attribute writer method with validation
251
- # @param [Object] business_name Value to be assigned
252
- def business_name=(business_name)
253
- @business_name = business_name
254
- end
255
-
256
- # Custom attribute writer method with validation
257
- # @param [Object] business_name_katakana Value to be assigned
258
- def business_name_katakana=(business_name_katakana)
259
- @business_name_katakana = business_name_katakana
260
- end
261
-
262
- # Custom attribute writer method with validation
263
- # @param [Object] jis2_track_data Value to be assigned
264
- def jis2_track_data=(jis2_track_data)
265
- @jis2_track_data = jis2_track_data
266
- end
267
-
268
- # Custom attribute writer method with validation
269
- # @param [Object] business_name_alpha_numeric Value to be assigned
270
- def business_name_alpha_numeric=(business_name_alpha_numeric)
271
- @business_name_alpha_numeric = business_name_alpha_numeric
272
- end
273
-
274
- # Checks equality by comparing each attribute.
275
- # @param [Object] Object to be compared
276
- def ==(o)
277
- return true if self.equal?(o)
278
- self.class == o.class &&
279
- payment_method == o.payment_method &&
280
- bonuses == o.bonuses &&
281
- bonus_month == o.bonus_month &&
282
- second_bonus_month == o.second_bonus_month &&
283
- bonus_amount == o.bonus_amount &&
284
- second_bonus_amount == o.second_bonus_amount &&
285
- preapproval_type == o.preapproval_type &&
286
- installments == o.installments &&
287
- terminal_id == o.terminal_id &&
288
- first_billing_month == o.first_billing_month &&
289
- business_name == o.business_name &&
290
- business_name_katakana == o.business_name_katakana &&
291
- jis2_track_data == o.jis2_track_data &&
292
- business_name_alpha_numeric == o.business_name_alpha_numeric
293
- end
294
-
295
- # @see the `==` method
296
- # @param [Object] Object to be compared
297
- def eql?(o)
298
- self == o
299
- end
300
-
301
- # Calculates hash code according to all attributes.
302
- # @return [Fixnum] Hash code
303
- def hash
304
- [payment_method, bonuses, bonus_month, second_bonus_month, bonus_amount, second_bonus_amount, preapproval_type, installments, terminal_id, first_billing_month, business_name, business_name_katakana, jis2_track_data, business_name_alpha_numeric].hash
305
- end
306
-
307
- # Builds the object from hash
308
- # @param [Hash] attributes Model attributes in the form of hash
309
- # @return [Object] Returns the model itself
310
- def build_from_hash(attributes)
311
- return nil unless attributes.is_a?(Hash)
312
- self.class.swagger_types.each_pair do |key, type|
313
- if type =~ /\AArray<(.*)>/i
314
- # check to ensure the input is an array given that the the attribute
315
- # is documented as an array but the input is not
316
- if attributes[self.class.attribute_map[key]].is_a?(Array)
317
- self.send("#{self.class.json_map[key]}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
318
- end
319
- elsif !attributes[self.class.attribute_map[key]].nil?
320
- self.send("#{self.class.json_map[key]}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
321
- end # or else data not found in attributes(hash), not an issue as the data can be optional
322
- end
323
-
324
- self
325
- end
326
-
327
- # Deserializes the data based on type
328
- # @param string type Data type
329
- # @param string value Value to be deserialized
330
- # @return [Object] Deserialized data
331
- def _deserialize(type, value)
332
- case type.to_sym
333
- when :DateTime
334
- DateTime.parse(value)
335
- when :Date
336
- Date.parse(value)
337
- when :String
338
- value.to_s
339
- when :Integer
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