ultracart_rest_api_v2_typescript 3.10.152 → 3.10.153
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 +3 -2
- package/api.ts +172 -0
- package/dist/api.d.ts +104 -0
- package/dist/api.js +91 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## ultracart_rest_api_v2_typescript@3.10.
|
|
1
|
+
## ultracart_rest_api_v2_typescript@3.10.153
|
|
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.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@3.10.153 --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.153 | 08/14/2023 | esp - expose rate limiter values in settings object |
|
|
57
58
|
| 3.10.152 | 07/27/2023 | dw bi - add settings to the report and page objects |
|
|
58
59
|
| 3.10.151 | 07/19/2023 | dw bi - add data_source_uuid to filter connection obj |
|
|
59
60
|
| 3.10.150 | 07/19/2023 | dw bi - add data_source_uuid to page visualization obj |
|
package/api.ts
CHANGED
|
@@ -18999,6 +18999,24 @@ export interface EmailSendingDomainsResponse {
|
|
|
18999
18999
|
* @interface EmailSettings
|
|
19000
19000
|
*/
|
|
19001
19001
|
export interface EmailSettings {
|
|
19002
|
+
/**
|
|
19003
|
+
* Emails per day allowed
|
|
19004
|
+
* @type {number}
|
|
19005
|
+
* @memberof EmailSettings
|
|
19006
|
+
*/
|
|
19007
|
+
emails_per_day?: number;
|
|
19008
|
+
/**
|
|
19009
|
+
* Emails per hour allowed
|
|
19010
|
+
* @type {number}
|
|
19011
|
+
* @memberof EmailSettings
|
|
19012
|
+
*/
|
|
19013
|
+
emails_per_hour?: number;
|
|
19014
|
+
/**
|
|
19015
|
+
* Emails per month allowed
|
|
19016
|
+
* @type {number}
|
|
19017
|
+
* @memberof EmailSettings
|
|
19018
|
+
*/
|
|
19019
|
+
emails_per_month?: number;
|
|
19002
19020
|
/**
|
|
19003
19021
|
*
|
|
19004
19022
|
* @type {string}
|
|
@@ -33135,6 +33153,52 @@ export interface OrderUtm {
|
|
|
33135
33153
|
wbraid?: string;
|
|
33136
33154
|
}
|
|
33137
33155
|
|
|
33156
|
+
/**
|
|
33157
|
+
*
|
|
33158
|
+
* @export
|
|
33159
|
+
* @interface OrderValidationRequest
|
|
33160
|
+
*/
|
|
33161
|
+
export interface OrderValidationRequest {
|
|
33162
|
+
/**
|
|
33163
|
+
* Checks to perform
|
|
33164
|
+
* @type {Array<string>}
|
|
33165
|
+
* @memberof OrderValidationRequest
|
|
33166
|
+
*/
|
|
33167
|
+
checks?: Array<string>;
|
|
33168
|
+
/**
|
|
33169
|
+
*
|
|
33170
|
+
* @type {Order}
|
|
33171
|
+
* @memberof OrderValidationRequest
|
|
33172
|
+
*/
|
|
33173
|
+
order?: Order;
|
|
33174
|
+
}
|
|
33175
|
+
|
|
33176
|
+
/**
|
|
33177
|
+
*
|
|
33178
|
+
* @export
|
|
33179
|
+
* @interface OrderValidationResponse
|
|
33180
|
+
*/
|
|
33181
|
+
export interface OrderValidationResponse {
|
|
33182
|
+
/**
|
|
33183
|
+
* Errors to display to the merchant if they failed any of the validations checked
|
|
33184
|
+
* @type {Array<string>}
|
|
33185
|
+
* @memberof OrderValidationResponse
|
|
33186
|
+
*/
|
|
33187
|
+
errors?: Array<string>;
|
|
33188
|
+
/**
|
|
33189
|
+
* Informational messages
|
|
33190
|
+
* @type {Array<string>}
|
|
33191
|
+
* @memberof OrderValidationResponse
|
|
33192
|
+
*/
|
|
33193
|
+
messages?: Array<string>;
|
|
33194
|
+
/**
|
|
33195
|
+
* If true, this order was updated during the validation call. This may happen during address standardization fixes.
|
|
33196
|
+
* @type {boolean}
|
|
33197
|
+
* @memberof OrderValidationResponse
|
|
33198
|
+
*/
|
|
33199
|
+
order_was_updated?: boolean;
|
|
33200
|
+
}
|
|
33201
|
+
|
|
33138
33202
|
/**
|
|
33139
33203
|
*
|
|
33140
33204
|
* @export
|
|
@@ -63117,6 +63181,61 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
|
|
|
63117
63181
|
const needsSerialization = (<any>"Order" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
63118
63182
|
localVarRequestOptions.body = needsSerialization ? JSON.stringify(order || {}) : (order || "");
|
|
63119
63183
|
|
|
63184
|
+
return {
|
|
63185
|
+
url: url.format(localVarUrlObj),
|
|
63186
|
+
options: localVarRequestOptions,
|
|
63187
|
+
};
|
|
63188
|
+
},
|
|
63189
|
+
/**
|
|
63190
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
63191
|
+
* @summary Validate
|
|
63192
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
63193
|
+
* @param {*} [options] Override http request option.
|
|
63194
|
+
* @throws {RequiredError}
|
|
63195
|
+
*/
|
|
63196
|
+
validateOrder(validation_request: OrderValidationRequest, options: any = {}): FetchArgs {
|
|
63197
|
+
// verify required parameter 'validation_request' is not null or undefined
|
|
63198
|
+
if (validation_request === null || validation_request === undefined) {
|
|
63199
|
+
throw new RequiredError('validation_request','Required parameter validation_request was null or undefined when calling validateOrder.');
|
|
63200
|
+
}
|
|
63201
|
+
const localVarPath = `/order/validate`;
|
|
63202
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
63203
|
+
const localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
63204
|
+
const localVarHeaderParameter = {} as any;
|
|
63205
|
+
const localVarQueryParameter = {} as any;
|
|
63206
|
+
|
|
63207
|
+
if(configuration && configuration.apiVersion) {
|
|
63208
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
63209
|
+
}
|
|
63210
|
+
|
|
63211
|
+
|
|
63212
|
+
|
|
63213
|
+
// authentication ultraCartOauth required
|
|
63214
|
+
// oauth required
|
|
63215
|
+
if (configuration && configuration.accessToken) {
|
|
63216
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
63217
|
+
? configuration.accessToken("ultraCartOauth", ["order_read", "order_write"])
|
|
63218
|
+
: configuration.accessToken;
|
|
63219
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
63220
|
+
}
|
|
63221
|
+
|
|
63222
|
+
// authentication ultraCartSimpleApiKey required
|
|
63223
|
+
if (configuration && configuration.apiKey) {
|
|
63224
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
63225
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
63226
|
+
: configuration.apiKey;
|
|
63227
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
63228
|
+
}
|
|
63229
|
+
|
|
63230
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
63231
|
+
|
|
63232
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
63233
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
63234
|
+
delete localVarUrlObj.search;
|
|
63235
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
63236
|
+
const needsSerialization = (<any>"OrderValidationRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
63237
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(validation_request || {}) : (validation_request || "");
|
|
63238
|
+
|
|
63120
63239
|
return {
|
|
63121
63240
|
url: url.format(localVarUrlObj),
|
|
63122
63241
|
options: localVarRequestOptions,
|
|
@@ -63733,6 +63852,27 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
|
63733
63852
|
});
|
|
63734
63853
|
};
|
|
63735
63854
|
},
|
|
63855
|
+
/**
|
|
63856
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
63857
|
+
* @summary Validate
|
|
63858
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
63859
|
+
* @param {*} [options] Override http request option.
|
|
63860
|
+
* @throws {RequiredError}
|
|
63861
|
+
*/
|
|
63862
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderValidationResponse> {
|
|
63863
|
+
const localVarFetchArgs = OrderApiFetchParamCreator(configuration).validateOrder(validation_request, options);
|
|
63864
|
+
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
|
63865
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
63866
|
+
|
|
63867
|
+
if (response.status >= 200 && response.status < 300) {
|
|
63868
|
+
return response.json();
|
|
63869
|
+
|
|
63870
|
+
} else {
|
|
63871
|
+
throw response;
|
|
63872
|
+
}
|
|
63873
|
+
});
|
|
63874
|
+
};
|
|
63875
|
+
},
|
|
63736
63876
|
}
|
|
63737
63877
|
};
|
|
63738
63878
|
|
|
@@ -64058,6 +64198,16 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
64058
64198
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any) {
|
|
64059
64199
|
return OrderApiFp(configuration).updateOrder(order, order_id, _expand, options)(fetch, basePath);
|
|
64060
64200
|
},
|
|
64201
|
+
/**
|
|
64202
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
64203
|
+
* @summary Validate
|
|
64204
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
64205
|
+
* @param {*} [options] Override http request option.
|
|
64206
|
+
* @throws {RequiredError}
|
|
64207
|
+
*/
|
|
64208
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any) {
|
|
64209
|
+
return OrderApiFp(configuration).validateOrder(validation_request, options)(fetch, basePath);
|
|
64210
|
+
},
|
|
64061
64211
|
};
|
|
64062
64212
|
};
|
|
64063
64213
|
|
|
@@ -64383,6 +64533,16 @@ export interface OrderApiInterface {
|
|
|
64383
64533
|
*/
|
|
64384
64534
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
64385
64535
|
|
|
64536
|
+
/**
|
|
64537
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
64538
|
+
* @summary Validate
|
|
64539
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
64540
|
+
* @param {*} [options] Override http request option.
|
|
64541
|
+
* @throws {RequiredError}
|
|
64542
|
+
* @memberof OrderApiInterface
|
|
64543
|
+
*/
|
|
64544
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): Promise<OrderValidationResponse>;
|
|
64545
|
+
|
|
64386
64546
|
}
|
|
64387
64547
|
|
|
64388
64548
|
/**
|
|
@@ -64760,6 +64920,18 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
64760
64920
|
return OrderApiFp(this.configuration).updateOrder(order, order_id, _expand, options)(this.fetch, this.basePath);
|
|
64761
64921
|
}
|
|
64762
64922
|
|
|
64923
|
+
/**
|
|
64924
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
64925
|
+
* @summary Validate
|
|
64926
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
64927
|
+
* @param {*} [options] Override http request option.
|
|
64928
|
+
* @throws {RequiredError}
|
|
64929
|
+
* @memberof OrderApi
|
|
64930
|
+
*/
|
|
64931
|
+
public validateOrder(validation_request: OrderValidationRequest, options?: any) {
|
|
64932
|
+
return OrderApiFp(this.configuration).validateOrder(validation_request, options)(this.fetch, this.basePath);
|
|
64933
|
+
}
|
|
64934
|
+
|
|
64763
64935
|
}
|
|
64764
64936
|
|
|
64765
64937
|
/**
|
package/dist/api.d.ts
CHANGED
|
@@ -18570,6 +18570,24 @@ export interface EmailSendingDomainsResponse {
|
|
|
18570
18570
|
* @interface EmailSettings
|
|
18571
18571
|
*/
|
|
18572
18572
|
export interface EmailSettings {
|
|
18573
|
+
/**
|
|
18574
|
+
* Emails per day allowed
|
|
18575
|
+
* @type {number}
|
|
18576
|
+
* @memberof EmailSettings
|
|
18577
|
+
*/
|
|
18578
|
+
emails_per_day?: number;
|
|
18579
|
+
/**
|
|
18580
|
+
* Emails per hour allowed
|
|
18581
|
+
* @type {number}
|
|
18582
|
+
* @memberof EmailSettings
|
|
18583
|
+
*/
|
|
18584
|
+
emails_per_hour?: number;
|
|
18585
|
+
/**
|
|
18586
|
+
* Emails per month allowed
|
|
18587
|
+
* @type {number}
|
|
18588
|
+
* @memberof EmailSettings
|
|
18589
|
+
*/
|
|
18590
|
+
emails_per_month?: number;
|
|
18573
18591
|
/**
|
|
18574
18592
|
*
|
|
18575
18593
|
* @type {string}
|
|
@@ -32444,6 +32462,50 @@ export interface OrderUtm {
|
|
|
32444
32462
|
*/
|
|
32445
32463
|
wbraid?: string;
|
|
32446
32464
|
}
|
|
32465
|
+
/**
|
|
32466
|
+
*
|
|
32467
|
+
* @export
|
|
32468
|
+
* @interface OrderValidationRequest
|
|
32469
|
+
*/
|
|
32470
|
+
export interface OrderValidationRequest {
|
|
32471
|
+
/**
|
|
32472
|
+
* Checks to perform
|
|
32473
|
+
* @type {Array<string>}
|
|
32474
|
+
* @memberof OrderValidationRequest
|
|
32475
|
+
*/
|
|
32476
|
+
checks?: Array<string>;
|
|
32477
|
+
/**
|
|
32478
|
+
*
|
|
32479
|
+
* @type {Order}
|
|
32480
|
+
* @memberof OrderValidationRequest
|
|
32481
|
+
*/
|
|
32482
|
+
order?: Order;
|
|
32483
|
+
}
|
|
32484
|
+
/**
|
|
32485
|
+
*
|
|
32486
|
+
* @export
|
|
32487
|
+
* @interface OrderValidationResponse
|
|
32488
|
+
*/
|
|
32489
|
+
export interface OrderValidationResponse {
|
|
32490
|
+
/**
|
|
32491
|
+
* Errors to display to the merchant if they failed any of the validations checked
|
|
32492
|
+
* @type {Array<string>}
|
|
32493
|
+
* @memberof OrderValidationResponse
|
|
32494
|
+
*/
|
|
32495
|
+
errors?: Array<string>;
|
|
32496
|
+
/**
|
|
32497
|
+
* Informational messages
|
|
32498
|
+
* @type {Array<string>}
|
|
32499
|
+
* @memberof OrderValidationResponse
|
|
32500
|
+
*/
|
|
32501
|
+
messages?: Array<string>;
|
|
32502
|
+
/**
|
|
32503
|
+
* If true, this order was updated during the validation call. This may happen during address standardization fixes.
|
|
32504
|
+
* @type {boolean}
|
|
32505
|
+
* @memberof OrderValidationResponse
|
|
32506
|
+
*/
|
|
32507
|
+
order_was_updated?: boolean;
|
|
32508
|
+
}
|
|
32447
32509
|
/**
|
|
32448
32510
|
*
|
|
32449
32511
|
* @export
|
|
@@ -48674,6 +48736,14 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
|
|
|
48674
48736
|
* @throws {RequiredError}
|
|
48675
48737
|
*/
|
|
48676
48738
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any): FetchArgs;
|
|
48739
|
+
/**
|
|
48740
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
48741
|
+
* @summary Validate
|
|
48742
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
48743
|
+
* @param {*} [options] Override http request option.
|
|
48744
|
+
* @throws {RequiredError}
|
|
48745
|
+
*/
|
|
48746
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): FetchArgs;
|
|
48677
48747
|
};
|
|
48678
48748
|
/**
|
|
48679
48749
|
* OrderApi - functional programming interface
|
|
@@ -48944,6 +49014,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
|
48944
49014
|
* @throws {RequiredError}
|
|
48945
49015
|
*/
|
|
48946
49016
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse>;
|
|
49017
|
+
/**
|
|
49018
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
49019
|
+
* @summary Validate
|
|
49020
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
49021
|
+
* @param {*} [options] Override http request option.
|
|
49022
|
+
* @throws {RequiredError}
|
|
49023
|
+
*/
|
|
49024
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderValidationResponse>;
|
|
48947
49025
|
};
|
|
48948
49026
|
/**
|
|
48949
49027
|
* OrderApi - factory interface
|
|
@@ -49214,6 +49292,14 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
|
|
|
49214
49292
|
* @throws {RequiredError}
|
|
49215
49293
|
*/
|
|
49216
49294
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
49295
|
+
/**
|
|
49296
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
49297
|
+
* @summary Validate
|
|
49298
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
49299
|
+
* @param {*} [options] Override http request option.
|
|
49300
|
+
* @throws {RequiredError}
|
|
49301
|
+
*/
|
|
49302
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): Promise<OrderValidationResponse>;
|
|
49217
49303
|
};
|
|
49218
49304
|
/**
|
|
49219
49305
|
* OrderApi - interface
|
|
@@ -49511,6 +49597,15 @@ export interface OrderApiInterface {
|
|
|
49511
49597
|
* @memberof OrderApiInterface
|
|
49512
49598
|
*/
|
|
49513
49599
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
49600
|
+
/**
|
|
49601
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
49602
|
+
* @summary Validate
|
|
49603
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
49604
|
+
* @param {*} [options] Override http request option.
|
|
49605
|
+
* @throws {RequiredError}
|
|
49606
|
+
* @memberof OrderApiInterface
|
|
49607
|
+
*/
|
|
49608
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): Promise<OrderValidationResponse>;
|
|
49514
49609
|
}
|
|
49515
49610
|
/**
|
|
49516
49611
|
* OrderApi - object-oriented interface
|
|
@@ -49809,6 +49904,15 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
49809
49904
|
* @memberof OrderApi
|
|
49810
49905
|
*/
|
|
49811
49906
|
updateOrder(order: Order, order_id: string, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
49907
|
+
/**
|
|
49908
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
49909
|
+
* @summary Validate
|
|
49910
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
49911
|
+
* @param {*} [options] Override http request option.
|
|
49912
|
+
* @throws {RequiredError}
|
|
49913
|
+
* @memberof OrderApi
|
|
49914
|
+
*/
|
|
49915
|
+
validateOrder(validation_request: OrderValidationRequest, options?: any): Promise<OrderValidationResponse>;
|
|
49812
49916
|
}
|
|
49813
49917
|
/**
|
|
49814
49918
|
* SsoApi - fetch parameter creator
|
package/dist/api.js
CHANGED
|
@@ -20587,6 +20587,54 @@ var OrderApiFetchParamCreator = function (configuration) {
|
|
|
20587
20587
|
options: localVarRequestOptions,
|
|
20588
20588
|
};
|
|
20589
20589
|
},
|
|
20590
|
+
/**
|
|
20591
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
20592
|
+
* @summary Validate
|
|
20593
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
20594
|
+
* @param {*} [options] Override http request option.
|
|
20595
|
+
* @throws {RequiredError}
|
|
20596
|
+
*/
|
|
20597
|
+
validateOrder: function (validation_request, options) {
|
|
20598
|
+
if (options === void 0) { options = {}; }
|
|
20599
|
+
// verify required parameter 'validation_request' is not null or undefined
|
|
20600
|
+
if (validation_request === null || validation_request === undefined) {
|
|
20601
|
+
throw new RequiredError('validation_request', 'Required parameter validation_request was null or undefined when calling validateOrder.');
|
|
20602
|
+
}
|
|
20603
|
+
var localVarPath = "/order/validate";
|
|
20604
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
20605
|
+
var localVarRequestOptions = Object.assign({ method: 'POST' }, options);
|
|
20606
|
+
var localVarHeaderParameter = {};
|
|
20607
|
+
var localVarQueryParameter = {};
|
|
20608
|
+
if (configuration && configuration.apiVersion) {
|
|
20609
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
20610
|
+
}
|
|
20611
|
+
// authentication ultraCartOauth required
|
|
20612
|
+
// oauth required
|
|
20613
|
+
if (configuration && configuration.accessToken) {
|
|
20614
|
+
var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
20615
|
+
? configuration.accessToken("ultraCartOauth", ["order_read", "order_write"])
|
|
20616
|
+
: configuration.accessToken;
|
|
20617
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
20618
|
+
}
|
|
20619
|
+
// authentication ultraCartSimpleApiKey required
|
|
20620
|
+
if (configuration && configuration.apiKey) {
|
|
20621
|
+
var localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
20622
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
20623
|
+
: configuration.apiKey;
|
|
20624
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
20625
|
+
}
|
|
20626
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
20627
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
20628
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
20629
|
+
delete localVarUrlObj.search;
|
|
20630
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
20631
|
+
var needsSerialization = ("OrderValidationRequest" !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
|
|
20632
|
+
localVarRequestOptions.body = needsSerialization ? JSON.stringify(validation_request || {}) : (validation_request || "");
|
|
20633
|
+
return {
|
|
20634
|
+
url: url.format(localVarUrlObj),
|
|
20635
|
+
options: localVarRequestOptions,
|
|
20636
|
+
};
|
|
20637
|
+
},
|
|
20590
20638
|
};
|
|
20591
20639
|
};
|
|
20592
20640
|
exports.OrderApiFetchParamCreator = OrderApiFetchParamCreator;
|
|
@@ -21224,6 +21272,28 @@ var OrderApiFp = function (configuration) {
|
|
|
21224
21272
|
});
|
|
21225
21273
|
};
|
|
21226
21274
|
},
|
|
21275
|
+
/**
|
|
21276
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
21277
|
+
* @summary Validate
|
|
21278
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
21279
|
+
* @param {*} [options] Override http request option.
|
|
21280
|
+
* @throws {RequiredError}
|
|
21281
|
+
*/
|
|
21282
|
+
validateOrder: function (validation_request, options) {
|
|
21283
|
+
var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).validateOrder(validation_request, options);
|
|
21284
|
+
return function (fetch, basePath) {
|
|
21285
|
+
if (fetch === void 0) { fetch = portableFetch; }
|
|
21286
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
21287
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
21288
|
+
if (response.status >= 200 && response.status < 300) {
|
|
21289
|
+
return response.json();
|
|
21290
|
+
}
|
|
21291
|
+
else {
|
|
21292
|
+
throw response;
|
|
21293
|
+
}
|
|
21294
|
+
});
|
|
21295
|
+
};
|
|
21296
|
+
},
|
|
21227
21297
|
};
|
|
21228
21298
|
};
|
|
21229
21299
|
exports.OrderApiFp = OrderApiFp;
|
|
@@ -21549,6 +21619,16 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
|
|
|
21549
21619
|
updateOrder: function (order, order_id, _expand, options) {
|
|
21550
21620
|
return (0, exports.OrderApiFp)(configuration).updateOrder(order, order_id, _expand, options)(fetch, basePath);
|
|
21551
21621
|
},
|
|
21622
|
+
/**
|
|
21623
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
21624
|
+
* @summary Validate
|
|
21625
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
21626
|
+
* @param {*} [options] Override http request option.
|
|
21627
|
+
* @throws {RequiredError}
|
|
21628
|
+
*/
|
|
21629
|
+
validateOrder: function (validation_request, options) {
|
|
21630
|
+
return (0, exports.OrderApiFp)(configuration).validateOrder(validation_request, options)(fetch, basePath);
|
|
21631
|
+
},
|
|
21552
21632
|
};
|
|
21553
21633
|
};
|
|
21554
21634
|
exports.OrderApiFactory = OrderApiFactory;
|
|
@@ -21905,6 +21985,17 @@ var OrderApi = /** @class */ (function (_super) {
|
|
|
21905
21985
|
OrderApi.prototype.updateOrder = function (order, order_id, _expand, options) {
|
|
21906
21986
|
return (0, exports.OrderApiFp)(this.configuration).updateOrder(order, order_id, _expand, options)(this.fetch, this.basePath);
|
|
21907
21987
|
};
|
|
21988
|
+
/**
|
|
21989
|
+
* Validate the order for errors. Specific checks can be passed to fine tune what is validated. Read and write permissions are required because the validate method may fix obvious address issues automatically which require update permission.This rest call makes use of the built-in translation of rest objects to UltraCart internal objects which also contains a multitude of validation checks that cannot be trapped. Therefore any time this call is made, you should also trap api exceptions and examine their content because it may contain validation issues. So check the response object and trap any exceptions.
|
|
21990
|
+
* @summary Validate
|
|
21991
|
+
* @param {OrderValidationRequest} validation_request Validation request
|
|
21992
|
+
* @param {*} [options] Override http request option.
|
|
21993
|
+
* @throws {RequiredError}
|
|
21994
|
+
* @memberof OrderApi
|
|
21995
|
+
*/
|
|
21996
|
+
OrderApi.prototype.validateOrder = function (validation_request, options) {
|
|
21997
|
+
return (0, exports.OrderApiFp)(this.configuration).validateOrder(validation_request, options)(this.fetch, this.basePath);
|
|
21998
|
+
};
|
|
21908
21999
|
return OrderApi;
|
|
21909
22000
|
}(BaseAPI));
|
|
21910
22001
|
exports.OrderApi = OrderApi;
|