ultracart_api 3.3.2 → 3.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +61 -4
- data/docs/ConfigurationApi.md +756 -0
- data/docs/DelayAutoOrdersResponse.md +12 -0
- data/docs/IntegrationLogApi.md +51 -0
- data/docs/IntegrationLogSummary.md +16 -0
- data/docs/IntegrationLogSummaryQueryRequest.md +9 -0
- data/docs/IntegrationLogSummaryQueryResponse.md +12 -0
- data/docs/OrderChannelPartner.md +1 -0
- data/docs/PaymentsConfiguration.md +23 -0
- data/docs/PaymentsConfigurationAffirm.md +15 -0
- data/docs/PaymentsConfigurationAmazon.md +15 -0
- data/docs/PaymentsConfigurationCOD.md +13 -0
- data/docs/PaymentsConfigurationCash.md +9 -0
- data/docs/PaymentsConfigurationCheck.md +25 -0
- data/docs/PaymentsConfigurationCreditCard.md +16 -0
- data/docs/PaymentsConfigurationLoanHero.md +12 -0
- data/docs/PaymentsConfigurationPayPal.md +36 -0
- data/docs/PaymentsConfigurationPurchaseOrder.md +11 -0
- data/docs/PaymentsConfigurationQuoteRequest.md +10 -0
- data/docs/PaymentsConfigurationResponse.md +12 -0
- data/docs/PaymentsConfigurationRestrictions.md +19 -0
- data/docs/PaymentsConfigurationSezzle.md +15 -0
- data/docs/PaymentsConfigurationWePay.md +35 -0
- data/docs/PaymentsConfigurationWireTransfer.md +18 -0
- data/docs/PaymentsThemeTransactionType.md +10 -0
- data/docs/PaymentsWepayEnroll.md +22 -0
- data/docs/RotatingTransactionGateway.md +50 -0
- data/docs/RotatingTransactionGatewayResponse.md +12 -0
- data/docs/RotatingTransactionGatewaysResponse.md +12 -0
- data/docs/RtgCurrency.md +10 -0
- data/docs/RtgDayOfMonthRestriction.md +9 -0
- data/docs/RtgDayOfWeekRestriction.md +10 -0
- data/docs/RtgSummaryGateway.md +24 -0
- data/docs/RtgSummaryResponse.md +14 -0
- data/docs/RtgThemeRestriction.md +10 -0
- data/docs/StripeConnectResponse.md +12 -0
- data/docs/TransactionGateway.md +71 -0
- data/docs/TransactionGatewaysRequest.md +10 -0
- data/docs/TransactionGatewaysResponse.md +12 -0
- data/lib/ultracart_api.rb +36 -0
- data/lib/ultracart_api/api/configuration_api.rb +843 -0
- data/lib/ultracart_api/api/integration_log_api.rb +55 -0
- data/lib/ultracart_api/models/delay_auto_orders_response.rb +221 -0
- data/lib/ultracart_api/models/integration_log_summary.rb +256 -0
- data/lib/ultracart_api/models/integration_log_summary_query_request.rb +195 -0
- data/lib/ultracart_api/models/integration_log_summary_query_response.rb +223 -0
- data/lib/ultracart_api/models/order_channel_partner.rb +11 -1
- data/lib/ultracart_api/models/payments_configuration.rb +319 -0
- data/lib/ultracart_api/models/payments_configuration_affirm.rb +247 -0
- data/lib/ultracart_api/models/payments_configuration_amazon.rb +247 -0
- data/lib/ultracart_api/models/payments_configuration_cash.rb +193 -0
- data/lib/ultracart_api/models/payments_configuration_check.rb +337 -0
- data/lib/ultracart_api/models/payments_configuration_cod.rb +229 -0
- data/lib/ultracart_api/models/payments_configuration_credit_card.rb +256 -0
- data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +220 -0
- data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +436 -0
- data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +211 -0
- data/lib/ultracart_api/models/payments_configuration_quote_request.rb +202 -0
- data/lib/ultracart_api/models/payments_configuration_response.rb +221 -0
- data/lib/ultracart_api/models/payments_configuration_restrictions.rb +283 -0
- data/lib/ultracart_api/models/payments_configuration_sezzle.rb +247 -0
- data/lib/ultracart_api/models/payments_configuration_we_pay.rb +427 -0
- data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +274 -0
- data/lib/ultracart_api/models/payments_theme_transaction_type.rb +239 -0
- data/lib/ultracart_api/models/payments_wepay_enroll.rb +310 -0
- data/lib/ultracart_api/models/rotating_transaction_gateway.rb +665 -0
- data/lib/ultracart_api/models/rotating_transaction_gateway_response.rb +221 -0
- data/lib/ultracart_api/models/rotating_transaction_gateways_response.rb +223 -0
- data/lib/ultracart_api/models/rtg_currency.rb +205 -0
- data/lib/ultracart_api/models/rtg_day_of_month_restriction.rb +195 -0
- data/lib/ultracart_api/models/rtg_day_of_week_restriction.rb +205 -0
- data/lib/ultracart_api/models/rtg_summary_gateway.rb +329 -0
- data/lib/ultracart_api/models/rtg_summary_response.rb +240 -0
- data/lib/ultracart_api/models/rtg_theme_restriction.rb +239 -0
- data/lib/ultracart_api/models/stripe_connect_response.rb +221 -0
- data/lib/ultracart_api/models/transaction_gateway.rb +823 -0
- data/lib/ultracart_api/models/transaction_gateways_request.rb +242 -0
- data/lib/ultracart_api/models/transaction_gateways_response.rb +223 -0
- data/lib/ultracart_api/version.rb +1 -1
- metadata +74 -2
@@ -0,0 +1,665 @@
|
|
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 dollar amount of trial orders
|
138
|
+
attr_accessor :trial_daily_amount
|
139
|
+
|
140
|
+
# If specified, limits the total month count 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_limit
|
145
|
+
|
146
|
+
class EnumAttributeValidator
|
147
|
+
attr_reader :datatype
|
148
|
+
attr_reader :allowable_values
|
149
|
+
|
150
|
+
def initialize(datatype, allowable_values)
|
151
|
+
@allowable_values = allowable_values.map do |value|
|
152
|
+
case datatype.to_s
|
153
|
+
when /Integer/i
|
154
|
+
value.to_i
|
155
|
+
when /Float/i
|
156
|
+
value.to_f
|
157
|
+
else
|
158
|
+
value
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
|
163
|
+
def valid?(value)
|
164
|
+
!value || allowable_values.include?(value)
|
165
|
+
end
|
166
|
+
end
|
167
|
+
|
168
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
169
|
+
def self.attribute_map
|
170
|
+
{
|
171
|
+
:'additional_native_currency_codes' => :'additional_native_currency_codes',
|
172
|
+
:'auto_order_cancel_unless_response_name' => :'auto_order_cancel_unless_response_name',
|
173
|
+
:'auto_order_cancel_unless_response_values' => :'auto_order_cancel_unless_response_values',
|
174
|
+
:'base_currency_code' => :'base_currency_code',
|
175
|
+
:'cascade_code' => :'cascade_code',
|
176
|
+
:'cascade_codes' => :'cascade_codes',
|
177
|
+
:'cascade_daily_auto_order_code' => :'cascade_daily_auto_order_code',
|
178
|
+
:'charge_appears_on_statement_as' => :'charge_appears_on_statement_as',
|
179
|
+
:'code' => :'code',
|
180
|
+
:'current_daily' => :'current_daily',
|
181
|
+
:'current_daily_auto_order' => :'current_daily_auto_order',
|
182
|
+
:'current_monthly' => :'current_monthly',
|
183
|
+
:'customer_service_email' => :'customer_service_email',
|
184
|
+
:'customer_service_phone' => :'customer_service_phone',
|
185
|
+
:'day_of_month_restrictions' => :'day_of_month_restrictions',
|
186
|
+
:'day_of_week_restrictions' => :'day_of_week_restrictions',
|
187
|
+
:'deactivate_after_failures' => :'deactivate_after_failures',
|
188
|
+
:'end_date' => :'end_date',
|
189
|
+
:'gateways' => :'gateways',
|
190
|
+
:'maximum_daily' => :'maximum_daily',
|
191
|
+
:'maximum_daily_auto_order' => :'maximum_daily_auto_order',
|
192
|
+
:'maximum_monthly' => :'maximum_monthly',
|
193
|
+
:'next_daily_auto_order_reset' => :'next_daily_auto_order_reset',
|
194
|
+
:'next_daily_reset' => :'next_daily_reset',
|
195
|
+
:'next_monthly_reset' => :'next_monthly_reset',
|
196
|
+
:'order_total' => :'order_total',
|
197
|
+
:'order_total_comparison' => :'order_total_comparison',
|
198
|
+
:'rebill_auto_orders_against_this_rtg_code' => :'rebill_auto_orders_against_this_rtg_code',
|
199
|
+
:'reserve_days' => :'reserve_days',
|
200
|
+
:'reserve_percentage' => :'reserve_percentage',
|
201
|
+
:'reserve_refunded' => :'reserve_refunded',
|
202
|
+
:'reserves_released_through' => :'reserves_released_through',
|
203
|
+
:'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid',
|
204
|
+
:'selected_gateway_name' => :'selected_gateway_name',
|
205
|
+
:'show_cascade_codes' => :'show_cascade_codes',
|
206
|
+
:'show_merchant_account_profiles' => :'show_merchant_account_profiles',
|
207
|
+
:'start_date' => :'start_date',
|
208
|
+
:'status' => :'status',
|
209
|
+
:'theme_restrictions' => :'theme_restrictions',
|
210
|
+
:'traffic_percentage' => :'traffic_percentage',
|
211
|
+
:'trial_daily_amount' => :'trial_daily_amount',
|
212
|
+
:'trial_daily_limit' => :'trial_daily_limit',
|
213
|
+
:'trial_monthly_limit' => :'trial_monthly_limit'
|
214
|
+
}
|
215
|
+
end
|
216
|
+
|
217
|
+
# Attribute type mapping.
|
218
|
+
def self.swagger_types
|
219
|
+
{
|
220
|
+
:'additional_native_currency_codes' => :'Array<RtgCurrency>',
|
221
|
+
:'auto_order_cancel_unless_response_name' => :'String',
|
222
|
+
:'auto_order_cancel_unless_response_values' => :'Array<String>',
|
223
|
+
:'base_currency_code' => :'String',
|
224
|
+
:'cascade_code' => :'String',
|
225
|
+
:'cascade_codes' => :'Array<String>',
|
226
|
+
:'cascade_daily_auto_order_code' => :'String',
|
227
|
+
:'charge_appears_on_statement_as' => :'String',
|
228
|
+
:'code' => :'String',
|
229
|
+
:'current_daily' => :'Float',
|
230
|
+
:'current_daily_auto_order' => :'Float',
|
231
|
+
:'current_monthly' => :'Float',
|
232
|
+
:'customer_service_email' => :'String',
|
233
|
+
:'customer_service_phone' => :'String',
|
234
|
+
:'day_of_month_restrictions' => :'Array<RtgDayOfMonthRestriction>',
|
235
|
+
:'day_of_week_restrictions' => :'Array<RtgDayOfWeekRestriction>',
|
236
|
+
:'deactivate_after_failures' => :'Integer',
|
237
|
+
:'end_date' => :'String',
|
238
|
+
:'gateways' => :'Array<TransactionGateway>',
|
239
|
+
:'maximum_daily' => :'Float',
|
240
|
+
:'maximum_daily_auto_order' => :'Float',
|
241
|
+
:'maximum_monthly' => :'Float',
|
242
|
+
:'next_daily_auto_order_reset' => :'String',
|
243
|
+
:'next_daily_reset' => :'String',
|
244
|
+
:'next_monthly_reset' => :'String',
|
245
|
+
:'order_total' => :'Float',
|
246
|
+
:'order_total_comparison' => :'String',
|
247
|
+
:'rebill_auto_orders_against_this_rtg_code' => :'String',
|
248
|
+
:'reserve_days' => :'Integer',
|
249
|
+
:'reserve_percentage' => :'Float',
|
250
|
+
:'reserve_refunded' => :'BOOLEAN',
|
251
|
+
:'reserves_released_through' => :'String',
|
252
|
+
:'rotating_transaction_gateway_oid' => :'Integer',
|
253
|
+
:'selected_gateway_name' => :'String',
|
254
|
+
:'show_cascade_codes' => :'BOOLEAN',
|
255
|
+
:'show_merchant_account_profiles' => :'BOOLEAN',
|
256
|
+
:'start_date' => :'String',
|
257
|
+
:'status' => :'String',
|
258
|
+
:'theme_restrictions' => :'Array<RtgThemeRestriction>',
|
259
|
+
:'traffic_percentage' => :'Float',
|
260
|
+
:'trial_daily_amount' => :'Integer',
|
261
|
+
:'trial_daily_limit' => :'Integer',
|
262
|
+
:'trial_monthly_limit' => :'Integer'
|
263
|
+
}
|
264
|
+
end
|
265
|
+
|
266
|
+
# Initializes the object
|
267
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
268
|
+
def initialize(attributes = {})
|
269
|
+
return unless attributes.is_a?(Hash)
|
270
|
+
|
271
|
+
# convert string to symbol for hash key
|
272
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
273
|
+
|
274
|
+
if attributes.has_key?(:'additional_native_currency_codes')
|
275
|
+
if (value = attributes[:'additional_native_currency_codes']).is_a?(Array)
|
276
|
+
self.additional_native_currency_codes = value
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
if attributes.has_key?(:'auto_order_cancel_unless_response_name')
|
281
|
+
self.auto_order_cancel_unless_response_name = attributes[:'auto_order_cancel_unless_response_name']
|
282
|
+
end
|
283
|
+
|
284
|
+
if attributes.has_key?(:'auto_order_cancel_unless_response_values')
|
285
|
+
if (value = attributes[:'auto_order_cancel_unless_response_values']).is_a?(Array)
|
286
|
+
self.auto_order_cancel_unless_response_values = value
|
287
|
+
end
|
288
|
+
end
|
289
|
+
|
290
|
+
if attributes.has_key?(:'base_currency_code')
|
291
|
+
self.base_currency_code = attributes[:'base_currency_code']
|
292
|
+
end
|
293
|
+
|
294
|
+
if attributes.has_key?(:'cascade_code')
|
295
|
+
self.cascade_code = attributes[:'cascade_code']
|
296
|
+
end
|
297
|
+
|
298
|
+
if attributes.has_key?(:'cascade_codes')
|
299
|
+
if (value = attributes[:'cascade_codes']).is_a?(Array)
|
300
|
+
self.cascade_codes = value
|
301
|
+
end
|
302
|
+
end
|
303
|
+
|
304
|
+
if attributes.has_key?(:'cascade_daily_auto_order_code')
|
305
|
+
self.cascade_daily_auto_order_code = attributes[:'cascade_daily_auto_order_code']
|
306
|
+
end
|
307
|
+
|
308
|
+
if attributes.has_key?(:'charge_appears_on_statement_as')
|
309
|
+
self.charge_appears_on_statement_as = attributes[:'charge_appears_on_statement_as']
|
310
|
+
end
|
311
|
+
|
312
|
+
if attributes.has_key?(:'code')
|
313
|
+
self.code = attributes[:'code']
|
314
|
+
end
|
315
|
+
|
316
|
+
if attributes.has_key?(:'current_daily')
|
317
|
+
self.current_daily = attributes[:'current_daily']
|
318
|
+
end
|
319
|
+
|
320
|
+
if attributes.has_key?(:'current_daily_auto_order')
|
321
|
+
self.current_daily_auto_order = attributes[:'current_daily_auto_order']
|
322
|
+
end
|
323
|
+
|
324
|
+
if attributes.has_key?(:'current_monthly')
|
325
|
+
self.current_monthly = attributes[:'current_monthly']
|
326
|
+
end
|
327
|
+
|
328
|
+
if attributes.has_key?(:'customer_service_email')
|
329
|
+
self.customer_service_email = attributes[:'customer_service_email']
|
330
|
+
end
|
331
|
+
|
332
|
+
if attributes.has_key?(:'customer_service_phone')
|
333
|
+
self.customer_service_phone = attributes[:'customer_service_phone']
|
334
|
+
end
|
335
|
+
|
336
|
+
if attributes.has_key?(:'day_of_month_restrictions')
|
337
|
+
if (value = attributes[:'day_of_month_restrictions']).is_a?(Array)
|
338
|
+
self.day_of_month_restrictions = value
|
339
|
+
end
|
340
|
+
end
|
341
|
+
|
342
|
+
if attributes.has_key?(:'day_of_week_restrictions')
|
343
|
+
if (value = attributes[:'day_of_week_restrictions']).is_a?(Array)
|
344
|
+
self.day_of_week_restrictions = value
|
345
|
+
end
|
346
|
+
end
|
347
|
+
|
348
|
+
if attributes.has_key?(:'deactivate_after_failures')
|
349
|
+
self.deactivate_after_failures = attributes[:'deactivate_after_failures']
|
350
|
+
end
|
351
|
+
|
352
|
+
if attributes.has_key?(:'end_date')
|
353
|
+
self.end_date = attributes[:'end_date']
|
354
|
+
end
|
355
|
+
|
356
|
+
if attributes.has_key?(:'gateways')
|
357
|
+
if (value = attributes[:'gateways']).is_a?(Array)
|
358
|
+
self.gateways = value
|
359
|
+
end
|
360
|
+
end
|
361
|
+
|
362
|
+
if attributes.has_key?(:'maximum_daily')
|
363
|
+
self.maximum_daily = attributes[:'maximum_daily']
|
364
|
+
end
|
365
|
+
|
366
|
+
if attributes.has_key?(:'maximum_daily_auto_order')
|
367
|
+
self.maximum_daily_auto_order = attributes[:'maximum_daily_auto_order']
|
368
|
+
end
|
369
|
+
|
370
|
+
if attributes.has_key?(:'maximum_monthly')
|
371
|
+
self.maximum_monthly = attributes[:'maximum_monthly']
|
372
|
+
end
|
373
|
+
|
374
|
+
if attributes.has_key?(:'next_daily_auto_order_reset')
|
375
|
+
self.next_daily_auto_order_reset = attributes[:'next_daily_auto_order_reset']
|
376
|
+
end
|
377
|
+
|
378
|
+
if attributes.has_key?(:'next_daily_reset')
|
379
|
+
self.next_daily_reset = attributes[:'next_daily_reset']
|
380
|
+
end
|
381
|
+
|
382
|
+
if attributes.has_key?(:'next_monthly_reset')
|
383
|
+
self.next_monthly_reset = attributes[:'next_monthly_reset']
|
384
|
+
end
|
385
|
+
|
386
|
+
if attributes.has_key?(:'order_total')
|
387
|
+
self.order_total = attributes[:'order_total']
|
388
|
+
end
|
389
|
+
|
390
|
+
if attributes.has_key?(:'order_total_comparison')
|
391
|
+
self.order_total_comparison = attributes[:'order_total_comparison']
|
392
|
+
end
|
393
|
+
|
394
|
+
if attributes.has_key?(:'rebill_auto_orders_against_this_rtg_code')
|
395
|
+
self.rebill_auto_orders_against_this_rtg_code = attributes[:'rebill_auto_orders_against_this_rtg_code']
|
396
|
+
end
|
397
|
+
|
398
|
+
if attributes.has_key?(:'reserve_days')
|
399
|
+
self.reserve_days = attributes[:'reserve_days']
|
400
|
+
end
|
401
|
+
|
402
|
+
if attributes.has_key?(:'reserve_percentage')
|
403
|
+
self.reserve_percentage = attributes[:'reserve_percentage']
|
404
|
+
end
|
405
|
+
|
406
|
+
if attributes.has_key?(:'reserve_refunded')
|
407
|
+
self.reserve_refunded = attributes[:'reserve_refunded']
|
408
|
+
end
|
409
|
+
|
410
|
+
if attributes.has_key?(:'reserves_released_through')
|
411
|
+
self.reserves_released_through = attributes[:'reserves_released_through']
|
412
|
+
end
|
413
|
+
|
414
|
+
if attributes.has_key?(:'rotating_transaction_gateway_oid')
|
415
|
+
self.rotating_transaction_gateway_oid = attributes[:'rotating_transaction_gateway_oid']
|
416
|
+
end
|
417
|
+
|
418
|
+
if attributes.has_key?(:'selected_gateway_name')
|
419
|
+
self.selected_gateway_name = attributes[:'selected_gateway_name']
|
420
|
+
end
|
421
|
+
|
422
|
+
if attributes.has_key?(:'show_cascade_codes')
|
423
|
+
self.show_cascade_codes = attributes[:'show_cascade_codes']
|
424
|
+
end
|
425
|
+
|
426
|
+
if attributes.has_key?(:'show_merchant_account_profiles')
|
427
|
+
self.show_merchant_account_profiles = attributes[:'show_merchant_account_profiles']
|
428
|
+
end
|
429
|
+
|
430
|
+
if attributes.has_key?(:'start_date')
|
431
|
+
self.start_date = attributes[:'start_date']
|
432
|
+
end
|
433
|
+
|
434
|
+
if attributes.has_key?(:'status')
|
435
|
+
self.status = attributes[:'status']
|
436
|
+
end
|
437
|
+
|
438
|
+
if attributes.has_key?(:'theme_restrictions')
|
439
|
+
if (value = attributes[:'theme_restrictions']).is_a?(Array)
|
440
|
+
self.theme_restrictions = value
|
441
|
+
end
|
442
|
+
end
|
443
|
+
|
444
|
+
if attributes.has_key?(:'traffic_percentage')
|
445
|
+
self.traffic_percentage = attributes[:'traffic_percentage']
|
446
|
+
end
|
447
|
+
|
448
|
+
if attributes.has_key?(:'trial_daily_amount')
|
449
|
+
self.trial_daily_amount = attributes[:'trial_daily_amount']
|
450
|
+
end
|
451
|
+
|
452
|
+
if attributes.has_key?(:'trial_daily_limit')
|
453
|
+
self.trial_daily_limit = attributes[:'trial_daily_limit']
|
454
|
+
end
|
455
|
+
|
456
|
+
if attributes.has_key?(:'trial_monthly_limit')
|
457
|
+
self.trial_monthly_limit = attributes[:'trial_monthly_limit']
|
458
|
+
end
|
459
|
+
end
|
460
|
+
|
461
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
462
|
+
# @return Array for valid properties with the reasons
|
463
|
+
def list_invalid_properties
|
464
|
+
invalid_properties = Array.new
|
465
|
+
invalid_properties
|
466
|
+
end
|
467
|
+
|
468
|
+
# Check to see if the all the properties in the model are valid
|
469
|
+
# @return true if the model is valid
|
470
|
+
def valid?
|
471
|
+
order_total_comparison_validator = EnumAttributeValidator.new('String', ['<', '<=', '=', '>', '>='])
|
472
|
+
return false unless order_total_comparison_validator.valid?(@order_total_comparison)
|
473
|
+
status_validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'standby'])
|
474
|
+
return false unless status_validator.valid?(@status)
|
475
|
+
true
|
476
|
+
end
|
477
|
+
|
478
|
+
# Custom attribute writer method checking allowed values (enum).
|
479
|
+
# @param [Object] order_total_comparison Object to be assigned
|
480
|
+
def order_total_comparison=(order_total_comparison)
|
481
|
+
validator = EnumAttributeValidator.new('String', ['<', '<=', '=', '>', '>='])
|
482
|
+
unless validator.valid?(order_total_comparison)
|
483
|
+
fail ArgumentError, 'invalid value for "order_total_comparison", must be one of #{validator.allowable_values}.'
|
484
|
+
end
|
485
|
+
@order_total_comparison = order_total_comparison
|
486
|
+
end
|
487
|
+
|
488
|
+
# Custom attribute writer method checking allowed values (enum).
|
489
|
+
# @param [Object] status Object to be assigned
|
490
|
+
def status=(status)
|
491
|
+
validator = EnumAttributeValidator.new('String', ['active', 'inactive', 'standby'])
|
492
|
+
unless validator.valid?(status)
|
493
|
+
fail ArgumentError, 'invalid value for "status", must be one of #{validator.allowable_values}.'
|
494
|
+
end
|
495
|
+
@status = status
|
496
|
+
end
|
497
|
+
|
498
|
+
# Checks equality by comparing each attribute.
|
499
|
+
# @param [Object] Object to be compared
|
500
|
+
def ==(o)
|
501
|
+
return true if self.equal?(o)
|
502
|
+
self.class == o.class &&
|
503
|
+
additional_native_currency_codes == o.additional_native_currency_codes &&
|
504
|
+
auto_order_cancel_unless_response_name == o.auto_order_cancel_unless_response_name &&
|
505
|
+
auto_order_cancel_unless_response_values == o.auto_order_cancel_unless_response_values &&
|
506
|
+
base_currency_code == o.base_currency_code &&
|
507
|
+
cascade_code == o.cascade_code &&
|
508
|
+
cascade_codes == o.cascade_codes &&
|
509
|
+
cascade_daily_auto_order_code == o.cascade_daily_auto_order_code &&
|
510
|
+
charge_appears_on_statement_as == o.charge_appears_on_statement_as &&
|
511
|
+
code == o.code &&
|
512
|
+
current_daily == o.current_daily &&
|
513
|
+
current_daily_auto_order == o.current_daily_auto_order &&
|
514
|
+
current_monthly == o.current_monthly &&
|
515
|
+
customer_service_email == o.customer_service_email &&
|
516
|
+
customer_service_phone == o.customer_service_phone &&
|
517
|
+
day_of_month_restrictions == o.day_of_month_restrictions &&
|
518
|
+
day_of_week_restrictions == o.day_of_week_restrictions &&
|
519
|
+
deactivate_after_failures == o.deactivate_after_failures &&
|
520
|
+
end_date == o.end_date &&
|
521
|
+
gateways == o.gateways &&
|
522
|
+
maximum_daily == o.maximum_daily &&
|
523
|
+
maximum_daily_auto_order == o.maximum_daily_auto_order &&
|
524
|
+
maximum_monthly == o.maximum_monthly &&
|
525
|
+
next_daily_auto_order_reset == o.next_daily_auto_order_reset &&
|
526
|
+
next_daily_reset == o.next_daily_reset &&
|
527
|
+
next_monthly_reset == o.next_monthly_reset &&
|
528
|
+
order_total == o.order_total &&
|
529
|
+
order_total_comparison == o.order_total_comparison &&
|
530
|
+
rebill_auto_orders_against_this_rtg_code == o.rebill_auto_orders_against_this_rtg_code &&
|
531
|
+
reserve_days == o.reserve_days &&
|
532
|
+
reserve_percentage == o.reserve_percentage &&
|
533
|
+
reserve_refunded == o.reserve_refunded &&
|
534
|
+
reserves_released_through == o.reserves_released_through &&
|
535
|
+
rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid &&
|
536
|
+
selected_gateway_name == o.selected_gateway_name &&
|
537
|
+
show_cascade_codes == o.show_cascade_codes &&
|
538
|
+
show_merchant_account_profiles == o.show_merchant_account_profiles &&
|
539
|
+
start_date == o.start_date &&
|
540
|
+
status == o.status &&
|
541
|
+
theme_restrictions == o.theme_restrictions &&
|
542
|
+
traffic_percentage == o.traffic_percentage &&
|
543
|
+
trial_daily_amount == o.trial_daily_amount &&
|
544
|
+
trial_daily_limit == o.trial_daily_limit &&
|
545
|
+
trial_monthly_limit == o.trial_monthly_limit
|
546
|
+
end
|
547
|
+
|
548
|
+
# @see the `==` method
|
549
|
+
# @param [Object] Object to be compared
|
550
|
+
def eql?(o)
|
551
|
+
self == o
|
552
|
+
end
|
553
|
+
|
554
|
+
# Calculates hash code according to all attributes.
|
555
|
+
# @return [Fixnum] Hash code
|
556
|
+
def hash
|
557
|
+
[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_limit].hash
|
558
|
+
end
|
559
|
+
|
560
|
+
# Builds the object from hash
|
561
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
562
|
+
# @return [Object] Returns the model itself
|
563
|
+
def build_from_hash(attributes)
|
564
|
+
return nil unless attributes.is_a?(Hash)
|
565
|
+
self.class.swagger_types.each_pair do |key, type|
|
566
|
+
if type =~ /\AArray<(.*)>/i
|
567
|
+
# check to ensure the input is an array given that the attribute
|
568
|
+
# is documented as an array but the input is not
|
569
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
570
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
571
|
+
end
|
572
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
573
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
574
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
575
|
+
end
|
576
|
+
|
577
|
+
self
|
578
|
+
end
|
579
|
+
|
580
|
+
# Deserializes the data based on type
|
581
|
+
# @param string type Data type
|
582
|
+
# @param string value Value to be deserialized
|
583
|
+
# @return [Object] Deserialized data
|
584
|
+
def _deserialize(type, value)
|
585
|
+
case type.to_sym
|
586
|
+
when :DateTime
|
587
|
+
DateTime.parse(value)
|
588
|
+
when :Date
|
589
|
+
Date.parse(value)
|
590
|
+
when :String
|
591
|
+
value.to_s
|
592
|
+
when :Integer
|
593
|
+
value.to_i
|
594
|
+
when :Float
|
595
|
+
value.to_f
|
596
|
+
when :BOOLEAN
|
597
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
598
|
+
true
|
599
|
+
else
|
600
|
+
false
|
601
|
+
end
|
602
|
+
when :Object
|
603
|
+
# generic object (usually a Hash), return directly
|
604
|
+
value
|
605
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
606
|
+
inner_type = Regexp.last_match[:inner_type]
|
607
|
+
value.map { |v| _deserialize(inner_type, v) }
|
608
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
609
|
+
k_type = Regexp.last_match[:k_type]
|
610
|
+
v_type = Regexp.last_match[:v_type]
|
611
|
+
{}.tap do |hash|
|
612
|
+
value.each do |k, v|
|
613
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
614
|
+
end
|
615
|
+
end
|
616
|
+
else # model
|
617
|
+
temp_model = UltracartClient.const_get(type).new
|
618
|
+
temp_model.build_from_hash(value)
|
619
|
+
end
|
620
|
+
end
|
621
|
+
|
622
|
+
# Returns the string representation of the object
|
623
|
+
# @return [String] String presentation of the object
|
624
|
+
def to_s
|
625
|
+
to_hash.to_s
|
626
|
+
end
|
627
|
+
|
628
|
+
# to_body is an alias to to_hash (backward compatibility)
|
629
|
+
# @return [Hash] Returns the object in the form of hash
|
630
|
+
def to_body
|
631
|
+
to_hash
|
632
|
+
end
|
633
|
+
|
634
|
+
# Returns the object in the form of hash
|
635
|
+
# @return [Hash] Returns the object in the form of hash
|
636
|
+
def to_hash
|
637
|
+
hash = {}
|
638
|
+
self.class.attribute_map.each_pair do |attr, param|
|
639
|
+
value = self.send(attr)
|
640
|
+
next if value.nil?
|
641
|
+
hash[param] = _to_hash(value)
|
642
|
+
end
|
643
|
+
hash
|
644
|
+
end
|
645
|
+
|
646
|
+
# Outputs non-array value in the form of hash
|
647
|
+
# For object, use to_hash. Otherwise, just return the value
|
648
|
+
# @param [Object] value Any valid value
|
649
|
+
# @return [Hash] Returns the value in the form of hash
|
650
|
+
def _to_hash(value)
|
651
|
+
if value.is_a?(Array)
|
652
|
+
value.compact.map { |v| _to_hash(v) }
|
653
|
+
elsif value.is_a?(Hash)
|
654
|
+
{}.tap do |hash|
|
655
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
656
|
+
end
|
657
|
+
elsif value.respond_to? :to_hash
|
658
|
+
value.to_hash
|
659
|
+
else
|
660
|
+
value
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
end
|
665
|
+
end
|