ultracart_api 3.11.14 → 3.11.16

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.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +27 -5
  3. data/docs/CartUpsellAfter.md +3 -1
  4. data/docs/ConversationVirtualAgentCapabilities.md +2 -0
  5. data/docs/CustomReport.md +17 -0
  6. data/docs/CustomReportAccountConfig.md +16 -0
  7. data/docs/CustomReportAccountConfigResponse.md +12 -0
  8. data/docs/CustomReportExecutionParameter.md +10 -0
  9. data/docs/CustomReportExecutionRequest.md +8 -0
  10. data/docs/CustomReportParameter.md +13 -0
  11. data/docs/CustomReportParameterOption.md +9 -0
  12. data/docs/CustomReportQuery.md +13 -0
  13. data/docs/CustomReportResponse.md +12 -0
  14. data/docs/CustomReportTooltip.md +9 -0
  15. data/docs/CustomReportsResponse.md +12 -0
  16. data/docs/DatawarehouseApi.md +403 -0
  17. data/docs/Item.md +1 -1
  18. data/docs/OrderApi.md +98 -65
  19. data/docs/WebhookApi.md +0 -16
  20. data/lib/ultracart_api/api/datawarehouse_api.rb +439 -0
  21. data/lib/ultracart_api/api/order_api.rb +111 -82
  22. data/lib/ultracart_api/api/webhook_api.rb +0 -24
  23. data/lib/ultracart_api/models/cart_upsell_after.rb +25 -5
  24. data/lib/ultracart_api/models/conversation_virtual_agent_capabilities.rb +55 -1
  25. data/lib/ultracart_api/models/custom_report.rb +271 -0
  26. data/lib/ultracart_api/models/custom_report_account_config.rb +261 -0
  27. data/lib/ultracart_api/models/custom_report_account_config_response.rb +221 -0
  28. data/lib/ultracart_api/models/custom_report_execution_parameter.rb +202 -0
  29. data/lib/ultracart_api/models/custom_report_execution_request.rb +186 -0
  30. data/lib/ultracart_api/models/custom_report_parameter.rb +231 -0
  31. data/lib/ultracart_api/models/custom_report_parameter_option.rb +193 -0
  32. data/lib/ultracart_api/models/custom_report_query.rb +231 -0
  33. data/lib/ultracart_api/models/custom_report_response.rb +221 -0
  34. data/lib/ultracart_api/models/custom_report_tooltip.rb +193 -0
  35. data/lib/ultracart_api/models/custom_reports_response.rb +224 -0
  36. data/lib/ultracart_api/models/item.rb +1 -1
  37. data/lib/ultracart_api/version.rb +1 -1
  38. data/lib/ultracart_api.rb +11 -0
  39. metadata +24 -2
@@ -32,6 +32,60 @@ module UltracartClient
32
32
  UltracartClient::DatawarehouseApi.new(api_client)
33
33
  end
34
34
 
35
+ # Delete a custom report
36
+ # Delete a custom report on the UltraCart account.
37
+ # @param custom_report_oid The report oid to delete.
38
+ # @param [Hash] opts the optional parameters
39
+ # @return [nil]
40
+ def delete_custom_report(custom_report_oid, opts = {})
41
+ delete_custom_report_with_http_info(custom_report_oid, opts)
42
+ nil
43
+ end
44
+
45
+ # Delete a custom report
46
+ # Delete a custom report on the UltraCart account.
47
+ # @param custom_report_oid The report oid to delete.
48
+ # @param [Hash] opts the optional parameters
49
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
50
+ def delete_custom_report_with_http_info(custom_report_oid, opts = {})
51
+ if @api_client.config.debugging
52
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.delete_custom_report ...'
53
+ end
54
+ # verify the required parameter 'custom_report_oid' is set
55
+ if @api_client.config.client_side_validation && custom_report_oid.nil?
56
+ fail ArgumentError, "Missing the required parameter 'custom_report_oid' when calling DatawarehouseApi.delete_custom_report"
57
+ end
58
+ # resource path
59
+ local_var_path = '/datawarehouse/custom_reports/{custom_report_oid}'.sub('{' + 'custom_report_oid' + '}', custom_report_oid.to_s)
60
+
61
+ # query parameters
62
+ query_params = {}
63
+
64
+ # header parameters
65
+ header_params = {}
66
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
67
+ # HTTP header 'Accept' (if needed)
68
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
69
+ # HTTP header 'Content-Type'
70
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
71
+
72
+ # form parameters
73
+ form_params = {}
74
+
75
+ # http body (model)
76
+ post_body = nil
77
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
78
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
79
+ :header_params => header_params,
80
+ :query_params => query_params,
81
+ :form_params => form_params,
82
+ :body => post_body,
83
+ :auth_names => auth_names)
84
+ if @api_client.config.debugging
85
+ @api_client.config.logger.debug "API called: DatawarehouseApi#delete_custom_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
86
+ end
87
+ return data, status_code, headers
88
+ end
35
89
  # Delete a report
