ultracart_api 3.3.2 → 3.4.0

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 (63) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +50 -4
  3. data/docs/ConfigurationApi.md +756 -0
  4. data/docs/DelayAutoOrdersResponse.md +12 -0
  5. data/docs/PaymentsConfiguration.md +23 -0
  6. data/docs/PaymentsConfigurationAffirm.md +15 -0
  7. data/docs/PaymentsConfigurationAmazon.md +15 -0
  8. data/docs/PaymentsConfigurationCOD.md +13 -0
  9. data/docs/PaymentsConfigurationCash.md +9 -0
  10. data/docs/PaymentsConfigurationCheck.md +25 -0
  11. data/docs/PaymentsConfigurationCreditCard.md +16 -0
  12. data/docs/PaymentsConfigurationLoanHero.md +12 -0
  13. data/docs/PaymentsConfigurationPayPal.md +36 -0
  14. data/docs/PaymentsConfigurationPurchaseOrder.md +11 -0
  15. data/docs/PaymentsConfigurationQuoteRequest.md +10 -0
  16. data/docs/PaymentsConfigurationResponse.md +12 -0
  17. data/docs/PaymentsConfigurationRestrictions.md +19 -0
  18. data/docs/PaymentsConfigurationSezzle.md +15 -0
  19. data/docs/PaymentsConfigurationWePay.md +35 -0
  20. data/docs/PaymentsConfigurationWireTransfer.md +18 -0
  21. data/docs/PaymentsThemeTransactionType.md +10 -0
  22. data/docs/PaymentsWepayEnroll.md +22 -0
  23. data/docs/RotatingTransactionGateway.md +50 -0
  24. data/docs/RtgCurrency.md +10 -0
  25. data/docs/RtgDayOfMonthRestriction.md +9 -0
  26. data/docs/RtgDayOfWeekRestriction.md +10 -0
  27. data/docs/RtgThemeRestriction.md +10 -0
  28. data/docs/StripeConnectResponse.md +12 -0
  29. data/docs/TransactionGateway.md +71 -0
  30. data/docs/TransactionGatewaysRequest.md +10 -0
  31. data/docs/TransactionGatewaysResponse.md +12 -0
  32. data/lib/ultracart_api.rb +29 -0
  33. data/lib/ultracart_api/api/configuration_api.rb +843 -0
  34. data/lib/ultracart_api/models/delay_auto_orders_response.rb +221 -0
  35. data/lib/ultracart_api/models/payments_configuration.rb +319 -0
  36. data/lib/ultracart_api/models/payments_configuration_affirm.rb +247 -0
  37. data/lib/ultracart_api/models/payments_configuration_amazon.rb +247 -0
  38. data/lib/ultracart_api/models/payments_configuration_cash.rb +193 -0
  39. data/lib/ultracart_api/models/payments_configuration_check.rb +337 -0
  40. data/lib/ultracart_api/models/payments_configuration_cod.rb +229 -0
  41. data/lib/ultracart_api/models/payments_configuration_credit_card.rb +256 -0
  42. data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +220 -0
  43. data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +436 -0
  44. data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +211 -0
  45. data/lib/ultracart_api/models/payments_configuration_quote_request.rb +202 -0
  46. data/lib/ultracart_api/models/payments_configuration_response.rb +221 -0
  47. data/lib/ultracart_api/models/payments_configuration_restrictions.rb +283 -0
  48. data/lib/ultracart_api/models/payments_configuration_sezzle.rb +247 -0
  49. data/lib/ultracart_api/models/payments_configuration_we_pay.rb +427 -0
  50. data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +274 -0
  51. data/lib/ultracart_api/models/payments_theme_transaction_type.rb +239 -0
  52. data/lib/ultracart_api/models/payments_wepay_enroll.rb +310 -0
  53. data/lib/ultracart_api/models/rotating_transaction_gateway.rb +665 -0
  54. data/lib/ultracart_api/models/rtg_currency.rb +205 -0
  55. data/lib/ultracart_api/models/rtg_day_of_month_restriction.rb +195 -0
  56. data/lib/ultracart_api/models/rtg_day_of_week_restriction.rb +205 -0
  57. data/lib/ultracart_api/models/rtg_theme_restriction.rb +239 -0
  58. data/lib/ultracart_api/models/stripe_connect_response.rb +221 -0
  59. data/lib/ultracart_api/models/transaction_gateway.rb +823 -0
  60. data/lib/ultracart_api/models/transaction_gateways_request.rb +242 -0
  61. data/lib/ultracart_api/models/transaction_gateways_response.rb +223 -0
  62. data/lib/ultracart_api/version.rb +1 -1
  63. metadata +60 -2
