ultracart_api 3.1.14 → 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 (49) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +8 -77
  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/StorefrontApi.md +3 -4
  24. data/docs/TaxJarConfig.md +1 -0
  25. data/lib/ultracart_api.rb +4 -0
  26. data/lib/ultracart_api/api/order_api.rb +6 -0
  27. data/lib/ultracart_api/api/storefront_api.rb +5 -6
  28. data/lib/ultracart_api/models/coupon.rb +10 -1
  29. data/lib/ultracart_api/models/coupon_percent_off_msrp_items.rb +219 -0
  30. data/lib/ultracart_api/models/customer_loyalty.rb +11 -1
  31. data/lib/ultracart_api/models/email_campaign.rb +12 -2
  32. data/lib/ultracart_api/models/email_flow.rb +12 -2
  33. data/lib/ultracart_api/models/library_item_attribute.rb +1 -10
  34. data/lib/ultracart_api/models/order_process_payment_request.rb +11 -1
  35. data/lib/ultracart_api/models/order_query.rb +22 -2
  36. data/lib/ultracart_api/models/screen_recording.rb +128 -1
  37. data/lib/ultracart_api/models/screen_recording_ad_platform.rb +235 -0
  38. data/lib/ultracart_api/models/screen_recording_filter.rb +109 -1
  39. data/lib/ultracart_api/models/screen_recording_filter_values.rb +128 -11
  40. data/lib/ultracart_api/models/screen_recording_filter_values_page_param.rb +195 -0
  41. data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +226 -0
  42. data/lib/ultracart_api/models/screen_recording_page_view.rb +21 -1
  43. data/lib/ultracart_api/models/screen_recording_page_view_event.rb +10 -1
  44. data/lib/ultracart_api/models/screen_recording_query_response.rb +30 -1
  45. data/lib/ultracart_api/models/screen_recording_segment.rb +30 -1
  46. data/lib/ultracart_api/models/screen_recording_settings.rb +49 -4
  47. data/lib/ultracart_api/models/tax_jar_config.rb +11 -1
  48. data/lib/ultracart_api/version.rb +1 -1
  49. metadata +10 -2