36
90
  # Delete a report on the UltraCart account.
37
91
  # @param report_oid The report oid to delete.
@@ -141,6 +195,67 @@ module UltracartClient
141
195
  end
142
196
  return data, status_code, headers
143
197
  end
198
+ # Execute a custom report
199
+ # Execute a custom report on the UltraCart account.
200
+ # @param execution_request Request to execute custom report
201
+ # @param custom_report_oid The report oid to execute.
202
+ # @param [Hash] opts the optional parameters
203
+ # @return [CustomReportResponse]
204
+ def execute_custom_report(execution_request, custom_report_oid, opts = {})
205
+ data, _status_code, _headers = execute_custom_report_with_http_info(execution_request, custom_report_oid, opts)
206
+ data
207
+ end
208
+
209
+ # Execute a custom report
210
+ # Execute a custom report on the UltraCart account.
211
+ # @param execution_request Request to execute custom report
212
+ # @param custom_report_oid The report oid to execute.
213
+ # @param [Hash] opts the optional parameters
214
+ # @return [Array<(CustomReportResponse, Fixnum, Hash)>] CustomReportResponse data, response status code and response headers
215
+ def execute_custom_report_with_http_info(execution_request, custom_report_oid, opts = {})
216
+ if @api_client.config.debugging
217
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.execute_custom_report ...'
218
+ end
219
+ # verify the required parameter 'execution_request' is set
220
+ if @api_client.config.client_side_validation && execution_request.nil?
221
+ fail ArgumentError, "Missing the required parameter 'execution_request' when calling DatawarehouseApi.execute_custom_report"
222
+ end
223
+ # verify the required parameter 'custom_report_oid' is set
224
+ if @api_client.config.client_side_validation && custom_report_oid.nil?
225
+ fail ArgumentError, "Missing the required parameter 'custom_report_oid' when calling DatawarehouseApi.execute_custom_report"
226
+ end
227
+ # resource path
228
+ local_var_path = '/datawarehouse/custom_reports/{custom_report_oid}/execute'.sub('{' + 'custom_report_oid' + '}', custom_report_oid.to_s)
229
+
230
+ # query parameters
231
+ query_params = {}
232
+
233
+ # header parameters
234
+ header_params = {}
235
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
236
+ # HTTP header 'Accept' (if needed)
237
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
238
+ # HTTP header 'Content-Type'
239
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
240
+
241
+ # form parameters
242
+ form_params = {}
243
+
244
+ # http body (model)
245
+ post_body = @api_client.object_to_http_body(execution_request)
246
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
247
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
248
+ :header_params => header_params,
249
+ :query_params => query_params,
250
+ :form_params => form_params,
251
+ :body => post_body,
252
+ :auth_names => auth_names,
253
+ :return_type => 'CustomReportResponse')
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug "API called: DatawarehouseApi#execute_custom_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
256
+ end
257
+ return data, status_code, headers
258
+ end
144
259
  # Execute the report queries
145
260
  # Execute the report queries
