ultracart_rest_api_v2_typescript 3.10.64 → 3.10.65

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.10.64
1
+ ## ultracart_rest_api_v2_typescript@3.10.65
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.10.64 --save
39
+ npm install ultracart_rest_api_v2_typescript@3.10.65 --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.10.65 | 11/15/2022 | order api new method is order refundable |
57
58
  | 3.10.64 | 11/15/2022 | increase order property length to 10k char |
58
59
  | 3.10.63 | 11/14/2022 | conversations - add allowed values for update agent status |
59
60
  | 3.10.62 | 11/09/2022 | conversations - add an enum of event typing |
package/api.ts CHANGED
@@ -28951,6 +28951,44 @@ export interface OrderQuote {
28951
28951
  quoted_dts?: string;
28952
28952
  }
28953
28953
 
28954
+ /**
28955
+ *
28956
+ * @export
28957
+ * @interface OrderRefundableResponse
28958
+ */
28959
+ export interface OrderRefundableResponse {
28960
+ /**
28961
+ *
28962
+ * @type {ModelError}
28963
+ * @memberof OrderRefundableResponse
28964
+ */
28965
+ error?: ModelError;
28966
+ /**
28967
+ *
28968
+ * @type {ResponseMetadata}
28969
+ * @memberof OrderRefundableResponse
28970
+ */
28971
+ metadata?: ResponseMetadata;
28972
+ /**
28973
+ * Whether the order is refundable or not.
28974
+ * @type {boolean}
28975
+ * @memberof OrderRefundableResponse
28976
+ */
28977
+ refundable?: boolean;
28978
+ /**
28979
+ * Indicates if API call was successful
28980
+ * @type {boolean}
28981
+ * @memberof OrderRefundableResponse
28982
+ */
28983
+ success?: boolean;
28984
+ /**
28985
+ *
28986
+ * @type {Warning}
28987
+ * @memberof OrderRefundableResponse
28988
+ */
28989
+ warning?: Warning;
28990
+ }
28991
+
28954
28992
  /**
28955
28993
  *
28956
28994
  * @export
@@ -52684,6 +52722,58 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
52684
52722
  options: localVarRequestOptions,
52685
52723
  };
52686
52724
  },
52725
+ /**
52726
+ * Determine if an order can be refunded based upon payment method and age
52727
+ * @summary Determine if an order can be refunded
52728
+ * @param {string} order_id The order id to check for refundable order.
52729
+ * @param {*} [options] Override http request option.
52730
+ * @throws {RequiredError}
52731
+ */
52732
+ isRefundableOrder(order_id: string, options: any = {}): FetchArgs {
52733
+ // verify required parameter 'order_id' is not null or undefined
52734
+ if (order_id === null || order_id === undefined) {
52735
+ throw new RequiredError('order_id','Required parameter order_id was null or undefined when calling isRefundableOrder.');
52736
+ }
52737
+ const localVarPath = `/order/orders/{order_id}/refundable`
52738
+ .replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
52739
+ const localVarUrlObj = url.parse(localVarPath, true);
52740
+ const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
52741
+ const localVarHeaderParameter = {} as any;
52742
+ const localVarQueryParameter = {} as any;
52743
+
52744
+ if(configuration && configuration.apiVersion) {
52745
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
52746
+ }
52747
+
52748
+
52749
+
52750
+ // authentication ultraCartOauth required
52751
+ // oauth required
52752
+ if (configuration && configuration.accessToken) {
52753
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
52754
+ ? configuration.accessToken("ultraCartOauth", ["order_write"])
52755
+ : configuration.accessToken;
52756
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
52757
+ }
52758
+
52759
+ // authentication ultraCartSimpleApiKey required
52760
+ if (configuration && configuration.apiKey) {
52761
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
52762
+ ? configuration.apiKey("x-ultracart-simple-key")
52763
+ : configuration.apiKey;
52764
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
52765
+ }
52766
+
52767
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
52768
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
52769
+ delete localVarUrlObj.search;
52770
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
52771
+
52772
+ return {
52773
+ url: url.format(localVarUrlObj),
52774
+ options: localVarRequestOptions,
52775
+ };
52776
+ },
52687
52777
  /**
52688
52778
  * Process payment on order
52689
52779
  * @summary Process payment
@@ -53514,6 +53604,27 @@ export const OrderApiFp = function(configuration?: Configuration) {
53514
53604
  });
53515
53605
  };
53516
53606
  },
53607
+ /**
53608
+ * Determine if an order can be refunded based upon payment method and age
53609
+ * @summary Determine if an order can be refunded
53610
+ * @param {string} order_id The order id to check for refundable order.
53611
+ * @param {*} [options] Override http request option.
53612
+ * @throws {RequiredError}
53613
+ */
53614
+ isRefundableOrder(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderRefundableResponse> {
53615
+ const localVarFetchArgs = OrderApiFetchParamCreator(configuration).isRefundableOrder(order_id, options);
53616
+ return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
53617
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
53618
+
53619
+ if (response.status >= 200 && response.status < 300) {
53620
+ return response.json();
53621
+
53622
+ } else {
53623
+ throw response;
53624
+ }
53625
+ });
53626
+ };
53627
+ },
53517
53628
  /**
53518
53629
  * Process payment on order
53519
53630
  * @summary Process payment
@@ -53884,6 +53995,16 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
53884
53995
  insertOrder(order: Order, _expand?: string, options?: any) {
53885
53996
  return OrderApiFp(configuration).insertOrder(order, _expand, options)(fetch, basePath);
53886
53997
  },
53998
+ /**
53999
+ * Determine if an order can be refunded based upon payment method and age
54000
+ * @summary Determine if an order can be refunded
54001
+ * @param {string} order_id The order id to check for refundable order.
54002
+ * @param {*} [options] Override http request option.
54003
+ * @throws {RequiredError}
54004
+ */
54005
+ isRefundableOrder(order_id: string, options?: any) {
54006
+ return OrderApiFp(configuration).isRefundableOrder(order_id, options)(fetch, basePath);
54007
+ },
53887
54008
  /**
53888
54009
  * Process payment on order
53889
54010
  * @summary Process payment
@@ -54177,6 +54298,16 @@ export interface OrderApiInterface {
54177
54298
  */
