ultracart_api 4.0.32.rc → 4.0.35.rc

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +25 -4
  3. data/docs/Activity.md +4 -0
  4. data/docs/AffiliateApi.md +16 -22
  5. data/docs/AutoOrderApi.md +64 -88
  6. data/docs/ChannelPartnerApi.md +40 -55
  7. data/docs/ChargebackApi.md +40 -55
  8. data/docs/CheckoutApi.md +152 -294
  9. data/docs/Conversation.md +26 -0
  10. data/docs/ConversationAgentAuthResponse.md +22 -0
  11. data/docs/ConversationApi.md +438 -0
  12. data/docs/ConversationMessage.md +26 -0
  13. data/docs/ConversationParticipant.md +30 -0
  14. data/docs/ConversationStartRequest.md +20 -0
  15. data/docs/ConversationStartResponse.md +20 -0
  16. data/docs/ConversationSummary.md +34 -0
  17. data/docs/ConversationsResponse.md +26 -0
  18. data/docs/CouponApi.md +152 -209
  19. data/docs/CustomerActivity.md +9 -1
  20. data/docs/CustomerApi.md +213 -192
  21. data/docs/CustomerMergeRequest.md +20 -0
  22. data/docs/FulfillmentApi.md +48 -66
  23. data/docs/GiftCertificateApi.md +64 -88
  24. data/docs/IntegrationLogApi.md +40 -55
  25. data/docs/ItemApi.md +72 -99
  26. data/docs/OauthApi.md +16 -32
  27. data/docs/OrderApi.md +184 -253
  28. data/docs/SsoApi.md +32 -44
  29. data/docs/StorefrontApi.md +1134 -2345
  30. data/docs/TaxApi.md +224 -308
  31. data/docs/UserApi.md +88 -121
  32. data/docs/WebhookApi.md +64 -88
  33. data/lib/ultracart_api/api/conversation_api.rb +418 -0
  34. data/lib/ultracart_api/api/customer_api.rb +78 -0
  35. data/lib/ultracart_api/models/activity.rb +19 -1
  36. data/lib/ultracart_api/models/conversation.rb +259 -0
  37. data/lib/ultracart_api/models/conversation_agent_auth_response.rb +237 -0
  38. data/lib/ultracart_api/models/conversation_message.rb +258 -0
  39. data/lib/ultracart_api/models/conversation_participant.rb +276 -0
  40. data/lib/ultracart_api/models/conversation_start_request.rb +230 -0
  41. data/lib/ultracart_api/models/conversation_start_response.rb +228 -0
  42. data/lib/ultracart_api/models/conversation_summary.rb +292 -0
  43. data/lib/ultracart_api/models/conversations_response.rb +258 -0
  44. data/lib/ultracart_api/models/customer_activity.rb +40 -4
  45. data/lib/ultracart_api/models/customer_merge_request.rb +230 -0
  46. data/lib/ultracart_api/version.rb +1 -1
  47. data/lib/ultracart_api.rb +10 -0
  48. metadata +22 -2
data/docs/OrderApi.md CHANGED
@@ -42,18 +42,15 @@ Adjusts an order total. Adjusts individual items appropriately and considers ta
42
42
  ```ruby
43
43
  require 'time'
44
44
  require 'ultracart_api'
45
- # setup authorization
46
- UltracartClient.configure do |config|
47
- # Configure OAuth2 access token for authorization: ultraCartOauth
48
- config.access_token = 'YOUR ACCESS TOKEN'
49
-
50
- # Configure API key authorization: ultraCartSimpleApiKey
51
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
52
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
53
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
54
- end
45
+ require 'json'
46
+ require 'yaml'
47
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
48
+
49
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
50
+ # As such, this might not be the best way to use this object.
51
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
55
52
 
56
- api_instance = UltracartClient::OrderApi.new
53
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
57
54
  order_id = 'order_id_example' # String | The order id to cancel.
58
55
  desired_total = 'desired_total_example' # String | The desired total with no formatting. example 123.45
59
56
 
@@ -118,18 +115,15 @@ Cancel an order on the UltraCart account. If the success flag is false, then co
118
115
  ```ruby
119
116
  require 'time'
120
117
  require 'ultracart_api'