@@ -0,0 +1,235 @@
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 ScreenRecordingAdPlatform
17
+ # Facebook Click Id (Cookie)
18
+ attr_accessor :fbc
19
+
20
+ # Facebook Click Id Parameter (Parameter)
21
+ attr_accessor :fbclid
22
+
23
+ # Facebook Browser Id (Cookie)
24
+ attr_accessor :fbp
25
+
26
+ # Google Analytics CID (Cookie)
27
+ attr_accessor :gacid
28
+
29
+ # Google Adwords Click Id (Parameter)
30
+ attr_accessor :glcid
31
+
32
+ # Bing Click Id (Parameter
33
+ attr_accessor :msclkid
34
+
35
+ # Attribute mapping from ruby-style variable name to JSON key.
36
+ def self.attribute_map
37
+ {
38
+ :'fbc' => :'fbc',
39
+ :'fbclid' => :'fbclid',
40
+ :'fbp' => :'fbp',
41
+ :'gacid' => :'gacid',
42
+ :'glcid' => :'glcid',
43
+ :'msclkid' => :'msclkid'
44
+ }
45
+ end
46
+
47
+ # Attribute type mapping.
48
+ def self.swagger_types
49
+ {
50
+ :'fbc' => :'String',
51
+ :'fbclid' => :'String',
52
+ :'fbp' => :'String',
53
+ :'gacid' => :'String',
54
+ :'glcid' => :'String',
55
+ :'msclkid' => :'String'
56
+ }
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ return unless attributes.is_a?(Hash)
63
+
64
+ # convert string to symbol for hash key
65
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
66
+
67
+ if attributes.has_key?(:'fbc')
68
+ self.fbc = attributes[:'fbc']
69
+ end
70
+
71
+ if attributes.has_key?(:'fbclid')
72
+ self.fbclid = attributes[:'fbclid']
73
+ end
74
+
75
+ if attributes.has_key?(:'fbp')
76
+ self.fbp = attributes[:'fbp']
77
+ end
78
+
79
+ if attributes.has_key?(:'gacid')
80
+ self.gacid = attributes[:'gacid']
81
+ end
82
+
83
+ if attributes.has_key?(:'glcid')
84
+ self.glcid = attributes[:'glcid']
85
+ end
86
+
87
+ if attributes.has_key?(:'msclkid')
88
+ self.msclkid = attributes[:'msclkid']
89
+ end
90
+ end
91
+
92
+ # Show invalid properties with the reasons. Usually used together with valid?
93
+ # @return Array for valid properties with the reasons
94
+ def list_invalid_properties
95
+ invalid_properties = Array.new
96
+ invalid_properties
97
+ end
98
+
99
+ # Check to see if the all the properties in the model are valid
100
+ # @return true if the model is valid
101
+ def valid?
102
+ true
103
+ end
104
+
105
+ # Checks equality by comparing each attribute.
106
+ # @param [Object] Object to be compared
107
+ def ==(o)
108
+ return true if self.equal?(o)
109
+ self.class == o.class &&
110
+ fbc == o.fbc &&
111
+ fbclid == o.fbclid &&
112
+ fbp == o.fbp &&
113
+ gacid == o.gacid &&
114
+ glcid == o.glcid &&
115
+ msclkid == o.msclkid
116
+ end
117
+
118
+ # @see the `==` method
119
+ # @param [Object] Object to be compared
120
+ def eql?(o)
121
+ self == o
122
+ end
123
+
124
+ # Calculates hash code according to all attributes.
125
+ # @return [Fixnum] Hash code
126
+ def hash
127
+ [fbc, fbclid, fbp, gacid, glcid, msclkid].hash
128
+ end
129
+
130
+ # Builds the object from hash
131
+ # @param [Hash] attributes Model attributes in the form of hash
132
+ # @return [Object] Returns the model itself
133
+ def build_from_hash(attributes)
134
+ return nil unless attributes.is_a?(Hash)
135
+ self.class.swagger_types.each_pair do |key, type|
136
+ if type =~ /\AArray<(.*)>/i
137
+ # check to ensure the input is an array given that the attribute
138
+ # is documented as an array but the input is not
139
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
140
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
141
+ end
142
+ elsif !attributes[self.class.attribute_map[key]].nil?
143
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
144
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
145
+ end
146
+
147
+ self
148
+ end
149
+
150
+ # Deserializes the data based on type
151
+ # @param string type Data type
152
+ # @param string value Value to be deserialized
153
+ # @return [Object] Deserialized data
154
+ def _deserialize(type, value)
155
+ case type.to_sym
156
+ when :DateTime
157
+ DateTime.parse(value)
158
+ when :Date
159
+ Date.parse(value)
160
+ when :String
161
+ value.to_s
162
+ when :Integer
163
+ value.to_i
164
+ when :Float
165
+ value.to_f
166
+ when :BOOLEAN
167
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
168
+ true
169
+ else
170
+ false
171
+ end
172
+ when :Object
173
+ # generic object (usually a Hash), return directly
174
+ value
175
+ when /\AArray<(?<inner_type>.+)>\z/
176
+ inner_type = Regexp.last_match[:inner_type]
177
+ value.map { |v| _deserialize(inner_type, v) }
178
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
179
+ k_type = Regexp.last_match[:k_type]
180
+ v_type = Regexp.last_match[:v_type]
181
+ {}.tap do |hash|
182
+ value.each do |k, v|
183
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
184
+ end
185
+ end
186
+ else # model
187
+ temp_model = UltracartClient.const_get(type).new
188
+ temp_model.build_from_hash(value)
189
+ end
190
+ end
191
+
192
+ # Returns the string representation of the object
193
+ # @return [String] String presentation of the object
194
+ def to_s
195
+ to_hash.to_s
196
+ end
197
+
198
+ # to_body is an alias to to_hash (backward compatibility)
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_body
201
+ to_hash
202
+ end
203
+
204
+ # Returns the object in the form of hash
205
+ # @return [Hash] Returns the object in the form of hash
206
+ def to_hash
207
+ hash = {}
208
+ self.class.attribute_map.each_pair do |attr, param|
209
+ value = self.send(attr)
210
+ next if value.nil?
211
+ hash[param] = _to_hash(value)
212
+ end
213
+ hash
214
+ end
215
+
216
+ # Outputs non-array value in the form of hash
217
+ # For object, use to_hash. Otherwise, just return the value
218
+ # @param [Object] value Any valid value
219
+ # @return [Hash] Returns the value in the form of hash
220
+ def _to_hash(value)
221
+ if value.is_a?(Array)
222
+ value.compact.map { |v| _to_hash(v) }
223
+ elsif value.is_a?(Hash)
224
+ {}.tap do |hash|
225
+ value.each { |k, v| hash[k] = _to_hash(v) }
226
+ end
227
+ elsif value.respond_to? :to_hash
228
+ value.to_hash
229
+ else
230
+ value
231
+ end
232
+ end
233
+
234
+ end
235
+ end
@@ -14,8 +14,20 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ScreenRecordingFilter
17
+ attr_accessor :affiliate_email
18
+
19
+ attr_accessor :affiliate_id
20
+
21
+ attr_accessor :communications_campaign_name
22
+
23
+ attr_accessor :communications_email_subject
24
+
25
+ attr_accessor :communications_flow_name
26
+
17
27
  attr_accessor :email
