ultracart_api 3.10.14 → 3.10.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +49 -97
  3. data/docs/ChannelPartnerApi.md +51 -0
  4. data/docs/{DelayAutoOrdersResponse.md → ChannelPartnerEstimateTaxResponse.md} +2 -2
  5. data/lib/ultracart_api/api/channel_partner_api.rb +55 -0
  6. data/lib/ultracart_api/models/{stripe_connect_response.rb → channel_partner_estimate_tax_response.rb} +8 -8
  7. data/lib/ultracart_api/version.rb +1 -1
  8. data/lib/ultracart_api.rb +1 -39
  9. metadata +4 -80
  10. data/docs/ConfigurationApi.md +0 -756
  11. data/docs/PaymentsConfiguration.md +0 -24
  12. data/docs/PaymentsConfigurationAffirm.md +0 -15
  13. data/docs/PaymentsConfigurationAmazon.md +0 -15
  14. data/docs/PaymentsConfigurationCOD.md +0 -13
  15. data/docs/PaymentsConfigurationCash.md +0 -9
  16. data/docs/PaymentsConfigurationCheck.md +0 -19
  17. data/docs/PaymentsConfigurationCreditCard.md +0 -17
  18. data/docs/PaymentsConfigurationCreditCardType.md +0 -18
  19. data/docs/PaymentsConfigurationEcheck.md +0 -12
  20. data/docs/PaymentsConfigurationInsurance.md +0 -9
  21. data/docs/PaymentsConfigurationLoanHero.md +0 -12
  22. data/docs/PaymentsConfigurationMoneyOrder.md +0 -11
  23. data/docs/PaymentsConfigurationPayPal.md +0 -36
  24. data/docs/PaymentsConfigurationPurchaseOrder.md +0 -11
  25. data/docs/PaymentsConfigurationQuoteRequest.md +0 -10
  26. data/docs/PaymentsConfigurationResponse.md +0 -12
  27. data/docs/PaymentsConfigurationRestrictions.md +0 -21
  28. data/docs/PaymentsConfigurationRestrictionsTheme.md +0 -10
  29. data/docs/PaymentsConfigurationSezzle.md +0 -15
  30. data/docs/PaymentsConfigurationTestMethod.md +0 -18
  31. data/docs/PaymentsConfigurationWePay.md +0 -35
  32. data/docs/PaymentsConfigurationWireTransfer.md +0 -18
  33. data/docs/PaymentsThemeTransactionType.md +0 -10
  34. data/docs/PaymentsWepayEnroll.md +0 -22
  35. data/docs/RotatingTransactionGateway.md +0 -51
  36. data/docs/RotatingTransactionGatewayResponse.md +0 -12
  37. data/docs/RotatingTransactionGatewaysResponse.md +0 -12
  38. data/docs/RtgCurrency.md +0 -10
  39. data/docs/RtgDayOfMonthRestriction.md +0 -9
  40. data/docs/RtgDayOfWeekRestriction.md +0 -10
  41. data/docs/RtgSummaryGateway.md +0 -24
  42. data/docs/RtgSummaryResponse.md +0 -14
  43. data/docs/RtgThemeRestriction.md +0 -10
  44. data/docs/StripeConnectResponse.md +0 -12
  45. data/docs/TransactionGateway.md +0 -71
  46. data/docs/TransactionGatewaysRequest.md +0 -10
  47. data/docs/TransactionGatewaysResponse.md +0 -12
  48. data/lib/ultracart_api/api/configuration_api.rb +0 -843
  49. data/lib/ultracart_api/models/delay_auto_orders_response.rb +0 -221
  50. data/lib/ultracart_api/models/payments_configuration.rb +0 -329
  51. data/lib/ultracart_api/models/payments_configuration_affirm.rb +0 -288
  52. data/lib/ultracart_api/models/payments_configuration_amazon.rb +0 -288
  53. data/lib/ultracart_api/models/payments_configuration_cash.rb +0 -194
  54. data/lib/ultracart_api/models/payments_configuration_check.rb +0 -294
  55. data/lib/ultracart_api/models/payments_configuration_cod.rb +0 -234
  56. data/lib/ultracart_api/models/payments_configuration_credit_card.rb +0 -279
  57. data/lib/ultracart_api/models/payments_configuration_credit_card_type.rb +0 -318
  58. data/lib/ultracart_api/models/payments_configuration_echeck.rb +0 -226
  59. data/lib/ultracart_api/models/payments_configuration_insurance.rb +0 -194
  60. data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +0 -224
  61. data/lib/ultracart_api/models/payments_configuration_money_order.rb +0 -214
  62. data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +0 -534
  63. data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +0 -214
  64. data/lib/ultracart_api/models/payments_configuration_quote_request.rb +0 -204
  65. data/lib/ultracart_api/models/payments_configuration_response.rb +0 -221
  66. data/lib/ultracart_api/models/payments_configuration_restrictions.rb +0 -447
  67. data/lib/ultracart_api/models/payments_configuration_restrictions_theme.rb +0 -202
  68. data/lib/ultracart_api/models/payments_configuration_sezzle.rb +0 -288
  69. data/lib/ultracart_api/models/payments_configuration_test_method.rb +0 -319
  70. data/lib/ultracart_api/models/payments_configuration_we_pay.rb +0 -454
  71. data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +0 -284
  72. data/lib/ultracart_api/models/payments_theme_transaction_type.rb +0 -239
  73. data/lib/ultracart_api/models/payments_wepay_enroll.rb +0 -310
  74. data/lib/ultracart_api/models/rotating_transaction_gateway.rb +0 -675
  75. data/lib/ultracart_api/models/rotating_transaction_gateway_response.rb +0 -221
  76. data/lib/ultracart_api/models/rotating_transaction_gateways_response.rb +0 -223
  77. data/lib/ultracart_api/models/rtg_currency.rb +0 -205
  78. data/lib/ultracart_api/models/rtg_day_of_month_restriction.rb +0 -195
  79. data/lib/ultracart_api/models/rtg_day_of_week_restriction.rb +0 -205
  80. data/lib/ultracart_api/models/rtg_summary_gateway.rb +0 -329
  81. data/lib/ultracart_api/models/rtg_summary_response.rb +0 -240
  82. data/lib/ultracart_api/models/rtg_theme_restriction.rb +0 -239
  83. data/lib/ultracart_api/models/transaction_gateway.rb +0 -823
  84. data/lib/ultracart_api/models/transaction_gateways_request.rb +0 -242
  85. data/lib/ultracart_api/models/transaction_gateways_response.rb +0 -223