54178
54299
  insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
54179
54300
 
54301
+ /**
54302
+ * Determine if an order can be refunded based upon payment method and age
54303
+ * @summary Determine if an order can be refunded
54304
+ * @param {string} order_id The order id to check for refundable order.
54305
+ * @param {*} [options] Override http request option.
54306
+ * @throws {RequiredError}
54307
+ * @memberof OrderApiInterface
54308
+ */
54309
+ isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
54310
+
54180
54311
  /**
54181
54312
  * Process payment on order
54182
54313
  * @summary Process payment
@@ -54502,6 +54633,18 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
54502
54633
  return OrderApiFp(this.configuration).insertOrder(order, _expand, options)(this.fetch, this.basePath);
54503
54634
  }
54504
54635
 
54636
+ /**
54637
+ * Determine if an order can be refunded based upon payment method and age
54638
+ * @summary Determine if an order can be refunded
54639
+ * @param {string} order_id The order id to check for refundable order.
54640
+ * @param {*} [options] Override http request option.
54641
+ * @throws {RequiredError}
54642
+ * @memberof OrderApi
54643
+ */
54644
+ public isRefundableOrder(order_id: string, options?: any) {
54645
+ return OrderApiFp(this.configuration).isRefundableOrder(order_id, options)(this.fetch, this.basePath);
54646
+ }
54647
+
54505
54648
  /**
54506
54649
  * Process payment on order
54507
54650
  * @summary Process payment
package/dist/api.d.ts CHANGED
@@ -28344,6 +28344,43 @@ export interface OrderQuote {
28344
28344
  */
28345
28345
  quoted_dts?: string;
28346
28346
  }
28347
+ /**
28348
+ *
28349
+ * @export
28350
+ * @interface OrderRefundableResponse
28351
+ */
28352
+ export interface OrderRefundableResponse {
28353
+ /**
28354
+ *
28355
+ * @type {ModelError}
28356
+ * @memberof OrderRefundableResponse
28357
+ */
28358
+ error?: ModelError;
28359
+ /**
28360
+ *
28361
+ * @type {ResponseMetadata}
28362
+ * @memberof OrderRefundableResponse
28363
+ */
28364
+ metadata?: ResponseMetadata;
28365
+ /**
28366
+ * Whether the order is refundable or not.
28367
+ * @type {boolean}
28368
+ * @memberof OrderRefundableResponse
28369
+ */
28370
+ refundable?: boolean;
28371
+ /**
28372
+ * Indicates if API call was successful
28373
+ * @type {boolean}
28374
+ * @memberof OrderRefundableResponse
28375
+ */
28376
+ success?: boolean;
28377
+ /**
28378
+ *
28379
+ * @type {Warning}
28380
+ * @memberof OrderRefundableResponse
28381
+ */
28382
+ warning?: Warning;
28383
+ }
28347
28384
  /**
28348
28385
  *
28349
28386
  * @export
@@ -41860,6 +41897,14 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
41860
41897
  * @throws {RequiredError}
41861
41898
  */
