ultracart_api 4.0.142 → 4.0.143
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.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/ReportDataSetSummary.md +30 -0
- data/docs/ReportWebsocketEvent.md +20 -0
- data/lib/ultracart_api/models/report_data_set_summary.rb +316 -0
- data/lib/ultracart_api/models/report_websocket_event.rb +263 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +5 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 70a3a20e89bbd3ddaefed8abbcfe856321e4a59137f76e14fcbd0e54da9f28ee
|
4
|
+
data.tar.gz: 3f01ed0057b15ec7aa051c281506b70d3176b1688071ddbb4e21537903c3ae60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25e6f5e8e0e1209b1972452f5bb64a0850b1699d30ae051b059588518547823fbe46905a71bf9892bdb6f452e2212f8cfee795d90de0e97936de1dd289a9e4e2
|
7
|
+
data.tar.gz: d6ef73f40c9e4bd1ba4bd384527216ef55bbc563c3830cd09017c92fb77c5984c98b30e27aeae6e20e722b5547d9f65ff4af50cc37d0c44c422165c598ffe24f
|
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.
|
10
|
+
- Package version: 4.0.143
|
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.
|
27
|
+
gem install ./ultracart_api-4.0.143.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./ultracart_api-4.0.
|
30
|
+
(for development, run `gem install --dev ./ultracart_api-4.0.143.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.
|
36
|
+
gem 'ultracart_api', '~> 4.0.143'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -1143,6 +1143,7 @@ Class | Method | HTTP request | Description
|
|
1143
1143
|
- [UltracartClient::ReportDataSetResponse](docs/ReportDataSetResponse.md)
|
1144
1144
|
- [UltracartClient::ReportDataSetRow](docs/ReportDataSetRow.md)
|
1145
1145
|
- [UltracartClient::ReportDataSetSchema](docs/ReportDataSetSchema.md)
|
1146
|
+
- [UltracartClient::ReportDataSetSummary](docs/ReportDataSetSummary.md)
|
1146
1147
|
- [UltracartClient::ReportDataSource](docs/ReportDataSource.md)
|
1147
1148
|
- [UltracartClient::ReportDataSourceSchema](docs/ReportDataSourceSchema.md)
|
1148
1149
|
- [UltracartClient::ReportExecuteQueriesRequest](docs/ReportExecuteQueriesRequest.md)
|
@@ -1153,6 +1154,7 @@ Class | Method | HTTP request | Description
|
|
1153
1154
|
- [UltracartClient::ReportPageVisualizationDimension](docs/ReportPageVisualizationDimension.md)
|
1154
1155
|
- [UltracartClient::ReportPageVisualizationMetric](docs/ReportPageVisualizationMetric.md)
|
1155
1156
|
- [UltracartClient::ReportResponse](docs/ReportResponse.md)
|
1157
|
+
- [UltracartClient::ReportWebsocketEvent](docs/ReportWebsocketEvent.md)
|
1156
1158
|
- [UltracartClient::ReportsResponse](docs/ReportsResponse.md)
|
1157
1159
|
- [UltracartClient::ResponseMetadata](docs/ResponseMetadata.md)
|
1158
1160
|
- [UltracartClient::ResultSet](docs/ResultSet.md)
|
@@ -1346,6 +1348,7 @@ Not every change is committed to every SDK.
|
|
1346
1348
|
|
1347
1349
|
| Version | Date | Comments |
|
1348
1350
|
| --: | :-: | --- |
|
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 |
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# UltracartClient::ReportDataSetSummary
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **data_set_uuid** | **String** | A unique identifier assigned to the data set that is returned. | [optional] |
|
8
|
+
| **error_message** | **String** | Error message if the query failed. | [optional] |
|
9
|
+
| **for_object_id** | **String** | An identifier that can be used to help match up the returned data set | [optional] |
|
10
|
+
| **for_object_type** | **String** | The type of object this data set is for | [optional] |
|
11
|
+
| **max_results** | **Integer** | The total number of results | [optional] |
|
12
|
+
| **schema** | [**Array<ReportDataSetSchema>**](ReportDataSetSchema.md) | The schema associated with the data set. | [optional] |
|
13
|
+
| **user_data** | **String** | Any other data that needs to be returned with the response to help the UI | [optional] |
|
14
|
+
|
15
|
+
## Example
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'ultracart_api'
|
19
|
+
|
20
|
+
instance = UltracartClient::ReportDataSetSummary.new(
|
21
|
+
data_set_uuid: null,
|
22
|
+
error_message: null,
|
23
|
+
for_object_id: null,
|
24
|
+
for_object_type: null,
|
25
|
+
max_results: null,
|
26
|
+
schema: null,
|
27
|
+
user_data: null
|
28
|
+
)
|
29
|
+
```
|
30
|
+
|
@@ -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** | [**ReportDataSetSummary**](ReportDataSetSummary.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
|
+
|
@@ -0,0 +1,316 @@
|
|
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 ReportDataSetSummary
|
18
|
+
# A unique identifier assigned to the data set that is returned.
|
19
|
+
attr_accessor :data_set_uuid
|
20
|
+
|
21
|
+
# Error message if the query failed.
|
22
|
+
attr_accessor :error_message
|
23
|
+
|
24
|
+
# An identifier that can be used to help match up the returned data set
|
25
|
+
attr_accessor :for_object_id
|
26
|
+
|
27
|
+
# The type of object this data set is for
|
28
|
+
attr_accessor :for_object_type
|
29
|
+
|
30
|
+
# The total number of results
|
31
|
+
attr_accessor :max_results
|
32
|
+
|
33
|
+
# The schema associated with the data set.
|
34
|
+
attr_accessor :schema
|
35
|
+
|
36
|
+
# Any other data that needs to be returned with the response to help the UI
|
37
|
+
attr_accessor :user_data
|
38
|
+
|
39
|
+
class EnumAttributeValidator
|
40
|
+
attr_reader :datatype
|
41
|
+
attr_reader :allowable_values
|
42
|
+
|
43
|
+
def initialize(datatype, allowable_values)
|
44
|
+
@allowable_values = allowable_values.map do |value|
|
45
|
+
case datatype.to_s
|
46
|
+
when /Integer/i
|
47
|
+
value.to_i
|
48
|
+
when /Float/i
|
49
|
+
value.to_f
|
50
|
+
else
|
51
|
+
value
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
def valid?(value)
|
57
|
+
!value || allowable_values.include?(value)
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
62
|
+
def self.attribute_map
|
63
|
+
{
|
64
|
+
:'data_set_uuid' => :'data_set_uuid',
|
65
|
+
:'error_message' => :'error_message',
|
66
|
+
:'for_object_id' => :'for_object_id',
|
67
|
+
:'for_object_type' => :'for_object_type',
|
68
|
+
:'max_results' => :'max_results',
|
69
|
+
:'schema' => :'schema',
|
70
|
+
:'user_data' => :'user_data'
|
71
|
+
}
|
72
|
+
end
|
73
|
+
|
74
|
+
# Returns all the JSON keys this model knows about
|
75
|
+
def self.acceptable_attributes
|
76
|
+
attribute_map.values
|
77
|
+
end
|
78
|
+
|
79
|
+
# Attribute type mapping.
|
80
|
+
def self.openapi_types
|
81
|
+
{
|
82
|
+
:'data_set_uuid' => :'String',
|
83
|
+
:'error_message' => :'String',
|
84
|
+
:'for_object_id' => :'String',
|
85
|
+
:'for_object_type' => :'String',
|
86
|
+
:'max_results' => :'Integer',
|
87
|
+
:'schema' => :'Array<ReportDataSetSchema>',
|
88
|
+
:'user_data' => :'String'
|
89
|
+
}
|
90
|
+
end
|
91
|
+
|
92
|
+
# List of attributes with nullable: true
|
93
|
+
def self.openapi_nullable
|
94
|
+
Set.new([
|
95
|
+
])
|
96
|
+
end
|
97
|
+
|
98
|
+
# Initializes the object
|
99
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
100
|
+
def initialize(attributes = {})
|
101
|
+
if (!attributes.is_a?(Hash))
|
102
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ReportDataSetSummary` initialize method"
|
103
|
+
end
|
104
|
+
|
105
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
106
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
107
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
108
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ReportDataSetSummary`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
109
|
+
end
|
110
|
+
h[k.to_sym] = v
|
111
|
+
}
|
112
|
+
|
113
|
+
if attributes.key?(:'data_set_uuid')
|
114
|
+
self.data_set_uuid = attributes[:'data_set_uuid']
|
115
|
+
end
|
116
|
+
|
117
|
+
if attributes.key?(:'error_message')
|
118
|
+
self.error_message = attributes[:'error_message']
|
119
|
+
end
|
120
|
+
|
121
|
+
if attributes.key?(:'for_object_id')
|
122
|
+
self.for_object_id = attributes[:'for_object_id']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes.key?(:'for_object_type')
|
126
|
+
self.for_object_type = attributes[:'for_object_type']
|
127
|
+
end
|
128
|
+
|
129
|
+
if attributes.key?(:'max_results')
|
130
|
+
self.max_results = attributes[:'max_results']
|
131
|
+
end
|
132
|
+
|
133
|
+
if attributes.key?(:'schema')
|
134
|
+
if (value = attributes[:'schema']).is_a?(Array)
|
135
|
+
self.schema = value
|
136
|
+
end
|
137
|
+
end
|
138
|
+
|
139
|
+
if attributes.key?(:'user_data')
|
140
|
+
self.user_data = attributes[:'user_data']
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
145
|
+
# @return Array for valid properties with the reasons
|
146
|
+
def list_invalid_properties
|
147
|
+
invalid_properties = Array.new
|
148
|
+
invalid_properties
|
149
|
+
end
|
150
|
+
|
151
|
+
# Check to see if the all the properties in the model are valid
|
152
|
+
# @return true if the model is valid
|
153
|
+
def valid?
|
154
|
+
for_object_type_validator = EnumAttributeValidator.new('String', ["schema", "filter", "visualization"])
|
155
|
+
return false unless for_object_type_validator.valid?(@for_object_type)
|
156
|
+
true
|
157
|
+
end
|
158
|
+
|
159
|
+
# Custom attribute writer method checking allowed values (enum).
|
160
|
+
# @param [Object] for_object_type Object to be assigned
|
161
|
+
def for_object_type=(for_object_type)
|
162
|
+
validator = EnumAttributeValidator.new('String', ["schema", "filter", "visualization"])
|
163
|
+
unless validator.valid?(for_object_type)
|
164
|
+
fail ArgumentError, "invalid value for \"for_object_type\", must be one of #{validator.allowable_values}."
|
165
|
+
end
|
166
|
+
@for_object_type = for_object_type
|
167
|
+
end
|
168
|
+
|
169
|
+
# Checks equality by comparing each attribute.
|
170
|
+
# @param [Object] Object to be compared
|
171
|
+
def ==(o)
|
172
|
+
return true if self.equal?(o)
|
173
|
+
self.class == o.class &&
|
174
|
+
data_set_uuid == o.data_set_uuid &&
|
175
|
+
error_message == o.error_message &&
|
176
|
+
for_object_id == o.for_object_id &&
|
177
|
+
for_object_type == o.for_object_type &&
|
178
|
+
max_results == o.max_results &&
|
179
|
+
schema == o.schema &&
|
180
|
+
user_data == o.user_data
|
181
|
+
end
|
182
|
+
|
183
|
+
# @see the `==` method
|
184
|
+
# @param [Object] Object to be compared
|
185
|
+
def eql?(o)
|
186
|
+
self == o
|
187
|
+
end
|
188
|
+
|
189
|
+
# Calculates hash code according to all attributes.
|
190
|
+
# @return [Integer] Hash code
|
191
|
+
def hash
|
192
|
+
[data_set_uuid, error_message, for_object_id, for_object_type, max_results, schema, user_data].hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Builds the object from hash
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
# @return [Object] Returns the model itself
|
198
|
+
def self.build_from_hash(attributes)
|
199
|
+
new.build_from_hash(attributes)
|
200
|
+
end
|
201
|
+
|
202
|
+
# Builds the object from hash
|
203
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
204
|
+
# @return [Object] Returns the model itself
|
205
|
+
def build_from_hash(attributes)
|
206
|
+
return nil unless attributes.is_a?(Hash)
|
207
|
+
attributes = attributes.transform_keys(&:to_sym)
|
208
|
+
self.class.openapi_types.each_pair do |key, type|
|
209
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
210
|
+
self.send("#{key}=", nil)
|
211
|
+
elsif type =~ /\AArray<(.*)>/i
|
212
|
+
# check to ensure the input is an array given that the attribute
|
213
|
+
# is documented as an array but the input is not
|
214
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
215
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
216
|
+
end
|
217
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
218
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
219
|
+
end
|
220
|
+
end
|
221
|
+
|
222
|
+
self
|
223
|
+
end
|
224
|
+
|
225
|
+
# Deserializes the data based on type
|
226
|
+
# @param string type Data type
|
227
|
+
# @param string value Value to be deserialized
|
228
|
+
# @return [Object] Deserialized data
|
229
|
+
def _deserialize(type, value)
|
230
|
+
case type.to_sym
|
231
|
+
when :Time
|
232
|
+
Time.parse(value)
|
233
|
+
when :Date
|
234
|
+
Date.parse(value)
|
235
|
+
when :String
|
236
|
+
value.to_s
|
237
|
+
when :Integer
|
238
|
+
value.to_i
|
239
|
+
when :Float
|
240
|
+
value.to_f
|
241
|
+
when :Boolean
|
242
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
243
|
+
true
|
244
|
+
else
|
245
|
+
false
|
246
|
+
end
|
247
|
+
when :Object
|
248
|
+
# generic object (usually a Hash), return directly
|
249
|
+
value
|
250
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
251
|
+
inner_type = Regexp.last_match[:inner_type]
|
252
|
+
value.map { |v| _deserialize(inner_type, v) }
|
253
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
254
|
+
k_type = Regexp.last_match[:k_type]
|
255
|
+
v_type = Regexp.last_match[:v_type]
|
256
|
+
{}.tap do |hash|
|
257
|
+
value.each do |k, v|
|
258
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
259
|
+
end
|
260
|
+
end
|
261
|
+
else # model
|
262
|
+
# models (e.g. Pet) or oneOf
|
263
|
+
klass = UltracartClient.const_get(type)
|
264
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
265
|
+
end
|
266
|
+
end
|
267
|
+
|
268
|
+
# Returns the string representation of the object
|
269
|
+
# @return [String] String presentation of the object
|
270
|
+
def to_s
|
271
|
+
to_hash.to_s
|
272
|
+
end
|
273
|
+
|
274
|
+
# to_body is an alias to to_hash (backward compatibility)
|
275
|
+
# @return [Hash] Returns the object in the form of hash
|
276
|
+
def to_body
|
277
|
+
to_hash
|
278
|
+
end
|
279
|
+
|
280
|
+
# Returns the object in the form of hash
|
281
|
+
# @return [Hash] Returns the object in the form of hash
|
282
|
+
def to_hash
|
283
|
+
hash = {}
|
284
|
+
self.class.attribute_map.each_pair do |attr, param|
|
285
|
+
value = self.send(attr)
|
286
|
+
if value.nil?
|
287
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
288
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
289
|
+
end
|
290
|
+
|
291
|
+
hash[param] = _to_hash(value)
|
292
|
+
end
|
293
|
+
hash
|
294
|
+
end
|
295
|
+
|
296
|
+
# Outputs non-array value in the form of hash
|
297
|
+
# For object, use to_hash. Otherwise, just return the value
|
298
|
+
# @param [Object] value Any valid value
|
299
|
+
# @return [Hash] Returns the value in the form of hash
|
300
|
+
def _to_hash(value)
|
301
|
+
if value.is_a?(Array)
|
302
|
+
value.compact.map { |v| _to_hash(v) }
|
303
|
+
elsif value.is_a?(Hash)
|
304
|
+
{}.tap do |hash|
|
305
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
306
|
+
end
|
307
|
+
elsif value.respond_to? :to_hash
|
308
|
+
value.to_hash
|
309
|
+
else
|
310
|
+
value
|
311
|
+
end
|
312
|
+
end
|
313
|
+
|
314
|
+
end
|
315
|
+
|
316
|
+
end
|
@@ -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' => :'ReportDataSetSummary'
|
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
|
data/lib/ultracart_api.rb
CHANGED
@@ -651,6 +651,7 @@ require 'ultracart_api/models/report_data_set_query'
|
|
651
651
|
require 'ultracart_api/models/report_data_set_response'
|
652
652
|
require 'ultracart_api/models/report_data_set_row'
|
653
653
|
require 'ultracart_api/models/report_data_set_schema'
|
654
|
+
require 'ultracart_api/models/report_data_set_summary'
|
654
655
|
require 'ultracart_api/models/report_data_source'
|
655
656
|
require 'ultracart_api/models/report_data_source_schema'
|
656
657
|
require 'ultracart_api/models/report_execute_queries_request'
|
@@ -661,6 +662,7 @@ require 'ultracart_api/models/report_page_visualization'
|
|
661
662
|
require 'ultracart_api/models/report_page_visualization_dimension'
|
662
663
|
require 'ultracart_api/models/report_page_visualization_metric'
|
663
664
|
require 'ultracart_api/models/report_response'
|
665
|
+
require 'ultracart_api/models/report_websocket_event'
|
664
666
|
require 'ultracart_api/models/reports_response'
|
665
667
|
require 'ultracart_api/models/response_metadata'
|
666
668
|
require 'ultracart_api/models/result_set'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ultracart_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.143
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -710,6 +710,7 @@ files:
|
|
710
710
|
- docs/ReportDataSetResponse.md
|
711
711
|
- docs/ReportDataSetRow.md
|
712
712
|
- docs/ReportDataSetSchema.md
|
713
|
+
- docs/ReportDataSetSummary.md
|
713
714
|
- docs/ReportDataSource.md
|
714
715
|
- docs/ReportDataSourceSchema.md
|
715
716
|
- docs/ReportExecuteQueriesRequest.md
|
@@ -720,6 +721,7 @@ files:
|
|
720
721
|
- docs/ReportPageVisualizationDimension.md
|
721
722
|
- docs/ReportPageVisualizationMetric.md
|
722
723
|
- docs/ReportResponse.md
|
724
|
+
- docs/ReportWebsocketEvent.md
|
723
725
|
- docs/ReportsResponse.md
|
724
726
|
- docs/ResponseMetadata.md
|
725
727
|
- docs/ResultSet.md
|
@@ -1504,6 +1506,7 @@ files:
|
|
1504
1506
|
- lib/ultracart_api/models/report_data_set_response.rb
|
1505
1507
|
- lib/ultracart_api/models/report_data_set_row.rb
|
1506
1508
|
- lib/ultracart_api/models/report_data_set_schema.rb
|
1509
|
+
- lib/ultracart_api/models/report_data_set_summary.rb
|
1507
1510
|
- lib/ultracart_api/models/report_data_source.rb
|
1508
1511
|
- lib/ultracart_api/models/report_data_source_schema.rb
|
1509
1512
|
- lib/ultracart_api/models/report_execute_queries_request.rb
|
@@ -1514,6 +1517,7 @@ files:
|
|
1514
1517
|
- lib/ultracart_api/models/report_page_visualization_dimension.rb
|
1515
1518
|
- lib/ultracart_api/models/report_page_visualization_metric.rb
|
1516
1519
|
- lib/ultracart_api/models/report_response.rb
|
1520
|
+
- lib/ultracart_api/models/report_websocket_event.rb
|
1517
1521
|
- lib/ultracart_api/models/reports_response.rb
|
1518
1522
|
- lib/ultracart_api/models/response_metadata.rb
|
1519
1523
|
- lib/ultracart_api/models/result_set.rb
|