ultracart_api 3.1.16 → 3.1.40

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.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -4
  3. data/docs/Coupon.md +1 -0
  4. data/docs/CouponPercentOffMsrpItems.md +11 -0
  5. data/docs/CustomerLoyalty.md +1 -0
  6. data/docs/EmailCampaign.md +2 -1
  7. data/docs/EmailFlow.md +2 -1
  8. data/docs/LibraryItemAttribute.md +0 -1
  9. data/docs/OrderApi.md +4 -0
  10. data/docs/OrderProcessPaymentRequest.md +1 -0
  11. data/docs/OrderQuery.md +3 -1
  12. data/docs/ScreenRecording.md +13 -0
  13. data/docs/ScreenRecordingAdPlatform.md +13 -0
  14. data/docs/ScreenRecordingFilter.md +12 -0
  15. data/docs/ScreenRecordingFilterValues.md +12 -2
  16. data/docs/ScreenRecordingFilterValuesPageView.md +12 -0
  17. data/docs/ScreenRecordingPageView.md +2 -0
  18. data/docs/ScreenRecordingPageViewEvent.md +1 -0
  19. data/docs/ScreenRecordingQueryResponse.md +3 -0
  20. data/docs/ScreenRecordingSegment.md +3 -0
  21. data/docs/ScreenRecordingSettings.md +5 -0
  22. data/docs/TaxJarConfig.md +1 -0
  23. data/lib/ultracart_api.rb +3 -0
  24. data/lib/ultracart_api/api/order_api.rb +6 -0
  25. data/lib/ultracart_api/models/coupon.rb +10 -1
  26. data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +219 -0
  27. data/lib/ultracart_api/models/customer_loyalty.rb +11 -1
  28. data/lib/ultracart_api/models/email_campaign.rb +12 -2
  29. data/lib/ultracart_api/models/email_flow.rb +12 -2
  30. data/lib/ultracart_api/models/library_item_attribute.rb +1 -10
  31. data/lib/ultracart_api/models/order_process_payment_request.rb +11 -1
  32. data/lib/ultracart_api/models/order_query.rb +22 -2
  33. data/lib/ultracart_api/models/screen_recording.rb +128 -1
  34. data/lib/ultracart_api/models/screen_recording_ad_platform.rb +235 -0
  35. data/lib/ultracart_api/models/screen_recording_filter.rb +109 -1
  36. data/lib/ultracart_api/models/screen_recording_filter_values.rb +124 -18
  37. data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +226 -0
  38. data/lib/ultracart_api/models/screen_recording_page_view.rb +21 -1
  39. data/lib/ultracart_api/models/screen_recording_page_view_event.rb +10 -1
  40. data/lib/ultracart_api/models/screen_recording_query_response.rb +30 -1
  41. data/lib/ultracart_api/models/screen_recording_segment.rb +30 -1
  42. data/lib/ultracart_api/models/screen_recording_settings.rb +49 -4
  43. data/lib/ultracart_api/models/tax_jar_config.rb +11 -1
  44. data/lib/ultracart_api/version.rb +1 -1
  45. metadata +8 -2
