ultracart_rest_api_v2_typescript 3.9.7 → 3.9.8

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.
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ## ultracart_rest_api_v2_typescript@3.9.7
1
+ ## ultracart_rest_api_v2_typescript@3.9.8
2
2
 
3
3
  This generator creates TypeScript/JavaScript client that utilizes [Fetch API](https://fetch.spec.whatwg.org/). The generated Node module can be used in the following environments:
4
4
 
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
36
36
  _published:_
37
37
 
38
38
  ```
39
- npm install ultracart_rest_api_v2_typescript@3.9.7 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.9.8 --save
40
40
  ```
41
41
 
42
42
  _unPublished (not recommended):_
@@ -54,6 +54,7 @@ Not every change is committed to every SDK.
54
54
 
55
55
  | Version | Date | Comments |
56
56
  | --: | :-: | --- |
57
+ | 3.9.8 | 04/26/2022 | OrderApi.duplicateOrder |
57
58
  | 3.9.7 | 04/25/2022 | integration logs method for zpl to pdf conversion |
58
59
  | 3.9.6 | 04/25/2022 | storefront communications email magic link setting |
59
60
  | 3.9.5 | 04/14/2022 | postcard screenshot bug fixes |
package/api.ts CHANGED
@@ -48989,6 +48989,63 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
48989
48989
  options: localVarRequestOptions,
48990
48990
  };
48991
48991
  },
48992
+ /**
48993
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
48994
+ * @summary Duplicate an order
48995
+ * @param {string} order_id The order id to duplicate.
48996
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
48997
+ * @param {*} [options] Override http request option.
48998
+ * @throws {RequiredError}
48999
+ */
49000
+ duplicateOrder(order_id: string, _expand?: string, options: any = {}): FetchArgs {
49001
+ // verify required parameter 'order_id' is not null or undefined
49002
+ if (order_id === null || order_id === undefined) {
49003
+ throw new RequiredError('order_id','Required parameter order_id was null or undefined when calling duplicateOrder.');
49004
+ }
49005
+ const localVarPath = `/order/orders/{order_id}/duplicate`
49006
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
49007
+ const localVarUrlObj = url.parse(localVarPath, true);
49008
+ const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
49009
+ const localVarHeaderParameter = {} as any;
49010
+ const localVarQueryParameter = {} as any;
49011
+
49012
+ if(configuration && configuration.apiVersion) {
49013
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
49014
+ }
49015
+
49016
+
49017
+
49018
+ // authentication ultraCartOauth required
49019
+ // oauth required
49020
+ if (configuration && configuration.accessToken) {
49021
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
49022
+ ? configuration.accessToken("ultraCartOauth", ["order_write"])
49023
+ : configuration.accessToken;
49024
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
49025
+ }
49026
+
49027
+ // authentication ultraCartSimpleApiKey required
49028
+ if (configuration && configuration.apiKey) {
49029
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
49030
+ ? configuration.apiKey("x-ultracart-simple-key")
49031
+ : configuration.apiKey;
49032
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
49033
+ }
49034
+
49035
+ if (_expand !== undefined) {
49036
+ localVarQueryParameter['_expand'] = _expand;
49037
+ }
49038
+
49039
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
49040
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
49041
+ delete localVarUrlObj.search;
49042
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
49043
+
49044
+ return {
49045
+ url: url.format(localVarUrlObj),
49046
+ options: localVarRequestOptions,
49047
+ };
49048
+ },
48992
49049
  /**
48993
49050
  * Format the order for display at text or html
48994
49051
  * @summary Format order
@@ -50398,6 +50455,28 @@ export const OrderApiFp = function(configuration?: Configuration) {
50398
50455
  });
50399
50456
  };
50400
50457
  },
50458
+ /**
50459
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
50460
+ * @summary Duplicate an order
50461
+ * @param {string} order_id The order id to duplicate.
50462
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
50463
+ * @param {*} [options] Override http request option.
50464
+ * @throws {RequiredError}
50465
+ */
50466
+ duplicateOrder(order_id: string, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse> {
50467
+ const localVarFetchArgs = OrderApiFetchParamCreator(configuration).duplicateOrder(order_id, _expand, options);
50468
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
50469
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
50470
+
50471
+ if (response.status >= 200 && response.status < 300) {
50472
+ return response.json();
50473
+
50474
+ } else {
50475
+ throw response;
50476
+ }
50477
+ });
50478
+ };
50479
+ },
50401
50480
  /**
50402
50481
  * Format the order for display at text or html
50403
50482
  * @summary Format order
@@ -50900,6 +50979,17 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
50900
50979
  deleteOrder(order_id: string, options?: any) {
50901
50980
  return OrderApiFp(configuration).deleteOrder(order_id, options)(fetch, basePath);
50902
50981
  },
50982
+ /**
50983
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
50984
+ * @summary Duplicate an order
50985
+ * @param {string} order_id The order id to duplicate.
50986
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
50987
+ * @param {*} [options] Override http request option.
50988
+ * @throws {RequiredError}
50989
+ */
50990
+ duplicateOrder(order_id: string, _expand?: string, options?: any) {
50991
+ return OrderApiFp(configuration).duplicateOrder(order_id, _expand, options)(fetch, basePath);
50992
+ },
50903
50993
  /**
50904
50994
  * Format the order for display at text or html
50905
50995
  * @summary Format order
@@ -51193,6 +51283,17 @@ export interface OrderApiInterface {
51193
51283
  */
