ultracart_api 4.0.153 → 4.0.155
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 +13 -4
- data/docs/AutoOrderItem.md +4 -0
- data/docs/ItemApi.md +369 -0
- data/docs/ItemPricingTierLimit.md +3 -1
- data/docs/ItemReview.md +17 -17
- data/docs/ItemReviewResponse.md +26 -0
- data/docs/ItemReviewsResponse.md +26 -0
- data/docs/ReportDataSet.md +2 -0
- data/lib/ultracart_api/api/item_api.rb +360 -0
- data/lib/ultracart_api/models/auto_order_item.rb +21 -1
- data/lib/ultracart_api/models/item_pricing_tier_limit.rb +16 -4
- data/lib/ultracart_api/models/item_review.rb +291 -0
- data/lib/ultracart_api/models/item_review_response.rb +256 -0
- data/lib/ultracart_api/models/item_reviews_response.rb +259 -0
- data/lib/ultracart_api/models/report_data_set.rb +10 -1
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
@@ -0,0 +1,259 @@
|
|
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 ItemReviewsResponse
|
18
|
+
attr_accessor :error
|
19
|
+
|
20
|
+
attr_accessor :metadata
|
21
|
+
|
22
|
+
# reviews
|
23
|
+
attr_accessor :reviews
|
24
|
+
|
25
|
+
# Indicates if API call was successful
|
26
|
+
attr_accessor :success
|
27
|
+
|
28
|
+
attr_accessor :warning
|
29
|
+
|
30
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
31
|
+
def self.attribute_map
|
32
|
+
{
|
33
|
+
:'error' => :'error',
|
34
|
+
:'metadata' => :'metadata',
|
35
|
+
:'reviews' => :'reviews',
|
36
|
+
:'success' => :'success',
|
37
|
+
:'warning' => :'warning'
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# Returns all the JSON keys this model knows about
|
42
|
+
def self.acceptable_attributes
|
43
|
+
attribute_map.values
|
44
|
+
end
|
45
|
+
|
46
|
+
# Attribute type mapping.
|
47
|
+
def self.openapi_types
|
48
|
+
{
|
49
|
+
:'error' => :'Error',
|
50
|
+
:'metadata' => :'ResponseMetadata',
|
51
|
+
:'reviews' => :'Array<ItemReview>',
|
52
|
+
:'success' => :'Boolean',
|
53
|
+
:'warning' => :'Warning'
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# List of attributes with nullable: true
|
58
|
+
def self.openapi_nullable
|
59
|
+
Set.new([
|
60
|
+
])
|
61
|
+
end
|
62
|
+
|
63
|
+
# Initializes the object
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
65
|
+
def initialize(attributes = {})
|
66
|
+
if (!attributes.is_a?(Hash))
|
67
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::ItemReviewsResponse` initialize method"
|
68
|
+
end
|
69
|
+
|
70
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
72
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
73
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::ItemReviewsResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
74
|
+
end
|
75
|
+
h[k.to_sym] = v
|
76
|
+
}
|
77
|
+
|
78
|
+
if attributes.key?(:'error')
|
79
|
+
self.error = attributes[:'error']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'metadata')
|
83
|
+
self.metadata = attributes[:'metadata']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'reviews')
|
87
|
+
if (value = attributes[:'reviews']).is_a?(Array)
|
88
|
+
self.reviews = value
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
if attributes.key?(:'success')
|
93
|
+
self.success = attributes[:'success']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes.key?(:'warning')
|
97
|
+
self.warning = attributes[:'warning']
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
102
|
+
# @return Array for valid properties with the reasons
|
103
|
+
def list_invalid_properties
|
104
|
+
invalid_properties = Array.new
|
105
|
+
invalid_properties
|
106
|
+
end
|
107
|
+
|
108
|
+
# Check to see if the all the properties in the model are valid
|
109
|
+
# @return true if the model is valid
|
110
|
+
def valid?
|
111
|
+
true
|
112
|
+
end
|
113
|
+
|
114
|
+
# Checks equality by comparing each attribute.
|
115
|
+
# @param [Object] Object to be compared
|
116
|
+
def ==(o)
|
117
|
+
return true if self.equal?(o)
|
118
|
+
self.class == o.class &&
|
119
|
+
error == o.error &&
|
120
|
+
metadata == o.metadata &&
|
121
|
+
reviews == o.reviews &&
|
122
|
+
success == o.success &&
|
123
|
+
warning == o.warning
|
124
|
+
end
|
125
|
+
|
126
|
+
# @see the `==` method
|
127
|
+
# @param [Object] Object to be compared
|
128
|
+
def eql?(o)
|
129
|
+
self == o
|
130
|
+
end
|
131
|
+
|
132
|
+
# Calculates hash code according to all attributes.
|
133
|
+
# @return [Integer] Hash code
|
134
|
+
def hash
|
135
|
+
[error, metadata, reviews, success, warning].hash
|
136
|
+
end
|
137
|
+
|
138
|
+
# Builds the object from hash
|
139
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
140
|
+
# @return [Object] Returns the model itself
|
141
|
+
def self.build_from_hash(attributes)
|
142
|
+
new.build_from_hash(attributes)
|
143
|
+
end
|
144
|
+
|
145
|
+
# Builds the object from hash
|
146
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
147
|
+
# @return [Object] Returns the model itself
|
148
|
+
def build_from_hash(attributes)
|
149
|
+
return nil unless attributes.is_a?(Hash)
|
150
|
+
attributes = attributes.transform_keys(&:to_sym)
|
151
|
+
self.class.openapi_types.each_pair do |key, type|
|
152
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
153
|
+
self.send("#{key}=", nil)
|
154
|
+
elsif type =~ /\AArray<(.*)>/i
|
155
|
+
# check to ensure the input is an array given that the attribute
|
156
|
+
# is documented as an array but the input is not
|
157
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
158
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
159
|
+
end
|
160
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
161
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
162
|
+
end
|
163
|
+
end
|
164
|
+
|
165
|
+
self
|
166
|
+
end
|
167
|
+
|
168
|
+
# Deserializes the data based on type
|
169
|
+
# @param string type Data type
|
170
|
+
# @param string value Value to be deserialized
|
171
|
+
# @return [Object] Deserialized data
|
172
|
+
def _deserialize(type, value)
|
173
|
+
case type.to_sym
|
174
|
+
when :Time
|
175
|
+
Time.parse(value)
|
176
|
+
when :Date
|
177
|
+
Date.parse(value)
|
178
|
+
when :String
|
179
|
+
value.to_s
|
180
|
+
when :Integer
|
181
|
+
value.to_i
|
182
|
+
when :Float
|
183
|
+
value.to_f
|
184
|
+
when :Boolean
|
185
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
186
|
+
true
|
187
|
+
else
|
188
|
+
false
|
189
|
+
end
|
190
|
+
when :Object
|
191
|
+
# generic object (usually a Hash), return directly
|
192
|
+
value
|
193
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
194
|
+
inner_type = Regexp.last_match[:inner_type]
|
195
|
+
value.map { |v| _deserialize(inner_type, v) }
|
196
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
197
|
+
k_type = Regexp.last_match[:k_type]
|
198
|
+
v_type = Regexp.last_match[:v_type]
|
199
|
+
{}.tap do |hash|
|
200
|
+
value.each do |k, v|
|
201
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
202
|
+
end
|
203
|
+
end
|
204
|
+
else # model
|
205
|
+
# models (e.g. Pet) or oneOf
|
206
|
+
klass = UltracartClient.const_get(type)
|
207
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
208
|
+
end
|
209
|
+
end
|
210
|
+
|
211
|
+
# Returns the string representation of the object
|
212
|
+
# @return [String] String presentation of the object
|
213
|
+
def to_s
|
214
|
+
to_hash.to_s
|
215
|
+
end
|
216
|
+
|
217
|
+
# to_body is an alias to to_hash (backward compatibility)
|
218
|
+
# @return [Hash] Returns the object in the form of hash
|
219
|
+
def to_body
|
220
|
+
to_hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Returns the object in the form of hash
|
224
|
+
# @return [Hash] Returns the object in the form of hash
|
225
|
+
def to_hash
|
226
|
+
hash = {}
|
227
|
+
self.class.attribute_map.each_pair do |attr, param|
|
228
|
+
value = self.send(attr)
|
229
|
+
if value.nil?
|
230
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
231
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
232
|
+
end
|
233
|
+
|
234
|
+
hash[param] = _to_hash(value)
|
235
|
+
end
|
236
|
+
hash
|
237
|
+
end
|
238
|
+
|
239
|
+
# Outputs non-array value in the form of hash
|
240
|
+
# For object, use to_hash. Otherwise, just return the value
|
241
|
+
# @param [Object] value Any valid value
|
242
|
+
# @return [Hash] Returns the value in the form of hash
|
243
|
+
def _to_hash(value)
|
244
|
+
if value.is_a?(Array)
|
245
|
+
value.compact.map { |v| _to_hash(v) }
|
246
|
+
elsif value.is_a?(Hash)
|
247
|
+
{}.tap do |hash|
|
248
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
249
|
+
end
|
250
|
+
elsif value.respond_to? :to_hash
|
251
|
+
value.to_hash
|
252
|
+
else
|
253
|
+
value
|
254
|
+
end
|
255
|
+
end
|
256
|
+
|
257
|
+
end
|
258
|
+
|
259
|
+
end
|
@@ -27,6 +27,8 @@ module UltracartClient
|
|
27
27
|
# Error message if the query failed.
|
28
28
|
attr_accessor :error_message
|
29
29
|
|
30
|
+
attr_accessor :executed_sql
|
31
|
+
|
30
32
|
# An identifier that can be used to help match up the returned data set
|
31
33
|
attr_accessor :for_object_id
|
32
34
|
|
@@ -88,6 +90,7 @@ module UltracartClient
|
|
88
90
|
:'data_set_uuid' => :'data_set_uuid',
|
89
91
|
:'destination_table_id' => :'destination_table_id',
|
90
92
|
:'error_message' => :'error_message',
|
93
|
+
:'executed_sql' => :'executed_sql',
|
91
94
|
:'for_object_id' => :'for_object_id',
|
92
95
|
:'for_object_type' => :'for_object_type',
|
93
96
|
:'initial_pages' => :'initial_pages',
|
@@ -114,6 +117,7 @@ module UltracartClient
|
|
114
117
|
:'data_set_uuid' => :'String',
|
115
118
|
:'destination_table_id' => :'String',
|
116
119
|
:'error_message' => :'String',
|
120
|
+
:'executed_sql' => :'String',
|
117
121
|
:'for_object_id' => :'String',
|
118
122
|
:'for_object_type' => :'String',
|
119
123
|
:'initial_pages' => :'Array<ReportDataSetPage>',
|
@@ -165,6 +169,10 @@ module UltracartClient
|
|
165
169
|
self.error_message = attributes[:'error_message']
|
166
170
|
end
|
167
171
|
|
172
|
+
if attributes.key?(:'executed_sql')
|
173
|
+
self.executed_sql = attributes[:'executed_sql']
|
174
|
+
end
|
175
|
+
|
168
176
|
if attributes.key?(:'for_object_id')
|
169
177
|
self.for_object_id = attributes[:'for_object_id']
|
170
178
|
end
|
@@ -248,6 +256,7 @@ module UltracartClient
|
|
248
256
|
data_set_uuid == o.data_set_uuid &&
|
249
257
|
destination_table_id == o.destination_table_id &&
|
250
258
|
error_message == o.error_message &&
|
259
|
+
executed_sql == o.executed_sql &&
|
251
260
|
for_object_id == o.for_object_id &&
|
252
261
|
for_object_type == o.for_object_type &&
|
253
262
|
initial_pages == o.initial_pages &&
|
@@ -270,7 +279,7 @@ module UltracartClient
|
|
270
279
|
# Calculates hash code according to all attributes.
|
271
280
|
# @return [Integer] Hash code
|
272
281
|
def hash
|
273
|
-
[data_set_query_uuid, data_set_uuid, destination_table_id, error_message, for_object_id, for_object_type, initial_pages, max_results, merchant_id, page_count, page_size, schema, security_level, timezone, user_data].hash
|
282
|
+
[data_set_query_uuid, data_set_uuid, destination_table_id, error_message, executed_sql, for_object_id, for_object_type, initial_pages, max_results, merchant_id, page_count, page_size, schema, security_level, timezone, user_data].hash
|
274
283
|
end
|
275
284
|
|
276
285
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -522,7 +522,9 @@ require 'ultracart_api/models/item_restriction'
|
|
522
522
|
require 'ultracart_api/models/item_restriction_item'
|
523
523
|
require 'ultracart_api/models/item_revguard'
|
524
524
|
require 'ultracart_api/models/item_review'
|
525
|
+
require 'ultracart_api/models/item_review_response'
|
525
526
|
require 'ultracart_api/models/item_reviews'
|
527
|
+
require 'ultracart_api/models/item_reviews_response'
|
526
528
|
require 'ultracart_api/models/item_salesforce'
|
527
529
|
require 'ultracart_api/models/item_shipping'
|
528
530
|
require 'ultracart_api/models/item_shipping_case'
|
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.
|
4
|
+
version: 4.0.155
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- UltraCart
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: typhoeus
|
@@ -579,7 +579,9 @@ files:
|
|
579
579
|
- docs/ItemRestrictionItem.md
|
580
580
|
- docs/ItemRevguard.md
|
581
581
|
- docs/ItemReview.md
|
582
|
+
- docs/ItemReviewResponse.md
|
582
583
|
- docs/ItemReviews.md
|
584
|
+
- docs/ItemReviewsResponse.md
|
583
585
|
- docs/ItemSalesforce.md
|
584
586
|
- docs/ItemShipping.md
|
585
587
|
- docs/ItemShippingCase.md
|
@@ -1383,7 +1385,9 @@ files:
|
|
1383
1385
|
- lib/ultracart_api/models/item_restriction_item.rb
|
1384
1386
|
- lib/ultracart_api/models/item_revguard.rb
|
1385
1387
|
- lib/ultracart_api/models/item_review.rb
|
1388
|
+
- lib/ultracart_api/models/item_review_response.rb
|
1386
1389
|
- lib/ultracart_api/models/item_reviews.rb
|
1390
|
+
- lib/ultracart_api/models/item_reviews_response.rb
|
1387
1391
|
- lib/ultracart_api/models/item_salesforce.rb
|
1388
1392
|
- lib/ultracart_api/models/item_shipping.rb
|
1389
1393
|
- lib/ultracart_api/models/item_shipping_case.rb
|