ultracart_api 3.10.125 → 3.10.126
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +7 -4
- data/docs/ReportDataSetSummary.md +14 -0
- data/docs/ReportWebsocketEvent.md +9 -0
- data/lib/ultracart_api/models/report_data_set_summary.rb +281 -0
- data/lib/ultracart_api/models/report_websocket_event.rb +228 -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: e04c6f616cdf5cb99b8cde7b1c1de250f497340acf579d4ba24b80f36a64f164
|
4
|
+
data.tar.gz: cade080fb27b592da1d720713e7047e6d36347bd83624d966a7999aaacb1d9de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b16540bc3169bb2ad5eeafe7d6821fd4913143b0ed53061438116524f0eb8aba74d4bdfdf1304c977eb47ff4ff608a0c23e80861f5a20e29d8b43ed3cba1401
|
7
|
+
data.tar.gz: 7c25afc3a6a01a7534ee028a3c3aada879a9962153c858deeb50fa9011faa8144d93e840dfc7f59c04acf2b407aaa09386e061be2a634582066d2de52a97801e
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ UltraCart REST API Version 2
|
|
7
7
|
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
8
|
|
9
9
|
- API version: 2.0.0
|
10
|
-
- Package version: 3.10.
|
10
|
+
- Package version: 3.10.126
|
11
11
|
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [http://www.ultracart.com](http://www.ultracart.com)
|
13
13
|
|
@@ -24,15 +24,15 @@ gem build ultracart_api.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./ultracart_api-3.10.
|
27
|
+
gem install ./ultracart_api-3.10.126.gem
|
28
28
|
```
|
29
|
-
(for development, run `gem install --dev ./ultracart_api-3.10.
|
29
|
+
(for development, run `gem install --dev ./ultracart_api-3.10.126.gem` to install the development dependencies)
|
30
30
|
|
31
31
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
32
32
|
|
33
33
|
Finally add this to the Gemfile:
|
34
34
|
|
35
|
-
gem 'ultracart_api', '~> 3.10.
|
35
|
+
gem 'ultracart_api', '~> 3.10.126'
|
36
36
|
|
37
37
|
### Install from Git
|
38
38
|
|
@@ -1138,6 +1138,7 @@ Class | Method | HTTP request | Description
|
|
1138
1138
|
- [UltracartClient::ReportDataSetResponse](docs/ReportDataSetResponse.md)
|
1139
1139
|
- [UltracartClient::ReportDataSetRow](docs/ReportDataSetRow.md)
|
1140
1140
|
- [UltracartClient::ReportDataSetSchema](docs/ReportDataSetSchema.md)
|
1141
|
+
- [UltracartClient::ReportDataSetSummary](docs/ReportDataSetSummary.md)
|
1141
1142
|
- [UltracartClient::ReportDataSource](docs/ReportDataSource.md)
|
1142
1143
|
- [UltracartClient::ReportDataSourceSchema](docs/ReportDataSourceSchema.md)
|
1143
1144
|
- [UltracartClient::ReportExecuteQueriesRequest](docs/ReportExecuteQueriesRequest.md)
|
@@ -1148,6 +1149,7 @@ Class | Method | HTTP request | Description
|
|
1148
1149
|
- [UltracartClient::ReportPageVisualizationDimension](docs/ReportPageVisualizationDimension.md)
|
1149
1150
|
- [UltracartClient::ReportPageVisualizationMetric](docs/ReportPageVisualizationMetric.md)
|
1150
1151
|
- [UltracartClient::ReportResponse](docs/ReportResponse.md)
|
1152
|
+
- [UltracartClient::ReportWebsocketEvent](docs/ReportWebsocketEvent.md)
|
1151
1153
|
- [UltracartClient::ReportsResponse](docs/ReportsResponse.md)
|
1152
1154
|
- [UltracartClient::ResponseMetadata](docs/ResponseMetadata.md)
|
1153
1155
|
- [UltracartClient::ResultSet](docs/ResultSet.md)
|
@@ -1338,6 +1340,7 @@ Not every change is committed to every SDK.
|
|
1338
1340
|
|
1339
1341
|
| Version | Date | Comments |
|
1340
1342
|
| --: | :-: | --- |
|
1343
|
+
| 3.10.126 | 03/22/2023 | data warehouse internal dev |
|
1341
1344
|
| 3.10.125 | 03/22/2023 | dw initial framework |
|
1342
1345
|
| 3.10.124 | 03/22/2023 | order api - refundable response added manual_because_multiple_charges boolean field |
|
1343
1346
|
| 3.10.123 | 03/21/2023 | order api - new stage named Hold |
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# UltracartClient::ReportDataSetSummary
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**data_set_uuid** | **String** | A unique identifier assigned to the data set that is returned. | [optional]
|
7
|
+
**error_message** | **String** | Error message if the query failed. | [optional]
|
8
|
+
**for_object_id** | **String** | An identifier that can be used to help match up the returned data set | [optional]
|
9
|
+
**for_object_type** | **String** | The type of object this data set is for | [optional]
|
10
|
+
**max_results** | **Integer** | The total number of results | [optional]
|
11
|
+
**schema** | [**Array<ReportDataSetSchema>**](ReportDataSetSchema.md) | The schema associated with the data set. | [optional]
|
12
|
+
**user_data** | **String** | Any other data that needs to be returned with the response to help the UI | [optional]
|
13
|
+
|
14
|
+
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# UltracartClient::ReportWebsocketEvent
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**event_type** | **String** | Event type | [optional]
|
7
|
+
**query_completion** | [**ReportDataSetSummary**](ReportDataSetSummary.md) | | [optional]
|
8
|
+
|
9
|
+
|
@@ -0,0 +1,281 @@
|
|
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 ReportDataSetSummary
|
17
|
+
# A unique identifier assigned to the data set that is returned.
|
18
|
+
attr_accessor :data_set_uuid
|
19
|
+
|
20
|
+
# Error message if the query failed.
|
21
|
+
attr_accessor :error_message
|
22
|
+
|
23
|
+
# An identifier that can be used to help match up the returned data set
|
24
|
+
attr_accessor :for_object_id
|
25
|
+
|
26
|
+
# The type of object this data set is for
|
27
|
+
attr_accessor :for_object_type
|
28
|
+
|
29
|
+
# The total number of results
|
30
|
+
attr_accessor :max_results
|
31
|
+
|
32
|
+
# The schema associated with the data set.
|
33
|
+
attr_accessor :schema
|
34
|
+
|
35
|
+
# Any other data that needs to be returned with the response to help the UI
|
36
|
+
attr_accessor :user_data
|
37
|
+
|
38
|
+
class EnumAttributeValidator
|
39
|
+
attr_reader :datatype
|
40
|
+
attr_reader :allowable_values
|
41
|
+
|
42
|
+
def initialize(datatype, allowable_values)
|
43
|
+
@allowable_values = allowable_values.map do |value|
|
44
|
+
case datatype.to_s
|
45
|
+
when /Integer/i
|
46
|
+
value.to_i
|
47
|
+
when /Float/i
|
48
|
+
value.to_f
|
49
|
+
else
|
50
|
+
value
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def valid?(value)
|
56
|
+
!value || allowable_values.include?(value)
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
61
|
+
def self.attribute_map
|
62
|
+
{
|
63
|
+
:'data_set_uuid' => :'data_set_uuid',
|
64
|
+
:'error_message' => :'error_message',
|
65
|
+
:'for_object_id' => :'for_object_id',
|
66
|
+
:'for_object_type' => :'for_object_type',
|
67
|
+
:'max_results' => :'max_results',
|
68
|
+
:'schema' => :'schema',
|
69
|
+
:'user_data' => :'user_data'
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Attribute type mapping.
|
74
|
+
def self.swagger_types
|
75
|
+
{
|
76
|
+
:'data_set_uuid' => :'String',
|
77
|
+
:'error_message' => :'String',
|
78
|
+
:'for_object_id' => :'String',
|
79
|
+
:'for_object_type' => :'String',
|
80
|
+
:'max_results' => :'Integer',
|
81
|
+
:'schema' => :'Array<ReportDataSetSchema>',
|
82
|
+
:'user_data' => :'String'
|
83
|
+
}
|
84
|
+
end
|
85
|
+
|
86
|
+
# Initializes the object
|
87
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
88
|
+
def initialize(attributes = {})
|
89
|
+
return unless attributes.is_a?(Hash)
|
90
|
+
|
91
|
+
# convert string to symbol for hash key
|
92
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
93
|
+
|
94
|
+
if attributes.has_key?(:'data_set_uuid')
|
95
|
+
self.data_set_uuid = attributes[:'data_set_uuid']
|
96
|
+
end
|
97
|
+
|
98
|
+
if attributes.has_key?(:'error_message')
|
99
|
+
self.error_message = attributes[:'error_message']
|
100
|
+
end
|
101
|
+
|
102
|
+
if attributes.has_key?(:'for_object_id')
|
103
|
+
self.for_object_id = attributes[:'for_object_id']
|
104
|
+
end
|
105
|
+
|
106
|
+
if attributes.has_key?(:'for_object_type')
|
107
|
+
self.for_object_type = attributes[:'for_object_type']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes.has_key?(:'max_results')
|
111
|
+
self.max_results = attributes[:'max_results']
|
112
|
+
end
|
113
|
+
|
114
|
+
if attributes.has_key?(:'schema')
|
115
|
+
if (value = attributes[:'schema']).is_a?(Array)
|
116
|
+
self.schema = value
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes.has_key?(:'user_data')
|
121
|
+
self.user_data = attributes[:'user_data']
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
126
|
+
# @return Array for valid properties with the reasons
|
127
|
+
def list_invalid_properties
|
128
|
+
invalid_properties = Array.new
|
129
|
+
invalid_properties
|
130
|
+
end
|
131
|
+
|
132
|
+
# Check to see if the all the properties in the model are valid
|
133
|
+
# @return true if the model is valid
|
134
|
+
def valid?
|
135
|
+
for_object_type_validator = EnumAttributeValidator.new('String', ['schema', 'filter', 'visualization'])
|
136
|
+
return false unless for_object_type_validator.valid?(@for_object_type)
|
137
|
+
true
|
138
|
+
end
|
139
|
+
|
140
|
+
# Custom attribute writer method checking allowed values (enum).
|
141
|
+
# @param [Object] for_object_type Object to be assigned
|
142
|
+
def for_object_type=(for_object_type)
|
143
|
+
validator = EnumAttributeValidator.new('String', ['schema', 'filter', 'visualization'])
|
144
|
+
unless validator.valid?(for_object_type)
|
145
|
+
fail ArgumentError, 'invalid value for "for_object_type", must be one of #{validator.allowable_values}.'
|
146
|
+
end
|
147
|
+
@for_object_type = for_object_type
|
148
|
+
end
|
149
|
+
|
150
|
+
# Checks equality by comparing each attribute.
|
151
|
+
# @param [Object] Object to be compared
|
152
|
+
def ==(o)
|
153
|
+
return true if self.equal?(o)
|
154
|
+
self.class == o.class &&
|
155
|
+
data_set_uuid == o.data_set_uuid &&
|
156
|
+
error_message == o.error_message &&
|
157
|
+
for_object_id == o.for_object_id &&
|
158
|
+
for_object_type == o.for_object_type &&
|
159
|
+
max_results == o.max_results &&
|
160
|
+
schema == o.schema &&
|
161
|
+
user_data == o.user_data
|
162
|
+
end
|
163
|
+
|
164
|
+
# @see the `==` method
|
165
|
+
# @param [Object] Object to be compared
|
166
|
+
def eql?(o)
|
167
|
+
self == o
|
168
|
+
end
|
169
|
+
|
170
|
+
# Calculates hash code according to all attributes.
|
171
|
+
# @return [Fixnum] Hash code
|
172
|
+
def hash
|
173
|
+
[data_set_uuid, error_message, for_object_id, for_object_type, max_results, schema, user_data].hash
|
174
|
+
end
|
175
|
+
|
176
|
+
# Builds the object from hash
|
177
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
178
|
+
# @return [Object] Returns the model itself
|
179
|
+
def build_from_hash(attributes)
|
180
|
+
return nil unless attributes.is_a?(Hash)
|
181
|
+
self.class.swagger_types.each_pair do |key, type|
|
182
|
+
if type =~ /\AArray<(.*)>/i
|
183
|
+
# check to ensure the input is an array given that the attribute
|
184
|
+
# is documented as an array but the input is not
|
185
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
186
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
187
|
+
end
|
188
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
189
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
190
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
191
|
+
end
|
192
|
+
|
193
|
+
self
|
194
|
+
end
|
195
|
+
|
196
|
+
# Deserializes the data based on type
|
197
|
+
# @param string type Data type
|
198
|
+
# @param string value Value to be deserialized
|
199
|
+
# @return [Object] Deserialized data
|
200
|
+
def _deserialize(type, value)
|
201
|
+
case type.to_sym
|
202
|
+
when :DateTime
|
203
|
+
DateTime.parse(value)
|
204
|
+
when :Date
|
205
|
+
Date.parse(value)
|
206
|
+
when :String
|
207
|
+
value.to_s
|
208
|
+
when :Integer
|
209
|
+
value.to_i
|
210
|
+
when :Float
|
211
|
+
value.to_f
|
212
|
+
when :BOOLEAN
|
213
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
214
|
+
true
|
215
|
+
else
|
216
|
+
false
|
217
|
+
end
|
218
|
+
when :Object
|
219
|
+
# generic object (usually a Hash), return directly
|
220
|
+
value
|
221
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
222
|
+
inner_type = Regexp.last_match[:inner_type]
|
223
|
+
value.map { |v| _deserialize(inner_type, v) }
|
224
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
225
|
+
k_type = Regexp.last_match[:k_type]
|
226
|
+
v_type = Regexp.last_match[:v_type]
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each do |k, v|
|
229
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
230
|
+
end
|
231
|
+
end
|
232
|
+
else # model
|
233
|
+
temp_model = UltracartClient.const_get(type).new
|
234
|
+
temp_model.build_from_hash(value)
|
235
|
+
end
|
236
|
+
end
|
237
|
+
|
238
|
+
# Returns the string representation of the object
|
239
|
+
# @return [String] String presentation of the object
|
240
|
+
def to_s
|
241
|
+
to_hash.to_s
|
242
|
+
end
|
243
|
+
|
244
|
+
# to_body is an alias to to_hash (backward compatibility)
|
245
|
+
# @return [Hash] Returns the object in the form of hash
|
246
|
+
def to_body
|
247
|
+
to_hash
|
248
|
+
end
|
249
|
+
|
250
|
+
# Returns the object in the form of hash
|
251
|
+
# @return [Hash] Returns the object in the form of hash
|
252
|
+
def to_hash
|
253
|
+
hash = {}
|
254
|
+
self.class.attribute_map.each_pair do |attr, param|
|
255
|
+
value = self.send(attr)
|
256
|
+
next if value.nil?
|
257
|
+
hash[param] = _to_hash(value)
|
258
|
+
end
|
259
|
+
hash
|
260
|
+
end
|
261
|
+
|
262
|
+
# Outputs non-array value in the form of hash
|
263
|
+
# For object, use to_hash. Otherwise, just return the value
|
264
|
+
# @param [Object] value Any valid value
|
265
|
+
# @return [Hash] Returns the value in the form of hash
|
266
|
+
def _to_hash(value)
|
267
|
+
if value.is_a?(Array)
|
268
|
+
value.compact.map { |v| _to_hash(v) }
|
269
|
+
elsif value.is_a?(Hash)
|
270
|
+
{}.tap do |hash|
|
271
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
272
|
+
end
|
273
|
+
elsif value.respond_to? :to_hash
|
274
|
+
value.to_hash
|
275
|
+
else
|
276
|
+
value
|
277
|
+
end
|
278
|
+
end
|
279
|
+
|
280
|
+
end
|
281
|
+
end
|
@@ -0,0 +1,228 @@
|
|
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 ReportWebsocketEvent
|
17
|
+
# Event type
|
18
|
+
attr_accessor :event_type
|
19
|
+
|
20
|
+
attr_accessor :query_completion
|
21
|
+
|
22
|
+
class EnumAttributeValidator
|
23
|
+
attr_reader :datatype
|
24
|
+
attr_reader :allowable_values
|
25
|
+
|
26
|
+
def initialize(datatype, allowable_values)
|
27
|
+
@allowable_values = allowable_values.map do |value|
|
28
|
+
case datatype.to_s
|
29
|
+
when /Integer/i
|
30
|
+
value.to_i
|
31
|
+
when /Float/i
|
32
|
+
value.to_f
|
33
|
+
else
|
34
|
+
value
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
def valid?(value)
|
40
|
+
!value || allowable_values.include?(value)
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
45
|
+
def self.attribute_map
|
46
|
+
{
|
47
|
+
:'event_type' => :'event_type',
|
48
|
+
:'query_completion' => :'query_completion'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Attribute type mapping.
|
53
|
+
def self.swagger_types
|
54
|
+
{
|
55
|
+
:'event_type' => :'String',
|
56
|
+
:'query_completion' => :'ReportDataSetSummary'
|
57
|
+
}
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
return unless attributes.is_a?(Hash)
|
64
|
+
|
65
|
+
# convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
67
|
+
|
68
|
+
if attributes.has_key?(:'event_type')
|
69
|
+
self.event_type = attributes[:'event_type']
|
70
|
+
end
|
71
|
+
|
72
|
+
if attributes.has_key?(:'query_completion')
|
73
|
+
self.query_completion = attributes[:'query_completion']
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
78
|
+
# @return Array for valid properties with the reasons
|
79
|
+
def list_invalid_properties
|
80
|
+
invalid_properties = Array.new
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
event_type_validator = EnumAttributeValidator.new('String', ['ping', 'query completion'])
|
88
|
+
return false unless event_type_validator.valid?(@event_type)
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method checking allowed values (enum).
|
93
|
+
# @param [Object] event_type Object to be assigned
|
94
|
+
def event_type=(event_type)
|
95
|
+
validator = EnumAttributeValidator.new('String', ['ping', 'query completion'])
|
96
|
+
unless validator.valid?(event_type)
|
97
|
+
fail ArgumentError, 'invalid value for "event_type", must be one of #{validator.allowable_values}.'
|
98
|
+
end
|
99
|
+
@event_type = event_type
|
100
|
+
end
|
101
|
+
|
102
|
+
# Checks equality by comparing each attribute.
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def ==(o)
|
105
|
+
return true if self.equal?(o)
|
106
|
+
self.class == o.class &&
|
107
|
+
event_type == o.event_type &&
|
108
|
+
query_completion == o.query_completion
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Fixnum] Hash code
|
119
|
+
def hash
|
120
|
+
[event_type, query_completion].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def build_from_hash(attributes)
|
127
|
+
return nil unless attributes.is_a?(Hash)
|
128
|
+
self.class.swagger_types.each_pair do |key, type|
|
129
|
+
if type =~ /\AArray<(.*)>/i
|
130
|
+
# check to ensure the input is an array given that the attribute
|
131
|
+
# is documented as an array but the input is not
|
132
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
133
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
134
|
+
end
|
135
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
136
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
137
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
|
143
|
+
# Deserializes the data based on type
|
144
|
+
# @param string type Data type
|
145
|
+
# @param string value Value to be deserialized
|
146
|
+
# @return [Object] Deserialized data
|
147
|
+
def _deserialize(type, value)
|
148
|
+
case type.to_sym
|
149
|
+
when :DateTime
|
150
|
+
DateTime.parse(value)
|
151
|
+
when :Date
|
152
|
+
Date.parse(value)
|
153
|
+
when :String
|
154
|
+
value.to_s
|
155
|
+
when :Integer
|
156
|
+
value.to_i
|
157
|
+
when :Float
|
158
|
+
value.to_f
|
159
|
+
when :BOOLEAN
|
160
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
161
|
+
true
|
162
|
+
else
|
163
|
+
false
|
164
|
+
end
|
165
|
+
when :Object
|
166
|
+
# generic object (usually a Hash), return directly
|
167
|
+
value
|
168
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
169
|
+
inner_type = Regexp.last_match[:inner_type]
|
170
|
+
value.map { |v| _deserialize(inner_type, v) }
|
171
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
172
|
+
k_type = Regexp.last_match[:k_type]
|
173
|
+
v_type = Regexp.last_match[:v_type]
|
174
|
+
{}.tap do |hash|
|
175
|
+
value.each do |k, v|
|
176
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
177
|
+
end
|
178
|
+
end
|
179
|
+
else # model
|
180
|
+
temp_model = UltracartClient.const_get(type).new
|
181
|
+
temp_model.build_from_hash(value)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_hash
|
200
|
+
hash = {}
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
202
|
+
value = self.send(attr)
|
203
|
+
next if value.nil?
|
204
|
+
hash[param] = _to_hash(value)
|
205
|
+
end
|
206
|
+
hash
|
207
|
+
end
|
208
|
+
|
209
|
+
# Outputs non-array value in the form of hash
|
210
|
+
# For object, use to_hash. Otherwise, just return the value
|
211
|
+
# @param [Object] value Any valid value
|
212
|
+
# @return [Hash] Returns the value in the form of hash
|
213
|
+
def _to_hash(value)
|
214
|
+
if value.is_a?(Array)
|
215
|
+
value.compact.map { |v| _to_hash(v) }
|
216
|
+
elsif value.is_a?(Hash)
|
217
|
+
{}.tap do |hash|
|
218
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
219
|
+
end
|
220
|
+
elsif value.respond_to? :to_hash
|
221
|
+
value.to_hash
|
222
|
+
else
|
223
|
+
value
|
224
|
+
end
|
225
|
+
end
|
226
|
+
|
227
|
+
end
|
228
|
+
end
|
data/lib/ultracart_api.rb
CHANGED
@@ -652,6 +652,7 @@ require 'ultracart_api/models/report_data_set_query'
|
|
652
652
|
require 'ultracart_api/models/report_data_set_response'
|
653
653
|
require 'ultracart_api/models/report_data_set_row'
|
654
654
|
require 'ultracart_api/models/report_data_set_schema'
|
655
|
+
require 'ultracart_api/models/report_data_set_summary'
|
655
656
|
require 'ultracart_api/models/report_data_source'
|
656
657
|
require 'ultracart_api/models/report_data_source_schema'
|
657
658
|
require 'ultracart_api/models/report_execute_queries_request'
|
@@ -662,6 +663,7 @@ require 'ultracart_api/models/report_page_visualization'
|
|
662
663
|
require 'ultracart_api/models/report_page_visualization_dimension'
|
663
664
|
require 'ultracart_api/models/report_page_visualization_metric'
|
664
665
|
require 'ultracart_api/models/report_response'
|
666
|
+
require 'ultracart_api/models/report_websocket_event'
|
665
667
|
require 'ultracart_api/models/reports_response'
|
666
668
|
require 'ultracart_api/models/response_metadata'
|
667
669
|
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: 3.10.
|
4
|
+
version: 3.10.126
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
@@ -871,6 +871,7 @@ files:
|
|
871
871
|
- docs/ReportDataSetResponse.md
|
872
872
|
- docs/ReportDataSetRow.md
|
873
873
|
- docs/ReportDataSetSchema.md
|
874
|
+
- docs/ReportDataSetSummary.md
|
874
875
|
- docs/ReportDataSource.md
|
875
876
|
- docs/ReportDataSourceSchema.md
|
876
877
|
- docs/ReportExecuteQueriesRequest.md
|
@@ -881,6 +882,7 @@ files:
|
|
881
882
|
- docs/ReportPageVisualizationDimension.md
|
882
883
|
- docs/ReportPageVisualizationMetric.md
|
883
884
|
- docs/ReportResponse.md
|
885
|
+
- docs/ReportWebsocketEvent.md
|
884
886
|
- docs/ReportsResponse.md
|
885
887
|
- docs/ResponseMetadata.md
|
886
888
|
- docs/ResultSet.md
|
@@ -1666,6 +1668,7 @@ files:
|
|
1666
1668
|
- lib/ultracart_api/models/report_data_set_response.rb
|
1667
1669
|
- lib/ultracart_api/models/report_data_set_row.rb
|
1668
1670
|
- lib/ultracart_api/models/report_data_set_schema.rb
|
1671
|
+
- lib/ultracart_api/models/report_data_set_summary.rb
|
1669
1672
|
- lib/ultracart_api/models/report_data_source.rb
|
1670
1673
|
- lib/ultracart_api/models/report_data_source_schema.rb
|
1671
1674
|
- lib/ultracart_api/models/report_execute_queries_request.rb
|
@@ -1676,6 +1679,7 @@ files:
|
|
1676
1679
|
- lib/ultracart_api/models/report_page_visualization_dimension.rb
|
1677
1680
|
- lib/ultracart_api/models/report_page_visualization_metric.rb
|
1678
1681
|
- lib/ultracart_api/models/report_response.rb
|
1682
|
+
- lib/ultracart_api/models/report_websocket_event.rb
|
1679
1683
|
- lib/ultracart_api/models/reports_response.rb
|
1680
1684
|
- lib/ultracart_api/models/response_metadata.rb
|
1681
1685
|
- lib/ultracart_api/models/result_set.rb
|