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,427 @@
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 PaymentsConfigurationWePay
17
+ attr_accessor :accept_wepay
18
+
19
+ attr_accessor :hide_credit_cards_non_ultra_cart_payments
20
+
21
+ attr_accessor :hide_surcharge_content
22
+
23
+ attr_accessor :remove_pay_pal_pro
24
+
25
+ attr_accessor :restrictions
26
+
27
+ attr_accessor :short_pay_pal_marketing_text
28
+
29
+ attr_accessor :show_ultra_cart_payments_disabled
30
+
31
+ attr_accessor :show_ultra_cart_payments_intro
32
+
33
+ attr_accessor :show_ultra_cart_payments_verification
34
+
35
+ attr_accessor :show_ultra_cart_payments_verified
36
+
37
+ attr_accessor :wepay_account_update_uri
38
+
39
+ attr_accessor :wepay_address1
40
+
41
+ attr_accessor :wepay_address2
42
+
43
+ attr_accessor :wepay_canada_accept_debit_cards
44
+
45
+ attr_accessor :wepay_city
46
+
47
+ attr_accessor :wepay_company
48
+
49
+ attr_accessor :wepay_company_description
50
+
51
+ attr_accessor :wepay_console_hostname
52
+
53
+ attr_accessor :wepay_country
54
+
55
+ attr_accessor :wepay_currency
56
+
57
+ attr_accessor :wepay_expected_revenue
58
+
59
+ attr_accessor :wepay_industry
60
+
61
+ attr_accessor :wepay_owner_email
62
+
63
+ attr_accessor :wepay_owner_name
64
+
65
+ attr_accessor :wepay_owner_phone
66
+
67
+ attr_accessor :wepay_state
68
+
69
+ attr_accessor :wepay_website_url
70
+
71
+ attr_accessor :wepay_zip
72
+
73
+ # Attribute mapping from ruby-style variable name to JSON key.
74
+ def self.attribute_map
75
+ {
76
+ :'accept_wepay' => :'acceptWepay',
77
+ :'hide_credit_cards_non_ultra_cart_payments' => :'hideCreditCardsNonUltraCartPayments',
78
+ :'hide_surcharge_content' => :'hideSurchargeContent',
79
+ :'remove_pay_pal_pro' => :'removePayPalPro',
80
+ :'restrictions' => :'restrictions',
81
+ :'short_pay_pal_marketing_text' => :'shortPayPalMarketingText',
82
+ :'show_ultra_cart_payments_disabled' => :'showUltraCartPaymentsDisabled',
83
+ :'show_ultra_cart_payments_intro' => :'showUltraCartPaymentsIntro',
84
+ :'show_ultra_cart_payments_verification' => :'showUltraCartPaymentsVerification',
85
+ :'show_ultra_cart_payments_verified' => :'showUltraCartPaymentsVerified',
86
+ :'wepay_account_update_uri' => :'wepayAccountUpdateUri',
87
+ :'wepay_address1' => :'wepayAddress1',
88
+ :'wepay_address2' => :'wepayAddress2',
89
+ :'wepay_canada_accept_debit_cards' => :'wepayCanadaAcceptDebitCards',
90
+ :'wepay_city' => :'wepayCity',
91
+ :'wepay_company' => :'wepayCompany',
92
+ :'wepay_company_description' => :'wepayCompanyDescription',
93
+ :'wepay_console_hostname' => :'wepayConsoleHostname',
94
+ :'wepay_country' => :'wepayCountry',
95
+ :'wepay_currency' => :'wepayCurrency',
96
+ :'wepay_expected_revenue' => :'wepayExpectedRevenue',
97
+ :'wepay_industry' => :'wepayIndustry',
98
+ :'wepay_owner_email' => :'wepayOwnerEmail',
99
+ :'wepay_owner_name' => :'wepayOwnerName',
100
+ :'wepay_owner_phone' => :'wepayOwnerPhone',
101
+ :'wepay_state' => :'wepayState',
102
+ :'wepay_website_url' => :'wepayWebsiteUrl',
103
+ :'wepay_zip' => :'wepayZip'
104
+ }
105
+ end
106
+
107
+ # Attribute type mapping.
108
+ def self.swagger_types
109
+ {
110
+ :'accept_wepay' => :'BOOLEAN',
111
+ :'hide_credit_cards_non_ultra_cart_payments' => :'BOOLEAN',
112
+ :'hide_surcharge_content' => :'BOOLEAN',
113
+ :'remove_pay_pal_pro' => :'BOOLEAN',
114
+ :'restrictions' => :'PaymentsConfigurationRestrictions',
115
+ :'short_pay_pal_marketing_text' => :'BOOLEAN',
116
+ :'show_ultra_cart_payments_disabled' => :'BOOLEAN',
117
+ :'show_ultra_cart_payments_intro' => :'BOOLEAN',
118
+ :'show_ultra_cart_payments_verification' => :'BOOLEAN',
119
+ :'show_ultra_cart_payments_verified' => :'BOOLEAN',
120
+ :'wepay_account_update_uri' => :'String',
121
+ :'wepay_address1' => :'String',
122
+ :'wepay_address2' => :'String',
123
+ :'wepay_canada_accept_debit_cards' => :'BOOLEAN',
124
+ :'wepay_city' => :'String',
125
+ :'wepay_company' => :'String',
126
+ :'wepay_company_description' => :'String',
127
+ :'wepay_console_hostname' => :'String',
128
+ :'wepay_country' => :'String',
129
+ :'wepay_currency' => :'String',
130
+ :'wepay_expected_revenue' => :'String',
131
+ :'wepay_industry' => :'String',
132
+ :'wepay_owner_email' => :'String',
133
+ :'wepay_owner_name' => :'String',
134
+ :'wepay_owner_phone' => :'String',
135
+ :'wepay_state' => :'String',
136
+ :'wepay_website_url' => :'String',
137
+ :'wepay_zip' => :'String'
138
+ }
139
+ end
140
+
141
+ # Initializes the object
142
+ # @param [Hash] attributes Model attributes in the form of hash
143
+ def initialize(attributes = {})
144
+ return unless attributes.is_a?(Hash)
145
+
146
+ # convert string to symbol for hash key
147
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
148
+
149
+ if attributes.has_key?(:'acceptWepay')
150
+ self.accept_wepay = attributes[:'acceptWepay']
151
+ end
152
+
153
+ if attributes.has_key?(:'hideCreditCardsNonUltraCartPayments')
154
+ self.hide_credit_cards_non_ultra_cart_payments = attributes[:'hideCreditCardsNonUltraCartPayments']
155
+ end
156
+
157
+ if attributes.has_key?(:'hideSurchargeContent')
158
+ self.hide_surcharge_content = attributes[:'hideSurchargeContent']
159
+ end
160
+
161
+ if attributes.has_key?(:'removePayPalPro')
162
+ self.remove_pay_pal_pro = attributes[:'removePayPalPro']
163
+ end
164
+
165
+ if attributes.has_key?(:'restrictions')
166
+ self.restrictions = attributes[:'restrictions']
167
+ end
168
+
169
+ if attributes.has_key?(:'shortPayPalMarketingText')
170
+ self.short_pay_pal_marketing_text = attributes[:'shortPayPalMarketingText']
171
+ end
172
+
173
+ if attributes.has_key?(:'showUltraCartPaymentsDisabled')
174
+ self.show_ultra_cart_payments_disabled = attributes[:'showUltraCartPaymentsDisabled']
175
+ end
176
+
177
+ if attributes.has_key?(:'showUltraCartPaymentsIntro')
178
+ self.show_ultra_cart_payments_intro = attributes[:'showUltraCartPaymentsIntro']
179
+ end
180
+
181
+ if attributes.has_key?(:'showUltraCartPaymentsVerification')
182
+ self.show_ultra_cart_payments_verification = attributes[:'showUltraCartPaymentsVerification']
183
+ end
184
+
185
+ if attributes.has_key?(:'showUltraCartPaymentsVerified')
186
+ self.show_ultra_cart_payments_verified = attributes[:'showUltraCartPaymentsVerified']
187
+ end
188
+
189
+ if attributes.has_key?(:'wepayAccountUpdateUri')
190
+ self.wepay_account_update_uri = attributes[:'wepayAccountUpdateUri']
191
+ end
192
+
193
+ if attributes.has_key?(:'wepayAddress1')
194
+ self.wepay_address1 = attributes[:'wepayAddress1']
195
+ end
196
+
197
+ if attributes.has_key?(:'wepayAddress2')
198
+ self.wepay_address2 = attributes[:'wepayAddress2']
199
+ end
200
+
201
+ if attributes.has_key?(:'wepayCanadaAcceptDebitCards')
202
+ self.wepay_canada_accept_debit_cards = attributes[:'wepayCanadaAcceptDebitCards']
203
+ end
204
+
205
+ if attributes.has_key?(:'wepayCity')
206
+ self.wepay_city = attributes[:'wepayCity']
207
+ end
208
+
209
+ if attributes.has_key?(:'wepayCompany')
210
+ self.wepay_company = attributes[:'wepayCompany']
211
+ end
212
+
213
+ if attributes.has_key?(:'wepayCompanyDescription')
214
+ self.wepay_company_description = attributes[:'wepayCompanyDescription']
215
+ end
216
+
217
+ if attributes.has_key?(:'wepayConsoleHostname')
218
+ self.wepay_console_hostname = attributes[:'wepayConsoleHostname']
219
+ end
220
+
221
+ if attributes.has_key?(:'wepayCountry')
222
+ self.wepay_country = attributes[:'wepayCountry']
223
+ end
224
+
225
+ if attributes.has_key?(:'wepayCurrency')
226
+ self.wepay_currency = attributes[:'wepayCurrency']
227
+ end
228
+
229
+ if attributes.has_key?(:'wepayExpectedRevenue')
230
+ self.wepay_expected_revenue = attributes[:'wepayExpectedRevenue']
231
+ end
232
+
233
+ if attributes.has_key?(:'wepayIndustry')
234
+ self.wepay_industry = attributes[:'wepayIndustry']
235
+ end
236
+
237
+ if attributes.has_key?(:'wepayOwnerEmail')
238
+ self.wepay_owner_email = attributes[:'wepayOwnerEmail']
239
+ end
240
+
241
+ if attributes.has_key?(:'wepayOwnerName')
242
+ self.wepay_owner_name = attributes[:'wepayOwnerName']
243
+ end
244
+
245
+ if attributes.has_key?(:'wepayOwnerPhone')
246
+ self.wepay_owner_phone = attributes[:'wepayOwnerPhone']
247
+ end
248
+
249
+ if attributes.has_key?(:'wepayState')
250
+ self.wepay_state = attributes[:'wepayState']
251
+ end
252
+
253
+ if attributes.has_key?(:'wepayWebsiteUrl')
254
+ self.wepay_website_url = attributes[:'wepayWebsiteUrl']
255
+ end
256
+
257
+ if attributes.has_key?(:'wepayZip')
258
+ self.wepay_zip = attributes[:'wepayZip']
259
+ end
260
+ end
261
+
262
+ # Show invalid properties with the reasons. Usually used together with valid?
263
+ # @return Array for valid properties with the reasons
264
+ def list_invalid_properties
265
+ invalid_properties = Array.new
266
+ invalid_properties
267
+ end
268
+
269
+ # Check to see if the all the properties in the model are valid
270
+ # @return true if the model is valid
271
+ def valid?
272
+ true
273
+ end
274
+
275
+ # Checks equality by comparing each attribute.
276
+ # @param [Object] Object to be compared
277
+ def ==(o)
278
+ return true if self.equal?(o)
279
+ self.class == o.class &&
280
+ accept_wepay == o.accept_wepay &&
281
+ hide_credit_cards_non_ultra_cart_payments == o.hide_credit_cards_non_ultra_cart_payments &&
282
+ hide_surcharge_content == o.hide_surcharge_content &&
283
+ remove_pay_pal_pro == o.remove_pay_pal_pro &&
284
+ restrictions == o.restrictions &&
285
+ short_pay_pal_marketing_text == o.short_pay_pal_marketing_text &&
286
+ show_ultra_cart_payments_disabled == o.show_ultra_cart_payments_disabled &&
287
+ show_ultra_cart_payments_intro == o.show_ultra_cart_payments_intro &&
288
+ show_ultra_cart_payments_verification == o.show_ultra_cart_payments_verification &&
289
+ show_ultra_cart_payments_verified == o.show_ultra_cart_payments_verified &&
290
+ wepay_account_update_uri == o.wepay_account_update_uri &&
291
+ wepay_address1 == o.wepay_address1 &&
292
+ wepay_address2 == o.wepay_address2 &&
293
+ wepay_canada_accept_debit_cards == o.wepay_canada_accept_debit_cards &&
294
+ wepay_city == o.wepay_city &&
295
+ wepay_company == o.wepay_company &&
296
+ wepay_company_description == o.wepay_company_description &&
297
+ wepay_console_hostname == o.wepay_console_hostname &&
298
+ wepay_country == o.wepay_country &&
299
+ wepay_currency == o.wepay_currency &&
300
+ wepay_expected_revenue == o.wepay_expected_revenue &&
301
+ wepay_industry == o.wepay_industry &&
302
+ wepay_owner_email == o.wepay_owner_email &&
303
+ wepay_owner_name == o.wepay_owner_name &&
304
+ wepay_owner_phone == o.wepay_owner_phone &&
305
+ wepay_state == o.wepay_state &&
306
+ wepay_website_url == o.wepay_website_url &&
307
+ wepay_zip == o.wepay_zip
308
+ end
309
+
310
+ # @see the `==` method
311
+ # @param [Object] Object to be compared
312
+ def eql?(o)
313
+ self == o
314
+ end
315
+
316
+ # Calculates hash code according to all attributes.
317
+ # @return [Fixnum] Hash code
318
+ def hash
319
+ [accept_wepay, hide_credit_cards_non_ultra_cart_payments, hide_surcharge_content, remove_pay_pal_pro, restrictions, short_pay_pal_marketing_text, show_ultra_cart_payments_disabled, show_ultra_cart_payments_intro, show_ultra_cart_payments_verification, show_ultra_cart_payments_verified, wepay_account_update_uri, wepay_address1, wepay_address2, wepay_canada_accept_debit_cards, wepay_city, wepay_company, wepay_company_description, wepay_console_hostname, wepay_country, wepay_currency, wepay_expected_revenue, wepay_industry, wepay_owner_email, wepay_owner_name, wepay_owner_phone, wepay_state, wepay_website_url, wepay_zip].hash
320
+ end
321
+
322
+ # Builds the object from hash
323
+ # @param [Hash] attributes Model attributes in the form of hash
324
+ # @return [Object] Returns the model itself
325
+ def build_from_hash(attributes)
326
+ return nil unless attributes.is_a?(Hash)
327
+ self.class.swagger_types.each_pair do |key, type|
328
+ if type =~ /\AArray<(.*)>/i
329
+ # check to ensure the input is an array given that the attribute
330
+ # is documented as an array but the input is not
331
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
332
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
333
+ end
334
+ elsif !attributes[self.class.attribute_map[key]].nil?
335
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
336
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
337
+ end
338
+
339
+ self
340
+ end
341
+
342
+ # Deserializes the data based on type
343
+ # @param string type Data type
344
+ # @param string value Value to be deserialized
345
+ # @return [Object] Deserialized data
346
+ def _deserialize(type, value)
347
+ case type.to_sym
348
+ when :DateTime
349
+ DateTime.parse(value)
350
+ when :Date
351
+ Date.parse(value)
352
+ when :String
353
+ value.to_s
354
+ when :Integer
355
+ value.to_i
356
+ when :Float
357
+ value.to_f
358
+ when :BOOLEAN
359
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
360
+ true
361
+ else
362
+ false
363
+ end
364
+ when :Object
365
+ # generic object (usually a Hash), return directly
366
+ value
367
+ when /\AArray<(?<inner_type>.+)>\z/
368
+ inner_type = Regexp.last_match[:inner_type]
369
+ value.map { |v| _deserialize(inner_type, v) }
370
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
371
+ k_type = Regexp.last_match[:k_type]
372
+ v_type = Regexp.last_match[:v_type]
373
+ {}.tap do |hash|
374
+ value.each do |k, v|
375
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
376
+ end
377
+ end
378
+ else # model
379
+ temp_model = UltracartClient.const_get(type).new
380
+ temp_model.build_from_hash(value)
381
+ end
382
+ end
383
+
384
+ # Returns the string representation of the object
385
+ # @return [String] String presentation of the object
386
+ def to_s
387
+ to_hash.to_s
388
+ end
389
+
390
+ # to_body is an alias to to_hash (backward compatibility)
391
+ # @return [Hash] Returns the object in the form of hash
392
+ def to_body
393
+ to_hash
394
+ end
395
+
396
+ # Returns the object in the form of hash
397
+ # @return [Hash] Returns the object in the form of hash
398
+ def to_hash
399
+ hash = {}
400
+ self.class.attribute_map.each_pair do |attr, param|
401
+ value = self.send(attr)
402
+ next if value.nil?
403
+ hash[param] = _to_hash(value)
404
+ end
405
+ hash
406
+ end
407
+
408
+ # Outputs non-array value in the form of hash
409
+ # For object, use to_hash. Otherwise, just return the value
410
+ # @param [Object] value Any valid value
411
+ # @return [Hash] Returns the value in the form of hash
412
+ def _to_hash(value)
413
+ if value.is_a?(Array)
414
+ value.compact.map { |v| _to_hash(v) }
415
+ elsif value.is_a?(Hash)
416
+ {}.tap do |hash|
417
+ value.each { |k, v| hash[k] = _to_hash(v) }
418
+ end
419
+ elsif value.respond_to? :to_hash
420
+ value.to_hash
421
+ else
422
+ value
423
+ end
424
+ end
425
+
426
+ end
427
+ end
@@ -0,0 +1,274 @@
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 PaymentsConfigurationWireTransfer
17
+ attr_accessor :accept_wire_transfer
18
+
19
+ attr_accessor :restrictions
20
+
21
+ attr_accessor :wire_transfer_accounting_code
22
+
23
+ attr_accessor :wire_transfer_account_number
24
+
25
+ attr_accessor :wire_transfer_bank_address
26
+
27
+ attr_accessor :wire_transfer_deposit_to_account
28
+
29
+ attr_accessor :wire_transfer_intermediate_routing_number
30
+
31
+ attr_accessor :wire_transfer_routing_number
32
+
33
+ attr_accessor :wire_transfer_surcharge_accounting_code
34
+
35
+ attr_accessor :wire_transfer_surcharge_fee
36
+
37
+ attr_accessor :wire_transfer_surcharge_perc
38
+
39
+ # Attribute mapping from ruby-style variable name to JSON key.
40
+ def self.attribute_map
41
+ {
42
+ :'accept_wire_transfer' => :'acceptWireTransfer',
43
+ :'restrictions' => :'restrictions',
44
+ :'wire_transfer_accounting_code' => :'wireTransferAccountingCode',
45
+ :'wire_transfer_account_number' => :'wireTransferAccountNumber',
46
+ :'wire_transfer_bank_address' => :'wireTransferBankAddress',
47
+ :'wire_transfer_deposit_to_account' => :'wireTransferDepositToAccount',
48
+ :'wire_transfer_intermediate_routing_number' => :'wireTransferIntermediateRoutingNumber',
49
+ :'wire_transfer_routing_number' => :'wireTransferRoutingNumber',
50
+ :'wire_transfer_surcharge_accounting_code' => :'wireTransferSurchargeAccountingCode',
51
+ :'wire_transfer_surcharge_fee' => :'wireTransferSurchargeFee',
52
+ :'wire_transfer_surcharge_perc' => :'wireTransferSurchargePerc'
53
+ }
54
+ end
55
+
56
+ # Attribute type mapping.
57
+ def self.swagger_types
58
+ {
59
+ :'accept_wire_transfer' => :'BOOLEAN',
60
+ :'restrictions' => :'PaymentsConfigurationRestrictions',
61
+ :'wire_transfer_accounting_code' => :'String',
62
+ :'wire_transfer_account_number' => :'String',
63
+ :'wire_transfer_bank_address' => :'String',
64
+ :'wire_transfer_deposit_to_account' => :'String',
65
+ :'wire_transfer_intermediate_routing_number' => :'String',
66
+ :'wire_transfer_routing_number' => :'String',
67
+ :'wire_transfer_surcharge_accounting_code' => :'String',
68
+ :'wire_transfer_surcharge_fee' => :'String',
69
+ :'wire_transfer_surcharge_perc' => :'String'
70
+ }
71
+ end
72
+
73
+ # Initializes the object
74
+ # @param [Hash] attributes Model attributes in the form of hash
75
+ def initialize(attributes = {})
76
+ return unless attributes.is_a?(Hash)
77
+
78
+ # convert string to symbol for hash key
79
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
80
+
81
+ if attributes.has_key?(:'acceptWireTransfer')
82
+ self.accept_wire_transfer = attributes[:'acceptWireTransfer']
83
+ end
84
+
85
+ if attributes.has_key?(:'restrictions')
86
+ self.restrictions = attributes[:'restrictions']
87
+ end
88
+
89
+ if attributes.has_key?(:'wireTransferAccountingCode')
90
+ self.wire_transfer_accounting_code = attributes[:'wireTransferAccountingCode']
91
+ end
92
+
93
+ if attributes.has_key?(:'wireTransferAccountNumber')
94
+ self.wire_transfer_account_number = attributes[:'wireTransferAccountNumber']
95
+ end
96
+
97
+ if attributes.has_key?(:'wireTransferBankAddress')
98
+ self.wire_transfer_bank_address = attributes[:'wireTransferBankAddress']
99
+ end
100
+
101
+ if attributes.has_key?(:'wireTransferDepositToAccount')
102
+ self.wire_transfer_deposit_to_account = attributes[:'wireTransferDepositToAccount']
103
+ end
104
+
105
+ if attributes.has_key?(:'wireTransferIntermediateRoutingNumber')
106
+ self.wire_transfer_intermediate_routing_number = attributes[:'wireTransferIntermediateRoutingNumber']
107
+ end
108
+
109
+ if attributes.has_key?(:'wireTransferRoutingNumber')
110
+ self.wire_transfer_routing_number = attributes[:'wireTransferRoutingNumber']
111
+ end
112
+
113
+ if attributes.has_key?(:'wireTransferSurchargeAccountingCode')
114
+ self.wire_transfer_surcharge_accounting_code = attributes[:'wireTransferSurchargeAccountingCode']
115
+ end
116
+
117
+ if attributes.has_key?(:'wireTransferSurchargeFee')
118
+ self.wire_transfer_surcharge_fee = attributes[:'wireTransferSurchargeFee']
119
+ end
120
+
121
+ if attributes.has_key?(:'wireTransferSurchargePerc')
122
+ self.wire_transfer_surcharge_perc = attributes[:'wireTransferSurchargePerc']
123
+ end
124
+ end
125
+
126
+ # Show invalid properties with the reasons. Usually used together with valid?
127
+ # @return Array for valid properties with the reasons
128
+ def list_invalid_properties
129
+ invalid_properties = Array.new
130
+ invalid_properties
131
+ end
132
+
133
+ # Check to see if the all the properties in the model are valid
134
+ # @return true if the model is valid
135
+ def valid?
136
+ true
137
+ end
138
+
139
+ # Checks equality by comparing each attribute.
140
+ # @param [Object] Object to be compared
141
+ def ==(o)
142
+ return true if self.equal?(o)
143
+ self.class == o.class &&
144
+ accept_wire_transfer == o.accept_wire_transfer &&
145
+ restrictions == o.restrictions &&
146
+ wire_transfer_accounting_code == o.wire_transfer_accounting_code &&
147
+ wire_transfer_account_number == o.wire_transfer_account_number &&
148
+ wire_transfer_bank_address == o.wire_transfer_bank_address &&
149
+ wire_transfer_deposit_to_account == o.wire_transfer_deposit_to_account &&
150
+ wire_transfer_intermediate_routing_number == o.wire_transfer_intermediate_routing_number &&
151
+ wire_transfer_routing_number == o.wire_transfer_routing_number &&
152
+ wire_transfer_surcharge_accounting_code == o.wire_transfer_surcharge_accounting_code &&
153
+ wire_transfer_surcharge_fee == o.wire_transfer_surcharge_fee &&
154
+ wire_transfer_surcharge_perc == o.wire_transfer_surcharge_perc
155
+ end
156
+
157
+ # @see the `==` method
158
+ # @param [Object] Object to be compared
159
+ def eql?(o)
160
+ self == o
161
+ end
162
+
163
+ # Calculates hash code according to all attributes.
164
+ # @return [Fixnum] Hash code
165
+ def hash
166
+ [accept_wire_transfer, restrictions, wire_transfer_accounting_code, wire_transfer_account_number, wire_transfer_bank_address, wire_transfer_deposit_to_account, wire_transfer_intermediate_routing_number, wire_transfer_routing_number, wire_transfer_surcharge_accounting_code, wire_transfer_surcharge_fee, wire_transfer_surcharge_perc].hash
167
+ end
168
+
169
+ # Builds the object from hash
170
+ # @param [Hash] attributes Model attributes in the form of hash
171
+ # @return [Object] Returns the model itself
172
+ def build_from_hash(attributes)
173
+ return nil unless attributes.is_a?(Hash)
174
+ self.class.swagger_types.each_pair do |key, type|
175
+ if type =~ /\AArray<(.*)>/i
176
+ # check to ensure the input is an array given that the attribute
177
+ # is documented as an array but the input is not
178
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
179
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
180
+ end
181
+ elsif !attributes[self.class.attribute_map[key]].nil?
182
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
183
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
184
+ end
185
+
186
+ self
187
+ end
188
+
189
+ # Deserializes the data based on type
190
+ # @param string type Data type
191
+ # @param string value Value to be deserialized
192
+ # @return [Object] Deserialized data
193
+ def _deserialize(type, value)
194
+ case type.to_sym
195
+ when :DateTime
196
+ DateTime.parse(value)
197
+ when :Date
198
+ Date.parse(value)
199
+ when :String
200
+ value.to_s
201
+ when :Integer
202
+ value.to_i
203
+ when :Float
204
+ value.to_f
205
+ when :BOOLEAN
206
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
207
+ true
208
+ else
209
+ false
210
+ end
211
+ when :Object
212
+ # generic object (usually a Hash), return directly
213
+ value
214
+ when /\AArray<(?<inner_type>.+)>\z/
215
+ inner_type = Regexp.last_match[:inner_type]
216
+ value.map { |v| _deserialize(inner_type, v) }
217
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
218
+ k_type = Regexp.last_match[:k_type]
219
+ v_type = Regexp.last_match[:v_type]
220
+ {}.tap do |hash|
221
+ value.each do |k, v|
222
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
223
+ end
224
+ end
225
+ else # model
226
+ temp_model = UltracartClient.const_get(type).new
227
+ temp_model.build_from_hash(value)
228
+ end
229
+ end
230
+
231
+ # Returns the string representation of the object
232
+ # @return [String] String presentation of the object
233
+ def to_s
234
+ to_hash.to_s
235
+ end
236
+
237
+ # to_body is an alias to to_hash (backward compatibility)
238
+ # @return [Hash] Returns the object in the form of hash
239
+ def to_body
240
+ to_hash
241
+ end
242
+
243
+ # Returns the object in the form of hash
244
+ # @return [Hash] Returns the object in the form of hash
245
+ def to_hash
246
+ hash = {}
247
+ self.class.attribute_map.each_pair do |attr, param|
248
+ value = self.send(attr)
249
+ next if value.nil?
250
+ hash[param] = _to_hash(value)
251
+ end
252
+ hash
253
+ end
254
+
255
+ # Outputs non-array value in the form of hash
256
+ # For object, use to_hash. Otherwise, just return the value
257
+ # @param [Object] value Any valid value
258
+ # @return [Hash] Returns the value in the form of hash
259
+ def _to_hash(value)
260
+ if value.is_a?(Array)
261
+ value.compact.map { |v| _to_hash(v) }
262
+ elsif value.is_a?(Hash)
263
+ {}.tap do |hash|
264
+ value.each { |k, v| hash[k] = _to_hash(v) }
265
+ end
266
+ elsif value.respond_to? :to_hash
267
+ value.to_hash
268
+ else
269
+ value
270
+ end
271
+ end
272
+
273
+ end
274
+ end