ultracart_api 3.10.135 → 3.10.137
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/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/lib/ultracart_api/api/item_api.rb +304 -0
- data/lib/ultracart_api/models/item_pricing_tier_limit.rb +11 -1
- 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/version.rb +1 -1
- data/lib/ultracart_api.rb +2 -0
- metadata +6 -2
@@ -140,6 +140,66 @@ module UltracartClient
|
|
140
140
|
end
|
141
141
|
return data, status_code, headers
|
142
142
|
end
|
143
|
+
# Delete a review
|
144
|
+
# Delete an item review.
|
145
|
+
# @param review_oid The review oid to delete.
|
146
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
147
|
+
# @param [Hash] opts the optional parameters
|
148
|
+
# @return [nil]
|
149
|
+
def delete_review(review_oid, merchant_item_oid, opts = {})
|
150
|
+
delete_review_with_http_info(review_oid, merchant_item_oid, opts)
|
151
|
+
nil
|
152
|
+
end
|
153
|
+
|
154
|
+
# Delete a review
|
155
|
+
# Delete an item review.
|
156
|
+
# @param review_oid The review oid to delete.
|
157
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
158
|
+
# @param [Hash] opts the optional parameters
|
159
|
+
# @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
|
160
|
+
def delete_review_with_http_info(review_oid, merchant_item_oid, opts = {})
|
161
|
+
if @api_client.config.debugging
|
162
|
+
@api_client.config.logger.debug 'Calling API: ItemApi.delete_review ...'
|
163
|
+
end
|
164
|
+
# verify the required parameter 'review_oid' is set
|
165
|
+
if @api_client.config.client_side_validation && review_oid.nil?
|
166
|
+
fail ArgumentError, "Missing the required parameter 'review_oid' when calling ItemApi.delete_review"
|
167
|
+
end
|
168
|
+
# verify the required parameter 'merchant_item_oid' is set
|
169
|
+
if @api_client.config.client_side_validation && merchant_item_oid.nil?
|
170
|
+
fail ArgumentError, "Missing the required parameter 'merchant_item_oid' when calling ItemApi.delete_review"
|
171
|
+
end
|
172
|
+
# resource path
|
173
|
+
local_var_path = '/item/items/{merchant_item_oid}/reviews/{review_oid}'.sub('{' + 'review_oid' + '}', review_oid.to_s).sub('{' + 'merchant_item_oid' + '}', merchant_item_oid.to_s)
|
174
|
+
|
175
|
+
# query parameters
|
176
|
+
query_params = {}
|
177
|
+
|
178
|
+
# header parameters
|
179
|
+
header_params = {}
|
180
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
181
|
+
# HTTP header 'Accept' (if needed)
|
182
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
183
|
+
# HTTP header 'Content-Type'
|
184
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
185
|
+
|
186
|
+
# form parameters
|
187
|
+
form_params = {}
|
188
|
+
|
189
|
+
# http body (model)
|
190
|
+
post_body = nil
|
191
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
192
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
|
193
|
+
:header_params => header_params,
|
194
|
+
:query_params => query_params,
|
195
|
+
:form_params => form_params,
|
196
|
+
:body => post_body,
|
197
|
+
:auth_names => auth_names)
|
198
|
+
if @api_client.config.debugging
|
199
|
+
@api_client.config.logger.debug "API called: ItemApi#delete_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
200
|
+
end
|
201
|
+
return data, status_code, headers
|
202
|
+
end
|
143
203
|
# Retrieve a digital item from the digital library, which are digital files that may be attached to normal items
|
144
204
|
# Retrieves a digital item (file information) from the account. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items.
|
145
205
|
# @param digital_item_oid The digital item oid to retrieve.
|
@@ -564,6 +624,122 @@ module UltracartClient
|
|
564
624
|
end
|
565
625
|
return data, status_code, headers
|
566
626
|
end
|
627
|
+
# get a review
|
628
|
+
# Retrieve an item review.
|
629
|
+
# @param review_oid The review oid to retrieve.
|
630
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
631
|
+
# @param [Hash] opts the optional parameters
|
632
|
+
# @return [ItemReviewResponse]
|
633
|
+
def get_review(review_oid, merchant_item_oid, opts = {})
|
634
|
+
data, _status_code, _headers = get_review_with_http_info(review_oid, merchant_item_oid, opts)
|
635
|
+
data
|
636
|
+
end
|
637
|
+
|
638
|
+
# get a review
|
639
|
+
# Retrieve an item review.
|
640
|
+
# @param review_oid The review oid to retrieve.
|
641
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
642
|
+
# @param [Hash] opts the optional parameters
|
643
|
+
# @return [Array<(ItemReviewResponse, Fixnum, Hash)>] ItemReviewResponse data, response status code and response headers
|
644
|
+
def get_review_with_http_info(review_oid, merchant_item_oid, opts = {})
|
645
|
+
if @api_client.config.debugging
|
646
|
+
@api_client.config.logger.debug 'Calling API: ItemApi.get_review ...'
|
647
|
+
end
|
648
|
+
# verify the required parameter 'review_oid' is set
|
649
|
+
if @api_client.config.client_side_validation && review_oid.nil?
|
650
|
+
fail ArgumentError, "Missing the required parameter 'review_oid' when calling ItemApi.get_review"
|
651
|
+
end
|
652
|
+
# verify the required parameter 'merchant_item_oid' is set
|
653
|
+
if @api_client.config.client_side_validation && merchant_item_oid.nil?
|
654
|
+
fail ArgumentError, "Missing the required parameter 'merchant_item_oid' when calling ItemApi.get_review"
|
655
|
+
end
|
656
|
+
# resource path
|
657
|
+
local_var_path = '/item/items/{merchant_item_oid}/reviews/{review_oid}'.sub('{' + 'review_oid' + '}', review_oid.to_s).sub('{' + 'merchant_item_oid' + '}', merchant_item_oid.to_s)
|
658
|
+
|
659
|
+
# query parameters
|
660
|
+
query_params = {}
|
661
|
+
|
662
|
+
# header parameters
|
663
|
+
header_params = {}
|
664
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
665
|
+
# HTTP header 'Accept' (if needed)
|
666
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
667
|
+
# HTTP header 'Content-Type'
|
668
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
669
|
+
|
670
|
+
# form parameters
|
671
|
+
form_params = {}
|
672
|
+
|
673
|
+
# http body (model)
|
674
|
+
post_body = nil
|
675
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
676
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
677
|
+
:header_params => header_params,
|
678
|
+
:query_params => query_params,
|
679
|
+
:form_params => form_params,
|
680
|
+
:body => post_body,
|
681
|
+
:auth_names => auth_names,
|
682
|
+
:return_type => 'ItemReviewResponse')
|
683
|
+
if @api_client.config.debugging
|
684
|
+
@api_client.config.logger.debug "API called: ItemApi#get_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
685
|
+
end
|
686
|
+
return data, status_code, headers
|
687
|
+
end
|
688
|
+
# get reviews for an item
|
689
|
+
# Retrieve item reviews.
|
690
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
691
|
+
# @param [Hash] opts the optional parameters
|
692
|
+
# @return [ItemReviewsResponse]
|
693
|
+
def get_reviews(merchant_item_oid, opts = {})
|
694
|
+
data, _status_code, _headers = get_reviews_with_http_info(merchant_item_oid, opts)
|
695
|
+
data
|
696
|
+
end
|
697
|
+
|
698
|
+
# get reviews for an item
|
699
|
+
# Retrieve item reviews.
|
700
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
701
|
+
# @param [Hash] opts the optional parameters
|
702
|
+
# @return [Array<(ItemReviewsResponse, Fixnum, Hash)>] ItemReviewsResponse data, response status code and response headers
|
703
|
+
def get_reviews_with_http_info(merchant_item_oid, opts = {})
|
704
|
+
if @api_client.config.debugging
|
705
|
+
@api_client.config.logger.debug 'Calling API: ItemApi.get_reviews ...'
|
706
|
+
end
|
707
|
+
# verify the required parameter 'merchant_item_oid' is set
|
708
|
+
if @api_client.config.client_side_validation && merchant_item_oid.nil?
|
709
|
+
fail ArgumentError, "Missing the required parameter 'merchant_item_oid' when calling ItemApi.get_reviews"
|
710
|
+
end
|
711
|
+
# resource path
|
712
|
+
local_var_path = '/item/items/{merchant_item_oid}/reviews'.sub('{' + 'merchant_item_oid' + '}', merchant_item_oid.to_s)
|
713
|
+
|
714
|
+
# query parameters
|
715
|
+
query_params = {}
|
716
|
+
|
717
|
+
# header parameters
|
718
|
+
header_params = {}
|
719
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
720
|
+
# HTTP header 'Accept' (if needed)
|
721
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
722
|
+
# HTTP header 'Content-Type'
|
723
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
724
|
+
|
725
|
+
# form parameters
|
726
|
+
form_params = {}
|
727
|
+
|
728
|
+
# http body (model)
|
729
|
+
post_body = nil
|
730
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
731
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path,
|
732
|
+
:header_params => header_params,
|
733
|
+
:query_params => query_params,
|
734
|
+
:form_params => form_params,
|
735
|
+
:body => post_body,
|
736
|
+
:auth_names => auth_names,
|
737
|
+
:return_type => 'ItemReviewsResponse')
|
738
|
+
if @api_client.config.debugging
|
739
|
+
@api_client.config.logger.debug "API called: ItemApi#get_reviews\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
740
|
+
end
|
741
|
+
return data, status_code, headers
|
742
|
+
end
|
567
743
|
# Retrieve digital items from the digital library (which are digital files that may be attached to normal items) not yet associated with actual items
|
568
744
|
# Retrieves a group of digital items (file information) from the account that are not yet associated with any actual items. If no parameters are specified, all digital items will be returned. Be aware that these are not normal items that can be added to a shopping cart. Rather, they are digital files that may be associated with normal items. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
569
745
|
# @param [Hash] opts the optional parameters
|
@@ -747,6 +923,67 @@ module UltracartClient
|
|
747
923
|
end
|
748
924
|
return data, status_code, headers
|
749
925
|
end
|
926
|
+
# Insert a review
|
927
|
+
# Insert a item review.
|
928
|
+
# @param review Review to insert
|
929
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
930
|
+
# @param [Hash] opts the optional parameters
|
931
|
+
# @return [ItemReviewResponse]
|
932
|
+
def insert_review(review, merchant_item_oid, opts = {})
|
933
|
+
data, _status_code, _headers = insert_review_with_http_info(review, merchant_item_oid, opts)
|
934
|
+
data
|
935
|
+
end
|
936
|
+
|
937
|
+
# Insert a review
|
938
|
+
# Insert a item review.
|
939
|
+
# @param review Review to insert
|
940
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
941
|
+
# @param [Hash] opts the optional parameters
|
942
|
+
# @return [Array<(ItemReviewResponse, Fixnum, Hash)>] ItemReviewResponse data, response status code and response headers
|
943
|
+
def insert_review_with_http_info(review, merchant_item_oid, opts = {})
|
944
|
+
if @api_client.config.debugging
|
945
|
+
@api_client.config.logger.debug 'Calling API: ItemApi.insert_review ...'
|
946
|
+
end
|
947
|
+
# verify the required parameter 'review' is set
|
948
|
+
if @api_client.config.client_side_validation && review.nil?
|
949
|
+
fail ArgumentError, "Missing the required parameter 'review' when calling ItemApi.insert_review"
|
950
|
+
end
|
951
|
+
# verify the required parameter 'merchant_item_oid' is set
|
952
|
+
if @api_client.config.client_side_validation && merchant_item_oid.nil?
|
953
|
+
fail ArgumentError, "Missing the required parameter 'merchant_item_oid' when calling ItemApi.insert_review"
|
954
|
+
end
|
955
|
+
# resource path
|
956
|
+
local_var_path = '/item/items/{merchant_item_oid}/reviews'.sub('{' + 'merchant_item_oid' + '}', merchant_item_oid.to_s)
|
957
|
+
|
958
|
+
# query parameters
|
959
|
+
query_params = {}
|
960
|
+
|
961
|
+
# header parameters
|
962
|
+
header_params = {}
|
963
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
964
|
+
# HTTP header 'Accept' (if needed)
|
965
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
966
|
+
# HTTP header 'Content-Type'
|
967
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
968
|
+
|
969
|
+
# form parameters
|
970
|
+
form_params = {}
|
971
|
+
|
972
|
+
# http body (model)
|
973
|
+
post_body = @api_client.object_to_http_body(review)
|
974
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
975
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path,
|
976
|
+
:header_params => header_params,
|
977
|
+
:query_params => query_params,
|
978
|
+
:form_params => form_params,
|
979
|
+
:body => post_body,
|
980
|
+
:auth_names => auth_names,
|
981
|
+
:return_type => 'ItemReviewResponse')
|
982
|
+
if @api_client.config.debugging
|
983
|
+
@api_client.config.logger.debug "API called: ItemApi#insert_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
984
|
+
end
|
985
|
+
return data, status_code, headers
|
986
|
+
end
|
750
987
|
# Updates a file within the digital library
|
751
988
|
# Updates a file within the digital library. This does not update an item, but updates a digital file available and selectable as part (or all) of an item.
|
752
989
|
# @param digital_item_oid The digital item oid to update.
|
@@ -939,6 +1176,73 @@ module UltracartClient
|
|
939
1176
|
end
|
940
1177
|
return data, status_code, headers
|
941
1178
|
end
|
1179
|
+
# Update a review
|
1180
|
+
# Update an item review.
|
1181
|
+
# @param review Review to update
|
1182
|
+
# @param review_oid The review oid to update.
|
1183
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
1184
|
+
# @param [Hash] opts the optional parameters
|
1185
|
+
# @return [ItemReviewResponse]
|
1186
|
+
def update_review(review, review_oid, merchant_item_oid, opts = {})
|
1187
|
+
data, _status_code, _headers = update_review_with_http_info(review, review_oid, merchant_item_oid, opts)
|
1188
|
+
data
|
1189
|
+
end
|
1190
|
+
|
1191
|
+
# Update a review
|
1192
|
+
# Update an item review.
|
1193
|
+
# @param review Review to update
|
1194
|
+
# @param review_oid The review oid to update.
|
1195
|
+
# @param merchant_item_oid The item oid the review is associated with.
|
1196
|
+
# @param [Hash] opts the optional parameters
|
1197
|
+
# @return [Array<(ItemReviewResponse, Fixnum, Hash)>] ItemReviewResponse data, response status code and response headers
|
1198
|
+
def update_review_with_http_info(review, review_oid, merchant_item_oid, opts = {})
|
1199
|
+
if @api_client.config.debugging
|
1200
|
+
@api_client.config.logger.debug 'Calling API: ItemApi.update_review ...'
|
1201
|
+
end
|
1202
|
+
# verify the required parameter 'review' is set
|
1203
|
+
if @api_client.config.client_side_validation && review.nil?
|
1204
|
+
fail ArgumentError, "Missing the required parameter 'review' when calling ItemApi.update_review"
|
1205
|
+
end
|
1206
|
+
# verify the required parameter 'review_oid' is set
|
1207
|
+
if @api_client.config.client_side_validation && review_oid.nil?
|
1208
|
+
fail ArgumentError, "Missing the required parameter 'review_oid' when calling ItemApi.update_review"
|
1209
|
+
end
|
1210
|
+
# verify the required parameter 'merchant_item_oid' is set
|
1211
|
+
if @api_client.config.client_side_validation && merchant_item_oid.nil?
|
1212
|
+
fail ArgumentError, "Missing the required parameter 'merchant_item_oid' when calling ItemApi.update_review"
|
1213
|
+
end
|
1214
|
+
# resource path
|
1215
|
+
local_var_path = '/item/items/{merchant_item_oid}/reviews/{review_oid}'.sub('{' + 'review_oid' + '}', review_oid.to_s).sub('{' + 'merchant_item_oid' + '}', merchant_item_oid.to_s)
|
1216
|
+
|
1217
|
+
# query parameters
|
1218
|
+
query_params = {}
|
1219
|
+
|
1220
|
+
# header parameters
|
1221
|
+
header_params = {}
|
1222
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1223
|
+
# HTTP header 'Accept' (if needed)
|
1224
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1225
|
+
# HTTP header 'Content-Type'
|
1226
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1227
|
+
|
1228
|
+
# form parameters
|
1229
|
+
form_params = {}
|
1230
|
+
|
1231
|
+
# http body (model)
|
1232
|
+
post_body = @api_client.object_to_http_body(review)
|
1233
|
+
auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1234
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
|
1235
|
+
:header_params => header_params,
|
1236
|
+
:query_params => query_params,
|
1237
|
+
:form_params => form_params,
|
1238
|
+
:body => post_body,
|
1239
|
+
:auth_names => auth_names,
|
1240
|
+
:return_type => 'ItemReviewResponse')
|
1241
|
+
if @api_client.config.debugging
|
1242
|
+
@api_client.config.logger.debug "API called: ItemApi#update_review\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1243
|
+
end
|
1244
|
+
return data, status_code, headers
|
1245
|
+
end
|
942
1246
|
# Upload an image to the temporary multimedia.
|
943
1247
|
# Uploads an image and returns back meta information about the image as well as the identifier needed for the item update.
|
944
1248
|
# @param file File to upload
|
@@ -17,6 +17,9 @@ module UltracartClient
|
|
17
17
|
# Cumulative order limit
|
18
18
|
attr_accessor :cumulative_order_limit
|
19
19
|
|
20
|
+
# Exempt from Minimum Item Count
|
21
|
+
attr_accessor :exempt_from_minimum_item_count
|
22
|
+
|
20
23
|
# Individual order limit
|
21
24
|
attr_accessor :individual_order_limit
|
22
25
|
|
@@ -27,6 +30,7 @@ module UltracartClient
|
|
27
30
|
def self.attribute_map
|
28
31
|
{
|
29
32
|
:'cumulative_order_limit' => :'cumulative_order_limit',
|
33
|
+
:'exempt_from_minimum_item_count' => :'exempt_from_minimum_item_count',
|
30
34
|
:'individual_order_limit' => :'individual_order_limit',
|
31
35
|
:'multiple_quantity' => :'multiple_quantity'
|
32
36
|
}
|
@@ -36,6 +40,7 @@ module UltracartClient
|
|
36
40
|
def self.swagger_types
|
37
41
|
{
|
38
42
|
:'cumulative_order_limit' => :'Integer',
|
43
|
+
:'exempt_from_minimum_item_count' => :'BOOLEAN',
|
39
44
|
:'individual_order_limit' => :'Integer',
|
40
45
|
:'multiple_quantity' => :'Integer'
|
41
46
|
}
|
@@ -53,6 +58,10 @@ module UltracartClient
|
|
53
58
|
self.cumulative_order_limit = attributes[:'cumulative_order_limit']
|
54
59
|
end
|
55
60
|
|
61
|
+
if attributes.has_key?(:'exempt_from_minimum_item_count')
|
62
|
+
self.exempt_from_minimum_item_count = attributes[:'exempt_from_minimum_item_count']
|
63
|
+
end
|
64
|
+
|
56
65
|
if attributes.has_key?(:'individual_order_limit')
|
57
66
|
self.individual_order_limit = attributes[:'individual_order_limit']
|
58
67
|
end
|
@@ -81,6 +90,7 @@ module UltracartClient
|
|
81
90
|
return true if self.equal?(o)
|
82
91
|
self.class == o.class &&
|
83
92
|
cumulative_order_limit == o.cumulative_order_limit &&
|
93
|
+
exempt_from_minimum_item_count == o.exempt_from_minimum_item_count &&
|
84
94
|
individual_order_limit == o.individual_order_limit &&
|
85
95
|
multiple_quantity == o.multiple_quantity
|
86
96
|
end
|
@@ -94,7 +104,7 @@ module UltracartClient
|
|
94
104
|
# Calculates hash code according to all attributes.
|
95
105
|
# @return [Fixnum] Hash code
|
96
106
|
def hash
|
97
|
-
[cumulative_order_limit, individual_order_limit, multiple_quantity].hash
|
107
|
+
[cumulative_order_limit, exempt_from_minimum_item_count, individual_order_limit, multiple_quantity].hash
|
98
108
|
end
|
99
109
|
|
100
110
|
# Builds the object from hash
|