146
261
  # @param query_request Query request
@@ -195,6 +310,159 @@ module UltracartClient
195
310
  end
196
311
  return data, status_code, headers
197
312
  end
313
+ # Get a custom report
314
+ # Retrieve a custom report
315
+ # @param custom_report_oid
316
+ # @param [Hash] opts the optional parameters
317
+ # @return [CustomReportResponse]
318
+ def get_custom_report(custom_report_oid, opts = {})
319
+ data, _status_code, _headers = get_custom_report_with_http_info(custom_report_oid, opts)
320
+ data
321
+ end
322
+
323
+ # Get a custom report
324
+ # Retrieve a custom report
325
+ # @param custom_report_oid
326
+ # @param [Hash] opts the optional parameters
327
+ # @return [Array<(CustomReportResponse, Fixnum, Hash)>] CustomReportResponse data, response status code and response headers
328
+ def get_custom_report_with_http_info(custom_report_oid, opts = {})
329
+ if @api_client.config.debugging
330
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_report ...'
331
+ end
332
+ # verify the required parameter 'custom_report_oid' is set
333
+ if @api_client.config.client_side_validation && custom_report_oid.nil?
334
+ fail ArgumentError, "Missing the required parameter 'custom_report_oid' when calling DatawarehouseApi.get_custom_report"
335
+ end
336
+ # resource path
337
+ local_var_path = '/datawarehouse/custom_reports/{custom_report_oid}'.sub('{' + 'custom_report_oid' + '}', custom_report_oid.to_s)
338
+
339
+ # query parameters
340
+ query_params = {}
341
+
342
+ # header parameters
343
+ header_params = {}
344
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
345
+ # HTTP header 'Accept' (if needed)
346
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
347
+ # HTTP header 'Content-Type'
348
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
349
+
350
+ # form parameters
351
+ form_params = {}
352
+
353
+ # http body (model)
354
+ post_body = nil
355
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
356
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
357
+ :header_params => header_params,
358
+ :query_params => query_params,
359
+ :form_params => form_params,
360
+ :body => post_body,
361
+ :auth_names => auth_names,
362
+ :return_type => 'CustomReportResponse')
363
+ if @api_client.config.debugging
364
+ @api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
365
+ end
366
+ return data, status_code, headers
367
+ end
368
+ # Get custom report account configuration
369
+ # Retrieve a custom report account configuration
370
+ # @param [Hash] opts the optional parameters
371
+ # @return [CustomReportAccountConfigResponse]
372
+ def get_custom_report_account_config(opts = {})
373
+ data, _status_code, _headers = get_custom_report_account_config_with_http_info(opts)
374
+ data
375
+ end
376
+
377
+ # Get custom report account configuration
378
+ # Retrieve a custom report account configuration
379
+ # @param [Hash] opts the optional parameters
380
+ # @return [Array<(CustomReportAccountConfigResponse, Fixnum, Hash)>] CustomReportAccountConfigResponse data, response status code and response headers
381
+ def get_custom_report_account_config_with_http_info(opts = {})
382
+ if @api_client.config.debugging
383
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_report_account_config ...'
384
+ end
385
+ # resource path
386
+ local_var_path = '/datawarehouse/custom_reports/account_config'
387
+
388
+ # query parameters
389
+ query_params = {}
390
+
391
+ # header parameters
392
+ header_params = {}
393
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
394
+ # HTTP header 'Accept' (if needed)
395
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
396
+ # HTTP header 'Content-Type'
397
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
398
+
399
+ # form parameters
400
+ form_params = {}
401
+
402
+ # http body (model)
403
+ post_body = nil
404
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
405
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
406
+ :header_params => header_params,
407
+ :query_params => query_params,
408
+ :form_params => form_params,
409
+ :body => post_body,
410
+ :auth_names => auth_names,
411
+ :return_type => 'CustomReportAccountConfigResponse')
412
+ if @api_client.config.debugging
413
+ @api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_report_account_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
414
+ end
415
+ return data, status_code, headers
416
+ end
417
+ # Get custom reports
418
+ # Retrieve a custom reports
419
+ # @param [Hash] opts the optional parameters
420
+ # @return [CustomReportsResponse]
421
+ def get_custom_reports(opts = {})
422
+ data, _status_code, _headers = get_custom_reports_with_http_info(opts)
423
+ data
424
+ end
425
+
426
+ # Get custom reports
427
+ # Retrieve a custom reports
428
+ # @param [Hash] opts the optional parameters
429
+ # @return [Array<(CustomReportsResponse, Fixnum, Hash)>] CustomReportsResponse data, response status code and response headers
430
+ def get_custom_reports_with_http_info(opts = {})
431
+ if @api_client.config.debugging
432
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.get_custom_reports ...'
433
+ end
434
+ # resource path
435
+ local_var_path = '/datawarehouse/custom_reports'
436
+
437
+ # query parameters
438
+ query_params = {}
439
+
440
+ # header parameters
441
+ header_params = {}
442
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
443
+ # HTTP header 'Accept' (if needed)
444
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
445
+ # HTTP header 'Content-Type'
446
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
447
+
448
+ # form parameters
449
+ form_params = {}
450
+
451
+ # http body (model)
452
+ post_body = nil
453
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
454
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
455
+ :header_params => header_params,
456
+ :query_params => query_params,
457
+ :form_params => form_params,
458
+ :body => post_body,
459
+ :auth_names => auth_names,
460
+ :return_type => 'CustomReportsResponse')
461
+ if @api_client.config.debugging
462
+ @api_client.config.logger.debug "API called: DatawarehouseApi#get_custom_reports\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
463
+ end
464
+ return data, status_code, headers
465
+ end
198
466
  # Get a report