@@ -0,0 +1,226 @@
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 ScreenRecordingFilterValuesPageView
17
+ attr_accessor :events
18
+
19
+ attr_accessor :page_params
20
+
21
+ attr_accessor :time_on_page_max
22
+
23
+ attr_accessor :time_on_page_min
24
+
25
+ attr_accessor :urls
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'events' => :'events',
31
+ :'page_params' => :'page_params',
32
+ :'time_on_page_max' => :'time_on_page_max',
33
+ :'time_on_page_min' => :'time_on_page_min',
34
+ :'urls' => :'urls'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'events' => :'Array<ScreenRecordingFilterValuesEvent>',
42
+ :'page_params' => :'Array<ScreenRecordingFilterValuesPageParam>',
43
+ :'time_on_page_max' => :'Integer',
44
+ :'time_on_page_min' => :'Integer',
45
+ :'urls' => :'Array<String>'
46
+ }
47
+ end
48
+
49
+ # Initializes the object
50
+ # @param [Hash] attributes Model attributes in the form of hash
51
+ def initialize(attributes = {})
52
+ return unless attributes.is_a?(Hash)
53
+
54
+ # convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
56
+
57
+ if attributes.has_key?(:'events')
58
+ if (value = attributes[:'events']).is_a?(Array)
59
+ self.events = value
60
+ end
61
+ end
62
+
63
+ if attributes.has_key?(:'page_params')
64
+ if (value = attributes[:'page_params']).is_a?(Array)
65
+ self.page_params = value
66
+ end
67
+ end
68
+
69
+ if attributes.has_key?(:'time_on_page_max')
70
+ self.time_on_page_max = attributes[:'time_on_page_max']
71
+ end
72
+
73
+ if attributes.has_key?(:'time_on_page_min')
74
+ self.time_on_page_min = attributes[:'time_on_page_min']
75
+ end
76
+
77
+ if attributes.has_key?(:'urls')
78
+ if (value = attributes[:'urls']).is_a?(Array)
79
+ self.urls = value
80
+ end
81
+ end
82
+ end
83
+
84
+ # Show invalid properties with the reasons. Usually used together with valid?
85
+ # @return Array for valid properties with the reasons
86
+ def list_invalid_properties
87
+ invalid_properties = Array.new
88
+ invalid_properties
89
+ end
90
+
91
+ # Check to see if the all the properties in the model are valid
92
+ # @return true if the model is valid
93
+ def valid?
94
+ true
95
+ end
96
+
97
+ # Checks equality by comparing each attribute.
98
+ # @param [Object] Object to be compared
99
+ def ==(o)
100
+ return true if self.equal?(o)
101
+ self.class == o.class &&
102
+ events == o.events &&
103
+ page_params == o.page_params &&
104
+ time_on_page_max == o.time_on_page_max &&
105
+ time_on_page_min == o.time_on_page_min &&
106
+ urls == o.urls
107
+ end
108
+
109
+ # @see the `==` method
110
+ # @param [Object] Object to be compared
111
+ def eql?(o)
112
+ self == o
113
+ end
114
+
115
+ # Calculates hash code according to all attributes.
116
+ # @return [Fixnum] Hash code
117
+ def hash
118
+ [events, page_params, time_on_page_max, time_on_page_min, urls].hash
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ self.class.swagger_types.each_pair do |key, type|
127
+ if type =~ /\AArray<(.*)>/i
128
+ # check to ensure the input is an array given that the attribute
129
+ # is documented as an array but the input is not
130
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
131
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
132
+ end
133
+ elsif !attributes[self.class.attribute_map[key]].nil?
134
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
135
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
136
+ end
137
+
138
+ self
139
+ end
140
+
141
+ # Deserializes the data based on type
142
+ # @param string type Data type
143
+ # @param string value Value to be deserialized
144
+ # @return [Object] Deserialized data
145
+ def _deserialize(type, value)
146
+ case type.to_sym
147
+ when :DateTime
148
+ DateTime.parse(value)
149
+ when :Date
150
+ Date.parse(value)
151
+ when :String
152
+ value.to_s
153
+ when :Integer
154
+ value.to_i
155
+ when :Float
156
+ value.to_f
157
+ when :BOOLEAN
158
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
159
+ true
160
+ else
161
+ false
162
+ end
163
+ when :Object
164
+ # generic object (usually a Hash), return directly
165
+ value
166
+ when /\AArray<(?<inner_type>.+)>\z/
167
+ inner_type = Regexp.last_match[:inner_type]
168
+ value.map { |v| _deserialize(inner_type, v) }
169
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
170
+ k_type = Regexp.last_match[:k_type]
171
+ v_type = Regexp.last_match[:v_type]
172
+ {}.tap do |hash|
173
+ value.each do |k, v|
174
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
175
+ end
176
+ end
177
+ else # model
178
+ temp_model = UltracartClient.const_get(type).new
179
+ temp_model.build_from_hash(value)
180
+ end
181
+ end
182
+
183
+ # Returns the string representation of the object
184
+ # @return [String] String presentation of the object
185
+ def to_s
186
+ to_hash.to_s
187
+ end
188
+
189
+ # to_body is an alias to to_hash (backward compatibility)
190
+ # @return [Hash] Returns the object in the form of hash
191
+ def to_body
192
+ to_hash
193
+ end
194
+
195
+ # Returns the object in the form of hash
196
+ # @return [Hash] Returns the object in the form of hash
197
+ def to_hash
198
+ hash = {}
199
+ self.class.attribute_map.each_pair do |attr, param|
200
+ value = self.send(attr)
201
+ next if value.nil?
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+ end
@@ -42,6 +42,12 @@ module UltracartClient
42
42
 