18
28
 
29
+ attr_accessor :email_domain
30
+
19
31
  attr_accessor :email_identified
20
32
 
21
33
  attr_accessor :end_timestamp
@@ -30,6 +42,10 @@ module UltracartClient
30
42
 
31
43
  attr_accessor :geolocation_state
32
44
 
45
+ attr_accessor :language_iso_code
46
+
47
+ attr_accessor :last_x_days
48
+
33
49
  attr_accessor :max_filter_values
34
50
 
35
51
  attr_accessor :order_id
@@ -40,6 +56,10 @@ module UltracartClient
40
56
 
41
57
  attr_accessor :placed_order
42
58
 
59
+ attr_accessor :preferred_language
60
+
61
+ attr_accessor :referrer_domain
62
+
43
63
  attr_accessor :screen_recording_uuids
44
64
 
45
65
  attr_accessor :screen_sizes
@@ -66,6 +86,10 @@ module UltracartClient
66
86
 
67
87
  attr_accessor :user_ip
68
88
 
89
+ attr_accessor :utm_campaign
90
+
91
+ attr_accessor :utm_source
92
+
69
93
  attr_accessor :visitor_number
70
94
 
71
95
  attr_accessor :watched
@@ -73,7 +97,13 @@ module UltracartClient
73
97
  # Attribute mapping from ruby-style variable name to JSON key.
74
98
  def self.attribute_map
75
99
  {
100
+ :'affiliate_email' => :'affiliate_email',
101
+ :'affiliate_id' => :'affiliate_id',
102
+ :'communications_campaign_name' => :'communications_campaign_name',
103
+ :'communications_email_subject' => :'communications_email_subject',
104
+ :'communications_flow_name' => :'communications_flow_name',
76
105
  :'email' => :'email',
106
+ :'email_domain' => :'email_domain',
77
107
  :'email_identified' => :'email_identified',
78
108
  :'end_timestamp' => :'end_timestamp',
79
109
  :'esp_customer_uuid' => :'esp_customer_uuid',
@@ -81,11 +111,15 @@ module UltracartClient
81
111
  :'geolocation' => :'geolocation',
82
112
  :'geolocation_country' => :'geolocation_country',
83
113
  :'geolocation_state' => :'geolocation_state',
114
+ :'language_iso_code' => :'language_iso_code',
115
+ :'last_x_days' => :'last_x_days',
84
116
  :'max_filter_values' => :'max_filter_values',
85
117
  :'order_id' => :'order_id',
86
118
  :'page_view_count' => :'page_view_count',
87
119
  :'page_views' => :'page_views',
88
120
  :'placed_order' => :'placed_order',
121
+ :'preferred_language' => :'preferred_language',
122
+ :'referrer_domain' => :'referrer_domain',
89
123
  :'screen_recording_uuids' => :'screen_recording_uuids',
90
124
  :'screen_sizes' => :'screen_sizes',
91
125
  :'skip_filter_values' => :'skip_filter_values',
@@ -99,6 +133,8 @@ module UltracartClient
99
133
  :'user_agent_os_name' => :'user_agent_os_name',
100
134
  :'user_agent_os_version' => :'user_agent_os_version',
101
135
  :'user_ip' => :'user_ip',
136
+ :'utm_campaign' => :'utm_campaign',
137
+ :'utm_source' => :'utm_source',
102
138
  :'visitor_number' => :'visitor_number',
103
139
  :'watched' => :'watched'
104
140
  }
@@ -107,7 +143,13 @@ module UltracartClient
107
143
  # Attribute type mapping.
108
144
  def self.swagger_types