199
467
  # Retrieve a report
200
468
  # @param report_oid
@@ -464,6 +732,61 @@ module UltracartClient
464
732
  end
465
733
  return data, status_code, headers
466
734
  end
735
+ # Create a custom report
736
+ # Create a new custom report on the UltraCart account.
737
+ # @param report Report to create
738
+ # @param [Hash] opts the optional parameters
739
+ # @return [CustomReportResponse]
740
+ def insert_custom_report(report, opts = {})
741
+ data, _status_code, _headers = insert_custom_report_with_http_info(report, opts)
742
+ data
743
+ end
744
+
745
+ # Create a custom report
746
+ # Create a new custom report on the UltraCart account.
747
+ # @param report Report to create
748
+ # @param [Hash] opts the optional parameters
749
+ # @return [Array<(CustomReportResponse, Fixnum, Hash)>] CustomReportResponse data, response status code and response headers
750
+ def insert_custom_report_with_http_info(report, opts = {})
751
+ if @api_client.config.debugging
752
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.insert_custom_report ...'
753
+ end
754
+ # verify the required parameter 'report' is set
755
+ if @api_client.config.client_side_validation && report.nil?
756
+ fail ArgumentError, "Missing the required parameter 'report' when calling DatawarehouseApi.insert_custom_report"
757
+ end
758
+ # resource path
759
+ local_var_path = '/datawarehouse/custom_reports'
760
+
761
+ # query parameters
762
+ query_params = {}
763
+
764
+ # header parameters
765
+ header_params = {}
766
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
767
+ # HTTP header 'Accept' (if needed)
768
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
769
+ # HTTP header 'Content-Type'
770
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
771
+
772
+ # form parameters
773
+ form_params = {}
774
+
775
+ # http body (model)
776
+ post_body = @api_client.object_to_http_body(report)
777
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
778
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
779
+ :header_params => header_params,
780
+ :query_params => query_params,
781
+ :form_params => form_params,
782
+ :body => post_body,
783
+ :auth_names => auth_names,
784
+ :return_type => 'CustomReportResponse')
785
+ if @api_client.config.debugging
786
+ @api_client.config.logger.debug "API called: DatawarehouseApi#insert_custom_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
787
+ end
788
+ return data, status_code, headers
789
+ end
467
790
  # Create a report