43
43
  attr_accessor :time_on_page
44
44
 
45
+ # Amount of time for DOMContentLoaded event to fire (milliseconds)
46
+ attr_accessor :timing_dom_content_loaded
47
+
48
+ # Amount of time for loaded event to fire (milliseconds)
49
+ attr_accessor :timing_loaded
50
+
45
51
  attr_accessor :truncated_events
46
52
 
47
53
  attr_accessor :ucapv
@@ -64,6 +70,8 @@ module UltracartClient
64
70
  :'referrer_raw' => :'referrer_raw',
65
71
  :'screen_recording_page_view_uuid' => :'screen_recording_page_view_uuid',
66
72
  :'time_on_page' => :'time_on_page',
73
+ :'timing_dom_content_loaded' => :'timing_dom_content_loaded',
74
+ :'timing_loaded' => :'timing_loaded',
67
75
  :'truncated_events' => :'truncated_events',
68
76
  :'ucapv' => :'ucapv',
69
77
  :'url' => :'url'
@@ -86,6 +94,8 @@ module UltracartClient
86
94
  :'referrer_raw' => :'String',
87
95
  :'screen_recording_page_view_uuid' => :'String',
88
96
  :'time_on_page' => :'Integer',
97
+ :'timing_dom_content_loaded' => :'Integer',
98
+ :'timing_loaded' => :'Integer',
89
99
  :'truncated_events' => :'BOOLEAN',
90
100
  :'ucapv' => :'String',
91
101
  :'url' => :'String'
@@ -158,6 +168,14 @@ module UltracartClient
158
168
  self.time_on_page = attributes[:'time_on_page']
159
169
  end
160
170
 
171
+ if attributes.has_key?(:'timing_dom_content_loaded')
172
+ self.timing_dom_content_loaded = attributes[:'timing_dom_content_loaded']
173
+ end
174
+
175
+ if attributes.has_key?(:'timing_loaded')
176
+ self.timing_loaded = attributes[:'timing_loaded']
177
+ end
178
+
161
179
  if attributes.has_key?(:'truncated_events')
162
180
  self.truncated_events = attributes[:'truncated_events']
163
181
  end
@@ -202,6 +220,8 @@ module UltracartClient
202
220
  referrer_raw == o.referrer_raw &&
203
221
  screen_recording_page_view_uuid == o.screen_recording_page_view_uuid &&
204
222
  time_on_page == o.time_on_page &&
223
+ timing_dom_content_loaded == o.timing_dom_content_loaded &&
224
+ timing_loaded == o.timing_loaded &&
205
225
  truncated_events == o.truncated_events &&
206
226
  ucapv == o.ucapv &&
207
227
  url == o.url
@@ -216,7 +236,7 @@ module UltracartClient
216
236
  # Calculates hash code according to all attributes.
217
237
  # @return [Fixnum] Hash code
218
238
  def hash
219
- [events, first_event_timestamp, http_post, last_event_timestamp, missing_events, params, range_end, range_start, referrer, referrer_params, referrer_raw, screen_recording_page_view_uuid, time_on_page, truncated_events, ucapv, url].hash
239
+ [events, first_event_timestamp, http_post, last_event_timestamp, missing_events, params, range_end, range_start, referrer, referrer_params, referrer_raw, screen_recording_page_view_uuid, time_on_page, timing_dom_content_loaded, timing_loaded, truncated_events, ucapv, url].hash
220
240
  end
221
241
 
222
242
  # Builds the object from hash
@@ -18,6 +18,8 @@ module UltracartClient
18
18
 
19
19
  attr_accessor :params
20
20
 
21
+ attr_accessor :prior_page_view
22
+
21
23
  # Timestamp of the event
22
24
  attr_accessor :timestamp
23
25
 
