ultracart_api 3.1.15 → 3.1.39

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +26 -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 -1
  16. data/docs/ScreenRecordingFilterValuesPageParam.md +9 -0
  17. data/docs/ScreenRecordingFilterValuesPageView.md +12 -0
  18. data/docs/ScreenRecordingPageView.md +2 -0
  19. data/docs/ScreenRecordingPageViewEvent.md +1 -0
  20. data/docs/ScreenRecordingQueryResponse.md +3 -0
  21. data/docs/ScreenRecordingSegment.md +3 -0
  22. data/docs/ScreenRecordingSettings.md +5 -0
  23. data/docs/TaxJarConfig.md +1 -0
  24. data/lib/ultracart_api.rb +4 -0
  25. data/lib/ultracart_api/api/order_api.rb +6 -0
  26. data/lib/ultracart_api/models/coupon.rb +10 -1
  27. data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +219 -0
  28. data/lib/ultracart_api/models/customer_loyalty.rb +11 -1
  29. data/lib/ultracart_api/models/email_campaign.rb +12 -2
  30. data/lib/ultracart_api/models/email_flow.rb +12 -2
  31. data/lib/ultracart_api/models/library_item_attribute.rb +1 -10
  32. data/lib/ultracart_api/models/order_process_payment_request.rb +11 -1
  33. data/lib/ultracart_api/models/order_query.rb +22 -2
  34. data/lib/ultracart_api/models/screen_recording.rb +128 -1
  35. data/lib/ultracart_api/models/screen_recording_ad_platform.rb +235 -0
  36. data/lib/ultracart_api/models/screen_recording_filter.rb +109 -1
  37. data/lib/ultracart_api/models/screen_recording_filter_values.rb +128 -11
  38. data/lib/ultracart_api/models/screen_recording_filter_values_page_param.rb +195 -0
  39. data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +226 -0
  40. data/lib/ultracart_api/models/screen_recording_page_view.rb +21 -1
  41. data/lib/ultracart_api/models/screen_recording_page_view_event.rb +10 -1
  42. data/lib/ultracart_api/models/screen_recording_query_response.rb +30 -1
  43. data/lib/ultracart_api/models/screen_recording_segment.rb +30 -1
  44. data/lib/ultracart_api/models/screen_recording_settings.rb +49 -4
  45. data/lib/ultracart_api/models/tax_jar_config.rb +11 -1
  46. data/lib/ultracart_api/version.rb +1 -1
  47. metadata +10 -2