@@ -1,675 +0,0 @@
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 RotatingTransactionGateway
17
- # An array of all currencies known to the UltraCart system and a boolean indicating whether this gateway supports that currency.
18
- attr_accessor :additional_native_currency_codes
19
-
20
- # Advanced feature for canceling an auto order unless the transaction gateway response contains a field with this name. If specified, this field must exist and the value must equal a value in the auto_order_cancel_unless_response_values array
21
- attr_accessor :auto_order_cancel_unless_response_name
22
-
23
- # Advanced feature for canceling an auto order unless the transaction gateway response contains a field with the name specified in auto_order_cancel_unless_response_name. If specified, this field must exist and the value must equal a value in this array. If nothing matches, the auto order is canceled.
24
- attr_accessor :auto_order_cancel_unless_response_values
25
-
26
- # The base currency code for your gateway. For example, USD.
27
- attr_accessor :base_currency_code
28
-
29
- # Optional field specifying a different rotating gateway to use if this gateway fails to process the transaction.
30
- attr_accessor :cascade_code
31
-
32
- # A list of other rotating transaction gateways that can be used as a lookup to assign actions based on failures of this gateway
33
- attr_accessor :cascade_codes
34
-
35
- # The code for the next rotating gateway that should be used when this gateway reaches a daily limit
36
- attr_accessor :cascade_daily_auto_order_code
37
-
38
- # Optional field providing an alternate Charge Appears As value for this rotating gateway
39
- attr_accessor :charge_appears_on_statement_as
40
-
41
- # A human friendly short code used to recognize and differentiate this rotating gateway with other rotating gateways
42
- attr_accessor :code
43
-
44
- # The current daily dollar amount this gateway has processed. Providing this will allow UltraCart to track the monthly amount going forward.
45
- attr_accessor :current_daily
46
-
47
- # The current daily dollar amount of auto orders (recurring) this gateway has processed. Providing this will allow UltraCart to track the monthly amount going forward.
48
- attr_accessor :current_daily_auto_order
49
-
50
- # The current monthly dollar amount this gateway has processed. Providing this will allow UltraCart to track the monthly amount going forward.
51
- attr_accessor :current_monthly
52
-
53
- # The customer service email address for this gateway
54
- attr_accessor :customer_service_email
55
-
56
- # The customer service phone number for this gateway
57
- attr_accessor :customer_service_phone
58
-
59
- # Array containing all 31 (possible) days and any optional restrictions for one or more days.
60
- attr_accessor :day_of_month_restrictions
61
-
62
- # Array containing all seven days of the week and any optional restrictions for one or more days
63
- attr_accessor :day_of_week_restrictions
64
-
65
- # If non-zero, this gateway will be deactivated after reaching this amount of consecutive failures.
66
- attr_accessor :deactivate_after_failures
67
-
68
- # Optional field to specify an absolute date when this gateway should stop accepting transactions
69
- attr_accessor :end_date
70
-
71
- # An array of all transaction gateways, not just the one currently configured for this rotating gateway. This allows for easy switching to another gateway. The enabled property on the transaction gateway indicates which one is actually being used.
72
- attr_accessor :gateways
73
-
74
- # The maximum daily dollar amount this gateway may process
75
- attr_accessor :maximum_daily
76
-
77
- # The maximum daily dollar amount of auto orders (recurring) this gateway may process
78
- attr_accessor :maximum_daily_auto_order
79
-
80
- # The maximum monthly dollar amount this gateway may process.
81
- attr_accessor :maximum_monthly
82
-
83
- # The date and time when this gateway daily limit for auto orders will reset
84
- attr_accessor :next_daily_auto_order_reset
85
-
86
- # The date and time when this gateway daily limit will reset
87
- attr_accessor :next_daily_reset
88
-
89
- # The date and time when this gateway monthly limit will reset
90
- attr_accessor :next_monthly_reset
91
-
92
- # This optional field is combined with order_total_comparison to determine if an order should be processed thorugh this gateway.
93
- attr_accessor :order_total
94
-
95
- # The math operator used to determine if the order total is allowed to process through this gateway.
96
- attr_accessor :order_total_comparison
97
-
98
- # If specified auto orders (rebills) are routed to this rotating gateway. This may be needed because rebills lack a credit card cvv.
99
- attr_accessor :rebill_auto_orders_against_this_rtg_code
100
-
101
- # The number of days that your gateway holds any reserves. This aids in profitability reporting.
102
- attr_accessor :reserve_days
103
-
104
- # The percentage of an order which your gateway is holding in reserve. This aids in profitability reporting.
105
- attr_accessor :reserve_percentage
106
-
107
- # If true, reserves are refunded when an order is refunded. This aids in profitability reporting.
108
- attr_accessor :reserve_refunded
109
-
110
- # An optional date specifying the date up to which your gateway has released all reserve funds. This aids in profitability reporting.
111
- attr_accessor :reserves_released_through
112
-
113
- # Internal identifier used to store and retrieve this gateway information
114
- attr_accessor :rotating_transaction_gateway_oid
115
-
116
- # The name of the currently selected transaction gateway used by this rotating gateway
117
- attr_accessor :selected_gateway_name
118
-
119
- # A boolean used by the builtin UltraCart UI to determine if cascading rtg codes should be shown
120
- attr_accessor :show_cascade_codes
121
-
122
- # A flag to help the UltraCart UI to know whether to show merchant account profiles or not.
123
- attr_accessor :show_merchant_account_profiles
124
-
125
- # Optional field to specify an absolute date when this gateway should begin accepting transactions
126
- attr_accessor :start_date
127
-
128
- # A field used to take a gateway offline without removing/deleting the configuration. Inactive marks the gateway as completely unusable. Standby takes the gateway offline and will not be used unless all other active gateways fail.
129
- attr_accessor :status
130
-
131
- # Optional restrictions by theme/storefront
132
- attr_accessor :theme_restrictions
133
-
134
- # Required field between 0 and 1 that dictates the percentage of traffic that should flow through this gateway
135
- attr_accessor :traffic_percentage
136
-
137
- # If specified, limits the total daily count of trial orders
138
- attr_accessor :trial_daily_amount
139
-
140
- # If specified, limits the total daily dollar amount of trial orders
141
- attr_accessor :trial_daily_limit
142
-
143
- # If specified, limits the total month dollar amount of trial orders
144
- attr_accessor :trial_monthly_amount
145
-
146
- # If specified, limits the total month count of trial orders
147
- attr_accessor :trial_monthly_limit
148
-
149
- class EnumAttributeValidator
150
- attr_reader :datatype
151
- attr_reader :allowable_values
152
-
153
- def initialize(datatype, allowable_values)
154
- @allowable_values = allowable_values.map do |value|
155
- case datatype.to_s
156
- when /Integer/i
157
- value.to_i
158
- when /Float/i
159
- value.to_f
160
- else
161
- value
162
- end
163
- end
164
- end
165
-
166
- def valid?(value)
167
- !value || allowable_values.include?(value)
168
- end
169
- end
170
-
171
- # Attribute mapping from ruby-style variable name to JSON key.
172
- def self.attribute_map
173
- {
174
- :'additional_native_currency_codes' => :'additional_native_currency_codes',
175
- :'auto_order_cancel_unless_response_name' => :'auto_order_cancel_unless_response_name',
176
- :'auto_order_cancel_unless_response_values' => :'auto_order_cancel_unless_response_values',
177
- :'base_currency_code' => :'base_currency_code',
178
- :'cascade_code' => :'cascade_code',
179
- :'cascade_codes' => :'cascade_codes',
180
- :'cascade_daily_auto_order_code' => :'cascade_daily_auto_order_code',
181
- :'charge_appears_on_statement_as' => :'charge_appears_on_statement_as',
182
- :'code' => :'code',
183
- :'current_daily' => :'current_daily',
184
- :'current_daily_auto_order' => :'current_daily_auto_order',
185
- :'current_monthly' => :'current_monthly',
186
- :'customer_service_email' => :'customer_service_email',
187
- :'customer_service_phone' => :'customer_service_phone',
188
- :'day_of_month_restrictions' => :'day_of_month_restrictions',
189
- :'day_of_week_restrictions' => :'day_of_week_restrictions',
190
- :'deactivate_after_failures' => :'deactivate_after_failures',
191
- :'end_date' => :'end_date',
192
- :'gateways' => :'gateways',
193
- :'maximum_daily' => :'maximum_daily',
194
- :'maximum_daily_auto_order' => :'maximum_daily_auto_order',
195
- :'maximum_monthly' => :'maximum_monthly',
196
- :'next_daily_auto_order_reset' => :'next_daily_auto_order_reset',
197
- :'next_daily_reset' => :'next_daily_reset',
198
- :'next_monthly_reset' => :'next_monthly_reset',
199
- :'order_total' => :'order_total',
200
- :'order_total_comparison' => :'order_total_comparison',
201
- :'rebill_auto_orders_against_this_rtg_code' => :'rebill_auto_orders_against_this_rtg_code',
202
- :'reserve_days' => :'reserve_days',
203
- :'reserve_percentage' => :'reserve_percentage',
204
- :'reserve_refunded' => :'reserve_refunded',
205
- :'reserves_released_through' => :'reserves_released_through',
206
- :'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid',
207
- :'selected_gateway_name' => :'selected_gateway_name',
208
- :'show_cascade_codes' => :'show_cascade_codes',
209
- :'show_merchant_account_profiles' => :'show_merchant_account_profiles',
210
- :'start_date' => :'start_date',
211
- :'status' => :'status',
212
- :'theme_restrictions' => :'theme_restrictions',
213
- :'traffic_percentage' => :'traffic_percentage',
214
- :'trial_daily_amount' => :'trial_daily_amount',
215
- :'trial_daily_limit' => :'trial_daily_limit',
216
- :'trial_monthly_amount' => :'trial_monthly_amount',
217
- :'trial_monthly_limit' => :'trial_monthly_limit'
218
- }
219
- end
220
-
221
- # Attribute type mapping.
222
- def self.swagger_types
223
- {
224
- :'additional_native_currency_codes' => :'Array<RtgCurrency>',
225
- :'auto_order_cancel_unless_response_name' => :'String',
226
- :'auto_order_cancel_unless_response_values' => :'Array<String>',
227
- :'base_currency_code' => :'String',
228
- :'cascade_code' => :'String',
229
- :'cascade_codes' => :'Array<String>',
230
- :'cascade_daily_auto_order_code' => :'String',
231
- :'charge_appears_on_statement_as' => :'String',
232
- :'code' => :'String',
233
- :'current_daily' => :'Float',
234
- :'current_daily_auto_order' => :'Float',
235
- :'current_monthly' => :'Float',
236
- :'customer_service_email' => :'String',
237
- :'customer_service_phone' => :'String',
238
- :'day_of_month_restrictions' => :'Array<RtgDayOfMonthRestriction>',
239
- :'day_of_week_restrictions' => :'Array<RtgDayOfWeekRestriction>',
240
- :'deactivate_after_failures' => :'Integer',
241
- :'end_date' => :'String',
242
- :'gateways' => :'Array<TransactionGateway>',
243
- :'maximum_daily' => :'Float',
244
- :'maximum_daily_auto_order' => :'Float',
245
- :'maximum_monthly' => :'Float',
246
- :'next_daily_auto_order_reset' => :'String',
247
- :'next_daily_reset' => :'String',
248
- :'next_monthly_reset' => :'String',
249
- :'order_total' => :'Float',
250
- :'order_total_comparison' => :'String',
251
- :'rebill_auto_orders_against_this_rtg_code' => :'String',
252
- :'reserve_days' => :'Integer',
253
- :'reserve_percentage' => :'Float',
254
- :'reserve_refunded' => :'BOOLEAN',
255
- :'reserves_released_through' => :'String',
256
- :'rotating_transaction_gateway_oid' => :'Integer',
257
- :'selected_gateway_name' => :'String',
258
- :'show_cascade_codes' => :'BOOLEAN',
259
- :'show_merchant_account_profiles' => :'BOOLEAN',
260
- :'start_date' => :'String',
261
- :'status' => :'String',
262
- :'theme_restrictions' => :'Array<RtgThemeRestriction>',
263
- :'traffic_percentage' => :'Float',
264
- :'trial_daily_amount' => :'Integer',
265
- :'trial_daily_limit' => :'Integer',
266
- :'trial_monthly_amount' => :'Integer',
267
- :'trial_monthly_limit' => :'Integer'
268
- }
269
- end
270
-
271
- # Initializes the object
272
- # @param [Hash] attributes Model attributes in the form of hash
273
- def initialize(attributes = {})
274
- return unless attributes.is_a?(Hash)
275
-
276
- # convert string to symbol for hash key
277
- attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
278
-
279
- if attributes.has_key?(:'additional_native_currency_codes')
280
- if (value = attributes[:'additional_native_currency_codes']).is_a?(Array)
281
- self.additional_native_currency_codes = value
282
- end
283
- end
284
-
285
- if attributes.has_key?(:'auto_order_cancel_unless_response_name')
286
- self.auto_order_cancel_unless_response_name = attributes[:'auto_order_cancel_unless_response_name']
287
- end
288
-
289
- if attributes.has_key?(:'auto_order_cancel_unless_response_values')
290
- if (value = attributes[:'auto_order_cancel_unless_response_values']).is_a?(Array)
291
- self.auto_order_cancel_unless_response_values = value
292
- end
293
- end
294
-
295
- if attributes.has_key?(:'base_currency_code')
296
- self.base_currency_code = attributes[:'base_currency_code']
297
- end
298
-
299
- if attributes.has_key?(:'cascade_code')
300
- self.cascade_code = attributes[:'cascade_code']
301
- end
302
-
303
- if attributes.has_key?(:'cascade_codes')
304
- if (value = attributes[:'cascade_codes']).is_a?(Array)
305
- self.cascade_codes = value
306
- end
307
- end
308
-
309
- if attributes.has_key?(:'cascade_daily_auto_order_code')
310
- self.cascade_daily_auto_order_code = attributes[:'cascade_daily_auto_order_code']
311
- end
312
-
313
- if attributes.has_key?(:'charge_appears_on_statement_as')
314
- self.charge_appears_on_statement_as = attributes[:'charge_appears_on_statement_as']
315
- end
316
-
317
- if attributes.has_key?(:'code')
318
- self.code = attributes[:'code']
319
- end
320
-
321
- if attributes.has_key?(:'current_daily')
322
- self.current_daily = attributes[:'current_daily']
323
- end
324
-
325
- if attributes.has_key?(:'current_daily_auto_order')
326
- self.current_daily_auto_order = attributes[:'current_daily_auto_order']
327
- end
328
-
329
- if attributes.has_key?(:'current_monthly')
330
- self.current_monthly = attributes[:'current_monthly']
331
- end
332
-
333
- if attributes.has_key?(:'customer_service_email')
334
- self.customer_service_email = attributes[:'customer_service_email']
335
- end
336
-
337
- if attributes.has_key?(:'customer_service_phone')
338
- self.customer_service_phone = attributes[:'customer_service_phone']
339
- end
340
-
341
- if attributes.has_key?(:'day_of_month_restrictions')
342
- if (value = attributes[:'day_of_month_restrictions']).is_a?(Array)
343
- self.day_of_month_restrictions = value
344
- end
345
- end
346
-
347
- if attributes.has_key?(:'day_of_week_restrictions')
348
- if (value = attributes[:'day_of_week_restrictions']).is_a?(Array)
349
- self.day_of_week_restrictions = value
350
- end
351
- end
352
-
353
- if attributes.has_key?(:'deactivate_after_failures')
354
- self.deactivate_after_failures = attributes[:'deactivate_after_failures']
355
- end
356
-
357
- if attributes.has_key?(:'end_date')
358
- self.end_date = attributes[:'end_date']
359
- end
360
-
361
- if attributes.has_key?(:'gateways')
362
- if (value = attributes[:'gateways']).is_a?(Array)
363
- self.gateways = value
364
- end
365
- end
366
-
367
- if attributes.has_key?(:'maximum_daily')
368
- self.maximum_daily = attributes[:'maximum_daily']
369
- end
370
-
371
- if attributes.has_key?(:'maximum_daily_auto_order')
372
- self.maximum_daily_auto_order = attributes[:'maximum_daily_auto_order']
373
- end
374
-
375
- if attributes.has_key?(:'maximum_monthly')
376
- self.maximum_monthly = attributes[:'maximum_monthly']
377
- end
378
-
379
- if attributes.has_key?(:'next_daily_auto_order_reset')
380
- self.next_daily_auto_order_reset = attributes[:'next_daily_auto_order_reset']
381
- end
382
-
383
- if attributes.has_key?(:'next_daily_reset')
384
- self.next_daily_reset = attributes[:'next_daily_reset']
385
- end
386
-
387
- if attributes.has_key?(:'next_monthly_reset')
388
- self.next_monthly_reset = attributes[:'next_monthly_reset']
389
- end
390
-
391
- if attributes.has_key?(:'order_total')
392
- self.order_total = attributes[:'order_total']
393
- end
394
-
395
- if attributes.has_key?(:'order_total_comparison')
396
- self.order_total_comparison = attributes[:'order_total_comparison']
397
- end
398
-
399
- if attributes.has_key?(:'rebill_auto_orders_against_this_rtg_code')
400
- self.rebill_auto_orders_against_this_rtg_code = attributes[:'rebill_auto_orders_against_this_rtg_code']
401
- end
402
-
403
- if attributes.has_key?(:'reserve_days')
404
- self.reserve_days = attributes[:'reserve_days']
405
- end
406
-
407
- if attributes.has_key?(:'reserve_percentage')
408
- self.reserve_percentage = attributes[:'reserve_percentage']
409
- end
410
-
411
- if attributes.has_key?(:'reserve_refunded')
412
- self.reserve_refunded = attributes[:'reserve_refunded']
413
- end
414
-
415
- if attributes.has_key?(:'reserves_released_through')
416
- self.reserves_released_through = attributes[:'reserves_released_through']
417
- end
418
-
419
- if attributes.has_key?(:'rotating_transaction_gateway_oid')
420
- self.rotating_transaction_gateway_oid = attributes[:'rotating_transaction_gateway_oid']
421
- end
422
-
423
- if attributes.has_key?(:'selected_gateway_name')
424
- self.selected_gateway_name = attributes[:'selected_gateway_name']
425
- end
426
-
427
- if attributes.has_key?(:'show_cascade_codes')
428
- self.show_cascade_codes = attributes[:'show_cascade_codes']
429
- end
430
-
431
- if attributes.has_key?(:'show_merchant_account_profiles')
432
- self.show_merchant_account_profiles = attributes[:'show_merchant_account_profiles']
433
- end
434
-
435
- if attributes.has_key?(:'start_date')
436
- self.start_date = attributes[:'start_date']
437
- end
438
-
439
- if attributes.has_key?(:'status')
440
- self.status = attributes[:'status']
441
- end
442
-
443
- if attributes.has_key?(:'theme_restrictions')
444
- if (value = attributes[:'theme_restrictions']).is_a?(Array)
445
- self.theme_restrictions = value
446
- end
447
- end
448
-
449
- if attributes.has_key?(:'traffic_percentage')
450
- self.traffic_percentage = attributes[:'traffic_percentage']
451
- end
452
-
453
- if attributes.has_key?(:'trial_daily_amount')
454
- self.trial_daily_amount = attributes[:'trial_daily_amount']
455
- end
456
-
457
- if attributes.has_key?(:'trial_daily_limit')
458
- self.trial_daily_limit = attributes[:'trial_daily_limit']
459
- end
460
-
461
- if attributes.has_key?(:'trial_monthly_amount')
462
- self.trial_monthly_amount = attributes[:'trial_monthly_amount']
463
- end
464
-
465
- if attributes.has_key?(:'trial_monthly_limit')
466
- self.trial_monthly_limit = attributes[:'trial_monthly_limit']
467
- end
468
- end
469
-
470
- # Show invalid properties with the reasons. Usually used together with valid?
471
- # @return Array for valid properties with the reasons
472
- def list_invalid_properties
473
- invalid_properties = Array.new
474
- invalid_properties
475
- end
476
-
477
- # Check to see if the all the properties in the model are valid
478
- # @return true if the model is valid
479
- def valid?
480
- order_total_comparison_validator = EnumAttributeValidator.new('String', ['<', '<=', '=', '>', '>='])
481
- return false unless order_total_comparison_validator.valid?(@order_total_comparison)
482
- status_validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'standby'])
483
- return false unless status_validator.valid?(@status)
484
- true
485
- end
486
-
487
- # Custom attribute writer method checking allowed values (enum).
488
- # @param [Object] order_total_comparison Object to be assigned
489
- def order_total_comparison=(order_total_comparison)
490
- validator = EnumAttributeValidator.new('String', ['<', '<=', '=', '>', '>='])
491
- unless validator.valid?(order_total_comparison)
492
- fail ArgumentError, 'invalid value for "order_total_comparison", must be one of #{validator.allowable_values}.'
493
- end
494
- @order_total_comparison = order_total_comparison
495
- end
496
-
497
- # Custom attribute writer method checking allowed values (enum).
498
- # @param [Object] status Object to be assigned
499
- def status=(status)
500
- validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'standby'])
501
- unless validator.valid?(status)
502
- fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
503
- end
504
- @status = status
505
- end
506
-
507
- # Checks equality by comparing each attribute.
508
- # @param [Object] Object to be compared
509
- def ==(o)
510
- return true if self.equal?(o)
511
- self.class == o.class &&
512
- additional_native_currency_codes == o.additional_native_currency_codes &&
513
- auto_order_cancel_unless_response_name == o.auto_order_cancel_unless_response_name &&
514
- auto_order_cancel_unless_response_values == o.auto_order_cancel_unless_response_values &&
515
- base_currency_code == o.base_currency_code &&
516
- cascade_code == o.cascade_code &&
517
- cascade_codes == o.cascade_codes &&
518
- cascade_daily_auto_order_code == o.cascade_daily_auto_order_code &&
519
- charge_appears_on_statement_as == o.charge_appears_on_statement_as &&
520
- code == o.code &&
521
- current_daily == o.current_daily &&
522
- current_daily_auto_order == o.current_daily_auto_order &&
523
- current_monthly == o.current_monthly &&
524
- customer_service_email == o.customer_service_email &&
525
- customer_service_phone == o.customer_service_phone &&
526
- day_of_month_restrictions == o.day_of_month_restrictions &&
527
- day_of_week_restrictions == o.day_of_week_restrictions &&
528
- deactivate_after_failures == o.deactivate_after_failures &&
529
- end_date == o.end_date &&
530
- gateways == o.gateways &&
531
- maximum_daily == o.maximum_daily &&
532
- maximum_daily_auto_order == o.maximum_daily_auto_order &&
533
- maximum_monthly == o.maximum_monthly &&
534
- next_daily_auto_order_reset == o.next_daily_auto_order_reset &&
535
- next_daily_reset == o.next_daily_reset &&
536
- next_monthly_reset == o.next_monthly_reset &&
537
- order_total == o.order_total &&
538
- order_total_comparison == o.order_total_comparison &&
539
- rebill_auto_orders_against_this_rtg_code == o.rebill_auto_orders_against_this_rtg_code &&
540
- reserve_days == o.reserve_days &&
541
- reserve_percentage == o.reserve_percentage &&
542
- reserve_refunded == o.reserve_refunded &&
543
- reserves_released_through == o.reserves_released_through &&
544
- rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid &&
545
- selected_gateway_name == o.selected_gateway_name &&
546
- show_cascade_codes == o.show_cascade_codes &&
547
- show_merchant_account_profiles == o.show_merchant_account_profiles &&
548
- start_date == o.start_date &&
549
- status == o.status &&
550
- theme_restrictions == o.theme_restrictions &&
551
- traffic_percentage == o.traffic_percentage &&
552
- trial_daily_amount == o.trial_daily_amount &&
553
- trial_daily_limit == o.trial_daily_limit &&
554
- trial_monthly_amount == o.trial_monthly_amount &&
555
- trial_monthly_limit == o.trial_monthly_limit
556
- end
557
-
558
- # @see the `==` method
559
- # @param [Object] Object to be compared
560
- def eql?(o)
561
- self == o
562
- end
563
-
564
- # Calculates hash code according to all attributes.
565
- # @return [Fixnum] Hash code
566
- def hash
567
- [additional_native_currency_codes, auto_order_cancel_unless_response_name, auto_order_cancel_unless_response_values, base_currency_code, cascade_code, cascade_codes, cascade_daily_auto_order_code, charge_appears_on_statement_as, code, current_daily, current_daily_auto_order, current_monthly, customer_service_email, customer_service_phone, day_of_month_restrictions, day_of_week_restrictions, deactivate_after_failures, end_date, gateways, maximum_daily, maximum_daily_auto_order, maximum_monthly, next_daily_auto_order_reset, next_daily_reset, next_monthly_reset, order_total, order_total_comparison, rebill_auto_orders_against_this_rtg_code, reserve_days, reserve_percentage, reserve_refunded, reserves_released_through, rotating_transaction_gateway_oid, selected_gateway_name, show_cascade_codes, show_merchant_account_profiles, start_date, status, theme_restrictions, traffic_percentage, trial_daily_amount, trial_daily_limit, trial_monthly_amount, trial_monthly_limit].hash
568
- end
569
-
570
- # Builds the object from hash
571
- # @param [Hash] attributes Model attributes in the form of hash
572
- # @return [Object] Returns the model itself
573
- def build_from_hash(attributes)
574
- return nil unless attributes.is_a?(Hash)
575
- self.class.swagger_types.each_pair do |key, type|
576
- if type =~ /\AArray<(.*)>/i
577
- # check to ensure the input is an array given that the attribute
578
- # is documented as an array but the input is not
579
- if attributes[self.class.attribute_map[key]].is_a?(Array)
580
- self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
581
- end
582
- elsif !attributes[self.class.attribute_map[key]].nil?
583
- self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
584
- end # or else data not found in attributes(hash), not an issue as the data can be optional
585
- end
586
-
587
- self
588
- end
589
-
590
- # Deserializes the data based on type
591
- # @param string type Data type
592
- # @param string value Value to be deserialized
593
- # @return [Object] Deserialized data
594
- def _deserialize(type, value)
595
- case type.to_sym
596
- when :DateTime
597
- DateTime.parse(value)
598
- when :Date
599
- Date.parse(value)
600
- when :String
601
- value.to_s
602
- when :Integer
603
- value.to_i
604
- when :Float
605
- value.to_f
606
- when :BOOLEAN
607
- if value.to_s =~ /\A(true|t|yes|y|1)\z/i
608
- true
609
- else
610
- false
611
- end
612
- when :Object
613
- # generic object (usually a Hash), return directly
614
- value
615
- when /\AArray<(?<inner_type>.+)>\z/
616
- inner_type = Regexp.last_match[:inner_type]
617
- value.map { |v| _deserialize(inner_type, v) }
618
- when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
619
- k_type = Regexp.last_match[:k_type]
620
- v_type = Regexp.last_match[:v_type]
621
- {}.tap do |hash|
622
- value.each do |k, v|
623
- hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
624
- end
625
- end
626
- else # model
627
- temp_model = UltracartClient.const_get(type).new
628
- temp_model.build_from_hash(value)
629
- end
630
- end
631
-
632
- # Returns the string representation of the object
633
- # @return [String] String presentation of the object
634
- def to_s
635
- to_hash.to_s
636
- end
637
-
638
- # to_body is an alias to to_hash (backward compatibility)
639
- # @return [Hash] Returns the object in the form of hash
640
- def to_body
641
- to_hash
642
- end
643
-
644
- # Returns the object in the form of hash
645
- # @return [Hash] Returns the object in the form of hash
646
- def to_hash
647
- hash = {}
648
- self.class.attribute_map.each_pair do |attr, param|
649
- value = self.send(attr)
650
- next if value.nil?
651
- hash[param] = _to_hash(value)
652
- end
653
- hash
654
- end
655
-
656
- # Outputs non-array value in the form of hash
657
- # For object, use to_hash. Otherwise, just return the value
658
- # @param [Object] value Any valid value
659
- # @return [Hash] Returns the value in the form of hash
660
- def _to_hash(value)
661
- if value.is_a?(Array)
662
- value.compact.map { |v| _to_hash(v) }
663
- elsif value.is_a?(Hash)
664
- {}.tap do |hash|
665
- value.each { |k, v| hash[k] = _to_hash(v) }
666
- end
667
- elsif value.respond_to? :to_hash
668
- value.to_hash
669
- else
670
- value
671
- end
672
- end
673
-
674
- end
675
- end