109
145
  {
146
+ :'affiliate_email' => :'String',
147
+ :'affiliate_id' => :'Integer',
148
+ :'communications_campaign_name' => :'String',
149
+ :'communications_email_subject' => :'String',
150
+ :'communications_flow_name' => :'String',
110
151
  :'email' => :'ScreenRecordingFilterStringSearch',
152
+ :'email_domain' => :'String',
111
153
  :'email_identified' => :'BOOLEAN',
112
154
  :'end_timestamp' => :'ScreenRecordingFilterRangeDate',
113
155
  :'esp_customer_uuid' => :'String',
@@ -115,11 +157,15 @@ module UltracartClient
115
157
  :'geolocation' => :'ScreenRecordingFilterGeoDistance',
116
158
  :'geolocation_country' => :'ScreenRecordingFilterStringSearch',
117
159
  :'geolocation_state' => :'ScreenRecordingFilterStringSearch',
160
+ :'language_iso_code' => :'ScreenRecordingFilterStringSearch',
161
+ :'last_x_days' => :'Integer',
118
162
  :'max_filter_values' => :'Integer',
119
163
  :'order_id' => :'ScreenRecordingFilterStringSearch',
120
164
  :'page_view_count' => :'ScreenRecordingFilterRangeInteger',
121
165
  :'page_views' => :'Array<ScreenRecordingFilterPageView>',
122
166
  :'placed_order' => :'BOOLEAN',
167
+ :'preferred_language' => :'ScreenRecordingFilterStringSearch',
168
+ :'referrer_domain' => :'String',
123
169
  :'screen_recording_uuids' => :'Array<String>',
124
170
  :'screen_sizes' => :'Array<String>',
125
171
  :'skip_filter_values' => :'BOOLEAN',
@@ -133,6 +179,8 @@ module UltracartClient
133
179
  :'user_agent_os_name' => :'String',
134
180
  :'user_agent_os_version' => :'String',
135
181
  :'user_ip' => :'ScreenRecordingFilterIpSearch',
182
+ :'utm_campaign' => :'String',
183
+ :'utm_source' => :'String',
136
184
  :'visitor_number' => :'Integer',
137
185
  :'watched' => :'BOOLEAN'
138
186
  }
@@ -146,10 +194,34 @@ module UltracartClient
146
194
  # convert string to symbol for hash key
147
195
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
148
196
 
197
+ if attributes.has_key?(:'affiliate_email')
198
+ self.affiliate_email = attributes[:'affiliate_email']
199
+ end
200
+
201
+ if attributes.has_key?(:'affiliate_id')
202
+ self.affiliate_id = attributes[:'affiliate_id']
203
+ end
204
+
205
+ if attributes.has_key?(:'communications_campaign_name')
206
+ self.communications_campaign_name = attributes[:'communications_campaign_name']
207
+ end
208
+
209
+ if attributes.has_key?(:'communications_email_subject')
210
+ self.communications_email_subject = attributes[:'communications_email_subject']
211
+ end
212
+
213
+ if attributes.has_key?(:'communications_flow_name')
214
+ self.communications_flow_name = attributes[:'communications_flow_name']
215
+ end
216
+
149
217
  if attributes.has_key?(:'email')
150
218
  self.email = attributes[:'email']
151
219
  end
152
220
 
221
+ if attributes.has_key?(:'email_domain')
222
+ self.email_domain = attributes[:'email_domain']
223
+ end
224
+
153
225
  if attributes.has_key?(:'email_identified')
154
226
  self.email_identified = attributes[:'email_identified']
155
227
  end
@@ -178,6 +250,14 @@ module UltracartClient
178
250
  self.geolocation_state = attributes[:'geolocation_state']
179
251
  end
180
252
 
253
+ if attributes.has_key?(:'language_iso_code')
254
+ self.language_iso_code = attributes[:'language_iso_code']
255
+ end
256
+
257
+ if attributes.has_key?(:'last_x_days')
258
+ self.last_x_days = attributes[:'last_x_days']
259
+ end
260
+
181
261
  if attributes.has_key?(:'max_filter_values')
182
262
  self.max_filter_values = attributes[:'max_filter_values']
183
263
  end
@@ -200,6 +280,14 @@ module UltracartClient
200
280
  self.placed_order = attributes[:'placed_order']
201
281
  end
202
282
 
