ultracart_api 3.1.18 → 3.1.37

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 (37) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +6 -81
  3. data/docs/CouponPercentOffMsrpItems.md +1 -1
  4. data/docs/CustomerLoyalty.md +1 -0
  5. data/docs/EmailCampaign.md +2 -1
  6. data/docs/EmailFlow.md +2 -1
  7. data/docs/LibraryItemAttribute.md +0 -1
  8. data/docs/OrderProcessPaymentRequest.md +1 -0
  9. data/docs/ScreenRecording.md +13 -0
  10. data/docs/ScreenRecordingAdPlatform.md +13 -0
  11. data/docs/ScreenRecordingFilter.md +12 -0
  12. data/docs/ScreenRecordingFilterValues.md +12 -2
  13. data/docs/ScreenRecordingFilterValuesPageView.md +12 -0
  14. data/docs/ScreenRecordingPageView.md +2 -0
  15. data/docs/ScreenRecordingPageViewEvent.md +1 -0
  16. data/docs/ScreenRecordingQueryResponse.md +3 -0
  17. data/docs/ScreenRecordingSegment.md +3 -0
  18. data/docs/ScreenRecordingSettings.md +5 -0
  19. data/lib/ultracart_api.rb +2 -0
  20. data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +1 -1
  21. data/lib/ultracart_api/models/customer_loyalty.rb +11 -1
  22. data/lib/ultracart_api/models/email_campaign.rb +12 -2
  23. data/lib/ultracart_api/models/email_flow.rb +12 -2
  24. data/lib/ultracart_api/models/library_item_attribute.rb +1 -10
  25. data/lib/ultracart_api/models/order_process_payment_request.rb +11 -1
  26. data/lib/ultracart_api/models/screen_recording.rb +128 -1
  27. data/lib/ultracart_api/models/screen_recording_ad_platform.rb +235 -0
  28. data/lib/ultracart_api/models/screen_recording_filter.rb +109 -1
  29. data/lib/ultracart_api/models/screen_recording_filter_values.rb +124 -18
  30. data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +226 -0
  31. data/lib/ultracart_api/models/screen_recording_page_view.rb +21 -1
  32. data/lib/ultracart_api/models/screen_recording_page_view_event.rb +10 -1
  33. data/lib/ultracart_api/models/screen_recording_query_response.rb +30 -1
  34. data/lib/ultracart_api/models/screen_recording_segment.rb +30 -1
  35. data/lib/ultracart_api/models/screen_recording_settings.rb +49 -4
  36. data/lib/ultracart_api/version.rb +1 -1
  37. metadata +6 -2
@@ -14,15 +14,31 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ScreenRecordingFilterValues
17
- attr_accessor :events
17
+ attr_accessor :communications_campaign_names
18
+
19
+ attr_accessor :communications_email_subjects
20
+
21
+ attr_accessor :communications_flow_names
22
+
23
+ attr_accessor :email_domains
18
24
 
19
25
  attr_accessor :geolocation_countries
20
26
 
21
27
  attr_accessor :geolocation_states
22
28
 
29
+ attr_accessor :language_iso_codes
30
+
23
31
  attr_accessor :max_values
24
32
 
25
- attr_accessor :page_params
33
+ attr_accessor :page_views
34
+
35
+ attr_accessor :preferred_languages
36
+
37
+ attr_accessor :referrer_domains
38
+
39
+ attr_accessor :time_on_site_max
40
+
41
+ attr_accessor :time_on_site_min
26
42
 
27
43
  attr_accessor :urls
28
44
 
@@ -36,37 +52,61 @@ module UltracartClient
36
52
 
37
53
  attr_accessor :user_agent_originals
38
54
 
55
+ attr_accessor :utm_campaigns
56
+
57
+ attr_accessor :utm_sources
58
+
39
59
  # Attribute mapping from ruby-style variable name to JSON key.
40
60
  def self.attribute_map
