ultracart_api 3.10.136 → 3.10.138
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -4
- data/docs/AutoOrderItem.md +2 -0
- data/docs/ItemApi.md +269 -0
- data/docs/ItemPricingTierLimit.md +1 -0
- data/docs/ItemReview.md +17 -17
- data/docs/ItemReviewResponse.md +12 -0
- data/docs/ItemReviewsResponse.md +12 -0
- data/docs/ReportDataSet.md +1 -0
- data/lib/ultracart_api/api/item_api.rb +304 -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 +221 -0
- data/lib/ultracart_api/models/item_reviews_response.rb +224 -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,224 @@
|
|
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 ItemReviewsResponse
|
17
|
+
attr_accessor :error
|
18
|
+
|
19
|
+
attr_accessor :metadata
|
20
|
+
|
21
|
+
# reviews
|
22
|
+
attr_accessor :reviews
|
23
|
+
|
24
|
+
# Indicates if API call was successful
|
25
|
+
attr_accessor :success
|
26
|
+
|
27
|
+
attr_accessor :warning
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'error' => :'error',
|
33
|
+
:'metadata' => :'metadata',
|
34
|
+
:'reviews' => :'reviews',
|
35
|
+
:'success' => :'success',
|
36
|
+
:'warning' => :'warning'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# Attribute type mapping.
|
41
|
+
def self.swagger_types
|
42
|
+
{
|
43
|
+
:'error' => :'Error',
|
44
|
+
:'metadata' => :'ResponseMetadata',
|
45
|
+
:'reviews' => :'Array<ItemReview>',
|
46
|
+
:'success' => :'BOOLEAN',
|
47
|
+
:'warning' => :'Warning'
|
48
|
+
}
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
return unless attributes.is_a?(Hash)
|
55
|
+
|
56
|
+
# convert string to symbol for hash key
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
58
|
+
|
59
|
+
if attributes.has_key?(:'error')
|
60
|
+
self.error = attributes[:'error']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.has_key?(:'metadata')
|
64
|
+
self.metadata = attributes[:'metadata']
|
65
|
+
end
|
66
|
+
|
67
|
+
if attributes.has_key?(:'reviews')
|
68
|
+
if (value = attributes[:'reviews']).is_a?(Array)
|
69
|
+
self.reviews = value
|
70
|
+
end
|
71
|
+
end
|
72
|
+
|
73
|
+
if attributes.has_key?(:'success')
|
74
|
+
self.success = attributes[:'success']
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.has_key?(:'warning')
|
78
|
+
self.warning = attributes[:'warning']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properties with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
error == o.error &&
|
101
|
+
metadata == o.metadata &&
|
102
|
+
reviews == o.reviews &&
|
103
|
+
success == o.success &&
|
104
|
+
warning == o.warning
|
105
|
+
end
|
106
|
+
|
107
|
+
# @see the `==` method
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
111
|
+
end
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Fixnum] Hash code
|
115
|
+
def hash
|
116
|
+
[error, metadata, reviews, success, warning].hash
|
117
|
+
end
|
118
|
+
|
119
|
+
# Builds the object from hash
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
# @return [Object] Returns the model itself
|
122
|
+
def build_from_hash(attributes)
|
123
|
+
return nil unless attributes.is_a?(Hash)
|
124
|
+
self.class.swagger_types.each_pair do |key, type|
|
125
|
+
if type =~ /\AArray<(.*)>/i
|
126
|
+
# check to ensure the input is an array given that the attribute
|
127
|
+
# is documented as an array but the input is not
|
128
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
129
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
130
|
+
end
|
131
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
132
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
133
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
134
|
+
end
|
135
|
+
|
136
|
+
self
|
137
|
+
end
|
138
|
+
|
139
|
+
# Deserializes the data based on type
|
140
|
+
# @param string type Data type
|
141
|
+
# @param string value Value to be deserialized
|
142
|
+
# @return [Object] Deserialized data
|
143
|
+
def _deserialize(type, value)
|
144
|
+
case type.to_sym
|
145
|
+
when :DateTime
|
146
|
+
DateTime.parse(value)
|
147
|
+
when :Date
|
148
|
+
Date.parse(value)
|
149
|
+
when :String
|
150
|
+
value.to_s
|
151
|
+
when :Integer
|
152
|
+
value.to_i
|
153
|
+
when :Float
|
154
|
+
value.to_f
|
155
|
+
when :BOOLEAN
|
156
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
157
|
+
true
|
158
|
+
else
|
159
|
+
false
|
160
|
+
end
|
161
|
+
when :Object
|
162
|
+
# generic object (usually a Hash), return directly
|
163
|
+
value
|
164
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
165
|
+
inner_type = Regexp.last_match[:inner_type]
|
166
|
+
value.map { |v| _deserialize(inner_type, v) }
|
167
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
168
|
+
k_type = Regexp.last_match[:k_type]
|
169
|
+
v_type = Regexp.last_match[:v_type]
|
170
|
+
{}.tap do |hash|
|
171
|
+
value.each do |k, v|
|
172
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
173
|
+
end
|
174
|
+
end
|
175
|
+
else # model
|
176
|
+
temp_model = UltracartClient.const_get(type).new
|
177
|
+
temp_model.build_from_hash(value)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
|
181
|
+
# Returns the string representation of the object
|
182
|
+
# @return [String] String presentation of the object
|
183
|
+
def to_s
|
184
|
+
to_hash.to_s
|
185
|
+
end
|
186
|
+
|
187
|
+
# to_body is an alias to to_hash (backward compatibility)
|
188
|
+
# @return [Hash] Returns the object in the form of hash
|
189
|
+
def to_body
|
190
|
+
to_hash
|
191
|
+
end
|
192
|
+
|
193
|
+
# Returns the object in the form of hash
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_hash
|
196
|
+
hash = {}
|
197
|
+
self.class.attribute_map.each_pair do |attr, param|
|
198
|
+
value = self.send(attr)
|
199
|
+
next if value.nil?
|
200
|
+
hash[param] = _to_hash(value)
|
201
|
+
end
|
202
|
+
hash
|
203
|
+
end
|
204
|
+
|
205
|
+
# Outputs non-array value in the form of hash
|
206
|
+
# For object, use to_hash. Otherwise, just return the value
|
207
|
+
# @param [Object] value Any valid value
|
208
|
+
# @return [Hash] Returns the value in the form of hash
|
209
|
+
def _to_hash(value)
|
210
|
+
if value.is_a?(Array)
|
211
|
+
value.compact.map { |v| _to_hash(v) }
|
212
|
+
elsif value.is_a?(Hash)
|
213
|
+
{}.tap do |hash|
|
214
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
215
|
+
end
|
216
|
+
elsif value.respond_to? :to_hash
|
217
|
+
value.to_hash
|
218
|
+
else
|
219
|
+
value
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
end
|
224
|
+
end
|
@@ -26,6 +26,8 @@ module UltracartClient
|
|
26
26
|
# Error message if the query failed.
|
27
27
|
attr_accessor :error_message
|
28
28
|
|
29
|
+
attr_accessor :executed_sql
|
30
|
+
|
29
31
|
# An identifier that can be used to help match up the returned data set
|
30
32
|
attr_accessor :for_object_id
|
31
33
|
|
@@ -87,6 +89,7 @@ module UltracartClient
|
|
87
89
|
:'data_set_uuid' => :'data_set_uuid',
|
88
90
|
:'destination_table_id' => :'destination_table_id',
|
89
91
|
:'error_message' => :'error_message',
|
92
|
+
:'executed_sql' => :'executed_sql',
|
90
93
|
:'for_object_id' => :'for_object_id',
|
91
94
|
:'for_object_type' => :'for_object_type',
|
92
95
|
:'initial_pages' => :'initial_pages',
|
@@ -108,6 +111,7 @@ module UltracartClient
|
|
108
111
|
:'data_set_uuid' => :'String',
|
109
112
|
:'destination_table_id' => :'String',
|
110
113
|
:'error_message' => :'String',
|
114
|
+
:'executed_sql' => :'String',
|
111
115
|
:'for_object_id' => :'String',
|
112
116
|
:'for_object_type' => :'String',
|
113
117
|
:'initial_pages' => :'Array<ReportDataSetPage>',
|
@@ -146,6 +150,10 @@ module UltracartClient
|
|
146
150
|
self.error_message = attributes[:'error_message']
|
147
151
|
end
|
148
152
|
|
153
|
+
if attributes.has_key?(:'executed_sql')
|
154
|
+
self.executed_sql = attributes[:'executed_sql']
|
155
|
+
end
|
156
|
+
|
149
157
|
if attributes.has_key?(:'for_object_id')
|
150
158
|
self.for_object_id = attributes[:'for_object_id']
|
151
159
|
end
|
@@ -229,6 +237,7 @@ module UltracartClient
|
|
229
237
|
data_set_uuid == o.data_set_uuid &&
|
230
238
|
destination_table_id == o.destination_table_id &&
|
231
239
|
error_message == o.error_message &&
|
240
|
+
executed_sql == o.executed_sql &&
|
232
241
|
for_object_id == o.for_object_id &&
|
233
242
|
for_object_type == o.for_object_type &&
|
234
243
|
initial_pages == o.initial_pages &&
|
@@ -251,7 +260,7 @@ module UltracartClient
|
|
251
260
|
# Calculates hash code according to all attributes.
|
252
261
|
# @return [Fixnum] Hash code
|
253
262
|
def hash
|
254
|
-
[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
|
263
|
+
[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
|
255
264
|
end
|
256
265
|
|
257
266
|
# Builds the object from hash
|
data/lib/ultracart_api.rb
CHANGED
@@ -523,7 +523,9 @@ require 'ultracart_api/models/item_restriction'
|
|
523
523
|
require 'ultracart_api/models/item_restriction_item'
|
524
524
|
require 'ultracart_api/models/item_revguard'
|
525
525
|
require 'ultracart_api/models/item_review'
|
526
|
+
require 'ultracart_api/models/item_review_response'
|
526
527
|
require 'ultracart_api/models/item_reviews'
|
528
|
+
require 'ultracart_api/models/item_reviews_response'
|
527
529
|
require 'ultracart_api/models/item_salesforce'
|
528
530
|
require 'ultracart_api/models/item_shipping'
|
529
531
|
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: 3.10.
|
4
|
+
version: 3.10.138
|
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
|
@@ -740,7 +740,9 @@ files:
|
|
740
740
|
- docs/ItemRestrictionItem.md
|
741
741
|
- docs/ItemRevguard.md
|
742
742
|
- docs/ItemReview.md
|
743
|
+
- docs/ItemReviewResponse.md
|
743
744
|
- docs/ItemReviews.md
|
745
|
+
- docs/ItemReviewsResponse.md
|
744
746
|
- docs/ItemSalesforce.md
|
745
747
|
- docs/ItemShipping.md
|
746
748
|
- docs/ItemShippingCase.md
|
@@ -1545,7 +1547,9 @@ files:
|
|
1545
1547
|
- lib/ultracart_api/models/item_restriction_item.rb
|
1546
1548
|
- lib/ultracart_api/models/item_revguard.rb
|
1547
1549
|
- lib/ultracart_api/models/item_review.rb
|
1550
|
+
- lib/ultracart_api/models/item_review_response.rb
|
1548
1551
|
- lib/ultracart_api/models/item_reviews.rb
|
1552
|
+
- lib/ultracart_api/models/item_reviews_response.rb
|
1549
1553
|
- lib/ultracart_api/models/item_salesforce.rb
|
1550
1554
|
- lib/ultracart_api/models/item_shipping.rb
|
1551
1555
|
- lib/ultracart_api/models/item_shipping_case.rb
|