ultracart_api 3.10.13 → 3.10.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +53 -96
- data/docs/ChannelPartnerApi.md +51 -0
- data/docs/{DelayAutoOrdersResponse.md → ChannelPartnerEstimateTaxResponse.md} +2 -2
- data/docs/ChargebackApi.md +1 -1
- data/docs/CustomerApi.md +1 -1
- data/docs/EmailDomain.md +1 -0
- data/docs/Mailgun.md +8 -0
- data/docs/OrderApi.md +1 -1
- data/docs/SsoApi.md +2 -2
- data/docs/StorefrontApi.md +101 -0
- data/docs/UserApi.md +2 -2
- data/docs/WebhookApi.md +1 -1
- data/lib/ultracart_api/api/channel_partner_api.rb +55 -0
- data/lib/ultracart_api/api/chargeback_api.rb +1 -1
- data/lib/ultracart_api/api/customer_api.rb +1 -1
- data/lib/ultracart_api/api/order_api.rb +1 -1
- data/lib/ultracart_api/api/sso_api.rb +2 -2
- data/lib/ultracart_api/api/storefront_api.rb +112 -0
- data/lib/ultracart_api/api/user_api.rb +2 -2
- data/lib/ultracart_api/api/webhook_api.rb +1 -1
- data/lib/ultracart_api/models/{stripe_connect_response.rb → channel_partner_estimate_tax_response.rb} +8 -8
- data/lib/ultracart_api/models/email_domain.rb +10 -1
- data/lib/ultracart_api/models/{payments_configuration_cash.rb → mailgun.rb} +8 -18
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -39
- metadata +6 -80
- data/docs/ConfigurationApi.md +0 -756
- data/docs/PaymentsConfiguration.md +0 -24
- data/docs/PaymentsConfigurationAffirm.md +0 -15
- data/docs/PaymentsConfigurationAmazon.md +0 -15
- data/docs/PaymentsConfigurationCOD.md +0 -13
- data/docs/PaymentsConfigurationCash.md +0 -9
- data/docs/PaymentsConfigurationCheck.md +0 -19
- data/docs/PaymentsConfigurationCreditCard.md +0 -17
- data/docs/PaymentsConfigurationCreditCardType.md +0 -18
- data/docs/PaymentsConfigurationEcheck.md +0 -12
- data/docs/PaymentsConfigurationInsurance.md +0 -9
- data/docs/PaymentsConfigurationLoanHero.md +0 -12
- data/docs/PaymentsConfigurationMoneyOrder.md +0 -11
- data/docs/PaymentsConfigurationPayPal.md +0 -36
- data/docs/PaymentsConfigurationPurchaseOrder.md +0 -11
- data/docs/PaymentsConfigurationQuoteRequest.md +0 -10
- data/docs/PaymentsConfigurationResponse.md +0 -12
- data/docs/PaymentsConfigurationRestrictions.md +0 -21
- data/docs/PaymentsConfigurationRestrictionsTheme.md +0 -10
- data/docs/PaymentsConfigurationSezzle.md +0 -15
- data/docs/PaymentsConfigurationTestMethod.md +0 -18
- data/docs/PaymentsConfigurationWePay.md +0 -35
- data/docs/PaymentsConfigurationWireTransfer.md +0 -18
- data/docs/PaymentsThemeTransactionType.md +0 -10
- data/docs/PaymentsWepayEnroll.md +0 -22
- data/docs/RotatingTransactionGateway.md +0 -51
- data/docs/RotatingTransactionGatewayResponse.md +0 -12
- data/docs/RotatingTransactionGatewaysResponse.md +0 -12
- data/docs/RtgCurrency.md +0 -10
- data/docs/RtgDayOfMonthRestriction.md +0 -9
- data/docs/RtgDayOfWeekRestriction.md +0 -10
- data/docs/RtgSummaryGateway.md +0 -24
- data/docs/RtgSummaryResponse.md +0 -14
- data/docs/RtgThemeRestriction.md +0 -10
- data/docs/StripeConnectResponse.md +0 -12
- data/docs/TransactionGateway.md +0 -71
- data/docs/TransactionGatewaysRequest.md +0 -10
- data/docs/TransactionGatewaysResponse.md +0 -12
- data/lib/ultracart_api/api/configuration_api.rb +0 -843
- data/lib/ultracart_api/models/delay_auto_orders_response.rb +0 -221
- data/lib/ultracart_api/models/payments_configuration.rb +0 -329
- data/lib/ultracart_api/models/payments_configuration_affirm.rb +0 -288
- data/lib/ultracart_api/models/payments_configuration_amazon.rb +0 -288
- data/lib/ultracart_api/models/payments_configuration_check.rb +0 -294
- data/lib/ultracart_api/models/payments_configuration_cod.rb +0 -234
- data/lib/ultracart_api/models/payments_configuration_credit_card.rb +0 -279
- data/lib/ultracart_api/models/payments_configuration_credit_card_type.rb +0 -318
- data/lib/ultracart_api/models/payments_configuration_echeck.rb +0 -226
- data/lib/ultracart_api/models/payments_configuration_insurance.rb +0 -194
- data/lib/ultracart_api/models/payments_configuration_loan_hero.rb +0 -224
- data/lib/ultracart_api/models/payments_configuration_money_order.rb +0 -214
- data/lib/ultracart_api/models/payments_configuration_pay_pal.rb +0 -534
- data/lib/ultracart_api/models/payments_configuration_purchase_order.rb +0 -214
- data/lib/ultracart_api/models/payments_configuration_quote_request.rb +0 -204
- data/lib/ultracart_api/models/payments_configuration_response.rb +0 -221
- data/lib/ultracart_api/models/payments_configuration_restrictions.rb +0 -447
- data/lib/ultracart_api/models/payments_configuration_restrictions_theme.rb +0 -202
- data/lib/ultracart_api/models/payments_configuration_sezzle.rb +0 -288
- data/lib/ultracart_api/models/payments_configuration_test_method.rb +0 -319
- data/lib/ultracart_api/models/payments_configuration_we_pay.rb +0 -454
- data/lib/ultracart_api/models/payments_configuration_wire_transfer.rb +0 -284
- data/lib/ultracart_api/models/payments_theme_transaction_type.rb +0 -239
- data/lib/ultracart_api/models/payments_wepay_enroll.rb +0 -310
- data/lib/ultracart_api/models/rotating_transaction_gateway.rb +0 -675
- data/lib/ultracart_api/models/rotating_transaction_gateway_response.rb +0 -221
- data/lib/ultracart_api/models/rotating_transaction_gateways_response.rb +0 -223
- data/lib/ultracart_api/models/rtg_currency.rb +0 -205
- data/lib/ultracart_api/models/rtg_day_of_month_restriction.rb +0 -195
- data/lib/ultracart_api/models/rtg_day_of_week_restriction.rb +0 -205
- data/lib/ultracart_api/models/rtg_summary_gateway.rb +0 -329
- data/lib/ultracart_api/models/rtg_summary_response.rb +0 -240
- data/lib/ultracart_api/models/rtg_theme_restriction.rb +0 -239
- data/lib/ultracart_api/models/transaction_gateway.rb +0 -823
- data/lib/ultracart_api/models/transaction_gateways_request.rb +0 -242
- data/lib/ultracart_api/models/transaction_gateways_response.rb +0 -223
@@ -1,329 +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 RtgSummaryGateway
|
17
|
-
attr_accessor :cascade_code
|
18
|
-
|
19
|
-
attr_accessor :code
|
20
|
-
|
21
|
-
attr_accessor :delay_auto_orders
|
22
|
-
|
23
|
-
attr_accessor :name
|
24
|
-
|
25
|
-
attr_accessor :reserve_percentage
|
26
|
-
|
27
|
-
# An optional date specifying the date up to which your gateway has released all reserve funds. This aids in profitability reporting.
|
28
|
-
attr_accessor :reserves_released_through
|
29
|
-
|
30
|
-
attr_accessor :rotating_transaction_gateway_oid
|
31
|
-
|
32
|
-
attr_accessor :show_ultracart_payments_verification
|
33
|
-
|
34
|
-
attr_accessor :show_ultracart_payments_verified
|
35
|
-
|
36
|
-
attr_accessor :status
|
37
|
-
|
38
|
-
attr_accessor :supports_auth
|
39
|
-
|
40
|
-
attr_accessor :supports_refund
|
41
|
-
|
42
|
-
attr_accessor :third_party
|
43
|
-
|
44
|
-
attr_accessor :traffic_percentage
|
45
|
-
|
46
|
-
attr_accessor :warning
|
47
|
-
|
48
|
-
attr_accessor :wepay_account_update_uri
|
49
|
-
|
50
|
-
attr_accessor :wepay_console_hostname
|
51
|
-
|
52
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
53
|
-
def self.attribute_map
|
54
|
-
{
|
55
|
-
:'cascade_code' => :'cascade_code',
|
56
|
-
:'code' => :'code',
|
57
|
-
:'delay_auto_orders' => :'delay_auto_orders',
|
58
|
-
:'name' => :'name',
|
59
|
-
:'reserve_percentage' => :'reserve_percentage',
|
60
|
-
:'reserves_released_through' => :'reserves_released_through',
|
61
|
-
:'rotating_transaction_gateway_oid' => :'rotating_transaction_gateway_oid',
|
62
|
-
:'show_ultracart_payments_verification' => :'show_ultracart_payments_verification',
|
63
|
-
:'show_ultracart_payments_verified' => :'show_ultracart_payments_verified',
|
64
|
-
:'status' => :'status',
|
65
|
-
:'supports_auth' => :'supports_auth',
|
66
|
-
:'supports_refund' => :'supports_refund',
|
67
|
-
:'third_party' => :'third_party',
|
68
|
-
:'traffic_percentage' => :'traffic_percentage',
|
69
|
-
:'warning' => :'warning',
|
70
|
-
:'wepay_account_update_uri' => :'wepay_account_update_uri',
|
71
|
-
:'wepay_console_hostname' => :'wepay_console_hostname'
|
72
|
-
}
|
73
|
-
end
|
74
|
-
|
75
|
-
# Attribute type mapping.
|
76
|
-
def self.swagger_types
|
77
|
-
{
|
78
|
-
:'cascade_code' => :'String',
|
79
|
-
:'code' => :'String',
|
80
|
-
:'delay_auto_orders' => :'String',
|
81
|
-
:'name' => :'String',
|
82
|
-
:'reserve_percentage' => :'Float',
|
83
|
-
:'reserves_released_through' => :'String',
|
84
|
-
:'rotating_transaction_gateway_oid' => :'Integer',
|
85
|
-
:'show_ultracart_payments_verification' => :'BOOLEAN',
|
86
|
-
:'show_ultracart_payments_verified' => :'BOOLEAN',
|
87
|
-
:'status' => :'String',
|
88
|
-
:'supports_auth' => :'String',
|
89
|
-
:'supports_refund' => :'String',
|
90
|
-
:'third_party' => :'String',
|
91
|
-
:'traffic_percentage' => :'Float',
|
92
|
-
:'warning' => :'String',
|
93
|
-
:'wepay_account_update_uri' => :'String',
|
94
|
-
:'wepay_console_hostname' => :'String'
|
95
|
-
}
|
96
|
-
end
|
97
|
-
|
98
|
-
# Initializes the object
|
99
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
-
def initialize(attributes = {})
|
101
|
-
return unless attributes.is_a?(Hash)
|
102
|
-
|
103
|
-
# convert string to symbol for hash key
|
104
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
105
|
-
|
106
|
-
if attributes.has_key?(:'cascade_code')
|
107
|
-
self.cascade_code = attributes[:'cascade_code']
|
108
|
-
end
|
109
|
-
|
110
|
-
if attributes.has_key?(:'code')
|
111
|
-
self.code = attributes[:'code']
|
112
|
-
end
|
113
|
-
|
114
|
-
if attributes.has_key?(:'delay_auto_orders')
|
115
|
-
self.delay_auto_orders = attributes[:'delay_auto_orders']
|
116
|
-
end
|
117
|
-
|
118
|
-
if attributes.has_key?(:'name')
|
119
|
-
self.name = attributes[:'name']
|
120
|
-
end
|
121
|
-
|
122
|
-
if attributes.has_key?(:'reserve_percentage')
|
123
|
-
self.reserve_percentage = attributes[:'reserve_percentage']
|
124
|
-
end
|
125
|
-
|
126
|
-
if attributes.has_key?(:'reserves_released_through')
|
127
|
-
self.reserves_released_through = attributes[:'reserves_released_through']
|
128
|
-
end
|
129
|
-
|
130
|
-
if attributes.has_key?(:'rotating_transaction_gateway_oid')
|
131
|
-
self.rotating_transaction_gateway_oid = attributes[:'rotating_transaction_gateway_oid']
|
132
|
-
end
|
133
|
-
|
134
|
-
if attributes.has_key?(:'show_ultracart_payments_verification')
|
135
|
-
self.show_ultracart_payments_verification = attributes[:'show_ultracart_payments_verification']
|
136
|
-
end
|
137
|
-
|
138
|
-
if attributes.has_key?(:'show_ultracart_payments_verified')
|
139
|
-
self.show_ultracart_payments_verified = attributes[:'show_ultracart_payments_verified']
|
140
|
-
end
|
141
|
-
|
142
|
-
if attributes.has_key?(:'status')
|
143
|
-
self.status = attributes[:'status']
|
144
|
-
end
|
145
|
-
|
146
|
-
if attributes.has_key?(:'supports_auth')
|
147
|
-
self.supports_auth = attributes[:'supports_auth']
|
148
|
-
end
|
149
|
-
|
150
|
-
if attributes.has_key?(:'supports_refund')
|
151
|
-
self.supports_refund = attributes[:'supports_refund']
|
152
|
-
end
|
153
|
-
|
154
|
-
if attributes.has_key?(:'third_party')
|
155
|
-
self.third_party = attributes[:'third_party']
|
156
|
-
end
|
157
|
-
|
158
|
-
if attributes.has_key?(:'traffic_percentage')
|
159
|
-
self.traffic_percentage = attributes[:'traffic_percentage']
|
160
|
-
end
|
161
|
-
|
162
|
-
if attributes.has_key?(:'warning')
|
163
|
-
self.warning = attributes[:'warning']
|
164
|
-
end
|
165
|
-
|
166
|
-
if attributes.has_key?(:'wepay_account_update_uri')
|
167
|
-
self.wepay_account_update_uri = attributes[:'wepay_account_update_uri']
|
168
|
-
end
|
169
|
-
|
170
|
-
if attributes.has_key?(:'wepay_console_hostname')
|
171
|
-
self.wepay_console_hostname = attributes[:'wepay_console_hostname']
|
172
|
-
end
|
173
|
-
end
|
174
|
-
|
175
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
176
|
-
# @return Array for valid properties with the reasons
|
177
|
-
def list_invalid_properties
|
178
|
-
invalid_properties = Array.new
|
179
|
-
invalid_properties
|
180
|
-
end
|
181
|
-
|
182
|
-
# Check to see if the all the properties in the model are valid
|
183
|
-
# @return true if the model is valid
|
184
|
-
def valid?
|
185
|
-
true
|
186
|
-
end
|
187
|
-
|
188
|
-
# Checks equality by comparing each attribute.
|
189
|
-
# @param [Object] Object to be compared
|
190
|
-
def ==(o)
|
191
|
-
return true if self.equal?(o)
|
192
|
-
self.class == o.class &&
|
193
|
-
cascade_code == o.cascade_code &&
|
194
|
-
code == o.code &&
|
195
|
-
delay_auto_orders == o.delay_auto_orders &&
|
196
|
-
name == o.name &&
|
197
|
-
reserve_percentage == o.reserve_percentage &&
|
198
|
-
reserves_released_through == o.reserves_released_through &&
|
199
|
-
rotating_transaction_gateway_oid == o.rotating_transaction_gateway_oid &&
|
200
|
-
show_ultracart_payments_verification == o.show_ultracart_payments_verification &&
|
201
|
-
show_ultracart_payments_verified == o.show_ultracart_payments_verified &&
|
202
|
-
status == o.status &&
|
203
|
-
supports_auth == o.supports_auth &&
|
204
|
-
supports_refund == o.supports_refund &&
|
205
|
-
third_party == o.third_party &&
|
206
|
-
traffic_percentage == o.traffic_percentage &&
|
207
|
-
warning == o.warning &&
|
208
|
-
wepay_account_update_uri == o.wepay_account_update_uri &&
|
209
|
-
wepay_console_hostname == o.wepay_console_hostname
|
210
|
-
end
|
211
|
-
|
212
|
-
# @see the `==` method
|
213
|
-
# @param [Object] Object to be compared
|
214
|
-
def eql?(o)
|
215
|
-
self == o
|
216
|
-
end
|
217
|
-
|
218
|
-
# Calculates hash code according to all attributes.
|
219
|
-
# @return [Fixnum] Hash code
|
220
|
-
def hash
|
221
|
-
[cascade_code, code, delay_auto_orders, name, reserve_percentage, reserves_released_through, rotating_transaction_gateway_oid, show_ultracart_payments_verification, show_ultracart_payments_verified, status, supports_auth, supports_refund, third_party, traffic_percentage, warning, wepay_account_update_uri, wepay_console_hostname].hash
|
222
|
-
end
|
223
|
-
|
224
|
-
# Builds the object from hash
|
225
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
226
|
-
# @return [Object] Returns the model itself
|
227
|
-
def build_from_hash(attributes)
|
228
|
-
return nil unless attributes.is_a?(Hash)
|
229
|
-
self.class.swagger_types.each_pair do |key, type|
|
230
|
-
if type =~ /\AArray<(.*)>/i
|
231
|
-
# check to ensure the input is an array given that the attribute
|
232
|
-
# is documented as an array but the input is not
|
233
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
234
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
235
|
-
end
|
236
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
237
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
238
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
239
|
-
end
|
240
|
-
|
241
|
-
self
|
242
|
-
end
|
243
|
-
|
244
|
-
# Deserializes the data based on type
|
245
|
-
# @param string type Data type
|
246
|
-
# @param string value Value to be deserialized
|
247
|
-
# @return [Object] Deserialized data
|
248
|
-
def _deserialize(type, value)
|
249
|
-
case type.to_sym
|
250
|
-
when :DateTime
|
251
|
-
DateTime.parse(value)
|
252
|
-
when :Date
|
253
|
-
Date.parse(value)
|
254
|
-
when :String
|
255
|
-
value.to_s
|
256
|
-
when :Integer
|
257
|
-
value.to_i
|
258
|
-
when :Float
|
259
|
-
value.to_f
|
260
|
-
when :BOOLEAN
|
261
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
262
|
-
true
|
263
|
-
else
|
264
|
-
false
|
265
|
-
end
|
266
|
-
when :Object
|
267
|
-
# generic object (usually a Hash), return directly
|
268
|
-
value
|
269
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
270
|
-
inner_type = Regexp.last_match[:inner_type]
|
271
|
-
value.map { |v| _deserialize(inner_type, v) }
|
272
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
273
|
-
k_type = Regexp.last_match[:k_type]
|
274
|
-
v_type = Regexp.last_match[:v_type]
|
275
|
-
{}.tap do |hash|
|
276
|
-
value.each do |k, v|
|
277
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
278
|
-
end
|
279
|
-
end
|
280
|
-
else # model
|
281
|
-
temp_model = UltracartClient.const_get(type).new
|
282
|
-
temp_model.build_from_hash(value)
|
283
|
-
end
|
284
|
-
end
|
285
|
-
|
286
|
-
# Returns the string representation of the object
|
287
|
-
# @return [String] String presentation of the object
|
288
|
-
def to_s
|
289
|
-
to_hash.to_s
|
290
|
-
end
|
291
|
-
|
292
|
-
# to_body is an alias to to_hash (backward compatibility)
|
293
|
-
# @return [Hash] Returns the object in the form of hash
|
294
|
-
def to_body
|
295
|
-
to_hash
|
296
|
-
end
|
297
|
-
|
298
|
-
# Returns the object in the form of hash
|
299
|
-
# @return [Hash] Returns the object in the form of hash
|
300
|
-
def to_hash
|
301
|
-
hash = {}
|
302
|
-
self.class.attribute_map.each_pair do |attr, param|
|
303
|
-
value = self.send(attr)
|
304
|
-
next if value.nil?
|
305
|
-
hash[param] = _to_hash(value)
|
306
|
-
end
|
307
|
-
hash
|
308
|
-
end
|
309
|
-
|
310
|
-
# Outputs non-array value in the form of hash
|
311
|
-
# For object, use to_hash. Otherwise, just return the value
|
312
|
-
# @param [Object] value Any valid value
|
313
|
-
# @return [Hash] Returns the value in the form of hash
|
314
|
-
def _to_hash(value)
|
315
|
-
if value.is_a?(Array)
|
316
|
-
value.compact.map { |v| _to_hash(v) }
|
317
|
-
elsif value.is_a?(Hash)
|
318
|
-
{}.tap do |hash|
|
319
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
320
|
-
end
|
321
|
-
elsif value.respond_to? :to_hash
|
322
|
-
value.to_hash
|
323
|
-
else
|
324
|
-
value
|
325
|
-
end
|
326
|
-
end
|
327
|
-
|
328
|
-
end
|
329
|
-
end
|
@@ -1,240 +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 RtgSummaryResponse
|
17
|
-
attr_accessor :gateways
|
18
|
-
|
19
|
-
attr_accessor :info_message
|
20
|
-
|
21
|
-
attr_accessor :migration_rtg_code
|
22
|
-
|
23
|
-
attr_accessor :migration_single_gateway_name
|
24
|
-
|
25
|
-
attr_accessor :show_delay_auto_orders
|
26
|
-
|
27
|
-
attr_accessor :show_migration
|
28
|
-
|
29
|
-
attr_accessor :warning
|
30
|
-
|
31
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
-
def self.attribute_map
|
33
|
-
{
|
34
|
-
:'gateways' => :'gateways',
|
35
|
-
:'info_message' => :'info_message',
|
36
|
-
:'migration_rtg_code' => :'migration_rtg_code',
|
37
|
-
:'migration_single_gateway_name' => :'migration_single_gateway_name',
|
38
|
-
:'show_delay_auto_orders' => :'show_delay_auto_orders',
|
39
|
-
:'show_migration' => :'show_migration',
|
40
|
-
:'warning' => :'warning'
|
41
|
-
}
|
42
|
-
end
|
43
|
-
|
44
|
-
# Attribute type mapping.
|
45
|
-
def self.swagger_types
|
46
|
-
{
|
47
|
-
:'gateways' => :'Array<RtgSummaryGateway>',
|
48
|
-
:'info_message' => :'String',
|
49
|
-
:'migration_rtg_code' => :'String',
|
50
|
-
:'migration_single_gateway_name' => :'String',
|
51
|
-
:'show_delay_auto_orders' => :'BOOLEAN',
|
52
|
-
:'show_migration' => :'BOOLEAN',
|
53
|
-
:'warning' => :'String'
|
54
|
-
}
|
55
|
-
end
|
56
|
-
|
57
|
-
# Initializes the object
|
58
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
59
|
-
def initialize(attributes = {})
|
60
|
-
return unless attributes.is_a?(Hash)
|
61
|
-
|
62
|
-
# convert string to symbol for hash key
|
63
|
-
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
64
|
-
|
65
|
-
if attributes.has_key?(:'gateways')
|
66
|
-
if (value = attributes[:'gateways']).is_a?(Array)
|
67
|
-
self.gateways = value
|
68
|
-
end
|
69
|
-
end
|
70
|
-
|
71
|
-
if attributes.has_key?(:'info_message')
|
72
|
-
self.info_message = attributes[:'info_message']
|
73
|
-
end
|
74
|
-
|
75
|
-
if attributes.has_key?(:'migration_rtg_code')
|
76
|
-
self.migration_rtg_code = attributes[:'migration_rtg_code']
|
77
|
-
end
|
78
|
-
|
79
|
-
if attributes.has_key?(:'migration_single_gateway_name')
|
80
|
-
self.migration_single_gateway_name = attributes[:'migration_single_gateway_name']
|
81
|
-
end
|
82
|
-
|
83
|
-
if attributes.has_key?(:'show_delay_auto_orders')
|
84
|
-
self.show_delay_auto_orders = attributes[:'show_delay_auto_orders']
|
85
|
-
end
|
86
|
-
|
87
|
-
if attributes.has_key?(:'show_migration')
|
88
|
-
self.show_migration = attributes[:'show_migration']
|
89
|
-
end
|
90
|
-
|
91
|
-
if attributes.has_key?(:'warning')
|
92
|
-
self.warning = attributes[:'warning']
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
97
|
-
# @return Array for valid properties with the reasons
|
98
|
-
def list_invalid_properties
|
99
|
-
invalid_properties = Array.new
|
100
|
-
invalid_properties
|
101
|
-
end
|
102
|
-
|
103
|
-
# Check to see if the all the properties in the model are valid
|
104
|
-
# @return true if the model is valid
|
105
|
-
def valid?
|
106
|
-
true
|
107
|
-
end
|
108
|
-
|
109
|
-
# Checks equality by comparing each attribute.
|
110
|
-
# @param [Object] Object to be compared
|
111
|
-
def ==(o)
|
112
|
-
return true if self.equal?(o)
|
113
|
-
self.class == o.class &&
|
114
|
-
gateways == o.gateways &&
|
115
|
-
info_message == o.info_message &&
|
116
|
-
migration_rtg_code == o.migration_rtg_code &&
|
117
|
-
migration_single_gateway_name == o.migration_single_gateway_name &&
|
118
|
-
show_delay_auto_orders == o.show_delay_auto_orders &&
|
119
|
-
show_migration == o.show_migration &&
|
120
|
-
warning == o.warning
|
121
|
-
end
|
122
|
-
|
123
|
-
# @see the `==` method
|
124
|
-
# @param [Object] Object to be compared
|
125
|
-
def eql?(o)
|
126
|
-
self == o
|
127
|
-
end
|
128
|
-
|
129
|
-
# Calculates hash code according to all attributes.
|
130
|
-
# @return [Fixnum] Hash code
|
131
|
-
def hash
|
132
|
-
[gateways, info_message, migration_rtg_code, migration_single_gateway_name, show_delay_auto_orders, show_migration, warning].hash
|
133
|
-
end
|
134
|
-
|
135
|
-
# Builds the object from hash
|
136
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
-
# @return [Object] Returns the model itself
|
138
|
-
def build_from_hash(attributes)
|
139
|
-
return nil unless attributes.is_a?(Hash)
|
140
|
-
self.class.swagger_types.each_pair do |key, type|
|
141
|
-
if type =~ /\AArray<(.*)>/i
|
142
|
-
# check to ensure the input is an array given that the attribute
|
143
|
-
# is documented as an array but the input is not
|
144
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
-
end
|
147
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
-
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
150
|
-
end
|
151
|
-
|
152
|
-
self
|
153
|
-
end
|
154
|
-
|
155
|
-
# Deserializes the data based on type
|
156
|
-
# @param string type Data type
|
157
|
-
# @param string value Value to be deserialized
|
158
|
-
# @return [Object] Deserialized data
|
159
|
-
def _deserialize(type, value)
|
160
|
-
case type.to_sym
|
161
|
-
when :DateTime
|
162
|
-
DateTime.parse(value)
|
163
|
-
when :Date
|
164
|
-
Date.parse(value)
|
165
|
-
when :String
|
166
|
-
value.to_s
|
167
|
-
when :Integer
|
168
|
-
value.to_i
|
169
|
-
when :Float
|
170
|
-
value.to_f
|
171
|
-
when :BOOLEAN
|
172
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
-
true
|
174
|
-
else
|
175
|
-
false
|
176
|
-
end
|
177
|
-
when :Object
|
178
|
-
# generic object (usually a Hash), return directly
|
179
|
-
value
|
180
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
-
inner_type = Regexp.last_match[:inner_type]
|
182
|
-
value.map { |v| _deserialize(inner_type, v) }
|
183
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
-
k_type = Regexp.last_match[:k_type]
|
185
|
-
v_type = Regexp.last_match[:v_type]
|
186
|
-
{}.tap do |hash|
|
187
|
-
value.each do |k, v|
|
188
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
-
end
|
190
|
-
end
|
191
|
-
else # model
|
192
|
-
temp_model = UltracartClient.const_get(type).new
|
193
|
-
temp_model.build_from_hash(value)
|
194
|
-
end
|
195
|
-
end
|
196
|
-
|
197
|
-
# Returns the string representation of the object
|
198
|
-
# @return [String] String presentation of the object
|
199
|
-
def to_s
|
200
|
-
to_hash.to_s
|
201
|
-
end
|
202
|
-
|
203
|
-
# to_body is an alias to to_hash (backward compatibility)
|
204
|
-
# @return [Hash] Returns the object in the form of hash
|
205
|
-
def to_body
|
206
|
-
to_hash
|
207
|
-
end
|
208
|
-
|
209
|
-
# Returns the object in the form of hash
|
210
|
-
# @return [Hash] Returns the object in the form of hash
|
211
|
-
def to_hash
|
212
|
-
hash = {}
|
213
|
-
self.class.attribute_map.each_pair do |attr, param|
|
214
|
-
value = self.send(attr)
|
215
|
-
next if value.nil?
|
216
|
-
hash[param] = _to_hash(value)
|
217
|
-
end
|
218
|
-
hash
|
219
|
-
end
|
220
|
-
|
221
|
-
# Outputs non-array value in the form of hash
|
222
|
-
# For object, use to_hash. Otherwise, just return the value
|
223
|
-
# @param [Object] value Any valid value
|
224
|
-
# @return [Hash] Returns the value in the form of hash
|
225
|
-
def _to_hash(value)
|
226
|
-
if value.is_a?(Array)
|
227
|
-
value.compact.map { |v| _to_hash(v) }
|
228
|
-
elsif value.is_a?(Hash)
|
229
|
-
{}.tap do |hash|
|
230
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
231
|
-
end
|
232
|
-
elsif value.respond_to? :to_hash
|
233
|
-
value.to_hash
|
234
|
-
else
|
235
|
-
value
|
236
|
-
end
|
237
|
-
end
|
238
|
-
|
239
|
-
end
|
240
|
-
end
|