ultracart_api 4.0.185 → 4.0.186
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/CustomerApi.md +370 -0
- data/docs/CustomerWishListItem.md +30 -0
- data/docs/CustomerWishListItemResponse.md +26 -0
- data/docs/CustomerWishListItemsResponse.md +26 -0
- data/lib/ultracart_api/api/customer_api.rb +360 -0
- data/lib/ultracart_api/models/customer_wish_list_item.rb +295 -0
- data/lib/ultracart_api/models/customer_wish_list_item_response.rb +256 -0
- data/lib/ultracart_api/models/customer_wish_list_items_response.rb +258 -0
- data/lib/ultracart_api/version.rb +1 -1
- data/lib/ultracart_api.rb +3 -0
- metadata +8 -2
@@ -246,6 +246,76 @@ module UltracartClient
|
|
246
246
|
return data, status_code, headers
|
247
247
|
end
|
248
248
|
|
249
|
+
# Delete a customer wishlist item
|
250
|
+
# Delete a customer wishlist item
|
251
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
252
|
+
# @param customer_wishlist_item_oid [Integer] The wishlist oid for this wishlist item to delete.
|
253
|
+
# @param [Hash] opts the optional parameters
|
254
|
+
# @return [CustomerWishListItem]
|
255
|
+
def delete_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, opts = {})
|
256
|
+
data, _status_code, _headers = delete_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts)
|
257
|
+
data
|
258
|
+
end
|
259
|
+
|
260
|
+
# Delete a customer wishlist item
|
261
|
+
# Delete a customer wishlist item
|
262
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
263
|
+
# @param customer_wishlist_item_oid [Integer] The wishlist oid for this wishlist item to delete.
|
264
|
+
# @param [Hash] opts the optional parameters
|
265
|
+
# @return [Array<(CustomerWishListItem, Integer, Hash)>] CustomerWishListItem data, response status code and response headers
|
266
|
+
def delete_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts = {})
|
267
|
+
if @api_client.config.debugging
|
268
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.delete_wish_list_item ...'
|
269
|
+
end
|
270
|
+
# verify the required parameter 'customer_profile_oid' is set
|
271
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
272
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.delete_wish_list_item"
|
273
|
+
end
|
274
|
+
# verify the required parameter 'customer_wishlist_item_oid' is set
|
275
|
+
if @api_client.config.client_side_validation && customer_wishlist_item_oid.nil?
|
276
|
+
fail ArgumentError, "Missing the required parameter 'customer_wishlist_item_oid' when calling CustomerApi.delete_wish_list_item"
|
277
|
+
end
|
278
|
+
# resource path
|
279
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'customer_wishlist_item_oid' + '}', CGI.escape(customer_wishlist_item_oid.to_s))
|
280
|
+
|
281
|
+
# query parameters
|
282
|
+
query_params = opts[:query_params] || {}
|
283
|
+
|
284
|
+
# header parameters
|
285
|
+
header_params = opts[:header_params] || {}
|
286
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
287
|
+
# HTTP header 'Accept' (if needed)
|
288
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
289
|
+
|
290
|
+
# form parameters
|
291
|
+
form_params = opts[:form_params] || {}
|
292
|
+
|
293
|
+
# http body (model)
|
294
|
+
post_body = opts[:debug_body]
|
295
|
+
|
296
|
+
# return_type
|
297
|
+
return_type = opts[:debug_return_type] || 'CustomerWishListItem'
|
298
|
+
|
299
|
+
# auth_names
|
300
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
301
|
+
|
302
|
+
new_options = opts.merge(
|
303
|
+
:operation => :"CustomerApi.delete_wish_list_item",
|
304
|
+
:header_params => header_params,
|
305
|
+
:query_params => query_params,
|
306
|
+
:form_params => form_params,
|
307
|
+
:body => post_body,
|
308
|
+
:auth_names => auth_names,
|
309
|
+
:return_type => return_type
|
310
|
+
)
|
311
|
+
|
312
|
+
data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
|
313
|
+
if @api_client.config.debugging
|
314
|
+
@api_client.config.logger.debug "API called: CustomerApi#delete_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
315
|
+
end
|
316
|
+
return data, status_code, headers
|
317
|
+
end
|
318
|
+
|
249
319
|
# Retrieve a customer
|
250
320
|
# Retrieves a single customer using the specified customer profile oid.
|
251
321
|
# @param customer_profile_oid [Integer] The customer oid to retrieve.
|
@@ -560,6 +630,140 @@ module UltracartClient
|
|
560
630
|
return data, status_code, headers
|
561
631
|
end
|
562
632
|
|
633
|
+
# Retrieve wishlist items for customer
|
634
|
+
# Retrieve wishlist items for customer.
|
635
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
636
|
+
# @param [Hash] opts the optional parameters
|
637
|
+
# @return [CustomerWishListItemsResponse]
|
638
|
+
def get_customer_wish_list(customer_profile_oid, opts = {})
|
639
|
+
data, _status_code, _headers = get_customer_wish_list_with_http_info(customer_profile_oid, opts)
|
640
|
+
data
|
641
|
+
end
|
642
|
+
|
643
|
+
# Retrieve wishlist items for customer
|
644
|
+
# Retrieve wishlist items for customer.
|
645
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
646
|
+
# @param [Hash] opts the optional parameters
|
647
|
+
# @return [Array<(CustomerWishListItemsResponse, Integer, Hash)>] CustomerWishListItemsResponse data, response status code and response headers
|
648
|
+
def get_customer_wish_list_with_http_info(customer_profile_oid, opts = {})
|
649
|
+
if @api_client.config.debugging
|
650
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_wish_list ...'
|
651
|
+
end
|
652
|
+
# verify the required parameter 'customer_profile_oid' is set
|
653
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
654
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer_wish_list"
|
655
|
+
end
|
656
|
+
# resource path
|
657
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/wishlist'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))
|
658
|
+
|
659
|
+
# query parameters
|
660
|
+
query_params = opts[:query_params] || {}
|
661
|
+
|
662
|
+
# header parameters
|
663
|
+
header_params = opts[: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
|
+
|
668
|
+
# form parameters
|
669
|
+
form_params = opts[:form_params] || {}
|
670
|
+
|
671
|
+
# http body (model)
|
672
|
+
post_body = opts[:debug_body]
|
673
|
+
|
674
|
+
# return_type
|
675
|
+
return_type = opts[:debug_return_type] || 'CustomerWishListItemsResponse'
|
676
|
+
|
677
|
+
# auth_names
|
678
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
679
|
+
|
680
|
+
new_options = opts.merge(
|
681
|
+
:operation => :"CustomerApi.get_customer_wish_list",
|
682
|
+
:header_params => header_params,
|
683
|
+
:query_params => query_params,
|
684
|
+
:form_params => form_params,
|
685
|
+
:body => post_body,
|
686
|
+
:auth_names => auth_names,
|
687
|
+
:return_type => return_type
|
688
|
+
)
|
689
|
+
|
690
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
691
|
+
if @api_client.config.debugging
|
692
|
+
@api_client.config.logger.debug "API called: CustomerApi#get_customer_wish_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
693
|
+
end
|
694
|
+
return data, status_code, headers
|
695
|
+
end
|
696
|
+
|
697
|
+
# Retrieve wishlist item for customer
|
698
|
+
# Retrieve wishlist item for customer.
|
699
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
700
|
+
# @param customer_wishlist_item_oid [Integer] The wishlist oid for this wishlist item.
|
701
|
+
# @param [Hash] opts the optional parameters
|
702
|
+
# @return [CustomerWishListItemResponse]
|
703
|
+
def get_customer_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, opts = {})
|
704
|
+
data, _status_code, _headers = get_customer_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts)
|
705
|
+
data
|
706
|
+
end
|
707
|
+
|
708
|
+
# Retrieve wishlist item for customer
|
709
|
+
# Retrieve wishlist item for customer.
|
710
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
711
|
+
# @param customer_wishlist_item_oid [Integer] The wishlist oid for this wishlist item.
|
712
|
+
# @param [Hash] opts the optional parameters
|
713
|
+
# @return [Array<(CustomerWishListItemResponse, Integer, Hash)>] CustomerWishListItemResponse data, response status code and response headers
|
714
|
+
def get_customer_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, opts = {})
|
715
|
+
if @api_client.config.debugging
|
716
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.get_customer_wish_list_item ...'
|
717
|
+
end
|
718
|
+
# verify the required parameter 'customer_profile_oid' is set
|
719
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
720
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.get_customer_wish_list_item"
|
721
|
+
end
|
722
|
+
# verify the required parameter 'customer_wishlist_item_oid' is set
|
723
|
+
if @api_client.config.client_side_validation && customer_wishlist_item_oid.nil?
|
724
|
+
fail ArgumentError, "Missing the required parameter 'customer_wishlist_item_oid' when calling CustomerApi.get_customer_wish_list_item"
|
725
|
+
end
|
726
|
+
# resource path
|
727
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'customer_wishlist_item_oid' + '}', CGI.escape(customer_wishlist_item_oid.to_s))
|
728
|
+
|
729
|
+
# query parameters
|
730
|
+
query_params = opts[:query_params] || {}
|
731
|
+
|
732
|
+
# header parameters
|
733
|
+
header_params = opts[:header_params] || {}
|
734
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
735
|
+
# HTTP header 'Accept' (if needed)
|
736
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
737
|
+
|
738
|
+
# form parameters
|
739
|
+
form_params = opts[:form_params] || {}
|
740
|
+
|
741
|
+
# http body (model)
|
742
|
+
post_body = opts[:debug_body]
|
743
|
+
|
744
|
+
# return_type
|
745
|
+
return_type = opts[:debug_return_type] || 'CustomerWishListItemResponse'
|
746
|
+
|
747
|
+
# auth_names
|
748
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
749
|
+
|
750
|
+
new_options = opts.merge(
|
751
|
+
:operation => :"CustomerApi.get_customer_wish_list_item",
|
752
|
+
:header_params => header_params,
|
753
|
+
:query_params => query_params,
|
754
|
+
:form_params => form_params,
|
755
|
+
:body => post_body,
|
756
|
+
:auth_names => auth_names,
|
757
|
+
:return_type => return_type
|
758
|
+
)
|
759
|
+
|
760
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
761
|
+
if @api_client.config.debugging
|
762
|
+
@api_client.config.logger.debug "API called: CustomerApi#get_customer_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
763
|
+
end
|
764
|
+
return data, status_code, headers
|
765
|
+
end
|
766
|
+
|
563
767
|
# Retrieve customers
|
564
768
|
# Retrieves customers from the account. If no parameters are specified, all customers will be returned. You will need to make multiple API calls in order to retrieve the entire result set since this API performs result set pagination.
|
565
769
|
# @param [Hash] opts the optional parameters
|
@@ -1070,6 +1274,81 @@ module UltracartClient
|
|
1070
1274
|
return data, status_code, headers
|
1071
1275
|
end
|
1072
1276
|
|
1277
|
+
# Insert a customer wishlist item
|
1278
|
+
# Insert a customer wishlist item
|
1279
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
1280
|
+
# @param wishlist_item [CustomerWishListItem] Wishlist item to insert
|
1281
|
+
# @param [Hash] opts the optional parameters
|
1282
|
+
# @return [CustomerWishListItem]
|
1283
|
+
def insert_wish_list_item(customer_profile_oid, wishlist_item, opts = {})
|
1284
|
+
data, _status_code, _headers = insert_wish_list_item_with_http_info(customer_profile_oid, wishlist_item, opts)
|
1285
|
+
data
|
1286
|
+
end
|
1287
|
+
|
1288
|
+
# Insert a customer wishlist item
|
1289
|
+
# Insert a customer wishlist item
|
1290
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
1291
|
+
# @param wishlist_item [CustomerWishListItem] Wishlist item to insert
|
1292
|
+
# @param [Hash] opts the optional parameters
|
1293
|
+
# @return [Array<(CustomerWishListItem, Integer, Hash)>] CustomerWishListItem data, response status code and response headers
|
1294
|
+
def insert_wish_list_item_with_http_info(customer_profile_oid, wishlist_item, opts = {})
|
1295
|
+
if @api_client.config.debugging
|
1296
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.insert_wish_list_item ...'
|
1297
|
+
end
|
1298
|
+
# verify the required parameter 'customer_profile_oid' is set
|
1299
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
1300
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.insert_wish_list_item"
|
1301
|
+
end
|
1302
|
+
# verify the required parameter 'wishlist_item' is set
|
1303
|
+
if @api_client.config.client_side_validation && wishlist_item.nil?
|
1304
|
+
fail ArgumentError, "Missing the required parameter 'wishlist_item' when calling CustomerApi.insert_wish_list_item"
|
1305
|
+
end
|
1306
|
+
# resource path
|
1307
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/wishlist'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s))
|
1308
|
+
|
1309
|
+
# query parameters
|
1310
|
+
query_params = opts[:query_params] || {}
|
1311
|
+
|
1312
|
+
# header parameters
|
1313
|
+
header_params = opts[:header_params] || {}
|
1314
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1315
|
+
# HTTP header 'Accept' (if needed)
|
1316
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1317
|
+
# HTTP header 'Content-Type'
|
1318
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1319
|
+
if !content_type.nil?
|
1320
|
+
header_params['Content-Type'] = content_type
|
1321
|
+
end
|
1322
|
+
|
1323
|
+
# form parameters
|
1324
|
+
form_params = opts[:form_params] || {}
|
1325
|
+
|
1326
|
+
# http body (model)
|
1327
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(wishlist_item)
|
1328
|
+
|
1329
|
+
# return_type
|
1330
|
+
return_type = opts[:debug_return_type] || 'CustomerWishListItem'
|
1331
|
+
|
1332
|
+
# auth_names
|
1333
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1334
|
+
|
1335
|
+
new_options = opts.merge(
|
1336
|
+
:operation => :"CustomerApi.insert_wish_list_item",
|
1337
|
+
:header_params => header_params,
|
1338
|
+
:query_params => query_params,
|
1339
|
+
:form_params => form_params,
|
1340
|
+
:body => post_body,
|
1341
|
+
:auth_names => auth_names,
|
1342
|
+
:return_type => return_type
|
1343
|
+
)
|
1344
|
+
|
1345
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
1346
|
+
if @api_client.config.debugging
|
1347
|
+
@api_client.config.logger.debug "API called: CustomerApi#insert_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1348
|
+
end
|
1349
|
+
return data, status_code, headers
|
1350
|
+
end
|
1351
|
+
|
1073
1352
|
# Merge customer into this customer
|
1074
1353
|
# Merge customer into this customer.
|
1075
1354
|
# @param customer_profile_oid [Integer] The customer_profile_oid to update.
|
@@ -1368,6 +1647,87 @@ module UltracartClient
|
|
1368
1647
|
return data, status_code, headers
|
1369
1648
|
end
|
1370
1649
|
|
1650
|
+
# Update a customer wishlist item
|
1651
|
+
# Update a customer wishlist item
|
1652
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
1653
|
+
# @param customer_wishlist_item_oid [Integer] The wishlist oid for this wishlist item.
|
1654
|
+
# @param wishlist_item [CustomerWishListItem] Wishlist item to update
|
1655
|
+
# @param [Hash] opts the optional parameters
|
1656
|
+
# @return [CustomerWishListItem]
|
1657
|
+
def update_wish_list_item(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts = {})
|
1658
|
+
data, _status_code, _headers = update_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts)
|
1659
|
+
data
|
1660
|
+
end
|
1661
|
+
|
1662
|
+
# Update a customer wishlist item
|
1663
|
+
# Update a customer wishlist item
|
1664
|
+
# @param customer_profile_oid [Integer] The customer oid for this wishlist.
|
1665
|
+
# @param customer_wishlist_item_oid [Integer] The wishlist oid for this wishlist item.
|
1666
|
+
# @param wishlist_item [CustomerWishListItem] Wishlist item to update
|
1667
|
+
# @param [Hash] opts the optional parameters
|
1668
|
+
# @return [Array<(CustomerWishListItem, Integer, Hash)>] CustomerWishListItem data, response status code and response headers
|
1669
|
+
def update_wish_list_item_with_http_info(customer_profile_oid, customer_wishlist_item_oid, wishlist_item, opts = {})
|
1670
|
+
if @api_client.config.debugging
|
1671
|
+
@api_client.config.logger.debug 'Calling API: CustomerApi.update_wish_list_item ...'
|
1672
|
+
end
|
1673
|
+
# verify the required parameter 'customer_profile_oid' is set
|
1674
|
+
if @api_client.config.client_side_validation && customer_profile_oid.nil?
|
1675
|
+
fail ArgumentError, "Missing the required parameter 'customer_profile_oid' when calling CustomerApi.update_wish_list_item"
|
1676
|
+
end
|
1677
|
+
# verify the required parameter 'customer_wishlist_item_oid' is set
|
1678
|
+
if @api_client.config.client_side_validation && customer_wishlist_item_oid.nil?
|
1679
|
+
fail ArgumentError, "Missing the required parameter 'customer_wishlist_item_oid' when calling CustomerApi.update_wish_list_item"
|
1680
|
+
end
|
1681
|
+
# verify the required parameter 'wishlist_item' is set
|
1682
|
+
if @api_client.config.client_side_validation && wishlist_item.nil?
|
1683
|
+
fail ArgumentError, "Missing the required parameter 'wishlist_item' when calling CustomerApi.update_wish_list_item"
|
1684
|
+
end
|
1685
|
+
# resource path
|
1686
|
+
local_var_path = '/customer/customers/{customer_profile_oid}/wishlist/{customer_wishlist_item_oid}'.sub('{' + 'customer_profile_oid' + '}', CGI.escape(customer_profile_oid.to_s)).sub('{' + 'customer_wishlist_item_oid' + '}', CGI.escape(customer_wishlist_item_oid.to_s))
|
1687
|
+
|
1688
|
+
# query parameters
|
1689
|
+
query_params = opts[:query_params] || {}
|
1690
|
+
|
1691
|
+
# header parameters
|
1692
|
+
header_params = opts[:header_params] || {}
|
1693
|
+
header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
|
1694
|
+
# HTTP header 'Accept' (if needed)
|
1695
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
1696
|
+
# HTTP header 'Content-Type'
|
1697
|
+
content_type = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
|
1698
|
+
if !content_type.nil?
|
1699
|
+
header_params['Content-Type'] = content_type
|
1700
|
+
end
|
1701
|
+
|
1702
|
+
# form parameters
|
1703
|
+
form_params = opts[:form_params] || {}
|
1704
|
+
|
1705
|
+
# http body (model)
|
1706
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(wishlist_item)
|
1707
|
+
|
1708
|
+
# return_type
|
1709
|
+
return_type = opts[:debug_return_type] || 'CustomerWishListItem'
|
1710
|
+
|
1711
|
+
# auth_names
|
1712
|
+
auth_names = opts[:debug_auth_names] || ['ultraCartOauth', 'ultraCartSimpleApiKey']
|
1713
|
+
|
1714
|
+
new_options = opts.merge(
|
1715
|
+
:operation => :"CustomerApi.update_wish_list_item",
|
1716
|
+
:header_params => header_params,
|
1717
|
+
:query_params => query_params,
|
1718
|
+
:form_params => form_params,
|
1719
|
+
:body => post_body,
|
1720
|
+
:auth_names => auth_names,
|
1721
|
+
:return_type => return_type
|
1722
|
+
)
|
1723
|
+
|
1724
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
1725
|
+
if @api_client.config.debugging
|
1726
|
+
@api_client.config.logger.debug "API called: CustomerApi#update_wish_list_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
1727
|
+
end
|
1728
|
+
return data, status_code, headers
|
1729
|
+
end
|
1730
|
+
|
1371
1731
|
# Validate a token that can be used to verify a customer email address
|
1372
1732
|
# Validate a token that can be used to verify a customer email address. The implementation of how a customer interacts with this token is left to the merchant.
|
1373
1733
|
# @param validation_request [EmailVerifyTokenValidateRequest] Token validation request
|
@@ -0,0 +1,295 @@
|
|
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 CustomerWishListItem
|
18
|
+
# Add date
|
19
|
+
attr_accessor :add_dts
|
20
|
+
|
21
|
+
# Comments
|
22
|
+
attr_accessor :comments
|
23
|
+
|
24
|
+
# Customer profile object identifier
|
25
|
+
attr_accessor :customer_profile_oid
|
26
|
+
|
27
|
+
# Customer wishlist item object identifier
|
28
|
+
attr_accessor :customer_wishlist_item_oid
|
29
|
+
|
30
|
+
# Merchant item object identifier
|
31
|
+
attr_accessor :merchant_item_oid
|
32
|
+
|
33
|
+
# Position in wishlist
|
34
|
+
attr_accessor :position
|
35
|
+
|
36
|
+
# Priority of wishlist item, 3 being low priority and 5 is high priority.
|
37
|
+
attr_accessor :priority
|
38
|
+
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
40
|
+
def self.attribute_map
|
41
|
+
{
|
42
|
+
:'add_dts' => :'add_dts',
|
43
|
+
:'comments' => :'comments',
|
44
|
+
:'customer_profile_oid' => :'customer_profile_oid',
|
45
|
+
:'customer_wishlist_item_oid' => :'customer_wishlist_item_oid',
|
46
|
+
:'merchant_item_oid' => :'merchant_item_oid',
|
47
|
+
:'position' => :'position',
|
48
|
+
:'priority' => :'priority'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# Returns all the JSON keys this model knows about
|
53
|
+
def self.acceptable_attributes
|
54
|
+
attribute_map.values
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.openapi_types
|
59
|
+
{
|
60
|
+
:'add_dts' => :'String',
|
61
|
+
:'comments' => :'String',
|
62
|
+
:'customer_profile_oid' => :'Integer',
|
63
|
+
:'customer_wishlist_item_oid' => :'Integer',
|
64
|
+
:'merchant_item_oid' => :'Integer',
|
65
|
+
:'position' => :'Integer',
|
66
|
+
:'priority' => :'Integer'
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# List of attributes with nullable: true
|
71
|
+
def self.openapi_nullable
|
72
|
+
Set.new([
|
73
|
+
])
|
74
|
+
end
|
75
|
+
|
76
|
+
# Initializes the object
|
77
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
78
|
+
def initialize(attributes = {})
|
79
|
+
if (!attributes.is_a?(Hash))
|
80
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `UltracartClient::CustomerWishListItem` initialize method"
|
81
|
+
end
|
82
|
+
|
83
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
84
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
85
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
86
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `UltracartClient::CustomerWishListItem`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
87
|
+
end
|
88
|
+
h[k.to_sym] = v
|
89
|
+
}
|
90
|
+
|
91
|
+
if attributes.key?(:'add_dts')
|
92
|
+
self.add_dts = attributes[:'add_dts']
|
93
|
+
end
|
94
|
+
|
95
|
+
if attributes.key?(:'comments')
|
96
|
+
self.comments = attributes[:'comments']
|
97
|
+
end
|
98
|
+
|
99
|
+
if attributes.key?(:'customer_profile_oid')
|
100
|
+
self.customer_profile_oid = attributes[:'customer_profile_oid']
|
101
|
+
end
|
102
|
+
|
103
|
+
if attributes.key?(:'customer_wishlist_item_oid')
|
104
|
+
self.customer_wishlist_item_oid = attributes[:'customer_wishlist_item_oid']
|
105
|
+
end
|
106
|
+
|
107
|
+
if attributes.key?(:'merchant_item_oid')
|
108
|
+
self.merchant_item_oid = attributes[:'merchant_item_oid']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes.key?(:'position')
|
112
|
+
self.position = attributes[:'position']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes.key?(:'priority')
|
116
|
+
self.priority = attributes[:'priority']
|
117
|
+
end
|
118
|
+
end
|
119
|
+
|
120
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
121
|
+
# @return Array for valid properties with the reasons
|
122
|
+
def list_invalid_properties
|
123
|
+
invalid_properties = Array.new
|
124
|
+
if !@comments.nil? && @comments.to_s.length > 1024
|
125
|
+
invalid_properties.push('invalid value for "comments", the character length must be smaller than or equal to 1024.')
|
126
|
+
end
|
127
|
+
|
128
|
+
invalid_properties
|
129
|
+
end
|
130
|
+
|
131
|
+
# Check to see if the all the properties in the model are valid
|
132
|
+
# @return true if the model is valid
|
133
|
+
def valid?
|
134
|
+
return false if !@comments.nil? && @comments.to_s.length > 1024
|
135
|
+
true
|
136
|
+
end
|
137
|
+
|
138
|
+
# Custom attribute writer method with validation
|
139
|
+
# @param [Object] comments Value to be assigned
|
140
|
+
def comments=(comments)
|
141
|
+
if !comments.nil? && comments.to_s.length > 1024
|
142
|
+
fail ArgumentError, 'invalid value for "comments", the character length must be smaller than or equal to 1024.'
|
143
|
+
end
|
144
|
+
|
145
|
+
@comments = comments
|
146
|
+
end
|
147
|
+
|
148
|
+
# Checks equality by comparing each attribute.
|
149
|
+
# @param [Object] Object to be compared
|
150
|
+
def ==(o)
|
151
|
+
return true if self.equal?(o)
|
152
|
+
self.class == o.class &&
|
153
|
+
add_dts == o.add_dts &&
|
154
|
+
comments == o.comments &&
|
155
|
+
customer_profile_oid == o.customer_profile_oid &&
|
156
|
+
customer_wishlist_item_oid == o.customer_wishlist_item_oid &&
|
157
|
+
merchant_item_oid == o.merchant_item_oid &&
|
158
|
+
position == o.position &&
|
159
|
+
priority == o.priority
|
160
|
+
end
|
161
|
+
|
162
|
+
# @see the `==` method
|
163
|
+
# @param [Object] Object to be compared
|
164
|
+
def eql?(o)
|
165
|
+
self == o
|
166
|
+
end
|
167
|
+
|
168
|
+
# Calculates hash code according to all attributes.
|
169
|
+
# @return [Integer] Hash code
|
170
|
+
def hash
|
171
|
+
[add_dts, comments, customer_profile_oid, customer_wishlist_item_oid, merchant_item_oid, position, priority].hash
|
172
|
+
end
|
173
|
+
|
174
|
+
# Builds the object from hash
|
175
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
176
|
+
# @return [Object] Returns the model itself
|
177
|
+
def self.build_from_hash(attributes)
|
178
|
+
new.build_from_hash(attributes)
|
179
|
+
end
|
180
|
+
|
181
|
+
# Builds the object from hash
|
182
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
183
|
+
# @return [Object] Returns the model itself
|
184
|
+
def build_from_hash(attributes)
|
185
|
+
return nil unless attributes.is_a?(Hash)
|
186
|
+
attributes = attributes.transform_keys(&:to_sym)
|
187
|
+
self.class.openapi_types.each_pair do |key, type|
|
188
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
189
|
+
self.send("#{key}=", nil)
|
190
|
+
elsif type =~ /\AArray<(.*)>/i
|
191
|
+
# check to ensure the input is an array given that the attribute
|
192
|
+
# is documented as an array but the input is not
|
193
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
194
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
195
|
+
end
|
196
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
197
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
self
|
202
|
+
end
|
203
|
+
|
204
|
+
# Deserializes the data based on type
|
205
|
+
# @param string type Data type
|
206
|
+
# @param string value Value to be deserialized
|
207
|
+
# @return [Object] Deserialized data
|
208
|
+
def _deserialize(type, value)
|
209
|
+
case type.to_sym
|
210
|
+
when :Time
|
211
|
+
Time.parse(value)
|
212
|
+
when :Date
|
213
|
+
Date.parse(value)
|
214
|
+
when :String
|
215
|
+
value.to_s
|
216
|
+
when :Integer
|
217
|
+
value.to_i
|
218
|
+
when :Float
|
219
|
+
value.to_f
|
220
|
+
when :Boolean
|
221
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
222
|
+
true
|
223
|
+
else
|
224
|
+
false
|
225
|
+
end
|
226
|
+
when :Object
|
227
|
+
# generic object (usually a Hash), return directly
|
228
|
+
value
|
229
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
230
|
+
inner_type = Regexp.last_match[:inner_type]
|
231
|
+
value.map { |v| _deserialize(inner_type, v) }
|
232
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
233
|
+
k_type = Regexp.last_match[:k_type]
|
234
|
+
v_type = Regexp.last_match[:v_type]
|
235
|
+
{}.tap do |hash|
|
236
|
+
value.each do |k, v|
|
237
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
238
|
+
end
|
239
|
+
end
|
240
|
+
else # model
|
241
|
+
# models (e.g. Pet) or oneOf
|
242
|
+
klass = UltracartClient.const_get(type)
|
243
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
# Returns the string representation of the object
|
248
|
+
# @return [String] String presentation of the object
|
249
|
+
def to_s
|
250
|
+
to_hash.to_s
|
251
|
+
end
|
252
|
+
|
253
|
+
# to_body is an alias to to_hash (backward compatibility)
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
255
|
+
def to_body
|
256
|
+
to_hash
|
257
|
+
end
|
258
|
+
|
259
|
+
# Returns the object in the form of hash
|
260
|
+
# @return [Hash] Returns the object in the form of hash
|
261
|
+
def to_hash
|
262
|
+
hash = {}
|
263
|
+
self.class.attribute_map.each_pair do |attr, param|
|
264
|
+
value = self.send(attr)
|
265
|
+
if value.nil?
|
266
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
267
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
268
|
+
end
|
269
|
+
|
270
|
+
hash[param] = _to_hash(value)
|
271
|
+
end
|
272
|
+
hash
|
273
|
+
end
|
274
|
+
|
275
|
+
# Outputs non-array value in the form of hash
|
276
|
+
# For object, use to_hash. Otherwise, just return the value
|
277
|
+
# @param [Object] value Any valid value
|
278
|
+
# @return [Hash] Returns the value in the form of hash
|
279
|
+
def _to_hash(value)
|
280
|
+
if value.is_a?(Array)
|
281
|
+
value.compact.map { |v| _to_hash(v) }
|
282
|
+
elsif value.is_a?(Hash)
|
283
|
+
{}.tap do |hash|
|
284
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
285
|
+
end
|
286
|
+
elsif value.respond_to? :to_hash
|
287
|
+
value.to_hash
|
288
|
+
else
|
289
|
+
value
|
290
|
+
end
|
291
|
+
end
|
292
|
+
|
293
|
+
end
|
294
|
+
|
295
|
+
end
|