121
- # setup authorization
122
- UltracartClient.configure do |config|
123
- # Configure OAuth2 access token for authorization: ultraCartOauth
124
- config.access_token = 'YOUR ACCESS TOKEN'
125
-
126
- # Configure API key authorization: ultraCartSimpleApiKey
127
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
128
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
129
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
130
- end
118
+ require 'json'
119
+ require 'yaml'
120
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
131
121
 
132
- api_instance = UltracartClient::OrderApi.new
122
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
123
+ # As such, this might not be the best way to use this object.
124
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
125
+
126
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
133
127
  order_id = 'order_id_example' # String | The order id to cancel.
134
128
 
135
129
  begin
@@ -192,18 +186,15 @@ Delete an order on the UltraCart account.
192
186
  ```ruby
193
187
  require 'time'
194
188
  require 'ultracart_api'
195
- # setup authorization
196
- UltracartClient.configure do |config|
197
- # Configure OAuth2 access token for authorization: ultraCartOauth
198
- config.access_token = 'YOUR ACCESS TOKEN'
199
-
200
- # Configure API key authorization: ultraCartSimpleApiKey
201
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
202
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
203
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
204
- end
189
+ require 'json'
190
+ require 'yaml'
191
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
192
+
193
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
194
+ # As such, this might not be the best way to use this object.
195
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
205
196
 
206
- api_instance = UltracartClient::OrderApi.new
197
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
207
198
  order_id = 'order_id_example' # String | The order id to delete.
208
199
 
209
200
  begin
@@ -265,18 +256,15 @@ Perform a duplicate of the specified order_id and return a new order located in
265
256
  ```ruby
266
257
  require 'time'
267
258
  require 'ultracart_api'
268
- # setup authorization
269
- UltracartClient.configure do |config|
270
- # Configure OAuth2 access token for authorization: ultraCartOauth
271
- config.access_token = 'YOUR ACCESS TOKEN'
272
-
273
- # Configure API key authorization: ultraCartSimpleApiKey
274
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
275
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
276
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
277
- end
259
+ require 'json'
260
+ require 'yaml'
261
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
262
+
263
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
264
+ # As such, this might not be the best way to use this object.
265
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
278
266
 
279
- api_instance = UltracartClient::OrderApi.new
267
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
280
268
  order_id = 'order_id_example' # String | The order id to duplicate.
