ultracart_api 3.10.68 → 3.10.70
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +12 -4
- data/docs/ConversationApi.md +51 -0
- data/docs/ConversationWebchatContext.md +12 -0
- data/docs/CouponPercentOffMsrpItems.md +2 -0
- data/docs/HitPageView.md +18 -0
- data/docs/HitPageViewMetaData.md +9 -0
- data/docs/HitSessionStart.md +24 -0
- data/docs/HitSessionUtm.md +22 -0
- data/lib/ultracart_api/api/conversation_api.rb +55 -0
- data/lib/ultracart_api/models/conversation_webchat_context.rb +222 -0
- data/lib/ultracart_api/models/conversation_websocket_message.rb +2 -2
- data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +24 -4
- data/lib/ultracart_api/models/hit_page_view.rb +276 -0
- data/lib/ultracart_api/models/hit_page_view_meta_data.rb +193 -0
- data/lib/ultracart_api/models/hit_session_start.rb +328 -0
- data/lib/ultracart_api/models/hit_session_utm.rb +310 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +5 -0
- metadata +11 -1
@@ -0,0 +1,328 @@
|
|
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 HitSessionStart
|
17
|
+
attr_accessor :bot
|
18
|
+
|
19
|
+
attr_accessor :bounce
|
20
|
+
|
21
|
+
attr_accessor :channel
|
22
|
+
|
23
|
+
attr_accessor :device_switch_detected
|
24
|
+
|
25
|
+
attr_accessor :fake_bot
|
26
|
+
|
27
|
+
attr_accessor :geolocation_country
|
28
|
+
|
29
|
+
attr_accessor :geolocation_latitude
|
30
|
+
|
31
|
+
attr_accessor :geolocation_longitude
|
32
|
+
|
33
|
+
attr_accessor :geolocation_province
|
34
|
+
|
35
|
+
attr_accessor :no_cookie_support
|
36
|
+
|
37
|
+
attr_accessor :prefetch
|
38
|
+
|
39
|
+
attr_accessor :referrer
|
40
|
+
|
41
|
+
attr_accessor :screen_height
|
42
|
+
|
43
|
+
attr_accessor :screen_width
|
44
|
+
|
45
|
+
attr_accessor :time_on_site
|
46
|
+
|
47
|
+
attr_accessor :user_agent
|
48
|
+
|
49
|
+
attr_accessor :user_ip
|
50
|
+
|
51
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
52
|
+
def self.attribute_map
|
53
|
+
{
|
54
|
+
:'bot' => :'bot',
|
55
|
+
:'bounce' => :'bounce',
|
56
|
+
:'channel' => :'channel',
|
57
|
+
:'device_switch_detected' => :'device_switch_detected',
|
58
|
+
:'fake_bot' => :'fake_bot',
|
59
|
+
:'geolocation_country' => :'geolocation_country',
|
60
|
+
:'geolocation_latitude' => :'geolocation_latitude',
|
61
|
+
:'geolocation_longitude' => :'geolocation_longitude',
|
62
|
+
:'geolocation_province' => :'geolocation_province',
|
63
|
+
:'no_cookie_support' => :'no_cookie_support',
|
64
|
+
:'prefetch' => :'prefetch',
|
65
|
+
:'referrer' => :'referrer',
|
66
|
+
:'screen_height' => :'screen_height',
|
67
|
+
:'screen_width' => :'screen_width',
|
68
|
+
:'time_on_site' => :'time_on_Site',
|
69
|
+
:'user_agent' => :'user_agent',
|
70
|
+
:'user_ip' => :'user_ip'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Attribute type mapping.
|
75
|
+
def self.swagger_types
|
76
|
+
{
|
77
|
+
:'bot' => :'BOOLEAN',
|
78
|
+
:'bounce' => :'BOOLEAN',
|
79
|
+
:'channel' => :'String',
|
80
|
+
:'device_switch_detected' => :'BOOLEAN',
|
81
|
+
:'fake_bot' => :'BOOLEAN',
|
82
|
+
:'geolocation_country' => :'String',
|
83
|
+
:'geolocation_latitude' => :'Float',
|
84
|
+
:'geolocation_longitude' => :'Float',
|
85
|
+
:'geolocation_province' => :'String',
|
86
|
+
:'no_cookie_support' => :'BOOLEAN',
|
87
|
+
:'prefetch' => :'BOOLEAN',
|
88
|
+
:'referrer' => :'String',
|
89
|
+
:'screen_height' => :'Integer',
|
90
|
+
:'screen_width' => :'Integer',
|
91
|
+
:'time_on_site' => :'Float',
|
92
|
+
:'user_agent' => :'String',
|
93
|
+
:'user_ip' => :'String'
|
94
|
+
}
|
95
|
+
end
|
96
|
+
|
97
|
+
# Initializes the object
|
98
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
99
|
+
def initialize(attributes = {})
|
100
|
+
return unless attributes.is_a?(Hash)
|
101
|
+
|
102
|
+
# convert string to symbol for hash key
|
103
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
104
|
+
|
105
|
+
if attributes.has_key?(:'bot')
|
106
|
+
self.bot = attributes[:'bot']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'bounce')
|
110
|
+
self.bounce = attributes[:'bounce']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'channel')
|
114
|
+
self.channel = attributes[:'channel']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'device_switch_detected')
|
118
|
+
self.device_switch_detected = attributes[:'device_switch_detected']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'fake_bot')
|
122
|
+
self.fake_bot = attributes[:'fake_bot']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.has_key?(:'geolocation_country')
|
126
|
+
self.geolocation_country = attributes[:'geolocation_country']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'geolocation_latitude')
|
130
|
+
self.geolocation_latitude = attributes[:'geolocation_latitude']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'geolocation_longitude')
|
134
|
+
self.geolocation_longitude = attributes[:'geolocation_longitude']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'geolocation_province')
|
138
|
+
self.geolocation_province = attributes[:'geolocation_province']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'no_cookie_support')
|
142
|
+
self.no_cookie_support = attributes[:'no_cookie_support']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'prefetch')
|
146
|
+
self.prefetch = attributes[:'prefetch']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'referrer')
|
150
|
+
self.referrer = attributes[:'referrer']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'screen_height')
|
154
|
+
self.screen_height = attributes[:'screen_height']
|
155
|
+
end
|
156
|
+
|
157
|
+
if attributes.has_key?(:'screen_width')
|
158
|
+
self.screen_width = attributes[:'screen_width']
|
159
|
+
end
|
160
|
+
|
161
|
+
if attributes.has_key?(:'time_on_Site')
|
162
|
+
self.time_on_site = attributes[:'time_on_Site']
|
163
|
+
end
|
164
|
+
|
165
|
+
if attributes.has_key?(:'user_agent')
|
166
|
+
self.user_agent = attributes[:'user_agent']
|
167
|
+
end
|
168
|
+
|
169
|
+
if attributes.has_key?(:'user_ip')
|
170
|
+
self.user_ip = attributes[:'user_ip']
|
171
|
+
end
|
172
|
+
end
|
173
|
+
|
174
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
175
|
+
# @return Array for valid properties with the reasons
|
176
|
+
def list_invalid_properties
|
177
|
+
invalid_properties = Array.new
|
178
|
+
invalid_properties
|
179
|
+
end
|
180
|
+
|
181
|
+
# Check to see if the all the properties in the model are valid
|
182
|
+
# @return true if the model is valid
|
183
|
+
def valid?
|
184
|
+
true
|
185
|
+
end
|
186
|
+
|
187
|
+
# Checks equality by comparing each attribute.
|
188
|
+
# @param [Object] Object to be compared
|
189
|
+
def ==(o)
|
190
|
+
return true if self.equal?(o)
|
191
|
+
self.class == o.class &&
|
192
|
+
bot == o.bot &&
|
193
|
+
bounce == o.bounce &&
|
194
|
+
channel == o.channel &&
|
195
|
+
device_switch_detected == o.device_switch_detected &&
|
196
|
+
fake_bot == o.fake_bot &&
|
197
|
+
geolocation_country == o.geolocation_country &&
|
198
|
+
geolocation_latitude == o.geolocation_latitude &&
|
199
|
+
geolocation_longitude == o.geolocation_longitude &&
|
200
|
+
geolocation_province == o.geolocation_province &&
|
201
|
+
no_cookie_support == o.no_cookie_support &&
|
202
|
+
prefetch == o.prefetch &&
|
203
|
+
referrer == o.referrer &&
|
204
|
+
screen_height == o.screen_height &&
|
205
|
+
screen_width == o.screen_width &&
|
206
|
+
time_on_site == o.time_on_site &&
|
207
|
+
user_agent == o.user_agent &&
|
208
|
+
user_ip == o.user_ip
|
209
|
+
end
|
210
|
+
|
211
|
+
# @see the `==` method
|
212
|
+
# @param [Object] Object to be compared
|
213
|
+
def eql?(o)
|
214
|
+
self == o
|
215
|
+
end
|
216
|
+
|
217
|
+
# Calculates hash code according to all attributes.
|
218
|
+
# @return [Fixnum] Hash code
|
219
|
+
def hash
|
220
|
+
[bot, bounce, channel, device_switch_detected, fake_bot, geolocation_country, geolocation_latitude, geolocation_longitude, geolocation_province, no_cookie_support, prefetch, referrer, screen_height, screen_width, time_on_site, user_agent, user_ip].hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Builds the object from hash
|
224
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
225
|
+
# @return [Object] Returns the model itself
|
226
|
+
def build_from_hash(attributes)
|
227
|
+
return nil unless attributes.is_a?(Hash)
|
228
|
+
self.class.swagger_types.each_pair do |key, type|
|
229
|
+
if type =~ /\AArray<(.*)>/i
|
230
|
+
# check to ensure the input is an array given that the attribute
|
231
|
+
# is documented as an array but the input is not
|
232
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
233
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
234
|
+
end
|
235
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
236
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
237
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
238
|
+
end
|
239
|
+
|
240
|
+
self
|
241
|
+
end
|
242
|
+
|
243
|
+
# Deserializes the data based on type
|
244
|
+
# @param string type Data type
|
245
|
+
# @param string value Value to be deserialized
|
246
|
+
# @return [Object] Deserialized data
|
247
|
+
def _deserialize(type, value)
|
248
|
+
case type.to_sym
|
249
|
+
when :DateTime
|
250
|
+
DateTime.parse(value)
|
251
|
+
when :Date
|
252
|
+
Date.parse(value)
|
253
|
+
when :String
|
254
|
+
value.to_s
|
255
|
+
when :Integer
|
256
|
+
value.to_i
|
257
|
+
when :Float
|
258
|
+
value.to_f
|
259
|
+
when :BOOLEAN
|
260
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
261
|
+
true
|
262
|
+
else
|
263
|
+
false
|
264
|
+
end
|
265
|
+
when :Object
|
266
|
+
# generic object (usually a Hash), return directly
|
267
|
+
value
|
268
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
269
|
+
inner_type = Regexp.last_match[:inner_type]
|
270
|
+
value.map { |v| _deserialize(inner_type, v) }
|
271
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
272
|
+
k_type = Regexp.last_match[:k_type]
|
273
|
+
v_type = Regexp.last_match[:v_type]
|
274
|
+
{}.tap do |hash|
|
275
|
+
value.each do |k, v|
|
276
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
277
|
+
end
|
278
|
+
end
|
279
|
+
else # model
|
280
|
+
temp_model = UltracartClient.const_get(type).new
|
281
|
+
temp_model.build_from_hash(value)
|
282
|
+
end
|
283
|
+
end
|
284
|
+
|
285
|
+
# Returns the string representation of the object
|
286
|
+
# @return [String] String presentation of the object
|
287
|
+
def to_s
|
288
|
+
to_hash.to_s
|
289
|
+
end
|
290
|
+
|
291
|
+
# to_body is an alias to to_hash (backward compatibility)
|
292
|
+
# @return [Hash] Returns the object in the form of hash
|
293
|
+
def to_body
|
294
|
+
to_hash
|
295
|
+
end
|
296
|
+
|
297
|
+
# Returns the object in the form of hash
|
298
|
+
# @return [Hash] Returns the object in the form of hash
|
299
|
+
def to_hash
|
300
|
+
hash = {}
|
301
|
+
self.class.attribute_map.each_pair do |attr, param|
|
302
|
+
value = self.send(attr)
|
303
|
+
next if value.nil?
|
304
|
+
hash[param] = _to_hash(value)
|
305
|
+
end
|
306
|
+
hash
|
307
|
+
end
|
308
|
+
|
309
|
+
# Outputs non-array value in the form of hash
|
310
|
+
# For object, use to_hash. Otherwise, just return the value
|
311
|
+
# @param [Object] value Any valid value
|
312
|
+
# @return [Hash] Returns the value in the form of hash
|
313
|
+
def _to_hash(value)
|
314
|
+
if value.is_a?(Array)
|
315
|
+
value.compact.map { |v| _to_hash(v) }
|
316
|
+
elsif value.is_a?(Hash)
|
317
|
+
{}.tap do |hash|
|
318
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
319
|
+
end
|
320
|
+
elsif value.respond_to? :to_hash
|
321
|
+
value.to_hash
|
322
|
+
else
|
323
|
+
value
|
324
|
+
end
|
325
|
+
end
|
326
|
+
|
327
|
+
end
|
328
|
+
end
|
@@ -0,0 +1,310 @@
|
|
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 HitSessionUtm
|
17
|
+
attr_accessor :fb_ad_id
|
18
|
+
|
19
|
+
attr_accessor :fbclid
|
20
|
+
|
21
|
+
attr_accessor :gbraid
|
22
|
+
|
23
|
+
attr_accessor :gclid
|
24
|
+
|
25
|
+
attr_accessor :msclkid
|
26
|
+
|
27
|
+
attr_accessor :ttclid
|
28
|
+
|
29
|
+
attr_accessor :uc_message_id
|
30
|
+
|
31
|
+
attr_accessor :utm_campaign
|
32
|
+
|
33
|
+
attr_accessor :utm_content
|
34
|
+
|
35
|
+
attr_accessor :utm_id
|
36
|
+
|
37
|
+
attr_accessor :utm_medium
|
38
|
+
|
39
|
+
attr_accessor :utm_source
|
40
|
+
|
41
|
+
attr_accessor :utm_term
|
42
|
+
|
43
|
+
attr_accessor :vmcid
|
44
|
+
|
45
|
+
attr_accessor :wbraid
|
46
|
+
|
47
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
48
|
+
def self.attribute_map
|
49
|
+
{
|
50
|
+
:'fb_ad_id' => :'fb_ad_id',
|
51
|
+
:'fbclid' => :'fbclid',
|
52
|
+
:'gbraid' => :'gbraid',
|
53
|
+
:'gclid' => :'gclid',
|
54
|
+
:'msclkid' => :'msclkid',
|
55
|
+
:'ttclid' => :'ttclid',
|
56
|
+
:'uc_message_id' => :'uc_message_id',
|
57
|
+
:'utm_campaign' => :'utm_campaign',
|
58
|
+
:'utm_content' => :'utm_content',
|
59
|
+
:'utm_id' => :'utm_id',
|
60
|
+
:'utm_medium' => :'utm_medium',
|
61
|
+
:'utm_source' => :'utm_source',
|
62
|
+
:'utm_term' => :'utm_term',
|
63
|
+
:'vmcid' => :'vmcid',
|
64
|
+
:'wbraid' => :'wbraid'
|
65
|
+
}
|
66
|
+
end
|
67
|
+
|
68
|
+
# Attribute type mapping.
|
69
|
+
def self.swagger_types
|
70
|
+
{
|
71
|
+
:'fb_ad_id' => :'String',
|
72
|
+
:'fbclid' => :'String',
|
73
|
+
:'gbraid' => :'String',
|
74
|
+
:'gclid' => :'String',
|
75
|
+
:'msclkid' => :'String',
|
76
|
+
:'ttclid' => :'String',
|
77
|
+
:'uc_message_id' => :'String',
|
78
|
+
:'utm_campaign' => :'String',
|
79
|
+
:'utm_content' => :'String',
|
80
|
+
:'utm_id' => :'String',
|
81
|
+
:'utm_medium' => :'String',
|
82
|
+
:'utm_source' => :'String',
|
83
|
+
:'utm_term' => :'String',
|
84
|
+
:'vmcid' => :'String',
|
85
|
+
:'wbraid' => :'String'
|
86
|
+
}
|
87
|
+
end
|
88
|
+
|
89
|
+
# Initializes the object
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
91
|
+
def initialize(attributes = {})
|
92
|
+
return unless attributes.is_a?(Hash)
|
93
|
+
|
94
|
+
# convert string to symbol for hash key
|
95
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
96
|
+
|
97
|
+
if attributes.has_key?(:'fb_ad_id')
|
98
|
+
self.fb_ad_id = attributes[:'fb_ad_id']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes.has_key?(:'fbclid')
|
102
|
+
self.fbclid = attributes[:'fbclid']
|
103
|
+
end
|
104
|
+
|
105
|
+
if attributes.has_key?(:'gbraid')
|
106
|
+
self.gbraid = attributes[:'gbraid']
|
107
|
+
end
|
108
|
+
|
109
|
+
if attributes.has_key?(:'gclid')
|
110
|
+
self.gclid = attributes[:'gclid']
|
111
|
+
end
|
112
|
+
|
113
|
+
if attributes.has_key?(:'msclkid')
|
114
|
+
self.msclkid = attributes[:'msclkid']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.has_key?(:'ttclid')
|
118
|
+
self.ttclid = attributes[:'ttclid']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.has_key?(:'uc_message_id')
|
122
|
+
self.uc_message_id = attributes[:'uc_message_id']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.has_key?(:'utm_campaign')
|
126
|
+
self.utm_campaign = attributes[:'utm_campaign']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.has_key?(:'utm_content')
|
130
|
+
self.utm_content = attributes[:'utm_content']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.has_key?(:'utm_id')
|
134
|
+
self.utm_id = attributes[:'utm_id']
|
135
|
+
end
|
136
|
+
|
137
|
+
if attributes.has_key?(:'utm_medium')
|
138
|
+
self.utm_medium = attributes[:'utm_medium']
|
139
|
+
end
|
140
|
+
|
141
|
+
if attributes.has_key?(:'utm_source')
|
142
|
+
self.utm_source = attributes[:'utm_source']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes.has_key?(:'utm_term')
|
146
|
+
self.utm_term = attributes[:'utm_term']
|
147
|
+
end
|
148
|
+
|
149
|
+
if attributes.has_key?(:'vmcid')
|
150
|
+
self.vmcid = attributes[:'vmcid']
|
151
|
+
end
|
152
|
+
|
153
|
+
if attributes.has_key?(:'wbraid')
|
154
|
+
self.wbraid = attributes[:'wbraid']
|
155
|
+
end
|
156
|
+
end
|
157
|
+
|
158
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
159
|
+
# @return Array for valid properties with the reasons
|
160
|
+
def list_invalid_properties
|
161
|
+
invalid_properties = Array.new
|
162
|
+
invalid_properties
|
163
|
+
end
|
164
|
+
|
165
|
+
# Check to see if the all the properties in the model are valid
|
166
|
+
# @return true if the model is valid
|
167
|
+
def valid?
|
168
|
+
true
|
169
|
+
end
|
170
|
+
|
171
|
+
# Checks equality by comparing each attribute.
|
172
|
+
# @param [Object] Object to be compared
|
173
|
+
def ==(o)
|
174
|
+
return true if self.equal?(o)
|
175
|
+
self.class == o.class &&
|
176
|
+
fb_ad_id == o.fb_ad_id &&
|
177
|
+
fbclid == o.fbclid &&
|
178
|
+
gbraid == o.gbraid &&
|
179
|
+
gclid == o.gclid &&
|
180
|
+
msclkid == o.msclkid &&
|
181
|
+
ttclid == o.ttclid &&
|
182
|
+
uc_message_id == o.uc_message_id &&
|
183
|
+
utm_campaign == o.utm_campaign &&
|
184
|
+
utm_content == o.utm_content &&
|
185
|
+
utm_id == o.utm_id &&
|
186
|
+
utm_medium == o.utm_medium &&
|
187
|
+
utm_source == o.utm_source &&
|
188
|
+
utm_term == o.utm_term &&
|
189
|
+
vmcid == o.vmcid &&
|
190
|
+
wbraid == o.wbraid
|
191
|
+
end
|
192
|
+
|
193
|
+
# @see the `==` method
|
194
|
+
# @param [Object] Object to be compared
|
195
|
+
def eql?(o)
|
196
|
+
self == o
|
197
|
+
end
|
198
|
+
|
199
|
+
# Calculates hash code according to all attributes.
|
200
|
+
# @return [Fixnum] Hash code
|
201
|
+
def hash
|
202
|
+
[fb_ad_id, fbclid, gbraid, gclid, msclkid, ttclid, uc_message_id, utm_campaign, utm_content, utm_id, utm_medium, utm_source, utm_term, vmcid, wbraid].hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Builds the object from hash
|
206
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
207
|
+
# @return [Object] Returns the model itself
|
208
|
+
def build_from_hash(attributes)
|
209
|
+
return nil unless attributes.is_a?(Hash)
|
210
|
+
self.class.swagger_types.each_pair do |key, type|
|
211
|
+
if type =~ /\AArray<(.*)>/i
|
212
|
+
# check to ensure the input is an array given that the attribute
|
213
|
+
# is documented as an array but the input is not
|
214
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
215
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
216
|
+
end
|
217
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
218
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
219
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
220
|
+
end
|
221
|
+
|
222
|
+
self
|
223
|
+
end
|
224
|
+
|
225
|
+
# Deserializes the data based on type
|
226
|
+
# @param string type Data type
|
227
|
+
# @param string value Value to be deserialized
|
228
|
+
# @return [Object] Deserialized data
|
229
|
+
def _deserialize(type, value)
|
230
|
+
case type.to_sym
|
231
|
+
when :DateTime
|
232
|
+
DateTime.parse(value)
|
233
|
+
when :Date
|
234
|
+
Date.parse(value)
|
235
|
+
when :String
|
236
|
+
value.to_s
|
237
|
+
when :Integer
|
238
|
+
value.to_i
|
239
|
+
when :Float
|
240
|
+
value.to_f
|
241
|
+
when :BOOLEAN
|
242
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
243
|
+
true
|
244
|
+
else
|
245
|
+
false
|
246
|
+
end
|
247
|
+
when :Object
|
248
|
+
# generic object (usually a Hash), return directly
|
249
|
+
value
|
250
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
251
|
+
inner_type = Regexp.last_match[:inner_type]
|
252
|
+
value.map { |v| _deserialize(inner_type, v) }
|
253
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
254
|
+
k_type = Regexp.last_match[:k_type]
|
255
|
+
v_type = Regexp.last_match[:v_type]
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each do |k, v|
|
258
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
else # model
|
262
|
+
temp_model = UltracartClient.const_get(type).new
|
263
|
+
temp_model.build_from_hash(value)
|
264
|
+
end
|
265
|
+
end
|
266
|
+
|
267
|
+
# Returns the string representation of the object
|
268
|
+
# @return [String] String presentation of the object
|
269
|
+
def to_s
|
270
|
+
to_hash.to_s
|
271
|
+
end
|
272
|
+
|
273
|
+
# to_body is an alias to to_hash (backward compatibility)
|
274
|
+
# @return [Hash] Returns the object in the form of hash
|
275
|
+
def to_body
|
276
|
+
to_hash
|
277
|
+
end
|
278
|
+
|
279
|
+
# Returns the object in the form of hash
|
280
|
+
# @return [Hash] Returns the object in the form of hash
|
281
|
+
def to_hash
|
282
|
+
hash = {}
|
283
|
+
self.class.attribute_map.each_pair do |attr, param|
|
284
|
+
value = self.send(attr)
|
285
|
+
next if value.nil?
|
286
|
+
hash[param] = _to_hash(value)
|
287
|
+
end
|
288
|
+
hash
|
289
|
+
end
|
290
|
+
|
291
|
+
# Outputs non-array value in the form of hash
|
292
|
+
# For object, use to_hash. Otherwise, just return the value
|
293
|
+
# @param [Object] value Any valid value
|
294
|
+
# @return [Hash] Returns the value in the form of hash
|
295
|
+
def _to_hash(value)
|
296
|
+
if value.is_a?(Array)
|
297
|
+
value.compact.map { |v| _to_hash(v) }
|
298
|
+
elsif value.is_a?(Hash)
|
299
|
+
{}.tap do |hash|
|
300
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
301
|
+
end
|
302
|
+
elsif value.respond_to? :to_hash
|
303
|
+
value.to_hash
|
304
|
+
else
|
305
|
+
value
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
end
|
310
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -155,6 +155,7 @@ require 'ultracart_api/models/conversation_start_request'
|
|
155
155
|
require 'ultracart_api/models/conversation_start_response'
|
156
156
|
require 'ultracart_api/models/conversation_summary'
|
157
157
|
require 'ultracart_api/models/conversation_twilio_account'
|
158
|
+
require 'ultracart_api/models/conversation_webchat_context'
|
158
159
|
require 'ultracart_api/models/conversation_webchat_queue_status'
|
159
160
|
require 'ultracart_api/models/conversation_webchat_queue_status_agent'
|
160
161
|
require 'ultracart_api/models/conversation_webchat_queue_status_queue_entry'
|
@@ -407,6 +408,10 @@ require 'ultracart_api/models/group_response'
|
|
407
408
|
require 'ultracart_api/models/group_user_membership'
|
408
409
|
require 'ultracart_api/models/groups_response'
|
409
410
|
require 'ultracart_api/models/http_header'
|
411
|
+
require 'ultracart_api/models/hit_page_view'
|
412
|
+
require 'ultracart_api/models/hit_page_view_meta_data'
|
413
|
+
require 'ultracart_api/models/hit_session_start'
|
414
|
+
require 'ultracart_api/models/hit_session_utm'
|
410
415
|
require 'ultracart_api/models/integration_log'
|
411
416
|
require 'ultracart_api/models/integration_log_file'
|
412
417
|
require 'ultracart_api/models/integration_log_log'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.10.
|
4
|
+
version: 3.10.70
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -365,6 +365,7 @@ files:
|
|
365
365
|
- docs/ConversationStartResponse.md
|
366
366
|
- docs/ConversationSummary.md
|
367
367
|
- docs/ConversationTwilioAccount.md
|
368
|
+
- docs/ConversationWebchatContext.md
|
368
369
|
- docs/ConversationWebchatQueueStatus.md
|
369
370
|
- docs/ConversationWebchatQueueStatusAgent.md
|
370
371
|
- docs/ConversationWebchatQueueStatusQueueEntry.md
|
@@ -621,6 +622,10 @@ files:
|
|
621
622
|
- docs/GroupUserMembership.md
|
622
623
|
- docs/GroupsResponse.md
|
623
624
|
- docs/HTTPHeader.md
|
625
|
+
- docs/HitPageView.md
|
626
|
+
- docs/HitPageViewMetaData.md
|
627
|
+
- docs/HitSessionStart.md
|
628
|
+
- docs/HitSessionUtm.md
|
624
629
|
- docs/IntegrationLog.md
|
625
630
|
- docs/IntegrationLogApi.md
|
626
631
|
- docs/IntegrationLogFile.md
|
@@ -1088,6 +1093,7 @@ files:
|
|
1088
1093
|
- lib/ultracart_api/models/conversation_start_response.rb
|
1089
1094
|
- lib/ultracart_api/models/conversation_summary.rb
|
1090
1095
|
- lib/ultracart_api/models/conversation_twilio_account.rb
|
1096
|
+
- lib/ultracart_api/models/conversation_webchat_context.rb
|
1091
1097
|
- lib/ultracart_api/models/conversation_webchat_queue_status.rb
|
1092
1098
|
- lib/ultracart_api/models/conversation_webchat_queue_status_agent.rb
|
1093
1099
|
- lib/ultracart_api/models/conversation_webchat_queue_status_queue_entry.rb
|
@@ -1339,6 +1345,10 @@ files:
|
|
1339
1345
|
- lib/ultracart_api/models/group_response.rb
|
1340
1346
|
- lib/ultracart_api/models/group_user_membership.rb
|
1341
1347
|
- lib/ultracart_api/models/groups_response.rb
|
1348
|
+
- lib/ultracart_api/models/hit_page_view.rb
|
1349
|
+
- lib/ultracart_api/models/hit_page_view_meta_data.rb
|
1350
|
+
- lib/ultracart_api/models/hit_session_start.rb
|
1351
|
+
- lib/ultracart_api/models/hit_session_utm.rb
|
1342
1352
|
- lib/ultracart_api/models/http_header.rb
|
1343
1353
|
- lib/ultracart_api/models/integration_log.rb
|
1344
1354
|
- lib/ultracart_api/models/integration_log_file.rb
|