@@ -0,0 +1,823 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ OpenAPI spec version: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 2.4.15-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module UltracartClient
16
+ class TransactionGateway
17
+ # Additional html to display for this transaction gateway. This html will include instructions and connection links
18
+ attr_accessor :arbitrary_html
19
+
20
+ # Additional comments
21
+ attr_accessor :comment
22
+
23
+ # True if this gateway supports credit cards
24
+ attr_accessor :credit_card_capable
25
+
26
+ # True if this gateway supports eChecks
27
+ attr_accessor :echeck_capable
28
+
29
+ # True if this gateway supports eChecks
30
+ attr_accessor :echeck_supported
31
+
32
+ # True if this transaction gateway is the currently active gateway.
33
+ attr_accessor :enabled
34
+
35
+ # Cryptographic public certificate allowing UltraCart to communicate securely with this gateway.
36
+ attr_accessor :gateway_cert_pem
37
+
38
+ # The label for the gateway certificate pem. The actual value stored may vary by gateway, so the label will vary too.
39
+ attr_accessor :gateway_cert_pem_label
40
+
41
+ # Gateway Email
42
+ attr_accessor :gateway_email
43
+
44
+ # The label for the gateway email. The actual value stored may vary by gateway, so the label will vary too.
45
+ attr_accessor :gateway_email_label
46
+
47
+ # Gateway Environment to indicate sandbox versus production environments
48
+ attr_accessor :gateway_environment
49
+
50
+ # The label for the gateway environment. The actual value stored may vary by gateway, so the label will vary too.
51
+ attr_accessor :gateway_environment_label
52
+
53
+ # Used to populate drop down lists for the gateway environment. Varies by gateway.
54
+ attr_accessor :gateway_environments
55
+
56
+ # Optional Look and feel setting for Verified-by-VISA. Only needed if you are using 3DS
57
+ attr_accessor :gateway_header_back_color
58
+
59
+ # Optional Look and feel setting for Verified-by-VISA. Only needed if you are using 3DS
60
+ attr_accessor :gateway_header_border_color
61
+
62
+ # Optional Look and feel setting for Verified-by-VISA. Only needed if you are using 3DS
63
+ attr_accessor :gateway_header_image_url
64
+
65
+ # Gateway Key
66
+ attr_accessor :gateway_key
67
+
68
+ # The label for the gateway key. The actual value stored may vary by gateway, so the label will vary too.
69
+ attr_accessor :gateway_key_label
70
+
71
+ # Cryptographic private key allowing UltraCart to communicate securely with this gateway.
72
+ attr_accessor :gateway_key_pem
73
+
74
+ # The label for the gateway key pem. The actual value stored may vary by gateway, so the label will vary too.
75
+ attr_accessor :gateway_key_pem_label
76
+
77
+ # Optional Look and feel setting for Verified-by-VISA. Only needed if you are using 3DS
78
+ attr_accessor :gateway_landing_page
79
+
80
+ # Gateway Merchant ID
81
+ attr_accessor :gateway_merchant_id
82
+
83
+ # The label for the gateway merchant id. The actual value stored may vary by gateway, so the label will vary too.
84
+ attr_accessor :gateway_merchant_id_label
85
+
86
+ # Gateway Mode
87
+ attr_accessor :gateway_mode
88
+
89
+ # The label for the gateway mode. The actual value stored may vary by gateway, so the label will vary too.
90
+ attr_accessor :gateway_mode_label
91
+
92
+ # Used to populate drop down lists for gateway modes
93
+ attr_accessor :gateway_modes
94
+
95
+ # Gateway Page Style
96
+ attr_accessor :gateway_page_style
97
+
98
+ # Gateway page style label
99
+ attr_accessor :gateway_page_style_label
100
+
101
+ # Used to populate drop down lists for gateway page style
102
+ attr_accessor :gateway_page_styles
103
+
104
+ # Gateway Partner
105
+ attr_accessor :gateway_partner
106
+
107
+ # The label for the gateway partner. The actual value stored may vary by gateway, so the label will vary too.
108
+ attr_accessor :gateway_partner_label
109
+
110
+ # Gateway Password
111
+ attr_accessor :gateway_password
112
+
113
+ # The label for the gateway password. The actual value stored may vary by gateway, so the label will vary too.
114
+ attr_accessor :gateway_password_label
115
+
116
+ # Optional Look and feel setting for Verified-by-VISA. Only needed if you are using 3DS
117
+ attr_accessor :gateway_payflow_color
118
+
119
+ # Gateway private key password
120
+ attr_accessor :gateway_private_key_password
121
+
122
+ # The label for the gateway private key password. The actual value stored may vary by gateway, so the label will vary too.
123
+ attr_accessor :gateway_private_key_password_label
124
+
125
+ # Optional Look and feel setting for Verified-by-VISA. Only needed if you are using 3DS
126
+ attr_accessor :gateway_solution_type
127
+
128
+ # The label for the gateway solution type. The actual value stored may vary by gateway, so the label will vary too.
129
+ attr_accessor :gateway_solution_type_label
130
+
131
+ # Used to populate drop down lists for gateway solution types
132
+ attr_accessor :gateway_solution_types
133
+
134
+ # Gateway URL
135
+ attr_accessor :gateway_url
136
+
137
+ # The label for the gateway url. The actual value stored may vary by gateway, so the label will vary too.
138
+ attr_accessor :gateway_url_label
139
+
140
+ # Gateway Username
141
+ attr_accessor :gateway_username
142
+
143
+ # The label for the gateway username. The actual value stored may vary by gateway, so the label will vary too.
144
+ attr_accessor :gateway_username_label
145
+
146
+ # If a merchant has multiple card processing accounts, this is the one to use for American Express cards.
147
+ attr_accessor :merchant_account_profile_amex
148
+
149
+ # If a merchant has multiple card processing accounts, this is the one to use for Diners Club cards.
150
+ attr_accessor :merchant_account_profile_diners_club
151
+
152
+ # If a merchant has multiple card processing accounts, this is the one to use for Discover cards.
153
+ attr_accessor :merchant_account_profile_discover
154
+
155
+ # If a merchant has multiple card processing accounts, this is the one to use for JCB cards.
156
+ attr_accessor :merchant_account_profile_jcb
157
+
158
+ # If a merchant has multiple card processing accounts, this is the one to use for MasterCard cards.
159
+ attr_accessor :merchant_account_profile_mastercard
160
+
161
+ # If a merchant has multiple card processing accounts, this is the one to use for VISA cards.
162
+ attr_accessor :merchant_account_profile_visa
163
+
164
+ # UltraCart Merchant ID
165
+ attr_accessor :merchant_id
166
+
167
+ # True if this gateway provides details for multiple currency transactions
168
+ attr_accessor :multi_currency_details
169
+
170
+ # Name of this transaction gateway
171
+ attr_accessor :name
172
+
173
+ # True if this gateway supports refunds
174
+ attr_accessor :refund_supported
175
+
176
+ # If true, e-Check transaction will require either a Tax ID or a Driver License
177
+ attr_accessor :require_echeck_tax_id_or_drivers_license
178
+
179
+ # True if this gateway supported Verified-by-VISA 3D Secure
180
+ attr_accessor :support_vbv_3ds
181
+
182
+ # If true, this gateway will attempt to process American Express transactions. If false, the customer will not be allowed to use this type of Credit Card.
183
+ attr_accessor :supports_amex
184
+
185
+ # If true, this gateway will attempt to process Diners Club transactions. If false, the customer will not be allowed to use this type of Credit Card.
186
+ attr_accessor :supports_diners_club
187
+
188
+ # If true, this gateway will attempt to process Discover transactions. If false, the customer will not be allowed to use this type of Credit Card.
189
+ attr_accessor :supports_discover
190
+
191
+ # If true, this gateway will attempt to process e-Check transactions. If false, the customer will not be allowed to use e-Checks.
192
+ attr_accessor :supports_echeck
193
+
194
+ # if true, this gateway will attempt to process electronic gift cards.
195
+ attr_accessor :supports_electronic_gift_card
196
+
197
+ # If true, this gateway will attempt to process JCB transactions. If false, the customer will not be allowed to use this type of Credit Card.
198
+ attr_accessor :supports_jcb
199
+
200
+ # If true, this gateway will attempt to process MasterCard transactions. If false, the customer will not be allowed to use this type of Credit Card.
201
+ attr_accessor :supports_mastercard
202
+
203
+ # If true, this gateway will attempt to process VISA transactions. If false, the customer will not be allowed to use this type of Credit Card.
204
+ attr_accessor :supports_visa
205
+
206
+ # True if this gateway supports third parties
207
+ attr_accessor :third_party
208
+
209
+ # Attribute mapping from ruby-style variable name to JSON key.
210
+ def self.attribute_map
211
+ {
212
+ :'arbitrary_html' => :'arbitrary_html',
213
+ :'comment' => :'comment',
214
+ :'credit_card_capable' => :'credit_card_capable',
215
+ :'echeck_capable' => :'echeck_capable',
216
+ :'echeck_supported' => :'echeck_supported',
217
+ :'enabled' => :'enabled',
218
+ :'gateway_cert_pem' => :'gateway_cert_pem',
219
+ :'gateway_cert_pem_label' => :'gateway_cert_pem_label',
220
+ :'gateway_email' => :'gateway_email',
221
+ :'gateway_email_label' => :'gateway_email_label',
222
+ :'gateway_environment' => :'gateway_environment',
223
+ :'gateway_environment_label' => :'gateway_environment_label',
224
+ :'gateway_environments' => :'gateway_environments',
225
+ :'gateway_header_back_color' => :'gateway_header_back_color',
226
+ :'gateway_header_border_color' => :'gateway_header_border_color',
227
+ :'gateway_header_image_url' => :'gateway_header_image_url',
228
+ :'gateway_key' => :'gateway_key',
229
+ :'gateway_key_label' => :'gateway_key_label',
230
+ :'gateway_key_pem' => :'gateway_key_pem',
231
+ :'gateway_key_pem_label' => :'gateway_key_pem_label',
232
+ :'gateway_landing_page' => :'gateway_landing_page',
233
+ :'gateway_merchant_id' => :'gateway_merchant_id',
234
+ :'gateway_merchant_id_label' => :'gateway_merchant_id_label',
235
+ :'gateway_mode' => :'gateway_mode',
236
+ :'gateway_mode_label' => :'gateway_mode_label',
237
+ :'gateway_modes' => :'gateway_modes',
238
+ :'gateway_page_style' => :'gateway_page_style',
239
+ :'gateway_page_style_label' => :'gateway_page_style_label',
240
+ :'gateway_page_styles' => :'gateway_page_styles',
241
+ :'gateway_partner' => :'gateway_partner',
242
+ :'gateway_partner_label' => :'gateway_partner_label',
243
+ :'gateway_password' => :'gateway_password',
244
+ :'gateway_password_label' => :'gateway_password_label',
245
+ :'gateway_payflow_color' => :'gateway_payflow_color',
246
+ :'gateway_private_key_password' => :'gateway_private_key_password',
247
+ :'gateway_private_key_password_label' => :'gateway_private_key_password_label',
248
+ :'gateway_solution_type' => :'gateway_solution_type',
249
+ :'gateway_solution_type_label' => :'gateway_solution_type_label',
250
+ :'gateway_solution_types' => :'gateway_solution_types',
251
+ :'gateway_url' => :'gateway_url',
252
+ :'gateway_url_label' => :'gateway_url_label',
253
+ :'gateway_username' => :'gateway_username',
254
+ :'gateway_username_label' => :'gateway_username_label',
255
+ :'merchant_account_profile_amex' => :'merchant_account_profile_amex',
256
+ :'merchant_account_profile_diners_club' => :'merchant_account_profile_diners_club',
257
+ :'merchant_account_profile_discover' => :'merchant_account_profile_discover',
258
+ :'merchant_account_profile_jcb' => :'merchant_account_profile_jcb',
259
+ :'merchant_account_profile_mastercard' => :'merchant_account_profile_mastercard',
260
+ :'merchant_account_profile_visa' => :'merchant_account_profile_visa',
261
+ :'merchant_id' => :'merchant_id',
262
+ :'multi_currency_details' => :'multi_currency_details',
263
+ :'name' => :'name',
264
+ :'refund_supported' => :'refund_supported',
265
+ :'require_echeck_tax_id_or_drivers_license' => :'require_echeck_tax_id_or_drivers_license',
266
+ :'support_vbv_3ds' => :'support_vbv_3ds',
267
+ :'supports_amex' => :'supports_amex',
268
+ :'supports_diners_club' => :'supports_diners_club',
269
+ :'supports_discover' => :'supports_discover',
270
+ :'supports_echeck' => :'supports_echeck',
271
+ :'supports_electronic_gift_card' => :'supports_electronic_gift_card',
272
+ :'supports_jcb' => :'supports_jcb',
273
+ :'supports_mastercard' => :'supports_mastercard',
274
+ :'supports_visa' => :'supports_visa',
275
+ :'third_party' => :'third_party'
276
+ }
277
+ end
278
+
279
+ # Attribute type mapping.
280
+ def self.swagger_types
281
+ {
282
+ :'arbitrary_html' => :'String',
283
+ :'comment' => :'String',
284
+ :'credit_card_capable' => :'BOOLEAN',
285
+ :'echeck_capable' => :'BOOLEAN',
286
+ :'echeck_supported' => :'String',
287
+ :'enabled' => :'BOOLEAN',
288
+ :'gateway_cert_pem' => :'String',
289
+ :'gateway_cert_pem_label' => :'String',
290
+ :'gateway_email' => :'String',
291
+ :'gateway_email_label' => :'String',
292
+ :'gateway_environment' => :'String',
293
+ :'gateway_environment_label' => :'String',
294
+ :'gateway_environments' => :'Array<String>',
295
+ :'gateway_header_back_color' => :'String',
296
+ :'gateway_header_border_color' => :'String',
297
+ :'gateway_header_image_url' => :'String',
298
+ :'gateway_key' => :'String',
299
+ :'gateway_key_label' => :'String',
300
+ :'gateway_key_pem' => :'String',
301
+ :'gateway_key_pem_label' => :'String',
302
+ :'gateway_landing_page' => :'String',
303
+ :'gateway_merchant_id' => :'String',
304
+ :'gateway_merchant_id_label' => :'String',
305
+ :'gateway_mode' => :'String',
306
+ :'gateway_mode_label' => :'String',
307
+ :'gateway_modes' => :'Array<String>',
308
+ :'gateway_page_style' => :'String',
309
+ :'gateway_page_style_label' => :'String',
310
+ :'gateway_page_styles' => :'Array<String>',
311
+ :'gateway_partner' => :'String',
312
+ :'gateway_partner_label' => :'String',
313
+ :'gateway_password' => :'String',
314
+ :'gateway_password_label' => :'String',
315
+ :'gateway_payflow_color' => :'String',
316
+ :'gateway_private_key_password' => :'String',
317
+ :'gateway_private_key_password_label' => :'String',
318
+ :'gateway_solution_type' => :'String',
319
+ :'gateway_solution_type_label' => :'String',
320
+ :'gateway_solution_types' => :'Array<String>',
321
+ :'gateway_url' => :'String',
322
+ :'gateway_url_label' => :'String',
323
+ :'gateway_username' => :'String',
324
+ :'gateway_username_label' => :'String',
325
+ :'merchant_account_profile_amex' => :'String',
326
+ :'merchant_account_profile_diners_club' => :'String',
327
+ :'merchant_account_profile_discover' => :'String',
328
+ :'merchant_account_profile_jcb' => :'String',
329
+ :'merchant_account_profile_mastercard' => :'String',
330
+ :'merchant_account_profile_visa' => :'String',
331
+ :'merchant_id' => :'String',
332
+ :'multi_currency_details' => :'BOOLEAN',
333
+ :'name' => :'String',
334
+ :'refund_supported' => :'BOOLEAN',
335
+ :'require_echeck_tax_id_or_drivers_license' => :'BOOLEAN',
336
+ :'support_vbv_3ds' => :'BOOLEAN',
337
+ :'supports_amex' => :'BOOLEAN',
338
+ :'supports_diners_club' => :'BOOLEAN',
339
+ :'supports_discover' => :'BOOLEAN',
340
+ :'supports_echeck' => :'BOOLEAN',
341
+ :'supports_electronic_gift_card' => :'BOOLEAN',
342
+ :'supports_jcb' => :'BOOLEAN',
343
+ :'supports_mastercard' => :'BOOLEAN',
344
+ :'supports_visa' => :'BOOLEAN',
345
+ :'third_party' => :'BOOLEAN'
346
+ }
347
+ end
348
+
349
+ # Initializes the object
350
+ # @param [Hash] attributes Model attributes in the form of hash
351
+ def initialize(attributes = {})
352
+ return unless attributes.is_a?(Hash)
353
+
354
+ # convert string to symbol for hash key
355
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
356
+
357
+ if attributes.has_key?(:'arbitrary_html')
358
+ self.arbitrary_html = attributes[:'arbitrary_html']
359
+ end
360
+
361
+ if attributes.has_key?(:'comment')
362
+ self.comment = attributes[:'comment']
363
+ end
364
+
365
+ if attributes.has_key?(:'credit_card_capable')
366
+ self.credit_card_capable = attributes[:'credit_card_capable']
367
+ end
368
+
369
+ if attributes.has_key?(:'echeck_capable')
370
+ self.echeck_capable = attributes[:'echeck_capable']
371
+ end
372
+
373
+ if attributes.has_key?(:'echeck_supported')
374
+ self.echeck_supported = attributes[:'echeck_supported']
375
+ end
376
+
377
+ if attributes.has_key?(:'enabled')
378
+ self.enabled = attributes[:'enabled']
379
+ end
380
+
381
+ if attributes.has_key?(:'gateway_cert_pem')
382
+ self.gateway_cert_pem = attributes[:'gateway_cert_pem']
383
+ end
384
+
385
+ if attributes.has_key?(:'gateway_cert_pem_label')
386
+ self.gateway_cert_pem_label = attributes[:'gateway_cert_pem_label']
387
+ end
388
+
389
+ if attributes.has_key?(:'gateway_email')
390
+ self.gateway_email = attributes[:'gateway_email']
391
+ end
392
+
393
+ if attributes.has_key?(:'gateway_email_label')
394
+ self.gateway_email_label = attributes[:'gateway_email_label']
395
+ end
396
+
397
+ if attributes.has_key?(:'gateway_environment')
398
+ self.gateway_environment = attributes[:'gateway_environment']
399
+ end
400
+
401
+ if attributes.has_key?(:'gateway_environment_label')
402
+ self.gateway_environment_label = attributes[:'gateway_environment_label']
403
+ end
404
+
405
+ if attributes.has_key?(:'gateway_environments')
406
+ if (value = attributes[:'gateway_environments']).is_a?(Array)
407
+ self.gateway_environments = value
408
+ end
409
+ end
410
+
411
+ if attributes.has_key?(:'gateway_header_back_color')
412
+ self.gateway_header_back_color = attributes[:'gateway_header_back_color']
413
+ end
414
+
415
+ if attributes.has_key?(:'gateway_header_border_color')
416
+ self.gateway_header_border_color = attributes[:'gateway_header_border_color']
417
+ end
418
+
419
+ if attributes.has_key?(:'gateway_header_image_url')
420
+ self.gateway_header_image_url = attributes[:'gateway_header_image_url']
421
+ end
422
+
423
+ if attributes.has_key?(:'gateway_key')
424
+ self.gateway_key = attributes[:'gateway_key']
425
+ end
426
+
427
+ if attributes.has_key?(:'gateway_key_label')
428
+ self.gateway_key_label = attributes[:'gateway_key_label']
429
+ end
430
+
431
+ if attributes.has_key?(:'gateway_key_pem')
432
+ self.gateway_key_pem = attributes[:'gateway_key_pem']
433
+ end
434
+
435
+ if attributes.has_key?(:'gateway_key_pem_label')
436
+ self.gateway_key_pem_label = attributes[:'gateway_key_pem_label']
437
+ end
438
+
439
+ if attributes.has_key?(:'gateway_landing_page')
440
+ self.gateway_landing_page = attributes[:'gateway_landing_page']
441
+ end
442
+
443
+ if attributes.has_key?(:'gateway_merchant_id')
444
+ self.gateway_merchant_id = attributes[:'gateway_merchant_id']
445
+ end
446
+
447
+ if attributes.has_key?(:'gateway_merchant_id_label')
448
+ self.gateway_merchant_id_label = attributes[:'gateway_merchant_id_label']
449
+ end
450
+
451
+ if attributes.has_key?(:'gateway_mode')
452
+ self.gateway_mode = attributes[:'gateway_mode']
453
+ end
454
+
455
+ if attributes.has_key?(:'gateway_mode_label')
456
+ self.gateway_mode_label = attributes[:'gateway_mode_label']
457
+ end
458
+
459
+ if attributes.has_key?(:'gateway_modes')
460
+ if (value = attributes[:'gateway_modes']).is_a?(Array)
461
+ self.gateway_modes = value
462
+ end
463
+ end
464
+
465
+ if attributes.has_key?(:'gateway_page_style')
466
+ self.gateway_page_style = attributes[:'gateway_page_style']
467
+ end
468
+
469
+ if attributes.has_key?(:'gateway_page_style_label')
470
+ self.gateway_page_style_label = attributes[:'gateway_page_style_label']
471
+ end
472
+
473
+ if attributes.has_key?(:'gateway_page_styles')
474
+ if (value = attributes[:'gateway_page_styles']).is_a?(Array)
475
+ self.gateway_page_styles = value
476
+ end
477
+ end
478
+
479
+ if attributes.has_key?(:'gateway_partner')
480
+ self.gateway_partner = attributes[:'gateway_partner']
481
+ end
482
+
483
+ if attributes.has_key?(:'gateway_partner_label')
484
+ self.gateway_partner_label = attributes[:'gateway_partner_label']
485
+ end
486
+
487
+ if attributes.has_key?(:'gateway_password')
488
+ self.gateway_password = attributes[:'gateway_password']
489
+ end
490
+
491
+ if attributes.has_key?(:'gateway_password_label')
492
+ self.gateway_password_label = attributes[:'gateway_password_label']
493
+ end
494
+
495
+ if attributes.has_key?(:'gateway_payflow_color')
496
+ self.gateway_payflow_color = attributes[:'gateway_payflow_color']
497
+ end
498
+
499
+ if attributes.has_key?(:'gateway_private_key_password')
500
+ self.gateway_private_key_password = attributes[:'gateway_private_key_password']
501
+ end
502
+
503
+ if attributes.has_key?(:'gateway_private_key_password_label')
504
+ self.gateway_private_key_password_label = attributes[:'gateway_private_key_password_label']
505
+ end
506
+
507
+ if attributes.has_key?(:'gateway_solution_type')
508
+ self.gateway_solution_type = attributes[:'gateway_solution_type']
509
+ end
510
+
511
+ if attributes.has_key?(:'gateway_solution_type_label')
512
+ self.gateway_solution_type_label = attributes[:'gateway_solution_type_label']
513
+ end
514
+
515
+ if attributes.has_key?(:'gateway_solution_types')
516
+ if (value = attributes[:'gateway_solution_types']).is_a?(Array)
517
+ self.gateway_solution_types = value
518
+ end
519
+ end
520
+
521
+ if attributes.has_key?(:'gateway_url')
522
+ self.gateway_url = attributes[:'gateway_url']
523
+ end
524
+
525
+ if attributes.has_key?(:'gateway_url_label')
526
+ self.gateway_url_label = attributes[:'gateway_url_label']
527
+ end
528
+
529
+ if attributes.has_key?(:'gateway_username')
530
+ self.gateway_username = attributes[:'gateway_username']
531
+ end
532
+
533
+ if attributes.has_key?(:'gateway_username_label')
534
+ self.gateway_username_label = attributes[:'gateway_username_label']
535
+ end
536
+
537
+ if attributes.has_key?(:'merchant_account_profile_amex')
538
+ self.merchant_account_profile_amex = attributes[:'merchant_account_profile_amex']
539
+ end
540
+
541
+ if attributes.has_key?(:'merchant_account_profile_diners_club')
542
+ self.merchant_account_profile_diners_club = attributes[:'merchant_account_profile_diners_club']
543
+ end
544
+
545
+ if attributes.has_key?(:'merchant_account_profile_discover')
546
+ self.merchant_account_profile_discover = attributes[:'merchant_account_profile_discover']
547
+ end
548
+
549
+ if attributes.has_key?(:'merchant_account_profile_jcb')
550
+ self.merchant_account_profile_jcb = attributes[:'merchant_account_profile_jcb']
551
+ end
552
+
553
+ if attributes.has_key?(:'merchant_account_profile_mastercard')
554
+ self.merchant_account_profile_mastercard = attributes[:'merchant_account_profile_mastercard']
555
+ end
556
+
557
+ if attributes.has_key?(:'merchant_account_profile_visa')
558
+ self.merchant_account_profile_visa = attributes[:'merchant_account_profile_visa']
559
+ end
560
+
561
+ if attributes.has_key?(:'merchant_id')
562
+ self.merchant_id = attributes[:'merchant_id']
563
+ end
564
+
565
+ if attributes.has_key?(:'multi_currency_details')
566
+ self.multi_currency_details = attributes[:'multi_currency_details']
567
+ end
568
+
569
+ if attributes.has_key?(:'name')
570
+ self.name = attributes[:'name']
571
+ end
572
+
573
+ if attributes.has_key?(:'refund_supported')
574
+ self.refund_supported = attributes[:'refund_supported']
575
+ end
576
+
577
+ if attributes.has_key?(:'require_echeck_tax_id_or_drivers_license')
578
+ self.require_echeck_tax_id_or_drivers_license = attributes[:'require_echeck_tax_id_or_drivers_license']
579
+ end
580
+
581
+ if attributes.has_key?(:'support_vbv_3ds')
582
+ self.support_vbv_3ds = attributes[:'support_vbv_3ds']
583
+ end
584
+
585
+ if attributes.has_key?(:'supports_amex')
586
+ self.supports_amex = attributes[:'supports_amex']
587
+ end
588
+
589
+ if attributes.has_key?(:'supports_diners_club')
590
+ self.supports_diners_club = attributes[:'supports_diners_club']
591
+ end
592
+
593
+ if attributes.has_key?(:'supports_discover')
594
+ self.supports_discover = attributes[:'supports_discover']
595
+ end
596
+
597
+ if attributes.has_key?(:'supports_echeck')
598
+ self.supports_echeck = attributes[:'supports_echeck']
599
+ end
600
+
601
+ if attributes.has_key?(:'supports_electronic_gift_card')
602
+ self.supports_electronic_gift_card = attributes[:'supports_electronic_gift_card']
603
+ end
604
+
605
+ if attributes.has_key?(:'supports_jcb')
606
+ self.supports_jcb = attributes[:'supports_jcb']
607
+ end
608
+
609
+ if attributes.has_key?(:'supports_mastercard')
610
+ self.supports_mastercard = attributes[:'supports_mastercard']
611
+ end
612
+
613
+ if attributes.has_key?(:'supports_visa')
614
+ self.supports_visa = attributes[:'supports_visa']
615
+ end
616
+
617
+ if attributes.has_key?(:'third_party')
618
+ self.third_party = attributes[:'third_party']
619
+ end
620
+ end
621
+
622
+ # Show invalid properties with the reasons. Usually used together with valid?
623
+ # @return Array for valid properties with the reasons
624
+ def list_invalid_properties
625
+ invalid_properties = Array.new
626
+ invalid_properties
627
+ end
628
+
629
+ # Check to see if the all the properties in the model are valid
630
+ # @return true if the model is valid
631
+ def valid?
632
+ true
633
+ end
634
+
635
+ # Checks equality by comparing each attribute.
636
+ # @param [Object] Object to be compared
637
+ def ==(o)
638
+ return true if self.equal?(o)
639
+ self.class == o.class &&
640
+ arbitrary_html == o.arbitrary_html &&
641
+ comment == o.comment &&
642
+ credit_card_capable == o.credit_card_capable &&
643
+ echeck_capable == o.echeck_capable &&
644
+ echeck_supported == o.echeck_supported &&
645
+ enabled == o.enabled &&
646
+ gateway_cert_pem == o.gateway_cert_pem &&
647
+ gateway_cert_pem_label == o.gateway_cert_pem_label &&
648
+ gateway_email == o.gateway_email &&
649
+ gateway_email_label == o.gateway_email_label &&
650
+ gateway_environment == o.gateway_environment &&
651
+ gateway_environment_label == o.gateway_environment_label &&
652
+ gateway_environments == o.gateway_environments &&
653
+ gateway_header_back_color == o.gateway_header_back_color &&
654
+ gateway_header_border_color == o.gateway_header_border_color &&
655
+ gateway_header_image_url == o.gateway_header_image_url &&
656
+ gateway_key == o.gateway_key &&
657
+ gateway_key_label == o.gateway_key_label &&
658
+ gateway_key_pem == o.gateway_key_pem &&
659
+ gateway_key_pem_label == o.gateway_key_pem_label &&
660
+ gateway_landing_page == o.gateway_landing_page &&
661
+ gateway_merchant_id == o.gateway_merchant_id &&
662
+ gateway_merchant_id_label == o.gateway_merchant_id_label &&
663
+ gateway_mode == o.gateway_mode &&
664
+ gateway_mode_label == o.gateway_mode_label &&
665
+ gateway_modes == o.gateway_modes &&
666
+ gateway_page_style == o.gateway_page_style &&
667
+ gateway_page_style_label == o.gateway_page_style_label &&
668
+ gateway_page_styles == o.gateway_page_styles &&
669
+ gateway_partner == o.gateway_partner &&
670
+ gateway_partner_label == o.gateway_partner_label &&
671
+ gateway_password == o.gateway_password &&
672
+ gateway_password_label == o.gateway_password_label &&
673
+ gateway_payflow_color == o.gateway_payflow_color &&
674
+ gateway_private_key_password == o.gateway_private_key_password &&
675
+ gateway_private_key_password_label == o.gateway_private_key_password_label &&
676
+ gateway_solution_type == o.gateway_solution_type &&
677
+ gateway_solution_type_label == o.gateway_solution_type_label &&
678
+ gateway_solution_types == o.gateway_solution_types &&
679
+ gateway_url == o.gateway_url &&
680
+ gateway_url_label == o.gateway_url_label &&
681
+ gateway_username == o.gateway_username &&
682
+ gateway_username_label == o.gateway_username_label &&
683
+ merchant_account_profile_amex == o.merchant_account_profile_amex &&
684
+ merchant_account_profile_diners_club == o.merchant_account_profile_diners_club &&
685
+ merchant_account_profile_discover == o.merchant_account_profile_discover &&
686
+ merchant_account_profile_jcb == o.merchant_account_profile_jcb &&
687
+ merchant_account_profile_mastercard == o.merchant_account_profile_mastercard &&
688
+ merchant_account_profile_visa == o.merchant_account_profile_visa &&
689
+ merchant_id == o.merchant_id &&
690
+ multi_currency_details == o.multi_currency_details &&
691
+ name == o.name &&
692
+ refund_supported == o.refund_supported &&
693
+ require_echeck_tax_id_or_drivers_license == o.require_echeck_tax_id_or_drivers_license &&
694
+ support_vbv_3ds == o.support_vbv_3ds &&
695
+ supports_amex == o.supports_amex &&
696
+ supports_diners_club == o.supports_diners_club &&
697
+ supports_discover == o.supports_discover &&
698
+ supports_echeck == o.supports_echeck &&
699
+ supports_electronic_gift_card == o.supports_electronic_gift_card &&
700
+ supports_jcb == o.supports_jcb &&
701
+ supports_mastercard == o.supports_mastercard &&
702
+ supports_visa == o.supports_visa &&
703
+ third_party == o.third_party
704
+ end
705
+
706
+ # @see the `==` method
707
+ # @param [Object] Object to be compared
708
+ def eql?(o)
709
+ self == o
710
+ end
711
+
712
+ # Calculates hash code according to all attributes.
713
+ # @return [Fixnum] Hash code
714
+ def hash
715
+ [arbitrary_html, comment, credit_card_capable, echeck_capable, echeck_supported, enabled, gateway_cert_pem, gateway_cert_pem_label, gateway_email, gateway_email_label, gateway_environment, gateway_environment_label, gateway_environments, gateway_header_back_color, gateway_header_border_color, gateway_header_image_url, gateway_key, gateway_key_label, gateway_key_pem, gateway_key_pem_label, gateway_landing_page, gateway_merchant_id, gateway_merchant_id_label, gateway_mode, gateway_mode_label, gateway_modes, gateway_page_style, gateway_page_style_label, gateway_page_styles, gateway_partner, gateway_partner_label, gateway_password, gateway_password_label, gateway_payflow_color, gateway_private_key_password, gateway_private_key_password_label, gateway_solution_type, gateway_solution_type_label, gateway_solution_types, gateway_url, gateway_url_label, gateway_username, gateway_username_label, merchant_account_profile_amex, merchant_account_profile_diners_club, merchant_account_profile_discover, merchant_account_profile_jcb, merchant_account_profile_mastercard, merchant_account_profile_visa, merchant_id, multi_currency_details, name, refund_supported, require_echeck_tax_id_or_drivers_license, support_vbv_3ds, supports_amex, supports_diners_club, supports_discover, supports_echeck, supports_electronic_gift_card, supports_jcb, supports_mastercard, supports_visa, third_party].hash
716
+ end
717
+
718
+ # Builds the object from hash
719
+ # @param [Hash] attributes Model attributes in the form of hash
720
+ # @return [Object] Returns the model itself
721
+ def build_from_hash(attributes)
722
+ return nil unless attributes.is_a?(Hash)
723
+ self.class.swagger_types.each_pair do |key, type|
724
+ if type =~ /\AArray<(.*)>/i
725
+ # check to ensure the input is an array given that the attribute
726
+ # is documented as an array but the input is not
727
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
728
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
729
+ end
730
+ elsif !attributes[self.class.attribute_map[key]].nil?
731
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
732
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
733
+ end
734
+
735
+ self
736
+ end
737
+
738
+ # Deserializes the data based on type
739
+ # @param string type Data type
740
+ # @param string value Value to be deserialized
741
+ # @return [Object] Deserialized data
742
+ def _deserialize(type, value)
743
+ case type.to_sym
744
+ when :DateTime
745
+ DateTime.parse(value)
746
+ when :Date
747
+ Date.parse(value)
748
+ when :String
749
+ value.to_s
750
+ when :Integer
751
+ value.to_i
752
+ when :Float
753
+ value.to_f
754
+ when :BOOLEAN
755
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
756
+ true
757
+ else
758
+ false
759
+ end
760
+ when :Object
761
+ # generic object (usually a Hash), return directly
762
+ value
763
+ when /\AArray<(?<inner_type>.+)>\z/
764
+ inner_type = Regexp.last_match[:inner_type]
765
+ value.map { |v| _deserialize(inner_type, v) }
766
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
767
+ k_type = Regexp.last_match[:k_type]
768
+ v_type = Regexp.last_match[:v_type]
769
+ {}.tap do |hash|
770
+ value.each do |k, v|
771
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
772
+ end
773
+ end
774
+ else # model
775
+ temp_model = UltracartClient.const_get(type).new
776
+ temp_model.build_from_hash(value)
777
+ end
778
+ end
779
+
780
+ # Returns the string representation of the object
781
+ # @return [String] String presentation of the object
782
+ def to_s
783
+ to_hash.to_s
784
+ end
785
+
786
+ # to_body is an alias to to_hash (backward compatibility)
787
+ # @return [Hash] Returns the object in the form of hash
788
+ def to_body
789
+ to_hash
790
+ end
791
+
792
+ # Returns the object in the form of hash
793
+ # @return [Hash] Returns the object in the form of hash
794
+ def to_hash
795
+ hash = {}
796
+ self.class.attribute_map.each_pair do |attr, param|
797
+ value = self.send(attr)
798
+ next if value.nil?
799
+ hash[param] = _to_hash(value)
800
+ end
801
+ hash
802
+ end
803
+
804
+ # Outputs non-array value in the form of hash
805
+ # For object, use to_hash. Otherwise, just return the value
806
+ # @param [Object] value Any valid value
807
+ # @return [Hash] Returns the value in the form of hash
808
+ def _to_hash(value)
809
+ if value.is_a?(Array)
810
+ value.compact.map { |v| _to_hash(v) }
811
+ elsif value.is_a?(Hash)
812
+ {}.tap do |hash|
813
+ value.each { |k, v| hash[k] = _to_hash(v) }
814
+ end
815
+ elsif value.respond_to? :to_hash
816
+ value.to_hash
817
+ else
818
+ value
819
+ end
820
+ end
821
+
822
+ end
823
+ end