281
269
  opts = {
282
270
  _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
@@ -343,18 +331,15 @@ Format the order for display at text or html
343
331
  ```ruby
344
332
  require 'time'
345
333
  require 'ultracart_api'
346
- # setup authorization
347
- UltracartClient.configure do |config|
348
- # Configure OAuth2 access token for authorization: ultraCartOauth
349
- config.access_token = 'YOUR ACCESS TOKEN'
350
-
351
- # Configure API key authorization: ultraCartSimpleApiKey
352
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
353
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
354
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
355
- end
334
+ require 'json'
335
+ require 'yaml'
336
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
356
337
 
357
- api_instance = UltracartClient::OrderApi.new
338
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
339
+ # As such, this might not be the best way to use this object.
340
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
341
+
342
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
358
343
  order_id = 'order_id_example' # String | The order id to format
359
344
  format_options = UltracartClient::OrderFormat.new # OrderFormat | Format options
360
345
 
@@ -419,18 +404,15 @@ Retrieves a single order token for a given order id. The token can be used with
419
404
  ```ruby
420
405
  require 'time'
421
406
  require 'ultracart_api'
422
- # setup authorization
423
- UltracartClient.configure do |config|
424
- # Configure OAuth2 access token for authorization: ultraCartOauth
425
- config.access_token = 'YOUR ACCESS TOKEN'
426
-
427
- # Configure API key authorization: ultraCartSimpleApiKey
428
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
429
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
430
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
431
- end
407
+ require 'json'
408
+ require 'yaml'
409
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
410
+
411
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
412
+ # As such, this might not be the best way to use this object.
413
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
432
414
 
433
- api_instance = UltracartClient::OrderApi.new
415
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
434
416
  order_id = 'order_id_example' # String | The order id to generate a token for.
435
417
 
436
418
  begin
@@ -493,18 +475,15 @@ The packing slip PDF that is returned is base 64 encoded
493
475
  ```ruby
494
476
  require 'time'
495
477
  require 'ultracart_api'
496
- # setup authorization
497
- UltracartClient.configure do |config|
498
- # Configure OAuth2 access token for authorization: ultraCartOauth
499
- config.access_token = 'YOUR ACCESS TOKEN'
500
-
501
- # Configure API key authorization: ultraCartSimpleApiKey
502
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
503
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
504
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
505
- end
478
+ require 'json'
479
+ require 'yaml'
480
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
481
+
482
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
483
+ # As such, this might not be the best way to use this object.
484
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
506
485
 
507
- api_instance = UltracartClient::OrderApi.new
486
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
508
487
  order_id = 'order_id_example' # String | Order ID
509
488
 
510
489
  begin
@@ -567,18 +546,15 @@ The packing slip PDF that is returned is base 64 encoded
567
546
  ```ruby
568
547
  require 'time'
569
548
  require 'ultracart_api'
570
- # setup authorization
571
- UltracartClient.configure do |config|
572
- # Configure OAuth2 access token for authorization: ultraCartOauth
573
- config.access_token = 'YOUR ACCESS TOKEN'
574
-
575
- # Configure API key authorization: ultraCartSimpleApiKey
576
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
577
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
578
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
579
- end
549
+ require 'json'
550
+ require 'yaml'
551
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
580
552
 
581
- api_instance = UltracartClient::OrderApi.new
553
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
554
+ # As such, this might not be the best way to use this object.
555
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
556
+
557
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
582
558
  distribution_center_code = 'distribution_center_code_example' # String | Distribution center code
583
559
  order_id = 'order_id_example' # String | Order ID
584
560
 
@@ -643,18 +619,15 @@ Retrieve A/R Retry Configuration. This is primarily an internal API call. It is
643
619
  ```ruby
644
620
  require 'time'
645
621
  require 'ultracart_api'
646
- # setup authorization
647
- UltracartClient.configure do |config|
648
- # Configure OAuth2 access token for authorization: ultraCartOauth
649
- config.access_token = 'YOUR ACCESS TOKEN'
650
-
651
- # Configure API key authorization: ultraCartSimpleApiKey
652
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
653
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
654
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
655
- end
622
+ require 'json'
623
+ require 'yaml'
624
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
625
+
626
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
627
+ # As such, this might not be the best way to use this object.
628
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
656
629
 
657
- api_instance = UltracartClient::OrderApi.new
630
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
658
631
 
659
632
  begin
660
633
  # Retrieve A/R Retry Configuration
@@ -714,18 +687,15 @@ Retrieve A/R Retry Statistics. This is primarily an internal API call. It is do
714
687
  ```ruby
715
688
  require 'time'
716
689
  require 'ultracart_api'
717
- # setup authorization
718
- UltracartClient.configure do |config|
719
- # Configure OAuth2 access token for authorization: ultraCartOauth
720
- config.access_token = 'YOUR ACCESS TOKEN'
721
-
722
- # Configure API key authorization: ultraCartSimpleApiKey
723
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
724
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
725
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
726
- end
690
+ require 'json'
691
+ require 'yaml'
692
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
693
+
694
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
695
+ # As such, this might not be the best way to use this object.
696
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
727
697
 
728
- api_instance = UltracartClient::OrderApi.new
698
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
729
699
  opts = {
730
700
  from: 'from_example', # String |
731
701
  to: 'to_example' # String |
@@ -792,18 +762,15 @@ Retrieves a single order using the specified order id.
792
762
  ```ruby
793
763
  require 'time'
794
764
  require 'ultracart_api'
795
- # setup authorization
796
- UltracartClient.configure do |config|
797
- # Configure OAuth2 access token for authorization: ultraCartOauth
798
- config.access_token = 'YOUR ACCESS TOKEN'
799
-
800
- # Configure API key authorization: ultraCartSimpleApiKey
801
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
802
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
803
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
804
- end
765
+ require 'json'
766
+ require 'yaml'
767
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
805
768
 
806
- api_instance = UltracartClient::OrderApi.new
769
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
770
+ # As such, this might not be the best way to use this object.
771
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
772
+
773
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
807
774
  order_id = 'order_id_example' # String | The order id to retrieve.
808
775
  opts = {
809
776
  _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
@@ -870,18 +837,15 @@ Retrieves a single order using the specified order token.
870
837
  ```ruby
871
838
  require 'time'
872
839
  require 'ultracart_api'
873
- # setup authorization
874
- UltracartClient.configure do |config|
875
- # Configure OAuth2 access token for authorization: ultraCartOauth
876
- config.access_token = 'YOUR ACCESS TOKEN'
877
-
878
- # Configure API key authorization: ultraCartSimpleApiKey
879
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
880
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
881
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
882
- end
840
+ require 'json'
841
+ require 'yaml'
842
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
883
843
 
884
- api_instance = UltracartClient::OrderApi.new
844
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
845
+ # As such, this might not be the best way to use this object.
846
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
847
+
848
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
885
849
  order_by_token_query = UltracartClient::OrderByTokenQuery.new # OrderByTokenQuery | Order by token query
886
850
  opts = {
887
851
  _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
@@ -948,18 +912,15 @@ Retrieves a group of orders from the account. If no parameters are specified, t
948
912
  ```ruby
949
913
  require 'time'
950
914
  require 'ultracart_api'
951
- # setup authorization
952
- UltracartClient.configure do |config|
953
- # Configure OAuth2 access token for authorization: ultraCartOauth
954
- config.access_token = 'YOUR ACCESS TOKEN'
955
-
956
- # Configure API key authorization: ultraCartSimpleApiKey
957
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
958
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
959
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
960
- end
915
+ require 'json'
916
+ require 'yaml'
917
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
918
+
919
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
920
+ # As such, this might not be the best way to use this object.
921
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
961
922
 
962
- api_instance = UltracartClient::OrderApi.new
923
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
963
924
  opts = {
964
925
  order_id: 'order_id_example', # String | Order Id
965
926
  payment_method: 'payment_method_example', # String | Payment Method
@@ -1084,18 +1045,15 @@ Retrieves a group of orders from the account based on an array of order ids. If
1084
1045
  ```ruby
1085
1046
  require 'time'
1086
1047
  require 'ultracart_api'
1087
- # setup authorization
1088
- UltracartClient.configure do |config|
1089
- # Configure OAuth2 access token for authorization: ultraCartOauth
1090
- config.access_token = 'YOUR ACCESS TOKEN'
1091
-
1092
- # Configure API key authorization: ultraCartSimpleApiKey
1093
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1094
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1095
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1096
- end
1048
+ require 'json'
1049
+ require 'yaml'
1050
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1051
+
1052
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1053
+ # As such, this might not be the best way to use this object.
1054
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1097
1055
 
1098
- api_instance = UltracartClient::OrderApi.new
1056
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1099
1057
  order_batch = UltracartClient::OrderQueryBatch.new # OrderQueryBatch | Order batch
1100
1058
  opts = {
1101
1059
  _expand: '_expand_example' # String | The object expansion to perform on the result.
@@ -1162,18 +1120,15 @@ Retrieves a group of orders from the account based on a query object. If no par
1162
1120
  ```ruby
1163
1121
  require 'time'
1164
1122
  require 'ultracart_api'
1165
- # setup authorization
1166
- UltracartClient.configure do |config|
1167
- # Configure OAuth2 access token for authorization: ultraCartOauth
1168
- config.access_token = 'YOUR ACCESS TOKEN'
1169
-
1170
- # Configure API key authorization: ultraCartSimpleApiKey
1171
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1172
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1173
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1174
- end
1123
+ require 'json'
1124
+ require 'yaml'
1125
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1175
1126
 
1176
- api_instance = UltracartClient::OrderApi.new
1127
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1128
+ # As such, this might not be the best way to use this object.
1129
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1130
+
1131
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1177
1132
  order_query = UltracartClient::OrderQuery.new # OrderQuery | Order query
1178
1133
  opts = {
1179
1134
  _limit: 56, # Integer | The maximum number of records to return on this one API call. (Maximum 200)
@@ -1246,18 +1201,15 @@ Inserts a new order on the UltraCart account. This is probably NOT the method y
1246
1201
  ```ruby
1247
1202
  require 'time'
1248
1203
  require 'ultracart_api'
1249
- # setup authorization
1250
- UltracartClient.configure do |config|
1251
- # Configure OAuth2 access token for authorization: ultraCartOauth
1252
- config.access_token = 'YOUR ACCESS TOKEN'
1253
-
1254
- # Configure API key authorization: ultraCartSimpleApiKey
1255
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1256
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1257
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1258
- end
1204
+ require 'json'
1205
+ require 'yaml'
1206
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1207
+
1208
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1209
+ # As such, this might not be the best way to use this object.
1210
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1259
1211
 
1260
- api_instance = UltracartClient::OrderApi.new
1212
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1261
1213
  order = UltracartClient::Order.new # Order | Order to insert
1262
1214
  opts = {
1263
1215
  _expand: '_expand_example' # String | The object expansion to perform on the result. See documentation for examples
@@ -1324,18 +1276,15 @@ Process payment on order
1324
1276
  ```ruby
1325
1277
  require 'time'
1326
1278
  require 'ultracart_api'
1327
- # setup authorization
1328
- UltracartClient.configure do |config|
1329
- # Configure OAuth2 access token for authorization: ultraCartOauth
1330
- config.access_token = 'YOUR ACCESS TOKEN'
1331
-
1332
- # Configure API key authorization: ultraCartSimpleApiKey
1333
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1334
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1335
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1336
- end
1279
+ require 'json'
1280
+ require 'yaml'
1281
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1282
+
1283
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1284
+ # As such, this might not be the best way to use this object.
1285
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1337
1286
 
1338
- api_instance = UltracartClient::OrderApi.new
1287
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1339
1288
  order_id = 'order_id_example' # String | The order id to process payment on
1340
1289
  process_payment_request = UltracartClient::OrderProcessPaymentRequest.new # OrderProcessPaymentRequest | Process payment parameters
1341
1290
 
@@ -1400,18 +1349,15 @@ Perform a refund operation on an order and then update the order if successful
1400
1349
  ```ruby
1401
1350
  require 'time'
1402
1351
  require 'ultracart_api'
1403
- # setup authorization
1404
- UltracartClient.configure do |config|
1405
- # Configure OAuth2 access token for authorization: ultraCartOauth
1406
- config.access_token = 'YOUR ACCESS TOKEN'
1407
-
1408
- # Configure API key authorization: ultraCartSimpleApiKey
1409
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1410
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1411
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1412
- end
1352
+ require 'json'
1353
+ require 'yaml'
1354
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1413
1355
 
1414
- api_instance = UltracartClient::OrderApi.new
1356
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1357
+ # As such, this might not be the best way to use this object.
1358
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1359
+
1360
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1415
1361
  order_id = 'order_id_example' # String | The order id to refund.
1416
1362
  order = UltracartClient::Order.new # Order | Order to refund
1417
1363
  opts = {
@@ -1490,18 +1436,15 @@ Create a replacement order based upon a previous order
1490
1436
  ```ruby
1491
1437
  require 'time'
1492
1438
  require 'ultracart_api'
1493
- # setup authorization
1494
- UltracartClient.configure do |config|
1495
- # Configure OAuth2 access token for authorization: ultraCartOauth
1496
- config.access_token = 'YOUR ACCESS TOKEN'
1497
-
1498
- # Configure API key authorization: ultraCartSimpleApiKey
1499
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1500
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1501
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1502
- end
1439
+ require 'json'
1440
+ require 'yaml'
1441
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1442
+
1443
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1444
+ # As such, this might not be the best way to use this object.
1445
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1503
1446
 
1504
- api_instance = UltracartClient::OrderApi.new
1447
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1505
1448
  order_id = 'order_id_example' # String | The order id to generate a replacement for.
1506
1449
  replacement = UltracartClient::OrderReplacement.new # OrderReplacement | Replacement order details
1507
1450
 
@@ -1566,18 +1509,15 @@ Resend the receipt for an order on the UltraCart account.
1566
1509
  ```ruby
1567
1510
  require 'time'
1568
1511
  require 'ultracart_api'
1569
- # setup authorization
1570
- UltracartClient.configure do |config|
1571
- # Configure OAuth2 access token for authorization: ultraCartOauth
1572
- config.access_token = 'YOUR ACCESS TOKEN'
1573
-
1574
- # Configure API key authorization: ultraCartSimpleApiKey
1575
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1576
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1577
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1578
- end
1512
+ require 'json'
1513
+ require 'yaml'
1514
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1515
+
1516
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1517
+ # As such, this might not be the best way to use this object.
1518
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1579
1519
 
1580
- api_instance = UltracartClient::OrderApi.new
1520
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1581
1521
  order_id = 'order_id_example' # String | The order id to resend the receipt for.
1582
1522
 
1583
1523
  begin
@@ -1640,18 +1580,15 @@ Resend shipment confirmation for an order on the UltraCart account.
1640
1580
  ```ruby
1641
1581
  require 'time'
1642
1582
  require 'ultracart_api'
1643
- # setup authorization
1644
- UltracartClient.configure do |config|
1645
- # Configure OAuth2 access token for authorization: ultraCartOauth
1646
- config.access_token = 'YOUR ACCESS TOKEN'
1647
-
1648
- # Configure API key authorization: ultraCartSimpleApiKey
1649
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1650
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1651
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1652
- end
1583
+ require 'json'
1584
+ require 'yaml'
1585
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1653
1586
 
1654
- api_instance = UltracartClient::OrderApi.new
1587
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1588
+ # As such, this might not be the best way to use this object.
1589
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1590
+
1591
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1655
1592
  order_id = 'order_id_example' # String | The order id to resend the shipment notification for.
1656
1593
 
1657
1594
  begin
@@ -1714,18 +1651,15 @@ Update A/R Retry Configuration. This is primarily an internal API call. It is
1714
1651
  ```ruby
1715
1652
  require 'time'
1716
1653
  require 'ultracart_api'
1717
- # setup authorization
1718
- UltracartClient.configure do |config|
1719
- # Configure OAuth2 access token for authorization: ultraCartOauth
1720
- config.access_token = 'YOUR ACCESS TOKEN'
1721
-
1722
- # Configure API key authorization: ultraCartSimpleApiKey
1723
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1724
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1725
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1726
- end
1654
+ require 'json'
1655
+ require 'yaml'
1656
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1657
+
1658
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1659
+ # As such, this might not be the best way to use this object.
1660
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1727
1661
 
1728
- api_instance = UltracartClient::OrderApi.new
1662
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1729
1663
  retry_config = UltracartClient::AccountsReceivableRetryConfig.new # AccountsReceivableRetryConfig | AccountsReceivableRetryConfig object
1730
1664
 
1731
1665
  begin
@@ -1788,18 +1722,15 @@ Update a new order on the UltraCart account. This is probably NOT the method yo
1788
1722
  ```ruby
1789
1723
  require 'time'
1790
1724
  require 'ultracart_api'
1791
- # setup authorization
1792
- UltracartClient.configure do |config|
1793
- # Configure OAuth2 access token for authorization: ultraCartOauth
1794
- config.access_token = 'YOUR ACCESS TOKEN'
1795
-
1796
- # Configure API key authorization: ultraCartSimpleApiKey
1797
- config.api_key['ultraCartSimpleApiKey'] = 'YOUR API KEY'
1798
- # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
1799
- # config.api_key_prefix['ultraCartSimpleApiKey'] = 'Bearer'
1800
- end
1725
+ require 'json'
1726
+ require 'yaml'
1727
+ require_relative '../constants' # https://github.com/UltraCart/sdk_samples/blob/master/ruby/constants.rb
1728
+
1729
+ # This example is based on our samples_sdk project, but still contains auto-generated content from our sdk generators.
1730
+ # As such, this might not be the best way to use this object.
1731
+ # Please see https://github.com/UltraCart/sdk_samples for working examples.
1801
1732
 
1802
- api_instance = UltracartClient::OrderApi.new
1733
+ api = UltracartClient::OrderApi.new_using_api_key(Constants::API_KEY, Constants::VERIFY_SSL, Constants::DEBUG_MODE)
1803
1734
  order_id = 'order_id_example' # String | The order id to update.
1804
1735
  order = UltracartClient::Order.new # Order | Order to update
1805
1736
  opts = {