ultracart_api 4.1.178 → 4.1.179
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +11 -2
- data/docs/SfvbApi.md +111 -0
- data/docs/SfvbRecording.md +60 -0
- data/docs/SfvbRecordingEvent.md +24 -0
- data/docs/SfvbRecordingEventsResponse.md +24 -0
- data/docs/SfvbRecordingPageView.md +42 -0
- data/docs/SfvbRecordingParameter.md +20 -0
- data/docs/SfvbRecordingResponse.md +18 -0
- data/lib/ultracart_api/api/sfvb_api.rb +146 -0
- data/lib/ultracart_api/models/sfvb_recording.rb +431 -0
- data/lib/ultracart_api/models/sfvb_recording_event.rb +252 -0
- data/lib/ultracart_api/models/sfvb_recording_events_response.rb +250 -0
- data/lib/ultracart_api/models/sfvb_recording_page_view.rb +344 -0
- data/lib/ultracart_api/models/sfvb_recording_parameter.rb +230 -0
- data/lib/ultracart_api/models/sfvb_recording_response.rb +219 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +6 -0
- metadata +14 -2
|
@@ -0,0 +1,250 @@
|
|
|
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 SfvbRecordingEventsResponse
|
|
18
|
+
# The page view's rrweb events as a JSON array in a string, the input an rrweb Replayer takes. Card number and security code fields are masked by the recorder, but other text the visitor typed can appear in it.
|
|
19
|
+
attr_accessor :events_json
|
|
20
|
+
|
|
21
|
+
# The rrweb version that recorded the events. Replay with the same version.
|
|
22
|
+
attr_accessor :rrweb_version
|
|
23
|
+
|
|
24
|
+
# The page view these events replay.
|
|
25
|
+
attr_accessor :screen_recording_page_view_uuid
|
|
26
|
+
|
|
27
|
+
# The recording the page view belongs to.
|
|
28
|
+
attr_accessor :screen_recording_uuid
|
|
29
|
+
|
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
31
|
+
def self.attribute_map
|
|
32
|
+
{
|
|
33
|
+
:'events_json' => :'events_json',
|
|
34
|
+
:'rrweb_version' => :'rrweb_version',
|
|
35
|
+
:'screen_recording_page_view_uuid' => :'screen_recording_page_view_uuid',
|
|
36
|
+
:'screen_recording_uuid' => :'screen_recording_uuid'
|
|
37
|
+
}
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
# Returns all the JSON keys this model knows about
|
|
41
|
+
def self.acceptable_attributes
|
|
42
|
+
attribute_map.values
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
# Attribute type mapping.
|
|
46
|
+
def self.openapi_types
|
|
47
|
+
{
|
|
48
|
+
:'events_json' => :'String',
|
|
49
|
+
:'rrweb_version' => :'String',
|
|
50
|
+
:'screen_recording_page_view_uuid' => :'String',
|
|
51
|
+
:'screen_recording_uuid' => :'String'
|
|
52
|
+
}
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# List of attributes with nullable: true
|
|
56
|
+
def self.openapi_nullable
|
|
57
|
+
Set.new([
|
|
58
|
+
])
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# Initializes the object
|
|
62
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
63
|
+
def initialize(attributes = {})
|
|
64
|
+
if (!attributes.is_a?(Hash))
|
|
65
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbRecordingEventsResponse` initialize method"
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
69
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
70
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
71
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbRecordingEventsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
72
|
+
end
|
|
73
|
+
h[k.to_sym] = v
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
if attributes.key?(:'events_json')
|
|
77
|
+
self.events_json = attributes[:'events_json']
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
if attributes.key?(:'rrweb_version')
|
|
81
|
+
self.rrweb_version = attributes[:'rrweb_version']
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
if attributes.key?(:'screen_recording_page_view_uuid')
|
|
85
|
+
self.screen_recording_page_view_uuid = attributes[:'screen_recording_page_view_uuid']
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
if attributes.key?(:'screen_recording_uuid')
|
|
89
|
+
self.screen_recording_uuid = attributes[:'screen_recording_uuid']
|
|
90
|
+
end
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
94
|
+
# @return Array for valid properties with the reasons
|
|
95
|
+
def list_invalid_properties
|
|
96
|
+
invalid_properties = Array.new
|
|
97
|
+
invalid_properties
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Check to see if the all the properties in the model are valid
|
|
101
|
+
# @return true if the model is valid
|
|
102
|
+
def valid?
|
|
103
|
+
true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Checks equality by comparing each attribute.
|
|
107
|
+
# @param [Object] Object to be compared
|
|
108
|
+
def ==(o)
|
|
109
|
+
return true if self.equal?(o)
|
|
110
|
+
self.class == o.class &&
|
|
111
|
+
events_json == o.events_json &&
|
|
112
|
+
rrweb_version == o.rrweb_version &&
|
|
113
|
+
screen_recording_page_view_uuid == o.screen_recording_page_view_uuid &&
|
|
114
|
+
screen_recording_uuid == o.screen_recording_uuid
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
# @see the `==` method
|
|
118
|
+
# @param [Object] Object to be compared
|
|
119
|
+
def eql?(o)
|
|
120
|
+
self == o
|
|
121
|
+
end
|
|
122
|
+
|
|
123
|
+
# Calculates hash code according to all attributes.
|
|
124
|
+
# @return [Integer] Hash code
|
|
125
|
+
def hash
|
|
126
|
+
[events_json, rrweb_version, screen_recording_page_view_uuid, screen_recording_uuid].hash
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# Builds the object from hash
|
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
131
|
+
# @return [Object] Returns the model itself
|
|
132
|
+
def self.build_from_hash(attributes)
|
|
133
|
+
new.build_from_hash(attributes)
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Builds the object from hash
|
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
138
|
+
# @return [Object] Returns the model itself
|
|
139
|
+
def build_from_hash(attributes)
|
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
|
141
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
142
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
143
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
144
|
+
self.send("#{key}=", nil)
|
|
145
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
146
|
+
# check to ensure the input is an array given that the attribute
|
|
147
|
+
# is documented as an array but the input is not
|
|
148
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
149
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
150
|
+
end
|
|
151
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
152
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
153
|
+
end
|
|
154
|
+
end
|
|
155
|
+
|
|
156
|
+
self
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
# Deserializes the data based on type
|
|
160
|
+
# @param string type Data type
|
|
161
|
+
# @param string value Value to be deserialized
|
|
162
|
+
# @return [Object] Deserialized data
|
|
163
|
+
def _deserialize(type, value)
|
|
164
|
+
case type.to_sym
|
|
165
|
+
when :Time
|
|
166
|
+
Time.parse(value)
|
|
167
|
+
when :Date
|
|
168
|
+
Date.parse(value)
|
|
169
|
+
when :String
|
|
170
|
+
value.to_s
|
|
171
|
+
when :Integer
|
|
172
|
+
value.to_i
|
|
173
|
+
when :Float
|
|
174
|
+
value.to_f
|
|
175
|
+
when :Boolean
|
|
176
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
177
|
+
true
|
|
178
|
+
else
|
|
179
|
+
false
|
|
180
|
+
end
|
|
181
|
+
when :Object
|
|
182
|
+
# generic object (usually a Hash), return directly
|
|
183
|
+
value
|
|
184
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
185
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
186
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
187
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
188
|
+
k_type = Regexp.last_match[:k_type]
|
|
189
|
+
v_type = Regexp.last_match[:v_type]
|
|
190
|
+
{}.tap do |hash|
|
|
191
|
+
value.each do |k, v|
|
|
192
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
193
|
+
end
|
|
194
|
+
end
|
|
195
|
+
else # model
|
|
196
|
+
# models (e.g. Pet) or oneOf
|
|
197
|
+
klass = UltracartClient.const_get(type)
|
|
198
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
# Returns the string representation of the object
|
|
203
|
+
# @return [String] String presentation of the object
|
|
204
|
+
def to_s
|
|
205
|
+
to_hash.to_s
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
|
210
|
+
def to_body
|
|
211
|
+
to_hash
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# Returns the object in the form of hash
|
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
|
216
|
+
def to_hash
|
|
217
|
+
hash = {}
|
|
218
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
219
|
+
value = self.send(attr)
|
|
220
|
+
if value.nil?
|
|
221
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
222
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
hash[param] = _to_hash(value)
|
|
226
|
+
end
|
|
227
|
+
hash
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Outputs non-array value in the form of hash
|
|
231
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
232
|
+
# @param [Object] value Any valid value
|
|
233
|
+
# @return [Hash] Returns the value in the form of hash
|
|
234
|
+
def _to_hash(value)
|
|
235
|
+
if value.is_a?(Array)
|
|
236
|
+
value.compact.map { |v| _to_hash(v) }
|
|
237
|
+
elsif value.is_a?(Hash)
|
|
238
|
+
{}.tap do |hash|
|
|
239
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
240
|
+
end
|
|
241
|
+
elsif value.respond_to? :to_hash
|
|
242
|
+
value.to_hash
|
|
243
|
+
else
|
|
244
|
+
value
|
|
245
|
+
end
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
end
|
|
@@ -0,0 +1,344 @@
|
|
|
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 SfvbRecordingPageView
|
|
18
|
+
# The host name of the address.
|
|
19
|
+
attr_accessor :domain
|
|
20
|
+
|
|
21
|
+
# Named events on this page view in time order, such as rage clicks and script errors.
|
|
22
|
+
attr_accessor :events
|
|
23
|
+
|
|
24
|
+
# When recording of this page view began, ISO-8601 in UTC.
|
|
25
|
+
attr_accessor :first_event_timestamp
|
|
26
|
+
|
|
27
|
+
# When recording of this page view ended, ISO-8601 in UTC.
|
|
28
|
+
attr_accessor :last_event_timestamp
|
|
29
|
+
|
|
30
|
+
# True when no replay events were stored for this page view.
|
|
31
|
+
attr_accessor :missing_events
|
|
32
|
+
|
|
33
|
+
# The query string parameters on the address.
|
|
34
|
+
attr_accessor :params
|
|
35
|
+
|
|
36
|
+
# The referring address, when there was one.
|
|
37
|
+
attr_accessor :referrer
|
|
38
|
+
|
|
39
|
+
# Identifies this page view when fetching its replay events.
|
|
40
|
+
attr_accessor :screen_recording_page_view_uuid
|
|
41
|
+
|
|
42
|
+
# Seconds the visitor spent on the page.
|
|
43
|
+
attr_accessor :time_on_page
|
|
44
|
+
|
|
45
|
+
# Milliseconds until DOMContentLoaded fired.
|
|
46
|
+
attr_accessor :timing_dom_content_loaded
|
|
47
|
+
|
|
48
|
+
# Milliseconds until the load event fired.
|
|
49
|
+
attr_accessor :timing_loaded
|
|
50
|
+
|
|
51
|
+
# True when the recorder stopped storing events part way through this page view.
|
|
52
|
+
attr_accessor :truncated_events
|
|
53
|
+
|
|
54
|
+
# The address the visitor viewed.
|
|
55
|
+
attr_accessor :url
|
|
56
|
+
|
|
57
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
58
|
+
def self.attribute_map
|
|
59
|
+
{
|
|
60
|
+
:'domain' => :'domain',
|
|
61
|
+
:'events' => :'events',
|
|
62
|
+
:'first_event_timestamp' => :'first_event_timestamp',
|
|
63
|
+
:'last_event_timestamp' => :'last_event_timestamp',
|
|
64
|
+
:'missing_events' => :'missing_events',
|
|
65
|
+
:'params' => :'params',
|
|
66
|
+
:'referrer' => :'referrer',
|
|
67
|
+
:'screen_recording_page_view_uuid' => :'screen_recording_page_view_uuid',
|
|
68
|
+
:'time_on_page' => :'time_on_page',
|
|
69
|
+
:'timing_dom_content_loaded' => :'timing_dom_content_loaded',
|
|
70
|
+
:'timing_loaded' => :'timing_loaded',
|
|
71
|
+
:'truncated_events' => :'truncated_events',
|
|
72
|
+
:'url' => :'url'
|
|
73
|
+
}
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
# Returns all the JSON keys this model knows about
|
|
77
|
+
def self.acceptable_attributes
|
|
78
|
+
attribute_map.values
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
# Attribute type mapping.
|
|
82
|
+
def self.openapi_types
|
|
83
|
+
{
|
|
84
|
+
:'domain' => :'String',
|
|
85
|
+
:'events' => :'Array<SfvbRecordingEvent>',
|
|
86
|
+
:'first_event_timestamp' => :'String',
|
|
87
|
+
:'last_event_timestamp' => :'String',
|
|
88
|
+
:'missing_events' => :'Boolean',
|
|
89
|
+
:'params' => :'Array<SfvbRecordingParameter>',
|
|
90
|
+
:'referrer' => :'String',
|
|
91
|
+
:'screen_recording_page_view_uuid' => :'String',
|
|
92
|
+
:'time_on_page' => :'Integer',
|
|
93
|
+
:'timing_dom_content_loaded' => :'Integer',
|
|
94
|
+
:'timing_loaded' => :'Integer',
|
|
95
|
+
:'truncated_events' => :'Boolean',
|
|
96
|
+
:'url' => :'String'
|
|
97
|
+
}
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# List of attributes with nullable: true
|
|
101
|
+
def self.openapi_nullable
|
|
102
|
+
Set.new([
|
|
103
|
+
])
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Initializes the object
|
|
107
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
108
|
+
def initialize(attributes = {})
|
|
109
|
+
if (!attributes.is_a?(Hash))
|
|
110
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::SfvbRecordingPageView` initialize method"
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
114
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
115
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
116
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::SfvbRecordingPageView`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
117
|
+
end
|
|
118
|
+
h[k.to_sym] = v
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
if attributes.key?(:'domain')
|
|
122
|
+
self.domain = attributes[:'domain']
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
if attributes.key?(:'events')
|
|
126
|
+
if (value = attributes[:'events']).is_a?(Array)
|
|
127
|
+
self.events = value
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
131
|
+
if attributes.key?(:'first_event_timestamp')
|
|
132
|
+
self.first_event_timestamp = attributes[:'first_event_timestamp']
|
|
133
|
+
end
|
|
134
|
+
|
|
135
|
+
if attributes.key?(:'last_event_timestamp')
|
|
136
|
+
self.last_event_timestamp = attributes[:'last_event_timestamp']
|
|
137
|
+
end
|
|
138
|
+
|
|
139
|
+
if attributes.key?(:'missing_events')
|
|
140
|
+
self.missing_events = attributes[:'missing_events']
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
if attributes.key?(:'params')
|
|
144
|
+
if (value = attributes[:'params']).is_a?(Array)
|
|
145
|
+
self.params = value
|
|
146
|
+
end
|
|
147
|
+
end
|
|
148
|
+
|
|
149
|
+
if attributes.key?(:'referrer')
|
|
150
|
+
self.referrer = attributes[:'referrer']
|
|
151
|
+
end
|
|
152
|
+
|
|
153
|
+
if attributes.key?(:'screen_recording_page_view_uuid')
|
|
154
|
+
self.screen_recording_page_view_uuid = attributes[:'screen_recording_page_view_uuid']
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
if attributes.key?(:'time_on_page')
|
|
158
|
+
self.time_on_page = attributes[:'time_on_page']
|
|
159
|
+
end
|
|
160
|
+
|
|
161
|
+
if attributes.key?(:'timing_dom_content_loaded')
|
|
162
|
+
self.timing_dom_content_loaded = attributes[:'timing_dom_content_loaded']
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
if attributes.key?(:'timing_loaded')
|
|
166
|
+
self.timing_loaded = attributes[:'timing_loaded']
|
|
167
|
+
end
|
|
168
|
+
|
|
169
|
+
if attributes.key?(:'truncated_events')
|
|
170
|
+
self.truncated_events = attributes[:'truncated_events']
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
if attributes.key?(:'url')
|
|
174
|
+
self.url = attributes[:'url']
|
|
175
|
+
end
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
179
|
+
# @return Array for valid properties with the reasons
|
|
180
|
+
def list_invalid_properties
|
|
181
|
+
invalid_properties = Array.new
|
|
182
|
+
invalid_properties
|
|
183
|
+
end
|
|
184
|
+
|
|
185
|
+
# Check to see if the all the properties in the model are valid
|
|
186
|
+
# @return true if the model is valid
|
|
187
|
+
def valid?
|
|
188
|
+
true
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
# Checks equality by comparing each attribute.
|
|
192
|
+
# @param [Object] Object to be compared
|
|
193
|
+
def ==(o)
|
|
194
|
+
return true if self.equal?(o)
|
|
195
|
+
self.class == o.class &&
|
|
196
|
+
domain == o.domain &&
|
|
197
|
+
events == o.events &&
|
|
198
|
+
first_event_timestamp == o.first_event_timestamp &&
|
|
199
|
+
last_event_timestamp == o.last_event_timestamp &&
|
|
200
|
+
missing_events == o.missing_events &&
|
|
201
|
+
params == o.params &&
|
|
202
|
+
referrer == o.referrer &&
|
|
203
|
+
screen_recording_page_view_uuid == o.screen_recording_page_view_uuid &&
|
|
204
|
+
time_on_page == o.time_on_page &&
|
|
205
|
+
timing_dom_content_loaded == o.timing_dom_content_loaded &&
|
|
206
|
+
timing_loaded == o.timing_loaded &&
|
|
207
|
+
truncated_events == o.truncated_events &&
|
|
208
|
+
url == o.url
|
|
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 [Integer] Hash code
|
|
219
|
+
def hash
|
|
220
|
+
[domain, events, first_event_timestamp, last_event_timestamp, missing_events, params, referrer, screen_recording_page_view_uuid, time_on_page, timing_dom_content_loaded, timing_loaded, truncated_events, url].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 self.build_from_hash(attributes)
|
|
227
|
+
new.build_from_hash(attributes)
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
# Builds the object from hash
|
|
231
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
232
|
+
# @return [Object] Returns the model itself
|
|
233
|
+
def build_from_hash(attributes)
|
|
234
|
+
return nil unless attributes.is_a?(Hash)
|
|
235
|
+
attributes = attributes.transform_keys(&:to_sym)
|
|
236
|
+
self.class.openapi_types.each_pair do |key, type|
|
|
237
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
|
238
|
+
self.send("#{key}=", nil)
|
|
239
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
240
|
+
# check to ensure the input is an array given that the attribute
|
|
241
|
+
# is documented as an array but the input is not
|
|
242
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
243
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
244
|
+
end
|
|
245
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
246
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
247
|
+
end
|
|
248
|
+
end
|
|
249
|
+
|
|
250
|
+
self
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
# Deserializes the data based on type
|
|
254
|
+
# @param string type Data type
|
|
255
|
+
# @param string value Value to be deserialized
|
|
256
|
+
# @return [Object] Deserialized data
|
|
257
|
+
def _deserialize(type, value)
|
|
258
|
+
case type.to_sym
|
|
259
|
+
when :Time
|
|
260
|
+
Time.parse(value)
|
|
261
|
+
when :Date
|
|
262
|
+
Date.parse(value)
|
|
263
|
+
when :String
|
|
264
|
+
value.to_s
|
|
265
|
+
when :Integer
|
|
266
|
+
value.to_i
|
|
267
|
+
when :Float
|
|
268
|
+
value.to_f
|
|
269
|
+
when :Boolean
|
|
270
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
271
|
+
true
|
|
272
|
+
else
|
|
273
|
+
false
|
|
274
|
+
end
|
|
275
|
+
when :Object
|
|
276
|
+
# generic object (usually a Hash), return directly
|
|
277
|
+
value
|
|
278
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
279
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
280
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
281
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
282
|
+
k_type = Regexp.last_match[:k_type]
|
|
283
|
+
v_type = Regexp.last_match[:v_type]
|
|
284
|
+
{}.tap do |hash|
|
|
285
|
+
value.each do |k, v|
|
|
286
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
287
|
+
end
|
|
288
|
+
end
|
|
289
|
+
else # model
|
|
290
|
+
# models (e.g. Pet) or oneOf
|
|
291
|
+
klass = UltracartClient.const_get(type)
|
|
292
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
293
|
+
end
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Returns the string representation of the object
|
|
297
|
+
# @return [String] String presentation of the object
|
|
298
|
+
def to_s
|
|
299
|
+
to_hash.to_s
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
303
|
+
# @return [Hash] Returns the object in the form of hash
|
|
304
|
+
def to_body
|
|
305
|
+
to_hash
|
|
306
|
+
end
|
|
307
|
+
|
|
308
|
+
# Returns the object in the form of hash
|
|
309
|
+
# @return [Hash] Returns the object in the form of hash
|
|
310
|
+
def to_hash
|
|
311
|
+
hash = {}
|
|
312
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
313
|
+
value = self.send(attr)
|
|
314
|
+
if value.nil?
|
|
315
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
|
316
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
hash[param] = _to_hash(value)
|
|
320
|
+
end
|
|
321
|
+
hash
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
# Outputs non-array value in the form of hash
|
|
325
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
326
|
+
# @param [Object] value Any valid value
|
|
327
|
+
# @return [Hash] Returns the value in the form of hash
|
|
328
|
+
def _to_hash(value)
|
|
329
|
+
if value.is_a?(Array)
|
|
330
|
+
value.compact.map { |v| _to_hash(v) }
|
|
331
|
+
elsif value.is_a?(Hash)
|
|
332
|
+
{}.tap do |hash|
|
|
333
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
334
|
+
end
|
|
335
|
+
elsif value.respond_to? :to_hash
|
|
336
|
+
value.to_hash
|
|
337
|
+
else
|
|
338
|
+
value
|
|
339
|
+
end
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
end
|