ultracart_api 4.0.142 → 4.0.144

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3dce739be4025bcd99ac8d626b79fdfb30645cea7cc13189b83f1981c032a9ce
4
- data.tar.gz: d65ba1847ed8076977214b23a141219024cc94bc4dfebb236c08687558017c98
3
+ metadata.gz: 68fb71fdebd9db9a11b4efdc375f11acfc252232ecb998c01e45dd3a210dc35a
4
+ data.tar.gz: f6959bceb05282bfd5d1af9f0021ef7d9d3072908665e62a7ca6461b15d1de91
5
5
  SHA512:
6
- metadata.gz: 8011b5dd6bbc45a1e953683281d2c2cf2e92b1d4364ab275d2bb3c8aebc532df180fad78411983b28fe2aa3578b75b4deab87fc67f33539faf399093ba7756bf
7
- data.tar.gz: 56ba4b248a0ab7981fb913ebaf0eec3e9657ed99b3aacf0c9f900f032f9e331c37b0b6d483c8c9d13e7b3f9a8a451dac2b10bf46285793dcf9709c1a554ff4dc
6
+ metadata.gz: fb87b0de09a27b85b50783414b449c2c6a1d1d4330b6e33748e6a734af26d8226dd0e03b8a03be6e0e1a1f415aa0f64bed82d8400809ca66e4f0b2e9b0b88ebe
7
+ data.tar.gz: b8219a5ca433d0ddb1ecfb61e334bc23627e77cc9591bb7db72c230dc857714199ac8776e845af0940168c2caf602947a861cdae8e4db229ae9d13f306b97cc8
data/README.md CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
7
7
  This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
8
8
 
9
9
  - API version: 2.0.0
10
- - Package version: 4.0.142
10
+ - Package version: 4.0.144
11
11
  - Build package: org.openapitools.codegen.languages.RubyClientCodegen
12
12
  For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
13
13
 
@@ -24,16 +24,16 @@ gem build ultracart_api.gemspec
24
24
  Then either install the gem locally:
25
25
 
26
26
  ```shell
27
- gem install ./ultracart_api-4.0.142.gem
27
+ gem install ./ultracart_api-4.0.144.gem
28
28
  ```
29
29
 
30
- (for development, run `gem install --dev ./ultracart_api-4.0.142.gem` to install the development dependencies)
30
+ (for development, run `gem install --dev ./ultracart_api-4.0.144.gem` to install the development dependencies)
31
31
 
32
32
  or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
33
33
 
34
34
  Finally add this to the Gemfile:
35
35
 
36
- gem 'ultracart_api', '~> 4.0.142'
36
+ gem 'ultracart_api', '~> 4.0.144'
37
37
 
38
38
  ### Install from Git
39
39
 
@@ -1153,6 +1153,7 @@ Class | Method | HTTP request | Description
1153
1153
  - [UltracartClient::ReportPageVisualizationDimension](docs/ReportPageVisualizationDimension.md)
1154
1154
  - [UltracartClient::ReportPageVisualizationMetric](docs/ReportPageVisualizationMetric.md)
1155
1155
  - [UltracartClient::ReportResponse](docs/ReportResponse.md)
1156
+ - [UltracartClient::ReportWebsocketEvent](docs/ReportWebsocketEvent.md)
1156
1157
  - [UltracartClient::ReportsResponse](docs/ReportsResponse.md)
1157
1158
  - [UltracartClient::ResponseMetadata](docs/ResponseMetadata.md)
1158
1159
  - [UltracartClient::ResultSet](docs/ResultSet.md)
@@ -1346,6 +1347,8 @@ Not every change is committed to every SDK.
1346
1347
 
1347
1348
  | Version | Date | Comments |
1348
1349
  | --: | :-: | --- |
1350
+ | 4.0.144 | 03/29/2023 | internal development |
1351
+ | 4.0.143 | 03/22/2023 | data warehouse internal dev |
1349
1352
  | 4.0.142 | 03/22/2023 | dw initial framework |
1350
1353
  | 4.0.141 | 03/22/2023 | order api - refundable response added manual_because_multiple_charges boolean field |
1351
1354
  | 4.0.140 | 03/21/2023 | order api - new stage named Hold |
data/docs/Experiment.md CHANGED
@@ -14,7 +14,12 @@
14
14
  | **notes** | **String** | Notes about the experiment | [optional] |
15
15
  | **objective** | **String** | Objective that is being optimized | [optional] |
16
16
  | **objective_parameter** | **String** | Objective parameter (such as event name) that is being optimized | [optional] |