41862
41899
  insertOrder(order: Order, _expand?: string, options?: any): FetchArgs;
41900
+ /**
41901
+ * Determine if an order can be refunded based upon payment method and age
41902
+ * @summary Determine if an order can be refunded
41903
+ * @param {string} order_id The order id to check for refundable order.
41904
+ * @param {*} [options] Override http request option.
41905
+ * @throws {RequiredError}
41906
+ */
41907
+ isRefundableOrder(order_id: string, options?: any): FetchArgs;
41863
41908
  /**
41864
41909
  * Process payment on order
41865
41910
  * @summary Process payment
@@ -42104,6 +42149,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
42104
42149
  * @throws {RequiredError}
42105
42150
  */
42106
42151
  insertOrder(order: Order, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse>;
42152
+ /**
42153
+ * Determine if an order can be refunded based upon payment method and age
42154
+ * @summary Determine if an order can be refunded
42155
+ * @param {string} order_id The order id to check for refundable order.
42156
+ * @param {*} [options] Override http request option.
42157
+ * @throws {RequiredError}
42158
+ */
42159
+ isRefundableOrder(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderRefundableResponse>;
42107
42160
  /**
42108
42161
  * Process payment on order
42109
42162
  * @summary Process payment
@@ -42348,6 +42401,14 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
42348
42401
  * @throws {RequiredError}
42349
42402
  */
42350
42403
  insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
42404
+ /**
42405
+ * Determine if an order can be refunded based upon payment method and age
42406
+ * @summary Determine if an order can be refunded
42407
+ * @param {string} order_id The order id to check for refundable order.
42408
+ * @param {*} [options] Override http request option.
42409
+ * @throws {RequiredError}
42410
+ */
42411
+ isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
42351
42412
  /**
42352
42413
  * Process payment on order
42353
42414
  * @summary Process payment
@@ -42609,6 +42670,15 @@ export interface OrderApiInterface {
42609
42670
  * @memberof OrderApiInterface
42610
42671
  */
42611
42672
  insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
42673
+ /**
42674
+ * Determine if an order can be refunded based upon payment method and age
42675
+ * @summary Determine if an order can be refunded
42676
+ * @param {string} order_id The order id to check for refundable order.
42677
+ * @param {*} [options] Override http request option.
42678
+ * @throws {RequiredError}
42679
+ * @memberof OrderApiInterface
42680
+ */
42681
+ isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
42612
42682
  /**
42613
42683
  * Process payment on order
42614
42684
  * @summary Process payment
@@ -42878,6 +42948,15 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
42878
42948
  * @memberof OrderApi
42879
42949
  */
42880
42950
  insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
42951
+ /**
42952
+ * Determine if an order can be refunded based upon payment method and age
42953
+ * @summary Determine if an order can be refunded
42954
+ * @param {string} order_id The order id to check for refundable order.
42955
+ * @param {*} [options] Override http request option.
42956
+ * @throws {RequiredError}
42957
+ * @memberof OrderApi
42958
+ */
42959
+ isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
42881
42960
  /**
42882
42961
  * Process payment on order
42883
42962
  * @summary Process payment
package/dist/api.js CHANGED
@@ -15396,6 +15396,52 @@ var OrderApiFetchParamCreator = function (configuration) {
15396
15396
  options: localVarRequestOptions,
15397
15397
  };
15398
15398
  },
15399
+ /**
15400
+ * Determine if an order can be refunded based upon payment method and age
15401
+ * @summary Determine if an order can be refunded
15402
+ * @param {string} order_id The order id to check for refundable order.
15403
+ * @param {*} [options] Override http request option.
15404
+ * @throws {RequiredError}
15405
+ */
15406
+ isRefundableOrder: function (order_id, options) {
15407
+ if (options === void 0) { options = {}; }
15408
+ // verify required parameter 'order_id' is not null or undefined
15409
+ if (order_id === null || order_id === undefined) {
15410
+ throw new RequiredError('order_id', 'Required parameter order_id was null or undefined when calling isRefundableOrder.');
15411
+ }
15412
+ var localVarPath = "/order/orders/{order_id}/refundable"
15413
+ .replace("{".concat("order_id", "}"), encodeURIComponent(String(order_id)));
15414
+ var localVarUrlObj = url.parse(localVarPath, true);
15415
+ var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
15416
+ var localVarHeaderParameter = {};
15417
+ var localVarQueryParameter = {};
15418
+ if (configuration && configuration.apiVersion) {
15419
+ localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
15420
+ }
15421
+ // authentication ultraCartOauth required
15422
+ // oauth required
15423
+ if (configuration && configuration.accessToken) {
15424
+ var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
15425
+ ? configuration.accessToken("ultraCartOauth", ["order_write"])
15426
+ : configuration.accessToken;
15427
+ localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
15428
+ }
15429
+ // authentication ultraCartSimpleApiKey required
15430
+ if (configuration && configuration.apiKey) {
15431
+ var localVarApiKeyValue = typeof configuration.apiKey === 'function'
15432
+ ? configuration.apiKey("x-ultracart-simple-key")
15433
+ : configuration.apiKey;
15434
+ localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
15435
+ }
15436
+ localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
15437
+ // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
15438
+ delete localVarUrlObj.search;
15439
+ localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
15440
+ return {
15441
+ url: url.format(localVarUrlObj),
15442
+ options: localVarRequestOptions,
15443
+ };
15444
+ },
15399
15445
  /**
15400
15446
  * Process payment on order
15401
15447
  * @summary Process payment
@@ -16187,6 +16233,28 @@ var OrderApiFp = function (configuration) {
16187
16233
  });
16188
16234
  };
16189
16235
  },
16236
+ /**
16237
+ * Determine if an order can be refunded based upon payment method and age
16238
+ * @summary Determine if an order can be refunded
16239
+ * @param {string} order_id The order id to check for refundable order.
16240
+ * @param {*} [options] Override http request option.
16241
+ * @throws {RequiredError}
16242
+ */
16243
+ isRefundableOrder: function (order_id, options) {
16244
+ var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).isRefundableOrder(order_id, options);
16245
+ return function (fetch, basePath) {
16246
+ if (fetch === void 0) { fetch = portableFetch; }
16247
+ if (basePath === void 0) { basePath = BASE_PATH; }
16248
+ return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
16249
+ if (response.status >= 200 && response.status < 300) {
16250
+ return response.json();
16251
+ }
16252
+ else {
16253
+ throw response;
16254
+ }
16255
+ });
16256
+ };
16257
+ },
16190
16258
  /**
16191
16259
  * Process payment on order
16192
16260
  * @summary Process payment
@@ -16564,6 +16632,16 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
16564
16632
  insertOrder: function (order, _expand, options) {
16565
16633
  return (0, exports.OrderApiFp)(configuration).insertOrder(order, _expand, options)(fetch, basePath);
16566
16634
  },
16635
+ /**
16636
+ * Determine if an order can be refunded based upon payment method and age
16637
+ * @summary Determine if an order can be refunded
16638
+ * @param {string} order_id The order id to check for refundable order.
16639
+ * @param {*} [options] Override http request option.
16640
+ * @throws {RequiredError}
16641
+ */
16642
+ isRefundableOrder: function (order_id, options) {
16643
+ return (0, exports.OrderApiFp)(configuration).isRefundableOrder(order_id, options)(fetch, basePath);
16644
+ },
16567
16645
  /**
16568
16646
  * Process payment on order
16569
16647
  * @summary Process payment
@@ -16878,6 +16956,17 @@ var OrderApi = /** @class */ (function (_super) {
16878
16956
  OrderApi.prototype.insertOrder = function (order, _expand, options) {
16879
16957
  return (0, exports.OrderApiFp)(this.configuration).insertOrder(order, _expand, options)(this.fetch, this.basePath);
16880
16958
  };
16959
+ /**
16960
+ * Determine if an order can be refunded based upon payment method and age
16961
+ * @summary Determine if an order can be refunded
16962
+ * @param {string} order_id The order id to check for refundable order.
16963
+ * @param {*} [options] Override http request option.
16964
+ * @throws {RequiredError}
16965
+ * @memberof OrderApi
16966
+ */
16967
+ OrderApi.prototype.isRefundableOrder = function (order_id, options) {
16968
+ return (0, exports.OrderApiFp)(this.configuration).isRefundableOrder(order_id, options)(this.fetch, this.basePath);
16969
+ };
16881
16970
  /**
16882
16971
  * Process payment on order
16883
16972
  * @summary Process payment
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ultracart_rest_api_v2_typescript",
3
- "version": "3.10.64",
3
+ "version": "3.10.65",
4
4
  "description": "UltraCart Rest TypeScript SDK",
5
5
  "author": "UltraCart",
6
6
  "keywords": [