41
61
  {
42
- :'events' => :'events',
62
+ :'communications_campaign_names' => :'communications_campaign_names',
63
+ :'communications_email_subjects' => :'communications_email_subjects',
64
+ :'communications_flow_names' => :'communications_flow_names',
65
+ :'email_domains' => :'email_domains',
43
66
  :'geolocation_countries' => :'geolocation_countries',
44
67
  :'geolocation_states' => :'geolocation_states',
68
+ :'language_iso_codes' => :'language_iso_codes',
45
69
  :'max_values' => :'max_values',
46
- :'page_params' => :'page_params',
70
+ :'page_views' => :'page_views',
71
+ :'preferred_languages' => :'preferred_languages',
72
+ :'referrer_domains' => :'referrer_domains',
73
+ :'time_on_site_max' => :'time_on_site_max',
74
+ :'time_on_site_min' => :'time_on_site_min',
47
75
  :'urls' => :'urls',
48
76
  :'user_agent_device_names' => :'user_agent_device_names',
49
77
  :'user_agent_device_os_names' => :'user_agent_device_os_names',
50
78
  :'user_agent_device_os_versions' => :'user_agent_device_os_versions',
51
79
  :'user_agent_names' => :'user_agent_names',
52
- :'user_agent_originals' => :'user_agent_originals'
80
+ :'user_agent_originals' => :'user_agent_originals',
81
+ :'utm_campaigns' => :'utm_campaigns',
82
+ :'utm_sources' => :'utm_sources'
53
83
  }
54
84
  end
55
85
 
56
86
  # Attribute type mapping.
57
87
  def self.swagger_types
58
88
  {
59
- :'events' => :'Array<ScreenRecordingFilterValuesEvent>',
89
+ :'communications_campaign_names' => :'Array<String>',
90
+ :'communications_email_subjects' => :'Array<String>',
91
+ :'communications_flow_names' => :'Array<String>',
92
+ :'email_domains' => :'Array<String>',
60
93
  :'geolocation_countries' => :'Array<String>',
61
94
  :'geolocation_states' => :'Array<String>',
95
+ :'language_iso_codes' => :'Array<String>',
62
96
  :'max_values' => :'Integer',
63
- :'page_params' => :'Array<ScreenRecordingFilterValuesPageParam>',
97
+ :'page_views' => :'Array<ScreenRecordingFilterValuesPageView>',
98
+ :'preferred_languages' => :'Array<String>',
99
+ :'referrer_domains' => :'Array<String>',
100
+ :'time_on_site_max' => :'Integer',
101
+ :'time_on_site_min' => :'Integer',
64
102
  :'urls' => :'Array<String>',
65
103
  :'user_agent_device_names' => :'Array<String>',
66
104
  :'user_agent_device_os_names' => :'Array<String>',
67
105
  :'user_agent_device_os_versions' => :'Array<String>',
68
106
  :'user_agent_names' => :'Array<String>',
69
- :'user_agent_originals' => :'Array<String>'
107
+ :'user_agent_originals' => :'Array<String>',
108
+ :'utm_campaigns' => :'Array<String>',
109
+ :'utm_sources' => :'Array<String>'
70
110
  }
71
111
  end
72
112
 
@@ -78,9 +118,27 @@ module UltracartClient
78
118
  # convert string to symbol for hash key
79
119
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
80
120
 
81
- if attributes.has_key?(:'events')
82
- if (value = attributes[:'events']).is_a?(Array)
83
- self.events = value
121
+ if attributes.has_key?(:'communications_campaign_names')
122
+ if (value = attributes[:'communications_campaign_names']).is_a?(Array)
123
+ self.communications_campaign_names = value
124
+ end
125
+ end
126
+
127
+ if attributes.has_key?(:'communications_email_subjects')
128
+ if (value = attributes[:'communications_email_subjects']).is_a?(Array)
129
+ self.communications_email_subjects = value
130
+ end
131
+ end
132
+
133
+ if attributes.has_key?(:'communications_flow_names')
134
+ if (value = attributes[:'communications_flow_names']).is_a?(Array)
135
+ self.communications_flow_names = value
136
+ end
137
+ end
138
+
139
+ if attributes.has_key?(:'email_domains')
140
+ if (value = attributes[:'email_domains']).is_a?(Array)
141
+ self.email_domains = value
84
142
  end
85
143
  end
86
144
 
@@ -96,16 +154,42 @@ module UltracartClient
96
154
  end
97
155
  end
98
156
 
157
+ if attributes.has_key?(:'language_iso_codes')
158
+ if (value = attributes[:'language_iso_codes']).is_a?(Array)
159
+ self.language_iso_codes = value
160
+ end
161
+ end
162
+
99
163
  if attributes.has_key?(:'max_values')
100
164
  self.max_values = attributes[:'max_values']
101
165
  end