468
791
  # Create a new report on the UltraCart account.
469
792
  # @param report Report to create
@@ -519,6 +842,122 @@ module UltracartClient
519
842
  end
520
843
  return data, status_code, headers
521
844
  end
845
+ # Update a custom report
846
+ # Update a custom report on the UltraCart account.
847
+ # @param report Report to custom update
848
+ # @param custom_report_oid The report oid to custom update.
849
+ # @param [Hash] opts the optional parameters
850
+ # @return [CustomReportResponse]
851
+ def update_custom_report(report, custom_report_oid, opts = {})
852
+ data, _status_code, _headers = update_custom_report_with_http_info(report, custom_report_oid, opts)
853
+ data
854
+ end
855
+
856
+ # Update a custom report
857
+ # Update a custom report on the UltraCart account.
858
+ # @param report Report to custom update
859
+ # @param custom_report_oid The report oid to custom update.
860
+ # @param [Hash] opts the optional parameters
861
+ # @return [Array<(CustomReportResponse, Fixnum, Hash)>] CustomReportResponse data, response status code and response headers
862
+ def update_custom_report_with_http_info(report, custom_report_oid, opts = {})
863
+ if @api_client.config.debugging
864
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_custom_report ...'
865
+ end
866
+ # verify the required parameter 'report' is set
867
+ if @api_client.config.client_side_validation && report.nil?
868
+ fail ArgumentError, "Missing the required parameter 'report' when calling DatawarehouseApi.update_custom_report"
869
+ end
870
+ # verify the required parameter 'custom_report_oid' is set
871
+ if @api_client.config.client_side_validation && custom_report_oid.nil?
872
+ fail ArgumentError, "Missing the required parameter 'custom_report_oid' when calling DatawarehouseApi.update_custom_report"
873
+ end
874
+ # resource path
875
+ local_var_path = '/datawarehouse/custom_reports/{custom_report_oid}'.sub('{' + 'custom_report_oid' + '}', custom_report_oid.to_s)
876
+
877
+ # query parameters
878
+ query_params = {}
879
+
880
+ # header parameters
881
+ header_params = {}
882
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
883
+ # HTTP header 'Accept' (if needed)
884
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
885
+ # HTTP header 'Content-Type'
886
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
887
+
888
+ # form parameters
889
+ form_params = {}
890
+
891
+ # http body (model)
892
+ post_body = @api_client.object_to_http_body(report)
893
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
894
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
895
+ :header_params => header_params,
896
+ :query_params => query_params,
897
+ :form_params => form_params,
898
+ :body => post_body,
899
+ :auth_names => auth_names,
900
+ :return_type => 'CustomReportResponse')
901
+ if @api_client.config.debugging
902
+ @api_client.config.logger.debug "API called: DatawarehouseApi#update_custom_report\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
903
+ end
904
+ return data, status_code, headers
905
+ end
906
+ # Update custom report account config
907
+ # Update custom report account config.
908
+ # @param account_config Account config to update
909
+ # @param [Hash] opts the optional parameters
910
+ # @return [CustomReportAccountConfigResponse]
911
+ def update_custom_report_account_config(account_config, opts = {})
912
+ data, _status_code, _headers = update_custom_report_account_config_with_http_info(account_config, opts)
913
+ data
914
+ end
915
+
916
+ # Update custom report account config
917
+ # Update custom report account config.
918
+ # @param account_config Account config to update
919
+ # @param [Hash] opts the optional parameters
920
+ # @return [Array<(CustomReportAccountConfigResponse, Fixnum, Hash)>] CustomReportAccountConfigResponse data, response status code and response headers
921
+ def update_custom_report_account_config_with_http_info(account_config, opts = {})
922
+ if @api_client.config.debugging
923
+ @api_client.config.logger.debug 'Calling API: DatawarehouseApi.update_custom_report_account_config ...'
924
+ end
925
+ # verify the required parameter 'account_config' is set
926
+ if @api_client.config.client_side_validation && account_config.nil?
927
+ fail ArgumentError, "Missing the required parameter 'account_config' when calling DatawarehouseApi.update_custom_report_account_config"
928
+ end
929
+ # resource path
930
+ local_var_path = '/datawarehouse/custom_reports/account_config'
931
+
932
+ # query parameters
933
+ query_params = {}
934
+
935
+ # header parameters
936
+ header_params = {}
937
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
938
+ # HTTP header 'Accept' (if needed)
939
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
940
+ # HTTP header 'Content-Type'
941
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
942
+
943
+ # form parameters
944
+ form_params = {}
945
+
946
+ # http body (model)
947
+ post_body = @api_client.object_to_http_body(account_config)
948
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
949
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
950
+ :header_params => header_params,
951
+ :query_params => query_params,
952
+ :form_params => form_params,
953
+ :body => post_body,
954
+ :auth_names => auth_names,
955
+ :return_type => 'CustomReportAccountConfigResponse')
956
+ if @api_client.config.debugging
957
+ @api_client.config.logger.debug "API called: DatawarehouseApi#update_custom_report_account_config\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
958
+ end
959
+ return data, status_code, headers
960
+ end
522
961
  # Update a report