@@ -0,0 +1,195 @@
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 ScreenRecordingFilterValuesPageParam
17
+ attr_accessor :name
18
+
19
+ attr_accessor :values
20
+
21
+ # Attribute mapping from ruby-style variable name to JSON key.
22
+ def self.attribute_map
23
+ {
24
+ :'name' => :'name',
25
+ :'values' => :'values'
26
+ }
27
+ end
28
+
29
+ # Attribute type mapping.
30
+ def self.swagger_types
31
+ {
32
+ :'name' => :'String',
33
+ :'values' => :'Array<String>'
34
+ }
35
+ end
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ def initialize(attributes = {})
40
+ return unless attributes.is_a?(Hash)
41
+
42
+ # convert string to symbol for hash key
43
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
44
+
45
+ if attributes.has_key?(:'name')
46
+ self.name = attributes[:'name']
47
+ end
48
+
49
+ if attributes.has_key?(:'values')
50
+ if (value = attributes[:'values']).is_a?(Array)
51
+ self.values = value
52
+ end
53
+ end
54
+ end
55
+
56
+ # Show invalid properties with the reasons. Usually used together with valid?
57
+ # @return Array for valid properties with the reasons
58
+ def list_invalid_properties
59
+ invalid_properties = Array.new
60
+ invalid_properties
61
+ end
62
+
63
+ # Check to see if the all the properties in the model are valid
64
+ # @return true if the model is valid
65
+ def valid?
66
+ true
67
+ end
68
+
69
+ # Checks equality by comparing each attribute.
70
+ # @param [Object] Object to be compared
71
+ def ==(o)
72
+ return true if self.equal?(o)
73
+ self.class == o.class &&
74
+ name == o.name &&
75
+ values == o.values
76
+ end
77
+
78
+ # @see the `==` method
79
+ # @param [Object] Object to be compared
80
+ def eql?(o)
81
+ self == o
82
+ end
83
+
84
+ # Calculates hash code according to all attributes.
85
+ # @return [Fixnum] Hash code
86
+ def hash
87
+ [name, values].hash
88
+ end
89
+
90
+ # Builds the object from hash
91
+ # @param [Hash] attributes Model attributes in the form of hash
92
+ # @return [Object] Returns the model itself
93
+ def build_from_hash(attributes)
94
+ return nil unless attributes.is_a?(Hash)
95
+ self.class.swagger_types.each_pair do |key, type|
96
+ if type =~ /\AArray<(.*)>/i
97
+ # check to ensure the input is an array given that the attribute
98
+ # is documented as an array but the input is not
99
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
100
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
101
+ end
102
+ elsif !attributes[self.class.attribute_map[key]].nil?
103
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
104
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
105
+ end
106
+
107
+ self
108
+ end
109
+
110
+ # Deserializes the data based on type
111
+ # @param string type Data type
112
+ # @param string value Value to be deserialized
113
+ # @return [Object] Deserialized data
114
+ def _deserialize(type, value)
115
+ case type.to_sym
116
+ when :DateTime
117
+ DateTime.parse(value)
118
+ when :Date
119
+ Date.parse(value)
120
+ when :String
121
+ value.to_s
122
+ when :Integer
123
+ value.to_i
124
+ when :Float
125
+ value.to_f
126
+ when :BOOLEAN
127
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
128
+ true
129
+ else
130
+ false
131
+ end
132
+ when :Object
133
+ # generic object (usually a Hash), return directly
134
+ value
135
+ when /\AArray<(?<inner_type>.+)>\z/
136
+ inner_type = Regexp.last_match[:inner_type]
137
+ value.map { |v| _deserialize(inner_type, v) }
138
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
139
+ k_type = Regexp.last_match[:k_type]
140
+ v_type = Regexp.last_match[:v_type]
141
+ {}.tap do |hash|
142
+ value.each do |k, v|
143
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
144
+ end
145
+ end
146
+ else # model
147
+ temp_model = UltracartClient.const_get(type).new
148
+ temp_model.build_from_hash(value)
149
+ end
150
+ end
151
+
152
+ # Returns the string representation of the object
153
+ # @return [String] String presentation of the object
154
+ def to_s
155
+ to_hash.to_s
156
+ end
157
+
158
+ # to_body is an alias to to_hash (backward compatibility)
159
+ # @return [Hash] Returns the object in the form of hash
160
+ def to_body
161
+ to_hash
162
+ end
163
+
164
+ # Returns the object in the form of hash
165
+ # @return [Hash] Returns the object in the form of hash
166
+ def to_hash
167
+ hash = {}
168
+ self.class.attribute_map.each_pair do |attr, param|
169
+ value = self.send(attr)
170
+ next if value.nil?
171
+ hash[param] = _to_hash(value)
172
+ end
173
+ hash
174
+ end
175
+
176
+ # Outputs non-array value in the form of hash
177
+ # For object, use to_hash. Otherwise, just return the value
178
+ # @param [Object] value Any valid value
179
+ # @return [Hash] Returns the value in the form of hash
180
+ def _to_hash(value)
181
+ if value.is_a?(Array)
182
+ value.compact.map { |v| _to_hash(v) }
183
+ elsif value.is_a?(Hash)
184
+ {}.tap do |hash|
185
+ value.each { |k, v| hash[k] = _to_hash(v) }
186
+ end
187
+ elsif value.respond_to? :to_hash
188
+ value.to_hash
189
+ else
190
+ value
191
+ end
192
+ end
193
+
194
+ end
195
+ end
@@ -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