ultracart_rest_api_v2_typescript 3.11.0 → 3.11.2
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 +4 -2
- package/api.ts +135 -2
- package/dist/api.d.ts +60 -2
- package/dist/api.js +107 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@3.11.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@3.11.2
|
|
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.11.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@3.11.2 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,8 @@ Not every change is committed to every SDK.
|
|
|
54
54
|
|
|
55
55
|
| Version | Date | Comments |
|
|
56
56
|
| --: | :-: | --- |
|
|
57
|
+
| 3.11.2 | 03/05/2025 | added ChannelPartnerOrder.use_prior_payment_information_from_order_id |
|
|
58
|
+
| 3.11.1 | 02/28/2025 | auto order pause method |
|
|
57
59
|
| 3.11.0 | 02/21/2025 | ItemApi.getInventorySnapshot had bad nickname causing bad sdk method name |
|
|
58
60
|
| 3.10.228 | 02/20/2025 | automation fix |
|
|
59
61
|
| 3.10.227 | 02/20/2025 | no change, revving sdk to troubleshoot java deployment automation |
|
package/api.ts
CHANGED
|
@@ -6122,6 +6122,12 @@ export interface ChannelPartnerOrder {
|
|
|
6122
6122
|
* @memberof ChannelPartnerOrder
|
|
6123
6123
|
*/
|
|
6124
6124
|
treat_warnings_as_errors?: boolean;
|
|
6125
|
+
/**
|
|
6126
|
+
* An Order Id from a prior purchase of this customer which is used to retrieve vaulted payment information in order to pay for this current order.
|
|
6127
|
+
* @type {string}
|
|
6128
|
+
* @memberof ChannelPartnerOrder
|
|
6129
|
+
*/
|
|
6130
|
+
use_prior_payment_information_from_order_id?: string;
|
|
6125
6131
|
}
|
|
6126
6132
|
|
|
6127
6133
|
/**
|
|
@@ -28593,7 +28599,7 @@ export interface ItemPaymentProcessing {
|
|
|
28593
28599
|
*/
|
|
28594
28600
|
block_prepaid?: boolean;
|
|
28595
28601
|
/**
|
|
28596
|
-
* True if this item should block any refund attempts
|
|
28602
|
+
* True if this item should block any refund attempts, set to false otherwise, null value will not update the field
|
|
28597
28603
|
* @type {boolean}
|
|
28598
28604
|
* @memberof ItemPaymentProcessing
|
|
28599
28605
|
*/
|
|
@@ -32661,7 +32667,7 @@ export interface OrderCoupon {
|
|
|
32661
32667
|
*/
|
|
32662
32668
|
coupon_code?: string;
|
|
32663
32669
|
/**
|
|
32664
|
-
* True if this coupon is
|
|
32670
|
+
* True if this coupon is hide from the customer
|
|
32665
32671
|
* @type {boolean}
|
|
32666
32672
|
* @memberof OrderCoupon
|
|
32667
32673
|
*/
|
|
@@ -46139,6 +46145,72 @@ export const AutoOrderApiFetchParamCreator = function (configuration?: Configura
|
|
|
46139
46145
|
options: localVarRequestOptions,
|
|
46140
46146
|
};
|
|
46141
46147
|
},
|
|
46148
|
+
/**
|
|
46149
|
+
* Completely pause an auto order
|
|
46150
|
+
* @summary Pause auto order
|
|
46151
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
46152
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
46153
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
46154
|
+
* @param {*} [options] Override http request option.
|
|
46155
|
+
* @throws {RequiredError}
|
|
46156
|
+
*/
|
|
46157
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options: any = {}): FetchArgs {
|
|
46158
|
+
// verify required parameter 'auto_order' is not null or undefined
|
|
46159
|
+
if (auto_order === null || auto_order === undefined) {
|
|
46160
|
+
throw new RequiredError('auto_order','Required parameter auto_order was null or undefined when calling pauseAutoOrder.');
|
|
46161
|
+
}
|
|
46162
|
+
// verify required parameter 'auto_order_oid' is not null or undefined
|
|
46163
|
+
if (auto_order_oid === null || auto_order_oid === undefined) {
|
|
46164
|
+
throw new RequiredError('auto_order_oid','Required parameter auto_order_oid was null or undefined when calling pauseAutoOrder.');
|
|
46165
|
+
}
|
|
46166
|
+
const localVarPath = `/auto_order/auto_orders/{auto_order_oid}/pause`
|
|
46167
|
+
.replace(`{${"auto_order_oid"}}`, encodeURIComponent(String(auto_order_oid)));
|
|
46168
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
46169
|
+
const localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
|
46170
|
+
const localVarHeaderParameter = {} as any;
|
|
46171
|
+
const localVarQueryParameter = {} as any;
|
|
46172
|
+
|
|
46173
|
+
if(configuration && configuration.apiVersion) {
|
|
46174
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
46175
|
+
}
|
|
46176
|
+
|
|
46177
|
+
|
|
46178
|
+
|
|
46179
|
+
// authentication ultraCartOauth required
|
|
46180
|
+
// oauth required
|
|
46181
|
+
if (configuration && configuration.accessToken) {
|
|
46182
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
46183
|
+
? configuration.accessToken("ultraCartOauth", ["auto_order_write"])
|
|
46184
|
+
: configuration.accessToken;
|
|
46185
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
46186
|
+
}
|
|
46187
|
+
|
|
46188
|
+
// authentication ultraCartSimpleApiKey required
|
|
46189
|
+
if (configuration && configuration.apiKey) {
|
|
46190
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
46191
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
46192
|
+
: configuration.apiKey;
|
|
46193
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
46194
|
+
}
|
|
46195
|
+
|
|
46196
|
+
if (_expand !== undefined) {
|
|
46197
|
+
localVarQueryParameter['_expand'] = _expand;
|
|
46198
|
+
}
|
|
46199
|
+
|
|
46200
|
+
localVarHeaderParameter['Content-Type'] = 'application/json; charset=UTF-8';
|
|
46201
|
+
|
|
46202
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
46203
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
46204
|
+
delete localVarUrlObj.search;
|
|
46205
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
46206
|
+
const needsSerialization = (<any>"AutoOrder" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
46207
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(auto_order || {}) : (auto_order || "");
|
|
46208
|
+
|
|
46209
|
+
return {
|
|
46210
|
+
url: url.format(localVarUrlObj),
|
|
46211
|
+
options: localVarRequestOptions,
|
|
46212
|
+
};
|
|
46213
|
+
},
|
|
46142
46214
|
/**
|
|
46143
46215
|
* Update an auto order on the UltraCart account.
|
|
46144
46216
|
* @summary Update an auto order
|
|
@@ -46490,6 +46562,29 @@ export const AutoOrderApiFp = function(configuration?: Configuration) {
|
|
|
46490
46562
|
});
|
|
46491
46563
|
};
|
|
46492
46564
|
},
|
|
46565
|
+
/**
|
|
46566
|
+
* Completely pause an auto order
|
|
46567
|
+
* @summary Pause auto order
|
|
46568
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
46569
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
46570
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
46571
|
+
* @param {*} [options] Override http request option.
|
|
46572
|
+
* @throws {RequiredError}
|
|
46573
|
+
*/
|
|
46574
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<AutoOrderResponse> {
|
|
46575
|
+
const localVarFetchArgs = AutoOrderApiFetchParamCreator(configuration).pauseAutoOrder(auto_order, auto_order_oid, _expand, options);
|
|
46576
|
+
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
|
46577
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
46578
|
+
|
|
46579
|
+
if (response.status >= 200 && response.status < 300) {
|
|
46580
|
+
return response.json();
|
|
46581
|
+
|
|
46582
|
+
} else {
|
|
46583
|
+
throw response;
|
|
46584
|
+
}
|
|
46585
|
+
});
|
|
46586
|
+
};
|
|
46587
|
+
},
|
|
46493
46588
|
/**
|
|
46494
46589
|
* Update an auto order on the UltraCart account.
|
|
46495
46590
|
* @summary Update an auto order
|
|
@@ -46660,6 +46755,18 @@ export const AutoOrderApiFactory = function (configuration?: Configuration, fetc
|
|
|
46660
46755
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any) {
|
|
46661
46756
|
return AutoOrderApiFp(configuration).getAutoOrdersByQuery(auto_order_query, _limit, _offset, _sort, _expand, options)(fetch, basePath);
|
|
46662
46757
|
},
|
|
46758
|
+
/**
|
|
46759
|
+
* Completely pause an auto order
|
|
46760
|
+
* @summary Pause auto order
|
|
46761
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
46762
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
46763
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
46764
|
+
* @param {*} [options] Override http request option.
|
|
46765
|
+
* @throws {RequiredError}
|
|
46766
|
+
*/
|
|
46767
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any) {
|
|
46768
|
+
return AutoOrderApiFp(configuration).pauseAutoOrder(auto_order, auto_order_oid, _expand, options)(fetch, basePath);
|
|
46769
|
+
},
|
|
46663
46770
|
/**
|
|
46664
46771
|
* Update an auto order on the UltraCart account.
|
|
46665
46772
|
* @summary Update an auto order
|
|
@@ -46808,6 +46915,18 @@ export interface AutoOrderApiInterface {
|
|
|
46808
46915
|
*/
|
|
46809
46916
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any): Promise<AutoOrdersResponse>;
|
|
46810
46917
|
|
|
46918
|
+
/**
|
|
46919
|
+
* Completely pause an auto order
|
|
46920
|
+
* @summary Pause auto order
|
|
46921
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
46922
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
46923
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
46924
|
+
* @param {*} [options] Override http request option.
|
|
46925
|
+
* @throws {RequiredError}
|
|
46926
|
+
* @memberof AutoOrderApiInterface
|
|
46927
|
+
*/
|
|
46928
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): Promise<AutoOrderResponse>;
|
|
46929
|
+
|
|
46811
46930
|
/**
|
|
46812
46931
|
* Update an auto order on the UltraCart account.
|
|
46813
46932
|
* @summary Update an auto order
|
|
@@ -46972,6 +47091,20 @@ export class AutoOrderApi extends BaseAPI implements AutoOrderApiInterface {
|
|
|
46972
47091
|
return AutoOrderApiFp(this.configuration).getAutoOrdersByQuery(auto_order_query, _limit, _offset, _sort, _expand, options)(this.fetch, this.basePath);
|
|
46973
47092
|
}
|
|
46974
47093
|
|
|
47094
|
+
/**
|
|
47095
|
+
* Completely pause an auto order
|
|
47096
|
+
* @summary Pause auto order
|
|
47097
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
47098
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
47099
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
47100
|
+
* @param {*} [options] Override http request option.
|
|
47101
|
+
* @throws {RequiredError}
|
|
47102
|
+
* @memberof AutoOrderApi
|
|
47103
|
+
*/
|
|
47104
|
+
public pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any) {
|
|
47105
|
+
return AutoOrderApiFp(this.configuration).pauseAutoOrder(auto_order, auto_order_oid, _expand, options)(this.fetch, this.basePath);
|
|
47106
|
+
}
|
|
47107
|
+
|
|
46975
47108
|
/**
|
|
46976
47109
|
* Update an auto order on the UltraCart account.
|
|
46977
47110
|
* @summary Update an auto order
|
package/dist/api.d.ts
CHANGED
|
@@ -5987,6 +5987,12 @@ export interface ChannelPartnerOrder {
|
|
|
5987
5987
|
* @memberof ChannelPartnerOrder
|
|
5988
5988
|
*/
|
|
5989
5989
|
treat_warnings_as_errors?: boolean;
|
|
5990
|
+
/**
|
|
5991
|
+
* An Order Id from a prior purchase of this customer which is used to retrieve vaulted payment information in order to pay for this current order.
|
|
5992
|
+
* @type {string}
|
|
5993
|
+
* @memberof ChannelPartnerOrder
|
|
5994
|
+
*/
|
|
5995
|
+
use_prior_payment_information_from_order_id?: string;
|
|
5990
5996
|
}
|
|
5991
5997
|
/**
|
|
5992
5998
|
* @export
|
|
@@ -27989,7 +27995,7 @@ export interface ItemPaymentProcessing {
|
|
|
27989
27995
|
*/
|
|
27990
27996
|
block_prepaid?: boolean;
|
|
27991
27997
|
/**
|
|
27992
|
-
* True if this item should block any refund attempts
|
|
27998
|
+
* True if this item should block any refund attempts, set to false otherwise, null value will not update the field
|
|
27993
27999
|
* @type {boolean}
|
|
27994
28000
|
* @memberof ItemPaymentProcessing
|
|
27995
28001
|
*/
|
|
@@ -31974,7 +31980,7 @@ export interface OrderCoupon {
|
|
|
31974
31980
|
*/
|
|
31975
31981
|
coupon_code?: string;
|
|
31976
31982
|
/**
|
|
31977
|
-
* True if this coupon is
|
|
31983
|
+
* True if this coupon is hide from the customer
|
|
31978
31984
|
* @type {boolean}
|
|
31979
31985
|
* @memberof OrderCoupon
|
|
31980
31986
|
*/
|
|
@@ -44523,6 +44529,16 @@ export declare const AutoOrderApiFetchParamCreator: (configuration?: Configurati
|
|
|
44523
44529
|
* @throws {RequiredError}
|
|
44524
44530
|
*/
|
|
44525
44531
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any): FetchArgs;
|
|
44532
|
+
/**
|
|
44533
|
+
* Completely pause an auto order
|
|
44534
|
+
* @summary Pause auto order
|
|
44535
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
44536
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
44537
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
44538
|
+
* @param {*} [options] Override http request option.
|
|
44539
|
+
* @throws {RequiredError}
|
|
44540
|
+
*/
|
|
44541
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): FetchArgs;
|
|
44526
44542
|
/**
|
|
44527
44543
|
* Update an auto order on the UltraCart account.
|
|
44528
44544
|
* @summary Update an auto order
|
|
@@ -44648,6 +44664,16 @@ export declare const AutoOrderApiFp: (configuration?: Configuration) => {
|
|
|
44648
44664
|
* @throws {RequiredError}
|
|
44649
44665
|
*/
|
|
44650
44666
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<AutoOrdersResponse>;
|
|
44667
|
+
/**
|
|
44668
|
+
* Completely pause an auto order
|
|
44669
|
+
* @summary Pause auto order
|
|
44670
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
44671
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
44672
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
44673
|
+
* @param {*} [options] Override http request option.
|
|
44674
|
+
* @throws {RequiredError}
|
|
44675
|
+
*/
|
|
44676
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<AutoOrderResponse>;
|
|
44651
44677
|
/**
|
|
44652
44678
|
* Update an auto order on the UltraCart account.
|
|
44653
44679
|
* @summary Update an auto order
|
|
@@ -44773,6 +44799,16 @@ export declare const AutoOrderApiFactory: (configuration?: Configuration, fetch?
|
|
|
44773
44799
|
* @throws {RequiredError}
|
|
44774
44800
|
*/
|
|
44775
44801
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any): Promise<AutoOrdersResponse>;
|
|
44802
|
+
/**
|
|
44803
|
+
* Completely pause an auto order
|
|
44804
|
+
* @summary Pause auto order
|
|
44805
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
44806
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
44807
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
44808
|
+
* @param {*} [options] Override http request option.
|
|
44809
|
+
* @throws {RequiredError}
|
|
44810
|
+
*/
|
|
44811
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): Promise<AutoOrderResponse>;
|
|
44776
44812
|
/**
|
|
44777
44813
|
* Update an auto order on the UltraCart account.
|
|
44778
44814
|
* @summary Update an auto order
|
|
@@ -44907,6 +44943,17 @@ export interface AutoOrderApiInterface {
|
|
|
44907
44943
|
* @memberof AutoOrderApiInterface
|
|
44908
44944
|
*/
|
|
44909
44945
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any): Promise<AutoOrdersResponse>;
|
|
44946
|
+
/**
|
|
44947
|
+
* Completely pause an auto order
|
|
44948
|
+
* @summary Pause auto order
|
|
44949
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
44950
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
44951
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
44952
|
+
* @param {*} [options] Override http request option.
|
|
44953
|
+
* @throws {RequiredError}
|
|
44954
|
+
* @memberof AutoOrderApiInterface
|
|
44955
|
+
*/
|
|
44956
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): Promise<AutoOrderResponse>;
|
|
44910
44957
|
/**
|
|
44911
44958
|
* Update an auto order on the UltraCart account.
|
|
44912
44959
|
* @summary Update an auto order
|
|
@@ -45044,6 +45091,17 @@ export declare class AutoOrderApi extends BaseAPI implements AutoOrderApiInterfa
|
|
|
45044
45091
|
* @memberof AutoOrderApi
|
|
45045
45092
|
*/
|
|
45046
45093
|
getAutoOrdersByQuery(auto_order_query: AutoOrderQuery, _limit?: number, _offset?: number, _sort?: string, _expand?: string, options?: any): Promise<AutoOrdersResponse>;
|
|
45094
|
+
/**
|
|
45095
|
+
* Completely pause an auto order
|
|
45096
|
+
* @summary Pause auto order
|
|
45097
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
45098
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
45099
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
45100
|
+
* @param {*} [options] Override http request option.
|
|
45101
|
+
* @throws {RequiredError}
|
|
45102
|
+
* @memberof AutoOrderApi
|
|
45103
|
+
*/
|
|
45104
|
+
pauseAutoOrder(auto_order: AutoOrder, auto_order_oid: number, _expand?: string, options?: any): Promise<AutoOrderResponse>;
|
|
45047
45105
|
/**
|
|
45048
45106
|
* Update an auto order on the UltraCart account.
|
|
45049
45107
|
* @summary Update an auto order
|
package/dist/api.js
CHANGED
|
@@ -2686,6 +2686,64 @@ var AutoOrderApiFetchParamCreator = function (configuration) {
|
|
|
2686
2686
|
options: localVarRequestOptions,
|
|
2687
2687
|
};
|
|
2688
2688
|
},
|
|
2689
|
+
/**
|
|
2690
|
+
* Completely pause an auto order
|
|
2691
|
+
* @summary Pause auto order
|
|
2692
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
2693
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
2694
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
2695
|
+
* @param {*} [options] Override http request option.
|
|
2696
|
+
* @throws {RequiredError}
|
|
2697
|
+
*/
|
|
2698
|
+
pauseAutoOrder: function (auto_order, auto_order_oid, _expand, options) {
|
|
2699
|
+
if (options === void 0) { options = {}; }
|
|
2700
|
+
// verify required parameter 'auto_order' is not null or undefined
|
|
2701
|
+
if (auto_order === null || auto_order === undefined) {
|
|
2702
|
+
throw new RequiredError('auto_order', 'Required parameter auto_order was null or undefined when calling pauseAutoOrder.');
|
|
2703
|
+
}
|
|
2704
|
+
// verify required parameter 'auto_order_oid' is not null or undefined
|
|
2705
|
+
if (auto_order_oid === null || auto_order_oid === undefined) {
|
|
2706
|
+
throw new RequiredError('auto_order_oid', 'Required parameter auto_order_oid was null or undefined when calling pauseAutoOrder.');
|
|
2707
|
+
}
|
|
2708
|
+
var localVarPath = "/auto_order/auto_orders/{auto_order_oid}/pause"
|
|
2709
|
+
.replace("{".concat("auto_order_oid", "}"), encodeURIComponent(String(auto_order_oid)));
|
|
2710
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
2711
|
+
var localVarRequestOptions = Object.assign({ method: 'PUT' }, options);
|
|
2712
|
+
var localVarHeaderParameter = {};
|
|
2713
|
+
var localVarQueryParameter = {};
|
|
2714
|
+
if (configuration && configuration.apiVersion) {
|
|
2715
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
2716
|
+
}
|
|
2717
|
+
// authentication ultraCartOauth required
|
|
2718
|
+
// oauth required
|
|
2719
|
+
if (configuration && configuration.accessToken) {
|
|
2720
|
+
var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
2721
|
+
? configuration.accessToken("ultraCartOauth", ["auto_order_write"])
|
|
2722
|
+
: configuration.accessToken;
|
|
2723
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
2724
|
+
}
|
|
2725
|
+
// authentication ultraCartSimpleApiKey required
|
|
2726
|
+
if (configuration && configuration.apiKey) {
|
|
2727
|
+
var localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
2728
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
2729
|
+
: configuration.apiKey;
|
|
2730
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
2731
|
+
}
|
|
2732
|
+
if (_expand !== undefined) {
|
|
2733
|
+
localVarQueryParameter['_expand'] = _expand;
|
|
2734
|
+
}
|
|
2735
|
+
localVarHeaderParameter['Content-Type'] = 'application/json; charset=UTF-8';
|
|
2736
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
2737
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
2738
|
+
delete localVarUrlObj.search;
|
|
2739
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
2740
|
+
var needsSerialization = ("AutoOrder" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
2741
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(auto_order || {}) : (auto_order || "");
|
|
2742
|
+
return {
|
|
2743
|
+
url: url.format(localVarUrlObj),
|
|
2744
|
+
options: localVarRequestOptions,
|
|
2745
|
+
};
|
|
2746
|
+
},
|
|
2689
2747
|
/**
|
|
2690
2748
|
* Update an auto order on the UltraCart account.
|
|
2691
2749
|
* @summary Update an auto order
|
|
@@ -3026,6 +3084,30 @@ var AutoOrderApiFp = function (configuration) {
|
|
|
3026
3084
|
});
|
|
3027
3085
|
};
|
|
3028
3086
|
},
|
|
3087
|
+
/**
|
|
3088
|
+
* Completely pause an auto order
|
|
3089
|
+
* @summary Pause auto order
|
|
3090
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
3091
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
3092
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
3093
|
+
* @param {*} [options] Override http request option.
|
|
3094
|
+
* @throws {RequiredError}
|
|
3095
|
+
*/
|
|
3096
|
+
pauseAutoOrder: function (auto_order, auto_order_oid, _expand, options) {
|
|
3097
|
+
var localVarFetchArgs = (0, exports.AutoOrderApiFetchParamCreator)(configuration).pauseAutoOrder(auto_order, auto_order_oid, _expand, options);
|
|
3098
|
+
return function (fetch, basePath) {
|
|
3099
|
+
if (fetch === void 0) { fetch = portableFetch; }
|
|
3100
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
3101
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
3102
|
+
if (response.status >= 200 && response.status < 300) {
|
|
3103
|
+
return response.json();
|
|
3104
|
+
}
|
|
3105
|
+
else {
|
|
3106
|
+
throw response;
|
|
3107
|
+
}
|
|
3108
|
+
});
|
|
3109
|
+
};
|
|
3110
|
+
},
|
|
3029
3111
|
/**
|
|
3030
3112
|
* Update an auto order on the UltraCart account.
|
|
3031
3113
|
* @summary Update an auto order
|
|
@@ -3198,6 +3280,18 @@ var AutoOrderApiFactory = function (configuration, fetch, basePath) {
|
|
|
3198
3280
|
getAutoOrdersByQuery: function (auto_order_query, _limit, _offset, _sort, _expand, options) {
|
|
3199
3281
|
return (0, exports.AutoOrderApiFp)(configuration).getAutoOrdersByQuery(auto_order_query, _limit, _offset, _sort, _expand, options)(fetch, basePath);
|
|
3200
3282
|
},
|
|
3283
|
+
/**
|
|
3284
|
+
* Completely pause an auto order
|
|
3285
|
+
* @summary Pause auto order
|
|
3286
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
3287
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
3288
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
3289
|
+
* @param {*} [options] Override http request option.
|
|
3290
|
+
* @throws {RequiredError}
|
|
3291
|
+
*/
|
|
3292
|
+
pauseAutoOrder: function (auto_order, auto_order_oid, _expand, options) {
|
|
3293
|
+
return (0, exports.AutoOrderApiFp)(configuration).pauseAutoOrder(auto_order, auto_order_oid, _expand, options)(fetch, basePath);
|
|
3294
|
+
},
|
|
3201
3295
|
/**
|
|
3202
3296
|
* Update an auto order on the UltraCart account.
|
|
3203
3297
|
* @summary Update an auto order
|
|
@@ -3359,6 +3453,19 @@ var AutoOrderApi = /** @class */ (function (_super) {
|
|
|
3359
3453
|
AutoOrderApi.prototype.getAutoOrdersByQuery = function (auto_order_query, _limit, _offset, _sort, _expand, options) {
|
|
3360
3454
|
return (0, exports.AutoOrderApiFp)(this.configuration).getAutoOrdersByQuery(auto_order_query, _limit, _offset, _sort, _expand, options)(this.fetch, this.basePath);
|
|
3361
3455
|
};
|
|
3456
|
+
/**
|
|
3457
|
+
* Completely pause an auto order
|
|
3458
|
+
* @summary Pause auto order
|
|
3459
|
+
* @param {AutoOrder} auto_order Auto orders to pause
|
|
3460
|
+
* @param {number} auto_order_oid The auto order oid to pause.
|
|
3461
|
+
* @param {string} [_expand] The object expansion to perform on the result. See documentation for examples
|
|
3462
|
+
* @param {*} [options] Override http request option.
|
|
3463
|
+
* @throws {RequiredError}
|
|
3464
|
+
* @memberof AutoOrderApi
|
|
3465
|
+
*/
|
|
3466
|
+
AutoOrderApi.prototype.pauseAutoOrder = function (auto_order, auto_order_oid, _expand, options) {
|
|
3467
|
+
return (0, exports.AutoOrderApiFp)(this.configuration).pauseAutoOrder(auto_order, auto_order_oid, _expand, options)(this.fetch, this.basePath);
|
|
3468
|
+
};
|
|
3362
3469
|
/**
|
|
3363
3470
|
* Update an auto order on the UltraCart account.
|
|
3364
3471
|
* @summary Update an auto order
|