523
962
  # Update a report on the UltraCart account.
524
963
  # @param report Report to update
@@ -93,6 +93,63 @@ module UltracartClient
93
93
  end
94
94
  return data, status_code, headers
95
95
  end
96
+ # Set a refund block on an order
97
+ # Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
98
+ # @param order_id The order id to block a refund on.
99
+ # @param [Hash] opts the optional parameters
100
+ # @option opts [String] :block_reason Block reason code (optional)
101
+ # @return [nil]
102
+ def block_refund_on_order(order_id, opts = {})
103
+ block_refund_on_order_with_http_info(order_id, opts)
104
+ nil
105
+ end
106
+
107
+ # Set a refund block on an order
108
+ # Sets a refund block on an order to prevent a user from performing a refund. Commonly used when a chargeback has been received.
109
+ # @param order_id The order id to block a refund on.
110
+ # @param [Hash] opts the optional parameters
111
+ # @option opts [String] :block_reason Block reason code (optional)
112
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
113
+ def block_refund_on_order_with_http_info(order_id, opts = {})
114
+ if @api_client.config.debugging
115
+ @api_client.config.logger.debug 'Calling API: OrderApi.block_refund_on_order ...'
116
+ end
117
+ # verify the required parameter 'order_id' is set
118
+ if @api_client.config.client_side_validation && order_id.nil?
119
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.block_refund_on_order"
120
+ end
121
+ # resource path
122
+ local_var_path = '/order/orders/{order_id}/refund_block'.sub('{' + 'order_id' + '}', order_id.to_s)
123
+
124
+ # query parameters
125
+ query_params = {}
126
+ query_params[:'block_reason'] = opts[:'block_reason'] if !opts[:'block_reason'].nil?
127
+
128
+ # header parameters
129
+ header_params = {}
130
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
131
+ # HTTP header 'Accept' (if needed)
132
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
+ # HTTP header 'Content-Type'
134
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
135
+
136
+ # form parameters
137
+ form_params = {}
138
+
139
+ # http body (model)
140
+ post_body = nil
141
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
142
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
143
+ :header_params => header_params,
144
+ :query_params => query_params,
145
+ :form_params => form_params,
146
+ :body => post_body,
147
+ :auth_names => auth_names)
148
+ if @api_client.config.debugging
149
+ @api_client.config.logger.debug "API called: OrderApi#block_refund_on_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
150
+ end
151
+ return data, status_code, headers
152
+ end
96
153
  # Cancel an order
97
154
  # Cancel an order on the UltraCart account. If the success flag is false, then consult the error message for why it failed.
98
155
  # @param order_id The order id to cancel.
@@ -1354,88 +1411,6 @@ module UltracartClient
1354
1411
  end
1355
1412
  return data, status_code, headers
1356
1413
  end