283
+ if attributes.has_key?(:'preferred_language')
284
+ self.preferred_language = attributes[:'preferred_language']
285
+ end
286
+
287
+ if attributes.has_key?(:'referrer_domain')
288
+ self.referrer_domain = attributes[:'referrer_domain']
289
+ end
290
+
203
291
  if attributes.has_key?(:'screen_recording_uuids')
204
292
  if (value = attributes[:'screen_recording_uuids']).is_a?(Array)
205
293
  self.screen_recording_uuids = value
@@ -258,6 +346,14 @@ module UltracartClient
258
346
  self.user_ip = attributes[:'user_ip']
259
347
  end
260
348
 
349
+ if attributes.has_key?(:'utm_campaign')
350
+ self.utm_campaign = attributes[:'utm_campaign']
351
+ end
352
+
353
+ if attributes.has_key?(:'utm_source')
354
+ self.utm_source = attributes[:'utm_source']
355
+ end
356
+
261
357
  if attributes.has_key?(:'visitor_number')
262
358
  self.visitor_number = attributes[:'visitor_number']
263
359
  end
@@ -285,7 +381,13 @@ module UltracartClient
285
381
  def ==(o)
286
382
  return true if self.equal?(o)
287
383
  self.class == o.class &&
384
+ affiliate_email == o.affiliate_email &&
385
+ affiliate_id == o.affiliate_id &&
386
+ communications_campaign_name == o.communications_campaign_name &&
387
+ communications_email_subject == o.communications_email_subject &&
388
+ communications_flow_name == o.communications_flow_name &&
288
389
  email == o.email &&
390
+ email_domain == o.email_domain &&
289
391
  email_identified == o.email_identified &&
290
392
  end_timestamp == o.end_timestamp &&
291
393
  esp_customer_uuid == o.esp_customer_uuid &&
@@ -293,11 +395,15 @@ module UltracartClient
293
395
  geolocation == o.geolocation &&
294
396
  geolocation_country == o.geolocation_country &&
295
397
  geolocation_state == o.geolocation_state &&
398
+ language_iso_code == o.language_iso_code &&
399
+ last_x_days == o.last_x_days &&
296
400
  max_filter_values == o.max_filter_values &&
297
401
  order_id == o.order_id &&
298
402
  page_view_count == o.page_view_count &&
299
403
  page_views == o.page_views &&
300
404
  placed_order == o.placed_order &&
405
+ preferred_language == o.preferred_language &&
406
+ referrer_domain == o.referrer_domain &&
301
407
  screen_recording_uuids == o.screen_recording_uuids &&
302
408
  screen_sizes == o.screen_sizes &&
303
409
  skip_filter_values == o.skip_filter_values &&
@@ -311,6 +417,8 @@ module UltracartClient
311
417
  user_agent_os_name == o.user_agent_os_name &&
312
418
  user_agent_os_version == o.user_agent_os_version &&
313
419
  user_ip == o.user_ip &&
420
+ utm_campaign == o.utm_campaign &&
421
+ utm_source == o.utm_source &&
314
422
  visitor_number == o.visitor_number &&
315
423
  watched == o.watched
316
424
  end
@@ -324,7 +432,7 @@ module UltracartClient
324
432
  # Calculates hash code according to all attributes.
325
433
  # @return [Fixnum] Hash code
326
434
  def hash
327
- [email, email_identified, end_timestamp, esp_customer_uuid, favorite, geolocation, geolocation_country, geolocation_state, max_filter_values, order_id, page_view_count, page_views, placed_order, screen_recording_uuids, screen_sizes, skip_filter_values, skip_hits, start_timestamp, tags, time_on_site, user_agent_device_name, user_agent_name, user_agent_original, user_agent_os_name, user_agent_os_version, user_ip, visitor_number, watched].hash
435
+ [affiliate_email, affiliate_id, communications_campaign_name, communications_email_subject, communications_flow_name, email, email_domain, email_identified, end_timestamp, esp_customer_uuid, favorite, geolocation, geolocation_country, geolocation_state, language_iso_code, last_x_days, max_filter_values, order_id, page_view_count, page_views, placed_order, preferred_language, referrer_domain, screen_recording_uuids, screen_sizes, skip_filter_values, skip_hits, start_timestamp, tags, time_on_site, user_agent_device_name, user_agent_name, user_agent_original, user_agent_os_name, user_agent_os_version, user_ip, utm_campaign, utm_source, visitor_number, watched].hash
328
436
  end
329
437
 
330
438
  # Builds the object from hash