ultracart_api 4.0.133 → 4.0.135
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -4
- data/docs/CartCheckout.md +6 -0
- data/docs/ConversationApi.md +71 -0
- data/docs/Order.md +3 -1
- data/docs/OrderCheckout.md +6 -0
- data/docs/OrderUtm.md +64 -0
- data/docs/PricingTier.md +2 -0
- data/lib/ultracart_api/api/conversation_api.rb +64 -0
- data/lib/ultracart_api/models/cart_checkout.rb +76 -1
- data/lib/ultracart_api/models/order.rb +16 -4
- data/lib/ultracart_api/models/order_checkout.rb +76 -1
- data/lib/ultracart_api/models/order_utm.rb +427 -0
- data/lib/ultracart_api/models/pricing_tier.rb +11 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +1 -0
- metadata +4 -2
@@ -23,6 +23,9 @@ module UltracartClient
|
|
23
23
|
# Custom field 1
|
24
24
|
attr_accessor :custom_field1
|
25
25
|
|
26
|
+
# Custom field 10
|
27
|
+
attr_accessor :custom_field10
|
28
|
+
|
26
29
|
# Custom field 2
|
27
30
|
attr_accessor :custom_field2
|
28
31
|
|
@@ -41,6 +44,12 @@ module UltracartClient
|
|
41
44
|
# Custom field 7
|
42
45
|
attr_accessor :custom_field7
|
43
46
|
|
47
|
+
# Custom field 8
|
48
|
+
attr_accessor :custom_field8
|
49
|
+
|
50
|
+
# Custom field 9
|
51
|
+
attr_accessor :custom_field9
|
52
|
+
|
44
53
|
# IP address of the customer when placing the order
|
45
54
|
attr_accessor :customer_ip_address
|
46
55
|
|
@@ -62,12 +71,15 @@ module UltracartClient
|
|
62
71
|
:'browser' => :'browser',
|
63
72
|
:'comments' => :'comments',
|
64
73
|
:'custom_field1' => :'custom_field1',
|
74
|
+
:'custom_field10' => :'custom_field10',
|
65
75
|
:'custom_field2' => :'custom_field2',
|
66
76
|
:'custom_field3' => :'custom_field3',
|
67
77
|
:'custom_field4' => :'custom_field4',
|
68
78
|
:'custom_field5' => :'custom_field5',
|
69
79
|
:'custom_field6' => :'custom_field6',
|
70
80
|
:'custom_field7' => :'custom_field7',
|
81
|
+
:'custom_field8' => :'custom_field8',
|
82
|
+
:'custom_field9' => :'custom_field9',
|
71
83
|
:'customer_ip_address' => :'customer_ip_address',
|
72
84
|
:'screen_branding_theme_code' => :'screen_branding_theme_code',
|
73
85
|
:'screen_size' => :'screen_size',
|
@@ -87,12 +99,15 @@ module UltracartClient
|
|
87
99
|
:'browser' => :'Browser',
|
88
100
|
:'comments' => :'String',
|
89
101
|
:'custom_field1' => :'String',
|
102
|
+
:'custom_field10' => :'String',
|
90
103
|
:'custom_field2' => :'String',
|
91
104
|
:'custom_field3' => :'String',
|
92
105
|
:'custom_field4' => :'String',
|
93
106
|
:'custom_field5' => :'String',
|
94
107
|
:'custom_field6' => :'String',
|
95
108
|
:'custom_field7' => :'String',
|
109
|
+
:'custom_field8' => :'String',
|
110
|
+
:'custom_field9' => :'String',
|
96
111
|
:'customer_ip_address' => :'String',
|
97
112
|
:'screen_branding_theme_code' => :'String',
|
98
113
|
:'screen_size' => :'String',
|
@@ -134,6 +149,10 @@ module UltracartClient
|
|
134
149
|
self.custom_field1 = attributes[:'custom_field1']
|
135
150
|
end
|
136
151
|
|
152
|
+
if attributes.key?(:'custom_field10')
|
153
|
+
self.custom_field10 = attributes[:'custom_field10']
|
154
|
+
end
|
155
|
+
|
137
156
|
if attributes.key?(:'custom_field2')
|
138
157
|
self.custom_field2 = attributes[:'custom_field2']
|
139
158
|
end
|
@@ -158,6 +177,14 @@ module UltracartClient
|
|
158
177
|
self.custom_field7 = attributes[:'custom_field7']
|
159
178
|
end
|
160
179
|
|
180
|
+
if attributes.key?(:'custom_field8')
|
181
|
+
self.custom_field8 = attributes[:'custom_field8']
|
182
|
+
end
|
183
|
+
|
184
|
+
if attributes.key?(:'custom_field9')
|
185
|
+
self.custom_field9 = attributes[:'custom_field9']
|
186
|
+
end
|
187
|
+
|
161
188
|
if attributes.key?(:'customer_ip_address')
|
162
189
|
self.customer_ip_address = attributes[:'customer_ip_address']
|
163
190
|
end
|
@@ -187,6 +214,10 @@ module UltracartClient
|
|
187
214
|
invalid_properties.push('invalid value for "custom_field1", the character length must be smaller than or equal to 50.')
|
188
215
|
end
|
189
216
|
|
217
|
+
if !@custom_field10.nil? && @custom_field10.to_s.length > 200
|
218
|
+
invalid_properties.push('invalid value for "custom_field10", the character length must be smaller than or equal to 200.')
|
219
|
+
end
|
220
|
+
|
190
221
|
if !@custom_field2.nil? && @custom_field2.to_s.length > 50
|
191
222
|
invalid_properties.push('invalid value for "custom_field2", the character length must be smaller than or equal to 50.')
|
192
223
|
end
|
@@ -211,6 +242,14 @@ module UltracartClient
|
|
211
242
|
invalid_properties.push('invalid value for "custom_field7", the character length must be smaller than or equal to 50.')
|
212
243
|
end
|
213
244
|
|
245
|
+
if !@custom_field8.nil? && @custom_field8.to_s.length > 200
|
246
|
+
invalid_properties.push('invalid value for "custom_field8", the character length must be smaller than or equal to 200.')
|
247
|
+
end
|
248
|
+
|
249
|
+
if !@custom_field9.nil? && @custom_field9.to_s.length > 200
|
250
|
+
invalid_properties.push('invalid value for "custom_field9", the character length must be smaller than or equal to 200.')
|
251
|
+
end
|
252
|
+
|
214
253
|
if !@screen_branding_theme_code.nil? && @screen_branding_theme_code.to_s.length > 10
|
215
254
|
invalid_properties.push('invalid value for "screen_branding_theme_code", the character length must be smaller than or equal to 10.')
|
216
255
|
end
|
@@ -222,12 +261,15 @@ module UltracartClient
|
|
222
261
|
# @return true if the model is valid
|
223
262
|
def valid?
|
224
263
|
return false if !@custom_field1.nil? && @custom_field1.to_s.length > 50
|
264
|
+
return false if !@custom_field10.nil? && @custom_field10.to_s.length > 200
|
225
265
|
return false if !@custom_field2.nil? && @custom_field2.to_s.length > 50
|
226
266
|
return false if !@custom_field3.nil? && @custom_field3.to_s.length > 50
|
227
267
|
return false if !@custom_field4.nil? && @custom_field4.to_s.length > 50
|
228
268
|
return false if !@custom_field5.nil? && @custom_field5.to_s.length > 75
|
229
269
|
return false if !@custom_field6.nil? && @custom_field6.to_s.length > 50
|
230
270
|
return false if !@custom_field7.nil? && @custom_field7.to_s.length > 50
|
271
|
+
return false if !@custom_field8.nil? && @custom_field8.to_s.length > 200
|
272
|
+
return false if !@custom_field9.nil? && @custom_field9.to_s.length > 200
|
231
273
|
return false if !@screen_branding_theme_code.nil? && @screen_branding_theme_code.to_s.length > 10
|
232
274
|
true
|
233
275
|
end
|
@@ -242,6 +284,16 @@ module UltracartClient
|
|
242
284
|
@custom_field1 = custom_field1
|
243
285
|
end
|
244
286
|
|
287
|
+
# Custom attribute writer method with validation
|
288
|
+
# @param [Object] custom_field10 Value to be assigned
|
289
|
+
def custom_field10=(custom_field10)
|
290
|
+
if !custom_field10.nil? && custom_field10.to_s.length > 200
|
291
|
+
fail ArgumentError, 'invalid value for "custom_field10", the character length must be smaller than or equal to 200.'
|
292
|
+
end
|
293
|
+
|
294
|
+
@custom_field10 = custom_field10
|
295
|
+
end
|
296
|
+
|
245
297
|
# Custom attribute writer method with validation
|
246
298
|
# @param [Object] custom_field2 Value to be assigned
|
247
299
|
def custom_field2=(custom_field2)
|
@@ -302,6 +354,26 @@ module UltracartClient
|
|
302
354
|
@custom_field7 = custom_field7
|
303
355
|
end
|
304
356
|
|
357
|
+
# Custom attribute writer method with validation
|
358
|
+
# @param [Object] custom_field8 Value to be assigned
|
359
|
+
def custom_field8=(custom_field8)
|
360
|
+
if !custom_field8.nil? && custom_field8.to_s.length > 200
|
361
|
+
fail ArgumentError, 'invalid value for "custom_field8", the character length must be smaller than or equal to 200.'
|
362
|
+
end
|
363
|
+
|
364
|
+
@custom_field8 = custom_field8
|
365
|
+
end
|
366
|
+
|
367
|
+
# Custom attribute writer method with validation
|
368
|
+
# @param [Object] custom_field9 Value to be assigned
|
369
|
+
def custom_field9=(custom_field9)
|
370
|
+
if !custom_field9.nil? && custom_field9.to_s.length > 200
|
371
|
+
fail ArgumentError, 'invalid value for "custom_field9", the character length must be smaller than or equal to 200.'
|
372
|
+
end
|
373
|
+
|
374
|
+
@custom_field9 = custom_field9
|
375
|
+
end
|
376
|
+
|
305
377
|
# Custom attribute writer method with validation
|
306
378
|
# @param [Object] screen_branding_theme_code Value to be assigned
|
307
379
|
def screen_branding_theme_code=(screen_branding_theme_code)
|
@@ -320,12 +392,15 @@ module UltracartClient
|
|
320
392
|
browser == o.browser &&
|
321
393
|
comments == o.comments &&
|
322
394
|
custom_field1 == o.custom_field1 &&
|
395
|
+
custom_field10 == o.custom_field10 &&
|
323
396
|
custom_field2 == o.custom_field2 &&
|
324
397
|
custom_field3 == o.custom_field3 &&
|
325
398
|
custom_field4 == o.custom_field4 &&
|
326
399
|
custom_field5 == o.custom_field5 &&
|
327
400
|
custom_field6 == o.custom_field6 &&
|
328
401
|
custom_field7 == o.custom_field7 &&
|
402
|
+
custom_field8 == o.custom_field8 &&
|
403
|
+
custom_field9 == o.custom_field9 &&
|
329
404
|
customer_ip_address == o.customer_ip_address &&
|
330
405
|
screen_branding_theme_code == o.screen_branding_theme_code &&
|
331
406
|
screen_size == o.screen_size &&
|
@@ -342,7 +417,7 @@ module UltracartClient
|
|
342
417
|
# Calculates hash code according to all attributes.
|
343
418
|
# @return [Integer] Hash code
|
344
419
|
def hash
|
345
|
-
[browser, comments, custom_field1, custom_field2, custom_field3, custom_field4, custom_field5, custom_field6, custom_field7, customer_ip_address, screen_branding_theme_code, screen_size, storefront_host_name, upsell_path_code].hash
|
420
|
+
[browser, comments, custom_field1, custom_field10, custom_field2, custom_field3, custom_field4, custom_field5, custom_field6, custom_field7, custom_field8, custom_field9, customer_ip_address, screen_branding_theme_code, screen_size, storefront_host_name, upsell_path_code].hash
|
346
421
|
end
|
347
422
|
|
348
423
|
# Builds the object from hash
|
@@ -0,0 +1,427 @@
|
|
1
|
+
=begin
|
2
|
+
#UltraCart Rest API V2
|
3
|
+
|
4
|
+
#UltraCart REST API Version 2
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 2.0.0
|
7
|
+
Contact: support@ultracart.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.0.1-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module UltracartClient
|
17
|
+
class OrderUtm
|
18
|
+
attr_accessor :attribution_first_click_subtotal
|
19
|
+
|
20
|
+
attr_accessor :attribution_first_click_total
|
21
|
+
|
22
|
+
attr_accessor :attribution_last_click_subtotal
|
23
|
+
|
24
|
+
attr_accessor :attribution_last_click_total
|
25
|
+
|
26
|
+
attr_accessor :attribution_linear_subtotal
|
27
|
+
|
28
|
+
attr_accessor :attribution_linear_total
|
29
|
+
|
30
|
+
attr_accessor :attribution_position_based_subtotal
|
31
|
+
|
32
|
+
attr_accessor :attribution_position_based_total
|
33
|
+
|
34
|
+
# Date/time that the click happened
|
35
|
+
attr_accessor :click_dts
|
36
|
+
|
37
|
+
attr_accessor :facebook_ad_id
|
38
|
+
|
39
|
+
attr_accessor :fbclid
|
40
|
+
|
41
|
+
attr_accessor :gbraid
|
42
|
+
|
43
|
+
attr_accessor :glcid
|
44
|
+
|
45
|
+
attr_accessor :msclkid
|
46
|
+
|
47
|
+
attr_accessor :ttclid
|
48
|
+
|
49
|
+
attr_accessor :uc_message_id
|
50
|
+
|
51
|
+
attr_accessor :utm_campaign
|
52
|
+
|
53
|
+
attr_accessor :utm_content
|
54
|
+
|
55
|
+
attr_accessor :utm_id
|
56
|
+
|
57
|
+
attr_accessor :utm_medium
|
58
|
+
|
59
|
+
attr_accessor :utm_source
|
60
|
+
|
61
|
+
attr_accessor :utm_term
|
62
|
+
|
63
|
+
attr_accessor :vmcid
|
64
|
+
|
65
|
+
attr_accessor :wbraid
|
66
|
+
|
67
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
68
|
+
def self.attribute_map
|
69
|
+
{
|
70
|
+
:'attribution_first_click_subtotal' => :'attribution_first_click_subtotal',
|
71
|
+
:'attribution_first_click_total' => :'attribution_first_click_total',
|
72
|
+
:'attribution_last_click_subtotal' => :'attribution_last_click_subtotal',
|
73
|
+
:'attribution_last_click_total' => :'attribution_last_click_total',
|
74
|
+
:'attribution_linear_subtotal' => :'attribution_linear_subtotal',
|
75
|
+
:'attribution_linear_total' => :'attribution_linear_total',
|
76
|
+
:'attribution_position_based_subtotal' => :'attribution_position_based_subtotal',
|
77
|
+
:'attribution_position_based_total' => :'attribution_position_based_total',
|
78
|
+
:'click_dts' => :'click_dts',
|
79
|
+
:'facebook_ad_id' => :'facebook_ad_id',
|
80
|
+
:'fbclid' => :'fbclid',
|
81
|
+
:'gbraid' => :'gbraid',
|
82
|
+
:'glcid' => :'glcid',
|
83
|
+
:'msclkid' => :'msclkid',
|
84
|
+
:'ttclid' => :'ttclid',
|
85
|
+
:'uc_message_id' => :'uc_message_id',
|
86
|
+
:'utm_campaign' => :'utm_campaign',
|
87
|
+
:'utm_content' => :'utm_content',
|
88
|
+
:'utm_id' => :'utm_id',
|
89
|
+
:'utm_medium' => :'utm_medium',
|
90
|
+
:'utm_source' => :'utm_source',
|
91
|
+
:'utm_term' => :'utm_term',
|
92
|
+
:'vmcid' => :'vmcid',
|
93
|
+
:'wbraid' => :'wbraid'
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# Returns all the JSON keys this model knows about
|
98
|
+
def self.acceptable_attributes
|
99
|
+
attribute_map.values
|
100
|
+
end
|
101
|
+
|
102
|
+
# Attribute type mapping.
|
103
|
+
def self.openapi_types
|
104
|
+
{
|
105
|
+
:'attribution_first_click_subtotal' => :'Float',
|
106
|
+
:'attribution_first_click_total' => :'Float',
|
107
|
+
:'attribution_last_click_subtotal' => :'Float',
|
108
|
+
:'attribution_last_click_total' => :'Float',
|
109
|
+
:'attribution_linear_subtotal' => :'Float',
|
110
|
+
:'attribution_linear_total' => :'Float',
|
111
|
+
:'attribution_position_based_subtotal' => :'Float',
|
112
|
+
:'attribution_position_based_total' => :'Float',
|
113
|
+
:'click_dts' => :'String',
|
114
|
+
:'facebook_ad_id' => :'String',
|
115
|
+
:'fbclid' => :'String',
|
116
|
+
:'gbraid' => :'String',
|
117
|
+
:'glcid' => :'String',
|
118
|
+
:'msclkid' => :'String',
|
119
|
+
:'ttclid' => :'String',
|
120
|
+
:'uc_message_id' => :'String',
|
121
|
+
:'utm_campaign' => :'String',
|
122
|
+
:'utm_content' => :'String',
|
123
|
+
:'utm_id' => :'String',
|
124
|
+
:'utm_medium' => :'String',
|
125
|
+
:'utm_source' => :'String',
|
126
|
+
:'utm_term' => :'String',
|
127
|
+
:'vmcid' => :'String',
|
128
|
+
:'wbraid' => :'String'
|
129
|
+
}
|
130
|
+
end
|
131
|
+
|
132
|
+
# List of attributes with nullable: true
|
133
|
+
def self.openapi_nullable
|
134
|
+
Set.new([
|
135
|
+
])
|
136
|
+
end
|
137
|
+
|
138
|
+
# Initializes the object
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
def initialize(attributes = {})
|
141
|
+
if (!attributes.is_a?(Hash))
|
142
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::OrderUtm` initialize method"
|
143
|
+
end
|
144
|
+
|
145
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
146
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
147
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
148
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::OrderUtm`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
149
|
+
end
|
150
|
+
h[k.to_sym] = v
|
151
|
+
}
|
152
|
+
|
153
|
+
if attributes.key?(:'attribution_first_click_subtotal')
|
154
|
+
self.attribution_first_click_subtotal = attributes[:'attribution_first_click_subtotal']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.key?(:'attribution_first_click_total')
|
158
|
+
self.attribution_first_click_total = attributes[:'attribution_first_click_total']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.key?(:'attribution_last_click_subtotal')
|
162
|
+
self.attribution_last_click_subtotal = attributes[:'attribution_last_click_subtotal']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.key?(:'attribution_last_click_total')
|
166
|
+
self.attribution_last_click_total = attributes[:'attribution_last_click_total']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.key?(:'attribution_linear_subtotal')
|
170
|
+
self.attribution_linear_subtotal = attributes[:'attribution_linear_subtotal']
|
171
|
+
end
|
172
|
+
|
173
|
+
if attributes.key?(:'attribution_linear_total')
|
174
|
+
self.attribution_linear_total = attributes[:'attribution_linear_total']
|
175
|
+
end
|
176
|
+
|
177
|
+
if attributes.key?(:'attribution_position_based_subtotal')
|
178
|
+
self.attribution_position_based_subtotal = attributes[:'attribution_position_based_subtotal']
|
179
|
+
end
|
180
|
+
|
181
|
+
if attributes.key?(:'attribution_position_based_total')
|
182
|
+
self.attribution_position_based_total = attributes[:'attribution_position_based_total']
|
183
|
+
end
|
184
|
+
|
185
|
+
if attributes.key?(:'click_dts')
|
186
|
+
self.click_dts = attributes[:'click_dts']
|
187
|
+
end
|
188
|
+
|
189
|
+
if attributes.key?(:'facebook_ad_id')
|
190
|
+
self.facebook_ad_id = attributes[:'facebook_ad_id']
|
191
|
+
end
|
192
|
+
|
193
|
+
if attributes.key?(:'fbclid')
|
194
|
+
self.fbclid = attributes[:'fbclid']
|
195
|
+
end
|
196
|
+
|
197
|
+
if attributes.key?(:'gbraid')
|
198
|
+
self.gbraid = attributes[:'gbraid']
|
199
|
+
end
|
200
|
+
|
201
|
+
if attributes.key?(:'glcid')
|
202
|
+
self.glcid = attributes[:'glcid']
|
203
|
+
end
|
204
|
+
|
205
|
+
if attributes.key?(:'msclkid')
|
206
|
+
self.msclkid = attributes[:'msclkid']
|
207
|
+
end
|
208
|
+
|
209
|
+
if attributes.key?(:'ttclid')
|
210
|
+
self.ttclid = attributes[:'ttclid']
|
211
|
+
end
|
212
|
+
|
213
|
+
if attributes.key?(:'uc_message_id')
|
214
|
+
self.uc_message_id = attributes[:'uc_message_id']
|
215
|
+
end
|
216
|
+
|
217
|
+
if attributes.key?(:'utm_campaign')
|
218
|
+
self.utm_campaign = attributes[:'utm_campaign']
|
219
|
+
end
|
220
|
+
|
221
|
+
if attributes.key?(:'utm_content')
|
222
|
+
self.utm_content = attributes[:'utm_content']
|
223
|
+
end
|
224
|
+
|
225
|
+
if attributes.key?(:'utm_id')
|
226
|
+
self.utm_id = attributes[:'utm_id']
|
227
|
+
end
|
228
|
+
|
229
|
+
if attributes.key?(:'utm_medium')
|
230
|
+
self.utm_medium = attributes[:'utm_medium']
|
231
|
+
end
|
232
|
+
|
233
|
+
if attributes.key?(:'utm_source')
|
234
|
+
self.utm_source = attributes[:'utm_source']
|
235
|
+
end
|
236
|
+
|
237
|
+
if attributes.key?(:'utm_term')
|
238
|
+
self.utm_term = attributes[:'utm_term']
|
239
|
+
end
|
240
|
+
|
241
|
+
if attributes.key?(:'vmcid')
|
242
|
+
self.vmcid = attributes[:'vmcid']
|
243
|
+
end
|
244
|
+
|
245
|
+
if attributes.key?(:'wbraid')
|
246
|
+
self.wbraid = attributes[:'wbraid']
|
247
|
+
end
|
248
|
+
end
|
249
|
+
|
250
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
251
|
+
# @return Array for valid properties with the reasons
|
252
|
+
def list_invalid_properties
|
253
|
+
invalid_properties = Array.new
|
254
|
+
invalid_properties
|
255
|
+
end
|
256
|
+
|
257
|
+
# Check to see if the all the properties in the model are valid
|
258
|
+
# @return true if the model is valid
|
259
|
+
def valid?
|
260
|
+
true
|
261
|
+
end
|
262
|
+
|
263
|
+
# Checks equality by comparing each attribute.
|
264
|
+
# @param [Object] Object to be compared
|
265
|
+
def ==(o)
|
266
|
+
return true if self.equal?(o)
|
267
|
+
self.class == o.class &&
|
268
|
+
attribution_first_click_subtotal == o.attribution_first_click_subtotal &&
|
269
|
+
attribution_first_click_total == o.attribution_first_click_total &&
|
270
|
+
attribution_last_click_subtotal == o.attribution_last_click_subtotal &&
|
271
|
+
attribution_last_click_total == o.attribution_last_click_total &&
|
272
|
+
attribution_linear_subtotal == o.attribution_linear_subtotal &&
|
273
|
+
attribution_linear_total == o.attribution_linear_total &&
|
274
|
+
attribution_position_based_subtotal == o.attribution_position_based_subtotal &&
|
275
|
+
attribution_position_based_total == o.attribution_position_based_total &&
|
276
|
+
click_dts == o.click_dts &&
|
277
|
+
facebook_ad_id == o.facebook_ad_id &&
|
278
|
+
fbclid == o.fbclid &&
|
279
|
+
gbraid == o.gbraid &&
|
280
|
+
glcid == o.glcid &&
|
281
|
+
msclkid == o.msclkid &&
|
282
|
+
ttclid == o.ttclid &&
|
283
|
+
uc_message_id == o.uc_message_id &&
|
284
|
+
utm_campaign == o.utm_campaign &&
|
285
|
+
utm_content == o.utm_content &&
|
286
|
+
utm_id == o.utm_id &&
|
287
|
+
utm_medium == o.utm_medium &&
|
288
|
+
utm_source == o.utm_source &&
|
289
|
+
utm_term == o.utm_term &&
|
290
|
+
vmcid == o.vmcid &&
|
291
|
+
wbraid == o.wbraid
|
292
|
+
end
|
293
|
+
|
294
|
+
# @see the `==` method
|
295
|
+
# @param [Object] Object to be compared
|
296
|
+
def eql?(o)
|
297
|
+
self == o
|
298
|
+
end
|
299
|
+
|
300
|
+
# Calculates hash code according to all attributes.
|
301
|
+
# @return [Integer] Hash code
|
302
|
+
def hash
|
303
|
+
[attribution_first_click_subtotal, attribution_first_click_total, attribution_last_click_subtotal, attribution_last_click_total, attribution_linear_subtotal, attribution_linear_total, attribution_position_based_subtotal, attribution_position_based_total, click_dts, facebook_ad_id, fbclid, gbraid, glcid, msclkid, ttclid, uc_message_id, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term, vmcid, wbraid].hash
|
304
|
+
end
|
305
|
+
|
306
|
+
# Builds the object from hash
|
307
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
308
|
+
# @return [Object] Returns the model itself
|
309
|
+
def self.build_from_hash(attributes)
|
310
|
+
new.build_from_hash(attributes)
|
311
|
+
end
|
312
|
+
|
313
|
+
# Builds the object from hash
|
314
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
315
|
+
# @return [Object] Returns the model itself
|
316
|
+
def build_from_hash(attributes)
|
317
|
+
return nil unless attributes.is_a?(Hash)
|
318
|
+
attributes = attributes.transform_keys(&:to_sym)
|
319
|
+
self.class.openapi_types.each_pair do |key, type|
|
320
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
321
|
+
self.send("#{key}=", nil)
|
322
|
+
elsif type =~ /\AArray<(.*)>/i
|
323
|
+
# check to ensure the input is an array given that the attribute
|
324
|
+
# is documented as an array but the input is not
|
325
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
326
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
327
|
+
end
|
328
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
329
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
330
|
+
end
|
331
|
+
end
|
332
|
+
|
333
|
+
self
|
334
|
+
end
|
335
|
+
|
336
|
+
# Deserializes the data based on type
|
337
|
+
# @param string type Data type
|
338
|
+
# @param string value Value to be deserialized
|
339
|
+
# @return [Object] Deserialized data
|
340
|
+
def _deserialize(type, value)
|
341
|
+
case type.to_sym
|
342
|
+
when :Time
|
343
|
+
Time.parse(value)
|
344
|
+
when :Date
|
345
|
+
Date.parse(value)
|
346
|
+
when :String
|
347
|
+
value.to_s
|
348
|
+
when :Integer
|
349
|
+
value.to_i
|
350
|
+
when :Float
|
351
|
+
value.to_f
|
352
|
+
when :Boolean
|
353
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
354
|
+
true
|
355
|
+
else
|
356
|
+
false
|
357
|
+
end
|
358
|
+
when :Object
|
359
|
+
# generic object (usually a Hash), return directly
|
360
|
+
value
|
361
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
362
|
+
inner_type = Regexp.last_match[:inner_type]
|
363
|
+
value.map { |v| _deserialize(inner_type, v) }
|
364
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
365
|
+
k_type = Regexp.last_match[:k_type]
|
366
|
+
v_type = Regexp.last_match[:v_type]
|
367
|
+
{}.tap do |hash|
|
368
|
+
value.each do |k, v|
|
369
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
370
|
+
end
|
371
|
+
end
|
372
|
+
else # model
|
373
|
+
# models (e.g. Pet) or oneOf
|
374
|
+
klass = UltracartClient.const_get(type)
|
375
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
376
|
+
end
|
377
|
+
end
|
378
|
+
|
379
|
+
# Returns the string representation of the object
|
380
|
+
# @return [String] String presentation of the object
|
381
|
+
def to_s
|
382
|
+
to_hash.to_s
|
383
|
+
end
|
384
|
+
|
385
|
+
# to_body is an alias to to_hash (backward compatibility)
|
386
|
+
# @return [Hash] Returns the object in the form of hash
|
387
|
+
def to_body
|
388
|
+
to_hash
|
389
|
+
end
|
390
|
+
|
391
|
+
# Returns the object in the form of hash
|
392
|
+
# @return [Hash] Returns the object in the form of hash
|
393
|
+
def to_hash
|
394
|
+
hash = {}
|
395
|
+
self.class.attribute_map.each_pair do |attr, param|
|
396
|
+
value = self.send(attr)
|
397
|
+
if value.nil?
|
398
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
399
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
400
|
+
end
|
401
|
+
|
402
|
+
hash[param] = _to_hash(value)
|
403
|
+
end
|
404
|
+
hash
|
405
|
+
end
|
406
|
+
|
407
|
+
# Outputs non-array value in the form of hash
|
408
|
+
# For object, use to_hash. Otherwise, just return the value
|
409
|
+
# @param [Object] value Any valid value
|
410
|
+
# @return [Hash] Returns the value in the form of hash
|
411
|
+
def _to_hash(value)
|
412
|
+
if value.is_a?(Array)
|
413
|
+
value.compact.map { |v| _to_hash(v) }
|
414
|
+
elsif value.is_a?(Hash)
|
415
|
+
{}.tap do |hash|
|
416
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
417
|
+
end
|
418
|
+
elsif value.respond_to? :to_hash
|
419
|
+
value.to_hash
|
420
|
+
else
|
421
|
+
value
|
422
|
+
end
|
423
|
+
end
|
424
|
+
|
425
|
+
end
|
426
|
+
|
427
|
+
end
|
@@ -95,6 +95,9 @@ module UltracartClient
|
|
95
95
|
# Realtime percentage discount
|
96
96
|
attr_accessor :realtime_percentage_discount
|
97
97
|
|
98
|
+
# Restrict inventory to this distribution center oid
|
99
|
+
attr_accessor :restrict_to_distribution_center_oid
|
100
|
+
|
98
101
|
attr_accessor :signup_notification
|
99
102
|
|
100
103
|
# Suppress buySAFE (deprecated)
|
@@ -139,6 +142,7 @@ module UltracartClient
|
|
139
142
|
:'not_valid_when_coupon_present' => :'not_valid_when_coupon_present',
|
140
143
|
:'pricing_tier_oid' => :'pricing_tier_oid',
|
141
144
|
:'realtime_percentage_discount' => :'realtime_percentage_discount',
|
145
|
+
:'restrict_to_distribution_center_oid' => :'restrict_to_distribution_center_oid',
|
142
146
|
:'signup_notification' => :'signup_notification',
|
143
147
|
:'suppress_buysafe' => :'suppress_buysafe',
|
144
148
|
:'suppress_mailing_list' => :'suppress_mailing_list',
|
@@ -182,6 +186,7 @@ module UltracartClient
|
|
182
186
|
:'not_valid_when_coupon_present' => :'Boolean',
|
183
187
|
:'pricing_tier_oid' => :'Integer',
|
184
188
|
:'realtime_percentage_discount' => :'Float',
|
189
|
+
:'restrict_to_distribution_center_oid' => :'Integer',
|
185
190
|
:'signup_notification' => :'PricingTierNotification',
|
186
191
|
:'suppress_buysafe' => :'Boolean',
|
187
192
|
:'suppress_mailing_list' => :'Boolean',
|
@@ -319,6 +324,10 @@ module UltracartClient
|
|
319
324
|
self.realtime_percentage_discount = attributes[:'realtime_percentage_discount']
|
320
325
|
end
|
321
326
|
|
327
|
+
if attributes.key?(:'restrict_to_distribution_center_oid')
|
328
|
+
self.restrict_to_distribution_center_oid = attributes[:'restrict_to_distribution_center_oid']
|
329
|
+
end
|
330
|
+
|
322
331
|
if attributes.key?(:'signup_notification')
|
323
332
|
self.signup_notification = attributes[:'signup_notification']
|
324
333
|
end
|
@@ -400,6 +409,7 @@ module UltracartClient
|
|
400
409
|
not_valid_when_coupon_present == o.not_valid_when_coupon_present &&
|
401
410
|
pricing_tier_oid == o.pricing_tier_oid &&
|
402
411
|
realtime_percentage_discount == o.realtime_percentage_discount &&
|
412
|
+
restrict_to_distribution_center_oid == o.restrict_to_distribution_center_oid &&
|
403
413
|
signup_notification == o.signup_notification &&
|
404
414
|
suppress_buysafe == o.suppress_buysafe &&
|
405
415
|
suppress_mailing_list == o.suppress_mailing_list &&
|
@@ -416,7 +426,7 @@ module UltracartClient
|
|
416
426
|
# Calculates hash code according to all attributes.
|
417
427
|
# @return [Integer] Hash code
|
418
428
|
def hash
|
419
|
-
[allow_3rd_party_billing, allow_cod, allow_purchase_order, allow_quote_request, approval_notification, auto_approve_cod, auto_approve_purchase_order, default_on_wholesale_signup, default_percentage_discount, default_shipping_method_oid, default_tier, display_on_wholesale_signup, exclude_from_free_promotion, exempt_loyalty_rewards, exempt_shipping_handling_charge, free_shipping, free_shipping_minimum, maximum_item_count, minimum_item_count, minimum_subtotal, name, no_coupons, no_free_shipping, no_realtime_charge, not_valid_when_coupon_present, pricing_tier_oid, realtime_percentage_discount, signup_notification, suppress_buysafe, suppress_mailing_list, tax_exempt, track_separately].hash
|
429
|
+
[allow_3rd_party_billing, allow_cod, allow_purchase_order, allow_quote_request, approval_notification, auto_approve_cod, auto_approve_purchase_order, default_on_wholesale_signup, default_percentage_discount, default_shipping_method_oid, default_tier, display_on_wholesale_signup, exclude_from_free_promotion, exempt_loyalty_rewards, exempt_shipping_handling_charge, free_shipping, free_shipping_minimum, maximum_item_count, minimum_item_count, minimum_subtotal, name, no_coupons, no_free_shipping, no_realtime_charge, not_valid_when_coupon_present, pricing_tier_oid, realtime_percentage_discount, restrict_to_distribution_center_oid, signup_notification, suppress_buysafe, suppress_mailing_list, tax_exempt, track_separately].hash
|
420
430
|
end
|
421
431
|
|
422
432
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -623,6 +623,7 @@ require 'ultracart_api/models/order_token_response'
|
|
623
623
|
require 'ultracart_api/models/order_tracking_number_detail'
|
624
624
|
require 'ultracart_api/models/order_tracking_number_details'
|
625
625
|
require 'ultracart_api/models/order_transactional_merchant_note'
|
626
|
+
require 'ultracart_api/models/order_utm'
|
626
627
|
require 'ultracart_api/models/orders_response'
|
627
628
|
require 'ultracart_api/models/permission'
|
628
629
|
require 'ultracart_api/models/point_of_sale_location'
|