@@ -28,6 +30,7 @@ module UltracartClient
28
30
  {
29
31
  :'name' => :'name',
30
32
  :'params' => :'params',
33
+ :'prior_page_view' => :'prior_page_view',
31
34
  :'timestamp' => :'timestamp',
32
35
  :'ts' => :'ts'
33
36
  }
@@ -38,6 +41,7 @@ module UltracartClient
38
41
  {
39
42
  :'name' => :'String',
40
43
  :'params' => :'Array<ScreenRecordingPageViewEventParameter>',
44
+ :'prior_page_view' => :'BOOLEAN',
41
45
  :'timestamp' => :'String',
42
46
  :'ts' => :'Integer'
43
47
  }
@@ -61,6 +65,10 @@ module UltracartClient
61
65
  end
62
66
  end
63
67
 
68
+ if attributes.has_key?(:'prior_page_view')
69
+ self.prior_page_view = attributes[:'prior_page_view']
70
+ end
71
+
64
72
  if attributes.has_key?(:'timestamp')
65
73
  self.timestamp = attributes[:'timestamp']
66
74
  end
@@ -90,6 +98,7 @@ module UltracartClient
90
98
  self.class == o.class &&
91
99
  name == o.name &&
92
100
  params == o.params &&
101
+ prior_page_view == o.prior_page_view &&
93
102
  timestamp == o.timestamp &&
94
103
  ts == o.ts
95
104
  end
@@ -103,7 +112,7 @@ module UltracartClient
103
112
  # Calculates hash code according to all attributes.
104
113
  # @return [Fixnum] Hash code
105
114
  def hash
106
- [name, params, timestamp, ts].hash
115
+ [name, params, prior_page_view, timestamp, ts].hash
107
116
  end
108
117
 
109
118
  # Builds the object from hash
@@ -20,6 +20,12 @@ module UltracartClient
20
20
 
21
21
  attr_accessor :filter_values
22
22
 
23
+ attr_accessor :histogram_data
24
+
25
+ attr_accessor :histogram_interval
26
+
27
+ attr_accessor :histogram_start_dts
28
+
23
29
  attr_accessor :metadata
24
30
 
25
31
  attr_accessor :screen_recordings
@@ -35,6 +41,9 @@ module UltracartClient
35
41
  :'error' => :'error',
36
42
  :'filter' => :'filter',
37
43
  :'filter_values' => :'filter_values',
44
+ :'histogram_data' => :'histogram_data',
45
+ :'histogram_interval' => :'histogram_interval',
46
+ :'histogram_start_dts' => :'histogram_start_dts',
38
47
  :'metadata' => :'metadata',
39
48
  :'screen_recordings' => :'screen_recordings',
40
49
  :'success' => :'success',
@@ -48,6 +57,9 @@ module UltracartClient
48
57
  :'error' => :'Error',
49
58
  :'filter' => :'ScreenRecordingFilter',
50
59
  :'filter_values' => :'ScreenRecordingFilterValues',
60
+ :'histogram_data' => :'Array<Integer>',
61
+ :'histogram_interval' => :'String',
62
+ :'histogram_start_dts' => :'String',
51
63
  :'metadata' => :'ResponseMetadata',
52
64
  :'screen_recordings' => :'Array<ScreenRecording>',
53
65
  :'success' => :'BOOLEAN',
@@ -75,6 +87,20 @@ module UltracartClient
75
87
  self.filter_values = attributes[:'filter_values']
76
88
  end
77
89
 
90
+ if attributes.has_key?(:'histogram_data')
91
+ if (value = attributes[:'histogram_data']).is_a?(Array)
92
+ self.histogram_data = value
93
+ end
94
+ end
95
+
96
+ if attributes.has_key?(:'histogram_interval')
97
+ self.histogram_interval = attributes[:'histogram_interval']
98
+ end
99
+
100
+ if attributes.has_key?(:'histogram_start_dts')
101
+ self.histogram_start_dts = attributes[:'histogram_start_dts']
102
+ end
103
+
78
104
  if attributes.has_key?(:'metadata')
79
105
  self.metadata = attributes[:'metadata']
80
106
  end
@@ -115,6 +141,9 @@ module UltracartClient
115
141
  error == o.error &&