1357
- # Refund an order completely
1358
- # Perform a refund operation on an order and then update the order if successful.
1359
- # @param order_id The order id to refund.
1360
- # @param [Hash] opts the optional parameters
1361
- # @option opts [BOOLEAN] :reject_after_refund Reject order after refund (default to false)
1362
- # @option opts [BOOLEAN] :skip_customer_notification Skip customer email notification (default to false)
1363
- # @option opts [BOOLEAN] :auto_order_cancel Cancel associated auto orders (default to false)
1364
- # @option opts [BOOLEAN] :manual_refund Consider a manual refund done externally (default to false)
1365
- # @option opts [BOOLEAN] :reverse_affiliate_transactions Reverse affiliate transactions (default to true)
1366
- # @option opts [BOOLEAN] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account (default to false)
1367
- # @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
1368
- # @option opts [String] :refund_reason Reason for refund
1369
- # @option opts [String] :reject_reason Reason for reject
1370
- # @return [OrderResponse]
1371
- def refund_order_completely(order_id, opts = {})
1372
- data, _status_code, _headers = refund_order_completely_with_http_info(order_id, opts)
1373
- data
1374
- end
1375
-
1376
- # Refund an order completely
1377
- # Perform a refund operation on an order and then update the order if successful.
1378
- # @param order_id The order id to refund.
1379
- # @param [Hash] opts the optional parameters
1380
- # @option opts [BOOLEAN] :reject_after_refund Reject order after refund
1381
- # @option opts [BOOLEAN] :skip_customer_notification Skip customer email notification
1382
- # @option opts [BOOLEAN] :auto_order_cancel Cancel associated auto orders
1383
- # @option opts [BOOLEAN] :manual_refund Consider a manual refund done externally
1384
- # @option opts [BOOLEAN] :reverse_affiliate_transactions Reverse affiliate transactions
1385
- # @option opts [BOOLEAN] :issue_store_credit Issue a store credit instead of refunding the original payment method, loyalty must be configured on merchant account
1386
- # @option opts [String] :auto_order_cancel_reason Reason for auto orders cancellation
1387
- # @option opts [String] :refund_reason Reason for refund
1388
- # @option opts [String] :reject_reason Reason for reject
1389
- # @return [Array<(OrderResponse, Fixnum, Hash)>] OrderResponse data, response status code and response headers
1390
- def refund_order_completely_with_http_info(order_id, opts = {})
1391
- if @api_client.config.debugging
1392
- @api_client.config.logger.debug 'Calling API: OrderApi.refund_order_completely ...'
1393
- end
1394
- # verify the required parameter 'order_id' is set
1395
- if @api_client.config.client_side_validation && order_id.nil?
1396
- fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.refund_order_completely"
1397
- end
1398
- # resource path
1399
- local_var_path = '/order/orders/{order_id}/refund_completely'.sub('{' + 'order_id' + '}', order_id.to_s)
1400
-
1401
- # query parameters
1402
- query_params = {}
1403
- query_params[:'reject_after_refund'] = opts[:'reject_after_refund'] if !opts[:'reject_after_refund'].nil?
1404
- query_params[:'skip_customer_notification'] = opts[:'skip_customer_notification'] if !opts[:'skip_customer_notification'].nil?
1405
- query_params[:'auto_order_cancel'] = opts[:'auto_order_cancel'] if !opts[:'auto_order_cancel'].nil?
1406
- query_params[:'manual_refund'] = opts[:'manual_refund'] if !opts[:'manual_refund'].nil?
1407
- query_params[:'reverse_affiliate_transactions'] = opts[:'reverse_affiliate_transactions'] if !opts[:'reverse_affiliate_transactions'].nil?
1408
- query_params[:'issue_store_credit'] = opts[:'issue_store_credit'] if !opts[:'issue_store_credit'].nil?
1409
- query_params[:'auto_order_cancel_reason'] = opts[:'auto_order_cancel_reason'] if !opts[:'auto_order_cancel_reason'].nil?
1410
- query_params[:'refund_reason'] = opts[:'refund_reason'] if !opts[:'refund_reason'].nil?
1411
- query_params[:'reject_reason'] = opts[:'reject_reason'] if !opts[:'reject_reason'].nil?
1412
-
1413
- # header parameters
1414
- header_params = {}
1415
- header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1416
- # HTTP header 'Accept' (if needed)
1417
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1418
- # HTTP header 'Content-Type'
1419
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json; charset=UTF-8'])
1420
-
1421
- # form parameters
1422
- form_params = {}
1423
-
1424
- # http body (model)
1425
- post_body = nil
1426
- auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
1427
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1428
- :header_params => header_params,
1429
- :query_params => query_params,
1430
- :form_params => form_params,
1431
- :body => post_body,
1432
- :auth_names => auth_names,
1433
- :return_type => 'OrderResponse')
1434
- if @api_client.config.debugging
1435
- @api_client.config.logger.debug "API called: OrderApi#refund_order_completely\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1436
- end
1437
- return data, status_code, headers
1438
- end
1439
1414
  # Replacement order
