ultracart_api 3.1.37 → 3.1.43

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 +109 -4
  3. data/docs/CouponTierAmount.md +1 -0
  4. data/docs/CouponTierPercent.md +1 -0
  5. data/docs/CouponTierQuantityAmount.md +1 -0
  6. data/docs/CouponTierQuantityPercent.md +1 -0
  7. data/docs/CouponTieredPercentOffShipping.md +1 -0
  8. data/docs/Item.md +1 -1
  9. data/docs/LibraryItemAttribute.md +1 -0
  10. data/docs/OrderApi.md +1 -1
  11. data/docs/OrderSummary.md +1 -0
  12. data/docs/ScreenRecordingFilterPageView.md +1 -0
  13. data/docs/ScreenRecordingFilterValuesPageView.md +1 -0
  14. data/docs/ScreenRecordingHeatmap.md +19 -0
  15. data/docs/ScreenRecordingHeatmapIndexResponse.md +12 -0
  16. data/docs/ScreenRecordingHeatmapRequest.md +9 -0
  17. data/docs/ScreenRecordingHeatmapReset.md +8 -0
  18. data/docs/ScreenRecordingHeatmapResponse.md +12 -0
  19. data/docs/ScreenRecordingHeatmapUrl.md +12 -0
  20. data/docs/ScreenRecordingPageView.md +1 -0
  21. data/docs/StorefrontApi.md +158 -0
  22. data/docs/WebhookLog.md +1 -0
  23. data/lib/ultracart_api.rb +6 -0
  24. data/lib/ultracart_api/api/order_api.rb +2 -2
  25. data/lib/ultracart_api/api/storefront_api.rb +176 -0
  26. data/lib/ultracart_api/models/coupon_tier_amount.rb +26 -1
  27. data/lib/ultracart_api/models/coupon_tier_percent.rb +26 -1
  28. data/lib/ultracart_api/models/coupon_tier_quantity_amount.rb +29 -4
  29. data/lib/ultracart_api/models/coupon_tier_quantity_percent.rb +29 -4
  30. data/lib/ultracart_api/models/coupon_tiered_percent_off_shipping.rb +26 -1
  31. data/lib/ultracart_api/models/item.rb +8 -8
  32. data/lib/ultracart_api/models/library_item_attribute.rb +10 -1
  33. data/lib/ultracart_api/models/order_summary.rb +10 -1
  34. data/lib/ultracart_api/models/screen_recording_filter_page_view.rb +10 -1
  35. data/lib/ultracart_api/models/screen_recording_filter_values_page_view.rb +12 -1
  36. data/lib/ultracart_api/models/screen_recording_heatmap.rb +283 -0
  37. data/lib/ultracart_api/models/screen_recording_heatmap_index_response.rb +223 -0
  38. data/lib/ultracart_api/models/screen_recording_heatmap_request.rb +193 -0
  39. data/lib/ultracart_api/models/screen_recording_heatmap_reset.rb +184 -0
  40. data/lib/ultracart_api/models/screen_recording_heatmap_response.rb +221 -0
  41. data/lib/ultracart_api/models/screen_recording_heatmap_url.rb +222 -0
  42. data/lib/ultracart_api/models/screen_recording_page_view.rb +10 -1
  43. data/lib/ultracart_api/models/webhook_log.rb +11 -1
  44. data/lib/ultracart_api/version.rb +1 -1
  45. metadata +14 -2