116
142
  filter == o.filter &&
117
143
  filter_values == o.filter_values &&
144
+ histogram_data == o.histogram_data &&
145
+ histogram_interval == o.histogram_interval &&
146
+ histogram_start_dts == o.histogram_start_dts &&
118
147
  metadata == o.metadata &&
119
148
  screen_recordings == o.screen_recordings &&
120
149
  success == o.success &&
@@ -130,7 +159,7 @@ module UltracartClient
130
159
  # Calculates hash code according to all attributes.
131
160
  # @return [Fixnum] Hash code
132
161
  def hash
133
- [error, filter, filter_values, metadata, screen_recordings, success, warning].hash
162
+ [error, filter, filter_values, histogram_data, histogram_interval, histogram_start_dts, metadata, screen_recordings, success, warning].hash
134
163
  end
135
164
 
136
165
  # Builds the object from hash
@@ -20,6 +20,12 @@ module UltracartClient
20
20
 
21
21
  attr_accessor :filter
22
22
 
23
+ attr_accessor :histogram_data
24
+
25
+ attr_accessor :histogram_interval
26
+
27
+ attr_accessor :histogram_start_dts
28
+
23
29
  attr_accessor :name
24
30
 
25
31
  attr_accessor :screen_recording_segment_oid
@@ -34,6 +40,9 @@ module UltracartClient
34
40
  :'create_dts' => :'create_dts',
35
41
  :'description' => :'description',
36
42
  :'filter' => :'filter',
43
+ :'histogram_data' => :'histogram_data',
44
+ :'histogram_interval' => :'histogram_interval',
45
+ :'histogram_start_dts' => :'histogram_start_dts',
37
46
  :'name' => :'name',
38
47
  :'screen_recording_segment_oid' => :'screen_recording_segment_oid',
39
48
  :'session_count' => :'session_count',
@@ -47,6 +56,9 @@ module UltracartClient
47
56
  :'create_dts' => :'String',
48
57
  :'description' => :'String',
49
58
  :'filter' => :'ScreenRecordingFilter',
59
+ :'histogram_data' => :'Array<Integer>',
60
+ :'histogram_interval' => :'String',
61
+ :'histogram_start_dts' => :'String',
50
62
  :'name' => :'String',
51
63
  :'screen_recording_segment_oid' => :'Integer',
52
64
  :'session_count' => :'Integer',
@@ -74,6 +86,20 @@ module UltracartClient
74
86
  self.filter = attributes[:'filter']
75
87
  end
76
88
 
89
+ if attributes.has_key?(:'histogram_data')
90
+ if (value = attributes[:'histogram_data']).is_a?(Array)
91
+ self.histogram_data = value
92
+ end
93
+ end
94
+
95
+ if attributes.has_key?(:'histogram_interval')
96
+ self.histogram_interval = attributes[:'histogram_interval']
97
+ end
98
+
99
+ if attributes.has_key?(:'histogram_start_dts')
100
+ self.histogram_start_dts = attributes[:'histogram_start_dts']
101
+ end
102
+
77
103
  if attributes.has_key?(:'name')
78
104
  self.name = attributes[:'name']
79
105
  end
@@ -112,6 +138,9 @@ module UltracartClient
112
138
  create_dts == o.create_dts &&
113
139
  description == o.description &&
114
140
  filter == o.filter &&
141
+ histogram_data == o.histogram_data &&
142
+ histogram_interval == o.histogram_interval &&
143
+ histogram_start_dts == o.histogram_start_dts &&
115
144
  name == o.name &&
116
145
  screen_recording_segment_oid == o.screen_recording_segment_oid &&
117
146
  session_count == o.session_count &&
@@ -127,7 +156,7 @@ module UltracartClient
127
156
  # Calculates hash code according to all attributes.
128
157
  # @return [Fixnum] Hash code
129
158
  def hash
130
- [create_dts, description, filter, name, screen_recording_segment_oid, session_count, session_count_last_update_dts].hash
159
+ [create_dts, description, filter, histogram_data, histogram_interval, histogram_start_dts, name, screen_recording_segment_oid, session_count, session_count_last_update_dts].hash
131
160
  end
132
161
 
133
162
  # Builds the object from hash