1440
1415
  # Create a replacement order based upon a previous order
1441
1416
  # @param order_id The order id to generate a replacement for.
@@ -1607,6 +1582,60 @@ module UltracartClient
1607
1582
  end
1608
1583
  return data, status_code, headers
1609
1584
  end
1585
+ # Remove a refund block on an order
1586
+ # Removes a refund block on an order to prevent a user from performing a refund.
1587
+ # @param order_id The order id to unblock a refund on.
1588
+ # @param [Hash] opts the optional parameters
1589
+ # @return [nil]
1590
+ def unblock_refund_on_order(order_id, opts = {})
1591
+ unblock_refund_on_order_with_http_info(order_id, opts)
1592
+ nil
1593
+ end
1594
+
1595
+ # Remove a refund block on an order
1596
+ # Removes a refund block on an order to prevent a user from performing a refund.
1597
+ # @param order_id The order id to unblock a refund on.
1598
+ # @param [Hash] opts the optional parameters
1599
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1600
+ def unblock_refund_on_order_with_http_info(order_id, opts = {})
1601
+ if @api_client.config.debugging
1602
+ @api_client.config.logger.debug 'Calling API: OrderApi.unblock_refund_on_order ...'
1603
+ end
1604
+ # verify the required parameter 'order_id' is set
1605
+ if @api_client.config.client_side_validation && order_id.nil?
1606
+ fail ArgumentError, "Missing the required parameter 'order_id' when calling OrderApi.unblock_refund_on_order"
1607
+ end
1608
+ # resource path
1609
+ local_var_path = '/order/orders/{order_id}/refund_unblock'.sub('{' + 'order_id' + '}', order_id.to_s)
1610
+
1611
+ # query parameters
1612
+ query_params = {}
1613
+
1614
+ # header parameters
1615
+ header_params = {}
1616
+ header_params['X-UltraCart-Api-Version'] = @api_client.select_header_api_version()
1617
+ # HTTP header 'Accept' (if needed)
1618
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1619
+ # HTTP header 'Content-Type'
1620
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1621
+
1622
+ # form parameters
1623
+ form_params = {}
1624
+
1625
+ # http body (model)
1626
+ post_body = nil
1627
+ auth_names = ['ultraCartOauth', 'ultraCartSimpleApiKey']
1628
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1629
+ :header_params => header_params,
1630
+ :query_params => query_params,
1631
+ :form_params => form_params,
1632
+ :body => post_body,
1633
+ :auth_names => auth_names)
1634
+ if @api_client.config.debugging
1635
+ @api_client.config.logger.debug "API called: OrderApi#unblock_refund_on_order\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1636
+ end
1637
+ return data, status_code, headers
1638
+ end
1610
1639
  # Update A/R Retry Configuration
1611
1640
  # Update A/R Retry Configuration. This is primarily an internal API call. It is doubtful you would ever need to use it.
1612
1641
  # @param retry_config AccountsReceivableRetryConfig object