17
+ | **openai_current_iteration** | **Integer** | The current iteration of the OpenAI related experiment | [optional] |
18
+ | **openai_element_type** | **String** | The type of OpenAI element being experimented on | [optional] |
19
+ | **openai_model** | **String** | The type of OpenAI model used | [optional] |
20
+ | **openai_total_iterations** | **Integer** | The total number of iterations to perform on the experiment | [optional] |
17
21
  | **optimization_type** | **String** | Type of optimization | [optional] |
22
+ | **p_value** | **Float** | Statistics p-value for the experiment | [optional] |
18
23
  | **session_count** | **Integer** | Total number of sessions in the experiment | [optional] |
19
24
  | **start_dts** | **String** | Start date/time | [optional] |
20
25
  | **status** | **String** | Status of the experiment | [optional] |
@@ -39,7 +44,12 @@ instance = UltracartClient::Experiment.new(
39
44
  notes: null,
40
45
  objective: null,
41
46
  objective_parameter: null,
47
+ openai_current_iteration: null,
48
+ openai_element_type: null,
49
+ openai_model: null,
50
+ openai_total_iterations: null,
42
51
  optimization_type: null,
52
+ p_value: null,
43
53
  session_count: null,
44
54
  start_dts: null,
45
55
  status: null,
@@ -0,0 +1,20 @@
1
+ # UltracartClient::ReportWebsocketEvent
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **event_type** | **String** | Event type | [optional] |
8
+ | **query_completion** | [**ReportDataSet**](ReportDataSet.md) | | [optional] |
9
+
10
+ ## Example
11
+
12
+ ```ruby
13
+ require 'ultracart_api'
14
+
15
+ instance = UltracartClient::ReportWebsocketEvent.new(
16
+ event_type: null,
17
+ query_completion: null
18
+ )
19
+ ```
20
+
@@ -45,9 +45,24 @@ module UltracartClient
45
45
  # Objective parameter (such as event name) that is being optimized
46
46
  attr_accessor :objective_parameter
47
47
 
48
+ # The current iteration of the OpenAI related experiment
49
+ attr_accessor :openai_current_iteration
50
+
51
+ # The type of OpenAI element being experimented on
52
+ attr_accessor :openai_element_type
53
+
54
+ # The type of OpenAI model used
55
+ attr_accessor :openai_model
56
+
57
+ # The total number of iterations to perform on the experiment
58
+ attr_accessor :openai_total_iterations
59
+
48
60
  # Type of optimization
49
61
  attr_accessor :optimization_type
50
62
 
63
+ # Statistics p-value for the experiment
64
+ attr_accessor :p_value
65
+
51
66
  # Total number of sessions in the experiment
52
67
  attr_accessor :session_count
53
68
 
@@ -104,7 +119,12 @@ module UltracartClient
104
119
  :'notes' => :'notes',
105
120
  :'objective' => :'objective',
106
121
  :'objective_parameter' => :'objective_parameter',
122
+ :'openai_current_iteration' => :'openai_current_iteration',
123
+ :'openai_element_type' => :'openai_element_type',
124
+ :'openai_model' => :'openai_model',
125
+ :'openai_total_iterations' => :'openai_total_iterations',
107
126
  :'optimization_type' => :'optimization_type',
127
+ :'p_value' => :'p_value',
108
128
  :'session_count' => :'session_count',
109
129
  :'start_dts' => :'start_dts',
110
130
  :'status' => :'status',
@@ -133,7 +153,12 @@ module UltracartClient
133
153
  :'notes' => :'String',
134
154
  :'objective' => :'String',
135
155
  :'objective_parameter' => :'String',
156
+ :'openai_current_iteration' => :'Integer',
157
+ :'openai_element_type' => :'String',
158
+ :'openai_model' => :'String',
159
+ :'openai_total_iterations' => :'Integer',
136
160
  :'optimization_type' => :'String',
161
+ :'p_value' => :'Float',
137
162
  :'session_count' => :'Integer',
138
163
  :'start_dts' => :'String',
139
164
  :'status' => :'String',
@@ -205,10 +230,30 @@ module UltracartClient
205
230
  self.objective_parameter = attributes[:'objective_parameter']
206
231
  end
207
232
 
233
+ if attributes.key?(:'openai_current_iteration')
234
+ self.openai_current_iteration = attributes[:'openai_current_iteration']
235
+ end
236
+
237
+ if attributes.key?(:'openai_element_type')
238
+ self.openai_element_type = attributes[:'openai_element_type']
239
+ end
240
+
241
+ if attributes.key?(:'openai_model')
242
+ self.openai_model = attributes[:'openai_model']
243
+ end
244
+
245
+ if attributes.key?(:'openai_total_iterations')
246
+ self.openai_total_iterations = attributes[:'openai_total_iterations']
247
+ end
248
+
208
249
  if attributes.key?(:'optimization_type')
209
250
  self.optimization_type = attributes[:'optimization_type']
210
251
  end
211
252
 
253
+ if attributes.key?(:'p_value')
254
+ self.p_value = attributes[:'p_value']
255
+ end
256
+
212
257
  if attributes.key?(:'session_count')
213
258
  self.session_count = attributes[:'session_count']
214
259
  end
@@ -250,11 +295,23 @@ module UltracartClient
250
295
  # Check to see if the all the properties in the model are valid
251
296
  # @return true if the model is valid
252
297
  def valid?
298
+ openai_element_type_validator = EnumAttributeValidator.new('String', ["headline", "text", "textblock"])
299
+ return false unless openai_element_type_validator.valid?(@openai_element_type)
253
300
  status_validator = EnumAttributeValidator.new('String', ["Running", "Ended", "Deleted"])
254
301
  return false unless status_validator.valid?(@status)
255
302
  true
256
303
  end
257
304
 
305
+ # Custom attribute writer method checking allowed values (enum).
306
+ # @param [Object] openai_element_type Object to be assigned
307
+ def openai_element_type=(openai_element_type)
308
+ validator = EnumAttributeValidator.new('String', ["headline", "text", "textblock"])
309
+ unless validator.valid?(openai_element_type)
310
+ fail ArgumentError, "invalid value for \"openai_element_type\", must be one of #{validator.allowable_values}."
311
+ end
312
+ @openai_element_type = openai_element_type
313
+ end
314
+
258
315
  # Custom attribute writer method checking allowed values (enum).
259
316
  # @param [Object] status Object to be assigned
260
317
  def status=(status)
@@ -280,7 +337,12 @@ module UltracartClient
280
337
  notes == o.notes &&
281
338
  objective == o.objective &&
282
339
  objective_parameter == o.objective_parameter &&
340
+ openai_current_iteration == o.openai_current_iteration &&
341
+ openai_element_type == o.openai_element_type &&
342
+ openai_model == o.openai_model &&
343
+ openai_total_iterations == o.openai_total_iterations &&
283
344
  optimization_type == o.optimization_type &&
345
+ p_value == o.p_value &&
284
346
  session_count == o.session_count &&
285
347
  start_dts == o.start_dts &&
286
348
  status == o.status &&
@@ -299,7 +361,7 @@ module UltracartClient
299
361
  # Calculates hash code according to all attributes.
300
362
  # @return [Integer] Hash code
301
363
  def hash
302
- [container_id, duration_days, end_dts, equal_weighting, experiment_type, id, name, notes, objective, objective_parameter, optimization_type, session_count, start_dts, status, storefront_experiment_oid, storefront_oid, uri, variations].hash
364
+ [container_id, duration_days, end_dts, equal_weighting, experiment_type, id, name, notes, objective, objective_parameter, openai_current_iteration, openai_element_type, openai_model, openai_total_iterations, optimization_type, p_value, session_count, start_dts, status, storefront_experiment_oid, storefront_oid, uri, variations].hash
303
365
  end
304
366
 
305
367
  # Builds the object from hash
@@ -0,0 +1,263 @@
1
+ =begin
2
+ #UltraCart Rest API V2
3
+
4
+ #UltraCart REST API Version 2
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 6.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module UltracartClient
17
+ class ReportWebsocketEvent
18
+ # Event type
19
+ attr_accessor :event_type
20
+
21
+ attr_accessor :query_completion
22
+
23
+ class EnumAttributeValidator
24
+ attr_reader :datatype
25
+ attr_reader :allowable_values
26
+
27
+ def initialize(datatype, allowable_values)
28
+ @allowable_values = allowable_values.map do |value|
29
+ case datatype.to_s
30
+ when /Integer/i
31
+ value.to_i
32
+ when /Float/i
33
+ value.to_f
34
+ else
35
+ value
36
+ end
37
+ end
38
+ end
39
+
40
+ def valid?(value)
41
+ !value || allowable_values.include?(value)
42
+ end
43
+ end
44
+
45
+ # Attribute mapping from ruby-style variable name to JSON key.
46
+ def self.attribute_map
47
+ {
48
+ :'event_type' => :'event_type',
49
+ :'query_completion' => :'query_completion'
50
+ }
51
+ end
52
+
53
+ # Returns all the JSON keys this model knows about
54
+ def self.acceptable_attributes
55
+ attribute_map.values
56
+ end
57
+
58
+ # Attribute type mapping.
59
+ def self.openapi_types
60
+ {
61
+ :'event_type' => :'String',
62
+ :'query_completion' => :'ReportDataSet'
63
+ }
64
+ end
65
+
66
+ # List of attributes with nullable: true
67
+ def self.openapi_nullable
68
+ Set.new([
69
+ ])
70
+ end
71
+
72
+ # Initializes the object
73
+ # @param [Hash] attributes Model attributes in the form of hash
74
+ def initialize(attributes = {})
75
+ if (!attributes.is_a?(Hash))
76
+ fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ReportWebsocketEvent` initialize method"
77
+ end
78
+
79
+ # check to see if the attribute exists and convert string to symbol for hash key
80
+ attributes = attributes.each_with_object({}) { |(k, v), h|
81
+ if (!self.class.attribute_map.key?(k.to_sym))
82
+ fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ReportWebsocketEvent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
83
+ end
84
+ h[k.to_sym] = v
85
+ }
86
+
87
+ if attributes.key?(:'event_type')
88
+ self.event_type = attributes[:'event_type']
89
+ end
90
+
91
+ if attributes.key?(:'query_completion')
92
+ self.query_completion = attributes[:'query_completion']
93
+ end
94
+ end
95
+
96
+ # Show invalid properties with the reasons. Usually used together with valid?
97
+ # @return Array for valid properties with the reasons
98
+ def list_invalid_properties
99
+ invalid_properties = Array.new
100
+ invalid_properties
101
+ end
102
+
103
+ # Check to see if the all the properties in the model are valid
104
+ # @return true if the model is valid
105
+ def valid?
106
+ event_type_validator = EnumAttributeValidator.new('String', ["ping", "query completion"])
107
+ return false unless event_type_validator.valid?(@event_type)
108
+ true
109
+ end
110
+
111
+ # Custom attribute writer method checking allowed values (enum).
112
+ # @param [Object] event_type Object to be assigned
113
+ def event_type=(event_type)
114
+ validator = EnumAttributeValidator.new('String', ["ping", "query completion"])
115
+ unless validator.valid?(event_type)
116
+ fail ArgumentError, "invalid value for \"event_type\", must be one of #{validator.allowable_values}."
117
+ end
118
+ @event_type = event_type
119
+ end
120
+
121
+ # Checks equality by comparing each attribute.
122
+ # @param [Object] Object to be compared
123
+ def ==(o)
124
+ return true if self.equal?(o)
125
+ self.class == o.class &&
126
+ event_type == o.event_type &&
127
+ query_completion == o.query_completion
128
+ end
129
+
130
+ # @see the `==` method
131
+ # @param [Object] Object to be compared
132
+ def eql?(o)
133
+ self == o
134
+ end
135
+
136
+ # Calculates hash code according to all attributes.
137
+ # @return [Integer] Hash code
138
+ def hash
139
+ [event_type, query_completion].hash
140
+ end
141
+
142
+ # Builds the object from hash
143
+ # @param [Hash] attributes Model attributes in the form of hash
144
+ # @return [Object] Returns the model itself
145
+ def self.build_from_hash(attributes)
146
+ new.build_from_hash(attributes)
147
+ end
148
+
149
+ # Builds the object from hash
150
+ # @param [Hash] attributes Model attributes in the form of hash
151
+ # @return [Object] Returns the model itself
152
+ def build_from_hash(attributes)
153
+ return nil unless attributes.is_a?(Hash)
154
+ attributes = attributes.transform_keys(&:to_sym)
155
+ self.class.openapi_types.each_pair do |key, type|
156
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
157
+ self.send("#{key}=", nil)
158
+ elsif type =~ /\AArray<(.*)>/i
159
+ # check to ensure the input is an array given that the attribute
160
+ # is documented as an array but the input is not
161
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
162
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
163
+ end
164
+ elsif !attributes[self.class.attribute_map[key]].nil?
165
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
166
+ end
167
+ end
168
+
169
+ self
170
+ end
171
+
172
+ # Deserializes the data based on type
173
+ # @param string type Data type
174
+ # @param string value Value to be deserialized
175
+ # @return [Object] Deserialized data
176
+ def _deserialize(type, value)
177
+ case type.to_sym
178
+ when :Time
179
+ Time.parse(value)
180
+ when :Date
181
+ Date.parse(value)
182
+ when :String
183
+ value.to_s
184
+ when :Integer
185
+ value.to_i
186
+ when :Float
187
+ value.to_f
188
+ when :Boolean
189
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
190
+ true
191
+ else
192
+ false
193
+ end
194
+ when :Object
195
+ # generic object (usually a Hash), return directly
196
+ value
197
+ when /\AArray<(?<inner_type>.+)>\z/
198
+ inner_type = Regexp.last_match[:inner_type]
199
+ value.map { |v| _deserialize(inner_type, v) }
200
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
201
+ k_type = Regexp.last_match[:k_type]
202
+ v_type = Regexp.last_match[:v_type]
203
+ {}.tap do |hash|
204
+ value.each do |k, v|
205
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
206
+ end
207
+ end
208
+ else # model
209
+ # models (e.g. Pet) or oneOf
210
+ klass = UltracartClient.const_get(type)
211
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
212
+ end
213
+ end
214
+
215
+ # Returns the string representation of the object
216
+ # @return [String] String presentation of the object
217
+ def to_s
218
+ to_hash.to_s
219
+ end
220
+
221
+ # to_body is an alias to to_hash (backward compatibility)
222
+ # @return [Hash] Returns the object in the form of hash
223
+ def to_body
224
+ to_hash
225
+ end
226
+
227
+ # Returns the object in the form of hash
228
+ # @return [Hash] Returns the object in the form of hash
229
+ def to_hash
230
+ hash = {}
231
+ self.class.attribute_map.each_pair do |attr, param|
232
+ value = self.send(attr)
233
+ if value.nil?
234
+ is_nullable = self.class.openapi_nullable.include?(attr)
235
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
236
+ end
237
+
238
+ hash[param] = _to_hash(value)
239
+ end
240
+ hash
241
+ end
242
+
243
+ # Outputs non-array value in the form of hash
244
+ # For object, use to_hash. Otherwise, just return the value
245
+ # @param [Object] value Any valid value
246
+ # @return [Hash] Returns the value in the form of hash
247
+ def _to_hash(value)
248
+ if value.is_a?(Array)
249
+ value.compact.map { |v| _to_hash(v) }
250
+ elsif value.is_a?(Hash)
251
+ {}.tap do |hash|
252
+ value.each { |k, v| hash[k] = _to_hash(v) }
253
+ end
254
+ elsif value.respond_to? :to_hash
255
+ value.to_hash
256
+ else
257
+ value
258
+ end
259
+ end
260
+
261
+ end
262
+
263
+ end
@@ -11,5 +11,5 @@ OpenAPI Generator version: 6.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module UltracartClient
14
- VERSION = '4.0.142'
14
+ VERSION = '4.0.144'
15
15
  end
data/lib/ultracart_api.rb CHANGED
@@ -661,6 +661,7 @@ require 'ultracart_api/models/report_page_visualization'
661
661
  require 'ultracart_api/models/report_page_visualization_dimension'
662
662
  require 'ultracart_api/models/report_page_visualization_metric'
663
663
  require 'ultracart_api/models/report_response'
664
+ require 'ultracart_api/models/report_websocket_event'
664
665
  require 'ultracart_api/models/reports_response'
665
666
  require 'ultracart_api/models/response_metadata'
666
667
  require 'ultracart_api/models/result_set'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ultracart_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.142
4
+ version: 4.0.144
5
5
  platform: ruby
6
6
  authors:
7
7
  - UltraCart
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-22 00:00:00.000000000 Z
11
+ date: 2023-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -720,6 +720,7 @@ files:
720
720
  - docs/ReportPageVisualizationDimension.md
721
721
  - docs/ReportPageVisualizationMetric.md
722
722
  - docs/ReportResponse.md
723
+ - docs/ReportWebsocketEvent.md
723
724
  - docs/ReportsResponse.md
724
725
  - docs/ResponseMetadata.md
725
726
  - docs/ResultSet.md
@@ -1514,6 +1515,7 @@ files:
1514
1515
  - lib/ultracart_api/models/report_page_visualization_dimension.rb
1515
1516
  - lib/ultracart_api/models/report_page_visualization_metric.rb
1516
1517
  - lib/ultracart_api/models/report_response.rb
1518
+ - lib/ultracart_api/models/report_websocket_event.rb
1517
1519
  - lib/ultracart_api/models/reports_response.rb
1518
1520
  - lib/ultracart_api/models/response_metadata.rb
1519
1521
  - lib/ultracart_api/models/result_set.rb