102
166
 
103
- if attributes.has_key?(:'page_params')
104
- if (value = attributes[:'page_params']).is_a?(Array)
105
- self.page_params = value
167
+ if attributes.has_key?(:'page_views')
168
+ if (value = attributes[:'page_views']).is_a?(Array)
169
+ self.page_views = value
170
+ end
171
+ end
172
+
173
+ if attributes.has_key?(:'preferred_languages')
174
+ if (value = attributes[:'preferred_languages']).is_a?(Array)
175
+ self.preferred_languages = value
106
176
  end
107
177
  end
108
178
 
179
+ if attributes.has_key?(:'referrer_domains')
180
+ if (value = attributes[:'referrer_domains']).is_a?(Array)
181
+ self.referrer_domains = value
182
+ end
183
+ end
184
+
185
+ if attributes.has_key?(:'time_on_site_max')
186
+ self.time_on_site_max = attributes[:'time_on_site_max']
187
+ end
188
+
189
+ if attributes.has_key?(:'time_on_site_min')
190
+ self.time_on_site_min = attributes[:'time_on_site_min']
191
+ end
192
+
109
193
  if attributes.has_key?(:'urls')
110
194
  if (value = attributes[:'urls']).is_a?(Array)
111
195
  self.urls = value
@@ -141,6 +225,18 @@ module UltracartClient
141
225
  self.user_agent_originals = value
142
226
  end
143
227
  end
228
+
229
+ if attributes.has_key?(:'utm_campaigns')
230
+ if (value = attributes[:'utm_campaigns']).is_a?(Array)
231
+ self.utm_campaigns = value
232
+ end
233
+ end
234
+
235
+ if attributes.has_key?(:'utm_sources')
236
+ if (value = attributes[:'utm_sources']).is_a?(Array)
237
+ self.utm_sources = value
238
+ end
239
+ end
144
240
  end
145
241
 
146
242
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -161,17 +257,27 @@ module UltracartClient
161
257
  def ==(o)
162
258
  return true if self.equal?(o)
163
259
  self.class == o.class &&
164
- events == o.events &&
260
+ communications_campaign_names == o.communications_campaign_names &&
261
+ communications_email_subjects == o.communications_email_subjects &&
262
+ communications_flow_names == o.communications_flow_names &&
263
+ email_domains == o.email_domains &&
165
264
  geolocation_countries == o.geolocation_countries &&
166
265
  geolocation_states == o.geolocation_states &&
266
+ language_iso_codes == o.language_iso_codes &&
167
267
  max_values == o.max_values &&
168
- page_params == o.page_params &&
268
+ page_views == o.page_views &&
269
+ preferred_languages == o.preferred_languages &&
270
+ referrer_domains == o.referrer_domains &&
271
+ time_on_site_max == o.time_on_site_max &&
272
+ time_on_site_min == o.time_on_site_min &&
169
273
  urls == o.urls &&
170
274
  user_agent_device_names == o.user_agent_device_names &&
171
275
  user_agent_device_os_names == o.user_agent_device_os_names &&
172
276
  user_agent_device_os_versions == o.user_agent_device_os_versions &&
173
277
  user_agent_names == o.user_agent_names &&
174
- user_agent_originals == o.user_agent_originals
278
+ user_agent_originals == o.user_agent_originals &&
279
+ utm_campaigns == o.utm_campaigns &&
280
+ utm_sources == o.utm_sources
175
281
  end
176
282
 
177
283
  # @see the `==` method
@@ -183,7 +289,7 @@ module UltracartClient
183
289
  # Calculates hash code according to all attributes.
184
290
  # @return [Fixnum] Hash code
185
291
  def hash
186
- [events, geolocation_countries, geolocation_states, max_values, page_params, urls, user_agent_device_names, user_agent_device_os_names, user_agent_device_os_versions, user_agent_names, user_agent_originals].hash
292
+ [communications_campaign_names, communications_email_subjects, communications_flow_names, email_domains, geolocation_countries, geolocation_states, language_iso_codes, max_values, page_views, preferred_languages, referrer_domains, time_on_site_max, time_on_site_min, urls, user_agent_device_names, user_agent_device_os_names, user_agent_device_os_versions, user_agent_names, user_agent_originals, utm_campaigns, utm_sources].hash
187
293
  end
188
294
 
189
295
  # Builds the object from hash
@@ -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