@@ -0,0 +1,221 @@
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 ScreenRecordingHeatmapResponse
17
+ attr_accessor :error
18
+
19
+ attr_accessor :heatmap
20
+
21
+ attr_accessor :metadata
22
+
23
+ # Indicates if API call was successful
24
+ attr_accessor :success
25
+
26
+ attr_accessor :warning
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'error' => :'error',
32
+ :'heatmap' => :'heatmap',
33
+ :'metadata' => :'metadata',
34
+ :'success' => :'success',
35
+ :'warning' => :'warning'
36
+ }
37
+ end
38
+
39
+ # Attribute type mapping.
40
+ def self.swagger_types
41
+ {
42
+ :'error' => :'Error',
43
+ :'heatmap' => :'ScreenRecordingHeatmap',
44
+ :'metadata' => :'ResponseMetadata',
45
+ :'success' => :'BOOLEAN',
46
+ :'warning' => :'Warning'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
57
+
58
+ if attributes.has_key?(:'error')
59
+ self.error = attributes[:'error']
60
+ end
61
+
62
+ if attributes.has_key?(:'heatmap')
63
+ self.heatmap = attributes[:'heatmap']
64
+ end
65
+
66
+ if attributes.has_key?(:'metadata')
67
+ self.metadata = attributes[:'metadata']
68
+ end
69
+
70
+ if attributes.has_key?(:'success')
71
+ self.success = attributes[:'success']
72
+ end
73
+
74
+ if attributes.has_key?(:'warning')
75
+ self.warning = attributes[:'warning']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ error == o.error &&
98
+ heatmap == o.heatmap &&
99
+ metadata == o.metadata &&
100
+ success == o.success &&
101
+ warning == o.warning
102
+ end
103
+
104
+ # @see the `==` method
105
+ # @param [Object] Object to be compared
106
+ def eql?(o)
107
+ self == o
108
+ end
109
+
110
+ # Calculates hash code according to all attributes.
111
+ # @return [Fixnum] Hash code
112
+ def hash
113
+ [error, heatmap, metadata, success, warning].hash
114
+ end
115
+
116
+ # Builds the object from hash
117
+ # @param [Hash] attributes Model attributes in the form of hash
118
+ # @return [Object] Returns the model itself
119
+ def build_from_hash(attributes)
120
+ return nil unless attributes.is_a?(Hash)
121
+ self.class.swagger_types.each_pair do |key, type|
122
+ if type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :DateTime
143
+ DateTime.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :BOOLEAN
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ temp_model = UltracartClient.const_get(type).new
174
+ temp_model.build_from_hash(value)
175
+ end
176
+ end
177
+
178
+ # Returns the string representation of the object
179
+ # @return [String] String presentation of the object
180
+ def to_s
181
+ to_hash.to_s
182
+ end
183
+
184
+ # to_body is an alias to to_hash (backward compatibility)
185
+ # @return [Hash] Returns the object in the form of hash
186
+ def to_body
187
+ to_hash
188
+ end
189
+
190
+ # Returns the object in the form of hash
191
+ # @return [Hash] Returns the object in the form of hash
192
+ def to_hash
193
+ hash = {}
194
+ self.class.attribute_map.each_pair do |attr, param|
195
+ value = self.send(attr)
196
+ next if value.nil?
197
+ hash[param] = _to_hash(value)
198
+ end
199
+ hash
200
+ end
201
+
202
+ # Outputs non-array value in the form of hash
203
+ # For object, use to_hash. Otherwise, just return the value
204
+ # @param [Object] value Any valid value
205
+ # @return [Hash] Returns the value in the form of hash
206
+ def _to_hash(value)
207
+ if value.is_a?(Array)
208
+ value.compact.map { |v| _to_hash(v) }
209
+ elsif value.is_a?(Hash)
210
+ {}.tap do |hash|
211
+ value.each { |k, v| hash[k] = _to_hash(v) }
212
+ end
213
+ elsif value.respond_to? :to_hash
214
+ value.to_hash
215
+ else
216
+ value
217
+ end
218
+ end
219
+
220
+ end
221
+ end
@@ -0,0 +1,222 @@
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 ScreenRecordingHeatmapUrl
17
+ attr_accessor :histogram_data
18
+
19
+ attr_accessor :histogram_interval
20
+
21
+ attr_accessor :histogram_start_dts
22
+
23
+ attr_accessor :session_count
24
+
25
+ attr_accessor :url
26
+
27
+ # Attribute mapping from ruby-style variable name to JSON key.
28
+ def self.attribute_map
29
+ {
30
+ :'histogram_data' => :'histogram_data',
31
+ :'histogram_interval' => :'histogram_interval',
32
+ :'histogram_start_dts' => :'histogram_start_dts',
33
+ :'session_count' => :'session_count',
34
+ :'url' => :'url'
35
+ }
36
+ end
37
+
38
+ # Attribute type mapping.
39
+ def self.swagger_types
40
+ {
41
+ :'histogram_data' => :'Array<Integer>',
42
+ :'histogram_interval' => :'String',
43
+ :'histogram_start_dts' => :'String',
44
+ :'session_count' => :'Integer',
45
+ :'url' => :'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?(:'histogram_data')
58
+ if (value = attributes[:'histogram_data']).is_a?(Array)
59
+ self.histogram_data = value
60
+ end
61
+ end
62
+
63
+ if attributes.has_key?(:'histogram_interval')
64
+ self.histogram_interval = attributes[:'histogram_interval']
65
+ end
66
+
67
+ if attributes.has_key?(:'histogram_start_dts')
68
+ self.histogram_start_dts = attributes[:'histogram_start_dts']
69
+ end
70
+
71
+ if attributes.has_key?(:'session_count')
72
+ self.session_count = attributes[:'session_count']
73
+ end
74
+
75
+ if attributes.has_key?(:'url')
76
+ self.url = attributes[:'url']
77
+ end
78
+ end
79
+
80
+ # Show invalid properties with the reasons. Usually used together with valid?
81
+ # @return Array for valid properties with the reasons
82
+ def list_invalid_properties
83
+ invalid_properties = Array.new
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ true
91
+ end
92
+
93
+ # Checks equality by comparing each attribute.
94
+ # @param [Object] Object to be compared
95
+ def ==(o)
96
+ return true if self.equal?(o)
97
+ self.class == o.class &&
98
+ histogram_data == o.histogram_data &&
99
+ histogram_interval == o.histogram_interval &&
100
+ histogram_start_dts == o.histogram_start_dts &&
101
+ session_count == o.session_count &&
102
+ url == o.url
103
+ end
104
+
105
+ # @see the `==` method
106
+ # @param [Object] Object to be compared
107
+ def eql?(o)
108
+ self == o
109
+ end
110
+
111
+ # Calculates hash code according to all attributes.
112
+ # @return [Fixnum] Hash code
113
+ def hash
114
+ [histogram_data, histogram_interval, histogram_start_dts, session_count, url].hash
115
+ end
116
+
117
+ # Builds the object from hash
118
+ # @param [Hash] attributes Model attributes in the form of hash
119
+ # @return [Object] Returns the model itself
120
+ def build_from_hash(attributes)
121
+ return nil unless attributes.is_a?(Hash)
122
+ self.class.swagger_types.each_pair do |key, type|
123
+ if type =~ /\AArray<(.*)>/i
124
+ # check to ensure the input is an array given that the attribute
125
+ # is documented as an array but the input is not
126
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
127
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
128
+ end
129
+ elsif !attributes[self.class.attribute_map[key]].nil?
130
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
131
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
132
+ end
133
+
134
+ self
135
+ end
136
+
137
+ # Deserializes the data based on type
138
+ # @param string type Data type
139
+ # @param string value Value to be deserialized
140
+ # @return [Object] Deserialized data
141
+ def _deserialize(type, value)
142
+ case type.to_sym
143
+ when :DateTime
144
+ DateTime.parse(value)
145
+ when :Date
146
+ Date.parse(value)
147
+ when :String
148
+ value.to_s
149
+ when :Integer
150
+ value.to_i
151
+ when :Float
152
+ value.to_f
153
+ when :BOOLEAN
154
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
155
+ true
156
+ else
157
+ false
158
+ end
159
+ when :Object
160
+ # generic object (usually a Hash), return directly
161
+ value
162
+ when /\AArray<(?<inner_type>.+)>\z/
163
+ inner_type = Regexp.last_match[:inner_type]
164
+ value.map { |v| _deserialize(inner_type, v) }
165
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
166
+ k_type = Regexp.last_match[:k_type]
167
+ v_type = Regexp.last_match[:v_type]
168
+ {}.tap do |hash|
169
+ value.each do |k, v|
170
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
171
+ end
172
+ end
173
+ else # model
174
+ temp_model = UltracartClient.const_get(type).new
175
+ temp_model.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ next if value.nil?
198
+ hash[param] = _to_hash(value)
199
+ end
200
+ hash
201
+ end
202
+
203
+ # Outputs non-array value in the form of hash
204
+ # For object, use to_hash. Otherwise, just return the value
205
+ # @param [Object] value Any valid value
206
+ # @return [Hash] Returns the value in the form of hash
207
+ def _to_hash(value)
208
+ if value.is_a?(Array)
209
+ value.compact.map { |v| _to_hash(v) }
210
+ elsif value.is_a?(Hash)
211
+ {}.tap do |hash|
212
+ value.each { |k, v| hash[k] = _to_hash(v) }
213
+ end
214
+ elsif value.respond_to? :to_hash
215
+ value.to_hash
216
+ else
217
+ value
218
+ end
219
+ end
220
+
221
+ end
222
+ end
@@ -14,6 +14,8 @@ require 'date'
14
14
 
15
15
  module UltracartClient
16
16
  class ScreenRecordingPageView
17
+ attr_accessor :domain
18
+
17
19
  attr_accessor :events
18
20
 
19
21
  # First event timestamp
@@ -57,6 +59,7 @@ module UltracartClient
57
59
  # Attribute mapping from ruby-style variable name to JSON key.
58
60
  def self.attribute_map
59
61
  {
62
+ :'domain' => :'domain',
60
63
  :'events' => :'events',
61
64
  :'first_event_timestamp' => :'first_event_timestamp',
62
65
  :'http_post' => :'http_post',
@@ -81,6 +84,7 @@ module UltracartClient
81
84
  # Attribute type mapping.
82
85
  def self.swagger_types
83
86
  {
87
+ :'domain' => :'String',
84
88
  :'events' => :'Array<ScreenRecordingPageViewEvent>',
85
89
  :'first_event_timestamp' => :'String',
86
90
  :'http_post' => :'BOOLEAN',
@@ -110,6 +114,10 @@ module UltracartClient
110
114
  # convert string to symbol for hash key
111
115
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
112
116
 
117
+ if attributes.has_key?(:'domain')
118
+ self.domain = attributes[:'domain']
119
+ end
120
+
113
121
  if attributes.has_key?(:'events')
114
122
  if (value = attributes[:'events']).is_a?(Array)
115
123
  self.events = value
@@ -207,6 +215,7 @@ module UltracartClient
207
215
  def ==(o)
208
216
  return true if self.equal?(o)
209
217
  self.class == o.class &&
218
+ domain == o.domain &&
210
219
  events == o.events &&
211
220
  first_event_timestamp == o.first_event_timestamp &&
212
221
  http_post == o.http_post &&
@@ -236,7 +245,7 @@ module UltracartClient
236
245
  # Calculates hash code according to all attributes.
237
246
  # @return [Fixnum] Hash code
238
247
  def 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
248
+ [domain, 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
240
249
  end
241
250
 
242
251
  # Builds the object from hash