51194
51284
  deleteOrder(order_id: string, options?: any): Promise<{}>;
51195
51285
 
51286
+ /**
51287
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
51288
+ * @summary Duplicate an order
51289
+ * @param {string} order_id The order id to duplicate.
51290
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
51291
+ * @param {*} [options] Override http request option.
51292
+ * @throws {RequiredError}
51293
+ * @memberof OrderApiInterface
51294
+ */
51295
+ duplicateOrder(order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
51296
+
51196
51297
  /**
51197
51298
  * Format the order for display at text or html
51198
51299
  * @summary Format order
@@ -51492,6 +51593,19 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
51492
51593
  return OrderApiFp(this.configuration).deleteOrder(order_id, options)(this.fetch, this.basePath);
51493
51594
  }
51494
51595
 
51596
+ /**
51597
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
51598
+ * @summary Duplicate an order
51599
+ * @param {string} order_id The order id to duplicate.
51600
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
51601
+ * @param {*} [options] Override http request option.
51602
+ * @throws {RequiredError}
51603
+ * @memberof OrderApi
51604
+ */
51605
+ public duplicateOrder(order_id: string, _expand?: string, options?: any) {
51606
+ return OrderApiFp(this.configuration).duplicateOrder(order_id, _expand, options)(this.fetch, this.basePath);
51607
+ }
51608
+
51495
51609
  /**
51496
51610
  * Format the order for display at text or html
51497
51611
  * @summary Format order
package/dist/api.d.ts CHANGED
@@ -39886,6 +39886,15 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
39886
39886
  * @throws {RequiredError}
39887
39887
  */
39888
39888
  deleteOrder(order_id: string, options?: any): FetchArgs;
39889
+ /**
39890
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
39891
+ * @summary Duplicate an order
39892
+ * @param {string} order_id The order id to duplicate.
39893
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
39894
+ * @param {*} [options] Override http request option.
39895
+ * @throws {RequiredError}
39896
+ */
39897
+ duplicateOrder(order_id: string, _expand?: string, options?: any): FetchArgs;
39889
39898
  /**
39890
39899
  * Format the order for display at text or html
39891
39900
  * @summary Format order
@@ -40132,6 +40141,15 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
40132
40141
  * @throws {RequiredError}
40133
40142
  */
40134
40143
  deleteOrder(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<Response>;
40144
+ /**
40145
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
40146
+ * @summary Duplicate an order
40147
+ * @param {string} order_id The order id to duplicate.
40148
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
40149
+ * @param {*} [options] Override http request option.
40150
+ * @throws {RequiredError}
40151
+ */
40152
+ duplicateOrder(order_id: string, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse>;
40135
40153
  /**
40136
40154
  * Format the order for display at text or html
40137
40155
  * @summary Format order
@@ -40378,6 +40396,15 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
40378
40396
  * @throws {RequiredError}
40379
40397
  */
40380
40398
  deleteOrder(order_id: string, options?: any): Promise<Response>;
40399
+ /**
40400
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
40401
+ * @summary Duplicate an order
40402
+ * @param {string} order_id The order id to duplicate.
40403
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
40404
+ * @param {*} [options] Override http request option.
40405
+ * @throws {RequiredError}
40406
+ */
40407
+ duplicateOrder(order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
40381
40408
  /**
40382
40409
  * Format the order for display at text or html
40383
40410
  * @summary Format order
@@ -40628,6 +40655,16 @@ export interface OrderApiInterface {
40628
40655
  * @memberof OrderApiInterface
40629
40656
  */
40630
40657
  deleteOrder(order_id: string, options?: any): Promise<{}>;
40658
+ /**
40659
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
40660
+ * @summary Duplicate an order
40661
+ * @param {string} order_id The order id to duplicate.
40662
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
40663
+ * @param {*} [options] Override http request option.
40664
+ * @throws {RequiredError}
40665
+ * @memberof OrderApiInterface
40666
+ */
40667
+ duplicateOrder(order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
40631
40668
  /**
40632
40669
  * Format the order for display at text or html
40633
40670
  * @summary Format order
@@ -40898,6 +40935,16 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
40898
40935
  * @memberof OrderApi
40899
40936
  */
40900
40937
  deleteOrder(order_id: string, options?: any): Promise<Response>;
40938
+ /**
40939
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
40940
+ * @summary Duplicate an order
40941
+ * @param {string} order_id The order id to duplicate.
40942
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
40943
+ * @param {*} [options] Override http request option.
40944
+ * @throws {RequiredError}
40945
+ * @memberof OrderApi
40946
+ */
40947
+ duplicateOrder(order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
40901
40948
  /**
40902
40949
  * Format the order for display at text or html
40903
40950
  * @summary Format order
package/dist/api.js CHANGED
@@ -13346,6 +13346,56 @@ var OrderApiFetchParamCreator = function (configuration) {
13346
13346
  options: localVarRequestOptions,
13347
13347
  };
13348
13348
  },
13349
+ /**
13350
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
13351
+ * @summary Duplicate an order
13352
+ * @param {string} order_id The order id to duplicate.
13353
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
13354
+ * @param {*} [options] Override http request option.
13355
+ * @throws {RequiredError}
13356
+ */
13357
+ duplicateOrder: function (order_id, _expand, options) {
13358
+ if (options === void 0) { options = {}; }
13359
+ // verify required parameter 'order_id' is not null or undefined
13360
+ if (order_id === null || order_id === undefined) {
13361
+ throw new RequiredError('order_id', 'Required parameter order_id was null or undefined when calling duplicateOrder.');
13362
+ }
13363
+ var localVarPath = "/order/orders/{order_id}/duplicate"
13364
+ .replace("{".concat("order_id", "}"), encodeURIComponent(String(order_id)));
13365
+ var localVarUrlObj = url.parse(localVarPath, true);
13366
+ var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
13367
+ var localVarHeaderParameter = {};
13368
+ var localVarQueryParameter = {};
13369
+ if (configuration && configuration.apiVersion) {
13370
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
13371
+ }
13372
+ // authentication ultraCartOauth required
13373
+ // oauth required
13374
+ if (configuration && configuration.accessToken) {
13375
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
13376
+ ? configuration.accessToken("ultraCartOauth", ["order_write"])
13377
+ : configuration.accessToken;
13378
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
13379
+ }
13380
+ // authentication ultraCartSimpleApiKey required
13381
+ if (configuration && configuration.apiKey) {
13382
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
13383
+ ? configuration.apiKey("x-ultracart-simple-key")
13384
+ : configuration.apiKey;
13385
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
13386
+ }
13387
+ if (_expand !== undefined) {
13388
+ localVarQueryParameter['_expand'] = _expand;
13389
+ }
13390
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
13391
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
13392
+ delete localVarUrlObj.search;
13393
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
13394
+ return {
13395
+ url: url.format(localVarUrlObj),
13396
+ options: localVarRequestOptions,
13397
+ };
13398
+ },
13349
13399
  /**
13350
13400
  * Format the order for display at text or html
13351
13401
  * @summary Format order
@@ -14574,6 +14624,29 @@ var OrderApiFp = function (configuration) {
14574
14624
  });
14575
14625
  };
14576
14626
  },
14627
+ /**
14628
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
14629
+ * @summary Duplicate an order
14630
+ * @param {string} order_id The order id to duplicate.
14631
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
14632
+ * @param {*} [options] Override http request option.
14633
+ * @throws {RequiredError}
14634
+ */
14635
+ duplicateOrder: function (order_id, _expand, options) {
14636
+ var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).duplicateOrder(order_id, _expand, options);
14637
+ return function (fetch, basePath) {
14638
+ if (fetch === void 0) { fetch = portableFetch; }
14639
+ if (basePath === void 0) { basePath = BASE_PATH; }
14640
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
14641
+ if (response.status >= 200 && response.status < 300) {
14642
+ return response.json();
14643
+ }
14644
+ else {
14645
+ throw response;
14646
+ }
14647
+ });
14648
+ };
14649
+ },
14577
14650
  /**
14578
14651
  * Format the order for display at text or html
14579
14652
  * @summary Format order
@@ -15095,6 +15168,17 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
15095
15168
  deleteOrder: function (order_id, options) {
15096
15169
  return (0, exports.OrderApiFp)(configuration).deleteOrder(order_id, options)(fetch, basePath);
15097
15170
  },
15171
+ /**
15172
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
15173
+ * @summary Duplicate an order
15174
+ * @param {string} order_id The order id to duplicate.
15175
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
15176
+ * @param {*} [options] Override http request option.
15177
+ * @throws {RequiredError}
15178
+ */
15179
+ duplicateOrder: function (order_id, _expand, options) {
15180
+ return (0, exports.OrderApiFp)(configuration).duplicateOrder(order_id, _expand, options)(fetch, basePath);
15181
+ },
15098
15182
  /**
15099
15183
  * Format the order for display at text or html
15100
15184
  * @summary Format order
@@ -15396,6 +15480,18 @@ var OrderApi = /** @class */ (function (_super) {
15396
15480
  OrderApi.prototype.deleteOrder = function (order_id, options) {
15397
15481
  return (0, exports.OrderApiFp)(this.configuration).deleteOrder(order_id, options)(this.fetch, this.basePath);
15398
15482
  };
15483
+ /**
15484
+ * Perform a duplicate of the specified order_id and return a new order located in Accounts Receivable.
15485
+ * @summary Duplicate an order
15486
+ * @param {string} order_id The order id to duplicate.
15487
+ * @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
15488
+ * @param {*} [options] Override http request option.
15489
+ * @throws {RequiredError}
15490
+ * @memberof OrderApi
15491
+ */
15492
+ OrderApi.prototype.duplicateOrder = function (order_id, _expand, options) {
15493
+ return (0, exports.OrderApiFp)(this.configuration).duplicateOrder(order_id, _expand, options)(this.fetch, this.basePath);
15494
+ };
15399
15495
  /**
15400
15496
  * Format the order for display at text or html
15401
15497
  * @summary Format order
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.9.7",
3
+ "version": "3.9.8",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [