ultracart_rest_api_v2_typescript 3.10.64 → 3.10.66
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 +186 -1
- package/dist/api.d.ts +120 -1
- 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.66
|
|
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.66 --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.10.66 | 11/15/2022 | conversations - enw events for add coupon and items |
|
|
58
|
+
| 3.10.65 | 11/15/2022 | order api new method is order refundable |
|
|
57
59
|
| 3.10.64 | 11/15/2022 | increase order property length to 10k char |
|
|
58
60
|
| 3.10.63 | 11/14/2022 | conversations - add allowed values for update agent status |
|
|
59
61
|
| 3.10.62 | 11/09/2022 | conversations - add an enum of event typing |
|
package/api.ts
CHANGED
|
@@ -6490,6 +6490,34 @@ export interface ConversationAgentAuthResponse {
|
|
|
6490
6490
|
warning?: Warning;
|
|
6491
6491
|
}
|
|
6492
6492
|
|
|
6493
|
+
/**
|
|
6494
|
+
*
|
|
6495
|
+
* @export
|
|
6496
|
+
* @interface ConversationEventAddCoupon
|
|
6497
|
+
*/
|
|
6498
|
+
export interface ConversationEventAddCoupon {
|
|
6499
|
+
/**
|
|
6500
|
+
*
|
|
6501
|
+
* @type {string}
|
|
6502
|
+
* @memberof ConversationEventAddCoupon
|
|
6503
|
+
*/
|
|
6504
|
+
coupon_code?: string;
|
|
6505
|
+
}
|
|
6506
|
+
|
|
6507
|
+
/**
|
|
6508
|
+
*
|
|
6509
|
+
* @export
|
|
6510
|
+
* @interface ConversationEventAddItem
|
|
6511
|
+
*/
|
|
6512
|
+
export interface ConversationEventAddItem {
|
|
6513
|
+
/**
|
|
6514
|
+
*
|
|
6515
|
+
* @type {string}
|
|
6516
|
+
* @memberof ConversationEventAddItem
|
|
6517
|
+
*/
|
|
6518
|
+
item_id?: string;
|
|
6519
|
+
}
|
|
6520
|
+
|
|
6493
6521
|
/**
|
|
6494
6522
|
*
|
|
6495
6523
|
* @export
|
|
@@ -7423,6 +7451,18 @@ export interface ConversationWebsocketMessage {
|
|
|
7423
7451
|
* @memberof ConversationWebsocketMessage
|
|
7424
7452
|
*/
|
|
7425
7453
|
conversation_uuid?: string;
|
|
7454
|
+
/**
|
|
7455
|
+
*
|
|
7456
|
+
* @type {ConversationEventAddCoupon}
|
|
7457
|
+
* @memberof ConversationWebsocketMessage
|
|
7458
|
+
*/
|
|
7459
|
+
event_add_coupon?: ConversationEventAddCoupon;
|
|
7460
|
+
/**
|
|
7461
|
+
*
|
|
7462
|
+
* @type {ConversationEventAddItem}
|
|
7463
|
+
* @memberof ConversationWebsocketMessage
|
|
7464
|
+
*/
|
|
7465
|
+
event_add_item?: ConversationEventAddItem;
|
|
7426
7466
|
/**
|
|
7427
7467
|
*
|
|
7428
7468
|
* @type {ConversationSummary}
|
|
@@ -7523,7 +7563,9 @@ export namespace ConversationWebsocketMessage {
|
|
|
7523
7563
|
Rrweb = <any> 'rrweb',
|
|
7524
7564
|
ParticipantUpdate = <any> 'participant update',
|
|
7525
7565
|
ReadMessage = <any> 'read message',
|
|
7526
|
-
Typing = <any> 'typing'
|
|
7566
|
+
Typing = <any> 'typing',
|
|
7567
|
+
AddCoupon = <any> 'add coupon',
|
|
7568
|
+
AddItem = <any> 'add item'
|
|
7527
7569
|
}
|
|
7528
7570
|
/**
|
|
7529
7571
|
* @export
|
|
@@ -28951,6 +28993,44 @@ export interface OrderQuote {
|
|
|
28951
28993
|
quoted_dts?: string;
|
|
28952
28994
|
}
|
|
28953
28995
|
|
|
28996
|
+
/**
|
|
28997
|
+
*
|
|
28998
|
+
* @export
|
|
28999
|
+
* @interface OrderRefundableResponse
|
|
29000
|
+
*/
|
|
29001
|
+
export interface OrderRefundableResponse {
|
|
29002
|
+
/**
|
|
29003
|
+
*
|
|
29004
|
+
* @type {ModelError}
|
|
29005
|
+
* @memberof OrderRefundableResponse
|
|
29006
|
+
*/
|
|
29007
|
+
error?: ModelError;
|
|
29008
|
+
/**
|
|
29009
|
+
*
|
|
29010
|
+
* @type {ResponseMetadata}
|
|
29011
|
+
* @memberof OrderRefundableResponse
|
|
29012
|
+
*/
|
|
29013
|
+
metadata?: ResponseMetadata;
|
|
29014
|
+
/**
|
|
29015
|
+
* Whether the order is refundable or not. Null should be interpreted as false.
|
|
29016
|
+
* @type {boolean}
|
|
29017
|
+
* @memberof OrderRefundableResponse
|
|
29018
|
+
*/
|
|
29019
|
+
refundable?: boolean;
|
|
29020
|
+
/**
|
|
29021
|
+
* Indicates if API call was successful
|
|
29022
|
+
* @type {boolean}
|
|
29023
|
+
* @memberof OrderRefundableResponse
|
|
29024
|
+
*/
|
|
29025
|
+
success?: boolean;
|
|
29026
|
+
/**
|
|
29027
|
+
*
|
|
29028
|
+
* @type {Warning}
|
|
29029
|
+
* @memberof OrderRefundableResponse
|
|
29030
|
+
*/
|
|
29031
|
+
warning?: Warning;
|
|
29032
|
+
}
|
|
29033
|
+
|
|
28954
29034
|
/**
|
|
28955
29035
|
*
|
|
28956
29036
|
* @export
|
|
@@ -52684,6 +52764,58 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
|
|
|
52684
52764
|
options: localVarRequestOptions,
|
|
52685
52765
|
};
|
|
52686
52766
|
},
|
|
52767
|
+
/**
|
|
52768
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
52769
|
+
* @summary Determine if an order can be refunded
|
|
52770
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
52771
|
+
* @param {*} [options] Override http request option.
|
|
52772
|
+
* @throws {RequiredError}
|
|
52773
|
+
*/
|
|
52774
|
+
isRefundableOrder(order_id: string, options: any = {}): FetchArgs {
|
|
52775
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
52776
|
+
if (order_id === null || order_id === undefined) {
|
|
52777
|
+
throw new RequiredError('order_id','Required parameter order_id was null or undefined when calling isRefundableOrder.');
|
|
52778
|
+
}
|
|
52779
|
+
const localVarPath = `/order/orders/{order_id}/refundable`
|
|
52780
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
52781
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
52782
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
52783
|
+
const localVarHeaderParameter = {} as any;
|
|
52784
|
+
const localVarQueryParameter = {} as any;
|
|
52785
|
+
|
|
52786
|
+
if(configuration && configuration.apiVersion) {
|
|
52787
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
52788
|
+
}
|
|
52789
|
+
|
|
52790
|
+
|
|
52791
|
+
|
|
52792
|
+
// authentication ultraCartOauth required
|
|
52793
|
+
// oauth required
|
|
52794
|
+
if (configuration && configuration.accessToken) {
|
|
52795
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
52796
|
+
? configuration.accessToken("ultraCartOauth", ["order_write"])
|
|
52797
|
+
: configuration.accessToken;
|
|
52798
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
52799
|
+
}
|
|
52800
|
+
|
|
52801
|
+
// authentication ultraCartSimpleApiKey required
|
|
52802
|
+
if (configuration && configuration.apiKey) {
|
|
52803
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
52804
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
52805
|
+
: configuration.apiKey;
|
|
52806
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
52807
|
+
}
|
|
52808
|
+
|
|
52809
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
52810
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
52811
|
+
delete localVarUrlObj.search;
|
|
52812
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
52813
|
+
|
|
52814
|
+
return {
|
|
52815
|
+
url: url.format(localVarUrlObj),
|
|
52816
|
+
options: localVarRequestOptions,
|
|
52817
|
+
};
|
|
52818
|
+
},
|
|
52687
52819
|
/**
|
|
52688
52820
|
* Process payment on order
|
|
52689
52821
|
* @summary Process payment
|
|
@@ -53514,6 +53646,27 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
|
53514
53646
|
});
|
|
53515
53647
|
};
|
|
53516
53648
|
},
|
|
53649
|
+
/**
|
|
53650
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
53651
|
+
* @summary Determine if an order can be refunded
|
|
53652
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
53653
|
+
* @param {*} [options] Override http request option.
|
|
53654
|
+
* @throws {RequiredError}
|
|
53655
|
+
*/
|
|
53656
|
+
isRefundableOrder(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderRefundableResponse> {
|
|
53657
|
+
const localVarFetchArgs = OrderApiFetchParamCreator(configuration).isRefundableOrder(order_id, options);
|
|
53658
|
+
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
|
53659
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
53660
|
+
|
|
53661
|
+
if (response.status >= 200 && response.status < 300) {
|
|
53662
|
+
return response.json();
|
|
53663
|
+
|
|
53664
|
+
} else {
|
|
53665
|
+
throw response;
|
|
53666
|
+
}
|
|
53667
|
+
});
|
|
53668
|
+
};
|
|
53669
|
+
},
|
|
53517
53670
|
/**
|
|
53518
53671
|
* Process payment on order
|
|
53519
53672
|
* @summary Process payment
|
|
@@ -53884,6 +54037,16 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
53884
54037
|
insertOrder(order: Order, _expand?: string, options?: any) {
|
|
53885
54038
|
return OrderApiFp(configuration).insertOrder(order, _expand, options)(fetch, basePath);
|
|
53886
54039
|
},
|
|
54040
|
+
/**
|
|
54041
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
54042
|
+
* @summary Determine if an order can be refunded
|
|
54043
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
54044
|
+
* @param {*} [options] Override http request option.
|
|
54045
|
+
* @throws {RequiredError}
|
|
54046
|
+
*/
|
|
54047
|
+
isRefundableOrder(order_id: string, options?: any) {
|
|
54048
|
+
return OrderApiFp(configuration).isRefundableOrder(order_id, options)(fetch, basePath);
|
|
54049
|
+
},
|
|
53887
54050
|
/**
|
|
53888
54051
|
* Process payment on order
|
|
53889
54052
|
* @summary Process payment
|
|
@@ -54177,6 +54340,16 @@ export interface OrderApiInterface {
|
|
|
54177
54340
|
*/
|
|
54178
54341
|
insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
54179
54342
|
|
|
54343
|
+
/**
|
|
54344
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
54345
|
+
* @summary Determine if an order can be refunded
|
|
54346
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
54347
|
+
* @param {*} [options] Override http request option.
|
|
54348
|
+
* @throws {RequiredError}
|
|
54349
|
+
* @memberof OrderApiInterface
|
|
54350
|
+
*/
|
|
54351
|
+
isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
|
|
54352
|
+
|
|
54180
54353
|
/**
|
|
54181
54354
|
* Process payment on order
|
|
54182
54355
|
* @summary Process payment
|
|
@@ -54502,6 +54675,18 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
54502
54675
|
return OrderApiFp(this.configuration).insertOrder(order, _expand, options)(this.fetch, this.basePath);
|
|
54503
54676
|
}
|
|
54504
54677
|
|
|
54678
|
+
/**
|
|
54679
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
54680
|
+
* @summary Determine if an order can be refunded
|
|
54681
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
54682
|
+
* @param {*} [options] Override http request option.
|
|
54683
|
+
* @throws {RequiredError}
|
|
54684
|
+
* @memberof OrderApi
|
|
54685
|
+
*/
|
|
54686
|
+
public isRefundableOrder(order_id: string, options?: any) {
|
|
54687
|
+
return OrderApiFp(this.configuration).isRefundableOrder(order_id, options)(this.fetch, this.basePath);
|
|
54688
|
+
}
|
|
54689
|
+
|
|
54505
54690
|
/**
|
|
54506
54691
|
* Process payment on order
|
|
54507
54692
|
* @summary Process payment
|
package/dist/api.d.ts
CHANGED
|
@@ -6339,6 +6339,32 @@ export interface ConversationAgentAuthResponse {
|
|
|
6339
6339
|
*/
|
|
6340
6340
|
warning?: Warning;
|
|
6341
6341
|
}
|
|
6342
|
+
/**
|
|
6343
|
+
*
|
|
6344
|
+
* @export
|
|
6345
|
+
* @interface ConversationEventAddCoupon
|
|
6346
|
+
*/
|
|
6347
|
+
export interface ConversationEventAddCoupon {
|
|
6348
|
+
/**
|
|
6349
|
+
*
|
|
6350
|
+
* @type {string}
|
|
6351
|
+
* @memberof ConversationEventAddCoupon
|
|
6352
|
+
*/
|
|
6353
|
+
coupon_code?: string;
|
|
6354
|
+
}
|
|
6355
|
+
/**
|
|
6356
|
+
*
|
|
6357
|
+
* @export
|
|
6358
|
+
* @interface ConversationEventAddItem
|
|
6359
|
+
*/
|
|
6360
|
+
export interface ConversationEventAddItem {
|
|
6361
|
+
/**
|
|
6362
|
+
*
|
|
6363
|
+
* @type {string}
|
|
6364
|
+
* @memberof ConversationEventAddItem
|
|
6365
|
+
*/
|
|
6366
|
+
item_id?: string;
|
|
6367
|
+
}
|
|
6342
6368
|
/**
|
|
6343
6369
|
*
|
|
6344
6370
|
* @export
|
|
@@ -7246,6 +7272,18 @@ export interface ConversationWebsocketMessage {
|
|
|
7246
7272
|
* @memberof ConversationWebsocketMessage
|
|
7247
7273
|
*/
|
|
7248
7274
|
conversation_uuid?: string;
|
|
7275
|
+
/**
|
|
7276
|
+
*
|
|
7277
|
+
* @type {ConversationEventAddCoupon}
|
|
7278
|
+
* @memberof ConversationWebsocketMessage
|
|
7279
|
+
*/
|
|
7280
|
+
event_add_coupon?: ConversationEventAddCoupon;
|
|
7281
|
+
/**
|
|
7282
|
+
*
|
|
7283
|
+
* @type {ConversationEventAddItem}
|
|
7284
|
+
* @memberof ConversationWebsocketMessage
|
|
7285
|
+
*/
|
|
7286
|
+
event_add_item?: ConversationEventAddItem;
|
|
7249
7287
|
/**
|
|
7250
7288
|
*
|
|
7251
7289
|
* @type {ConversationSummary}
|
|
@@ -7345,7 +7383,9 @@ export declare namespace ConversationWebsocketMessage {
|
|
|
7345
7383
|
Rrweb,
|
|
7346
7384
|
ParticipantUpdate,
|
|
7347
7385
|
ReadMessage,
|
|
7348
|
-
Typing
|
|
7386
|
+
Typing,
|
|
7387
|
+
AddCoupon,
|
|
7388
|
+
AddItem
|
|
7349
7389
|
}
|
|
7350
7390
|
/**
|
|
7351
7391
|
* @export
|
|
@@ -28344,6 +28384,43 @@ export interface OrderQuote {
|
|
|
28344
28384
|
*/
|
|
28345
28385
|
quoted_dts?: string;
|
|
28346
28386
|
}
|
|
28387
|
+
/**
|
|
28388
|
+
*
|
|
28389
|
+
* @export
|
|
28390
|
+
* @interface OrderRefundableResponse
|
|
28391
|
+
*/
|
|
28392
|
+
export interface OrderRefundableResponse {
|
|
28393
|
+
/**
|
|
28394
|
+
*
|
|
28395
|
+
* @type {ModelError}
|
|
28396
|
+
* @memberof OrderRefundableResponse
|
|
28397
|
+
*/
|
|
28398
|
+
error?: ModelError;
|
|
28399
|
+
/**
|
|
28400
|
+
*
|
|
28401
|
+
* @type {ResponseMetadata}
|
|
28402
|
+
* @memberof OrderRefundableResponse
|
|
28403
|
+
*/
|
|
28404
|
+
metadata?: ResponseMetadata;
|
|
28405
|
+
/**
|
|
28406
|
+
* Whether the order is refundable or not. Null should be interpreted as false.
|
|
28407
|
+
* @type {boolean}
|
|
28408
|
+
* @memberof OrderRefundableResponse
|
|
28409
|
+
*/
|
|
28410
|
+
refundable?: boolean;
|
|
28411
|
+
/**
|
|
28412
|
+
* Indicates if API call was successful
|
|
28413
|
+
* @type {boolean}
|
|
28414
|
+
* @memberof OrderRefundableResponse
|
|
28415
|
+
*/
|
|
28416
|
+
success?: boolean;
|
|
28417
|
+
/**
|
|
28418
|
+
*
|
|
28419
|
+
* @type {Warning}
|
|
28420
|
+
* @memberof OrderRefundableResponse
|
|
28421
|
+
*/
|
|
28422
|
+
warning?: Warning;
|
|
28423
|
+
}
|
|
28347
28424
|
/**
|
|
28348
28425
|
*
|
|
28349
28426
|
* @export
|
|
@@ -41860,6 +41937,14 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
|
|
|
41860
41937
|
* @throws {RequiredError}
|
|
41861
41938
|
*/
|
|
41862
41939
|
insertOrder(order: Order, _expand?: string, options?: any): FetchArgs;
|
|
41940
|
+
/**
|
|
41941
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
41942
|
+
* @summary Determine if an order can be refunded
|
|
41943
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
41944
|
+
* @param {*} [options] Override http request option.
|
|
41945
|
+
* @throws {RequiredError}
|
|
41946
|
+
*/
|
|
41947
|
+
isRefundableOrder(order_id: string, options?: any): FetchArgs;
|
|
41863
41948
|
/**
|
|
41864
41949
|
* Process payment on order
|
|
41865
41950
|
* @summary Process payment
|
|
@@ -42104,6 +42189,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
|
42104
42189
|
* @throws {RequiredError}
|
|
42105
42190
|
*/
|
|
42106
42191
|
insertOrder(order: Order, _expand?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderResponse>;
|
|
42192
|
+
/**
|
|
42193
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
42194
|
+
* @summary Determine if an order can be refunded
|
|
42195
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
42196
|
+
* @param {*} [options] Override http request option.
|
|
42197
|
+
* @throws {RequiredError}
|
|
42198
|
+
*/
|
|
42199
|
+
isRefundableOrder(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderRefundableResponse>;
|
|
42107
42200
|
/**
|
|
42108
42201
|
* Process payment on order
|
|
42109
42202
|
* @summary Process payment
|
|
@@ -42348,6 +42441,14 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
|
|
|
42348
42441
|
* @throws {RequiredError}
|
|
42349
42442
|
*/
|
|
42350
42443
|
insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
42444
|
+
/**
|
|
42445
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
42446
|
+
* @summary Determine if an order can be refunded
|
|
42447
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
42448
|
+
* @param {*} [options] Override http request option.
|
|
42449
|
+
* @throws {RequiredError}
|
|
42450
|
+
*/
|
|
42451
|
+
isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
|
|
42351
42452
|
/**
|
|
42352
42453
|
* Process payment on order
|
|
42353
42454
|
* @summary Process payment
|
|
@@ -42609,6 +42710,15 @@ export interface OrderApiInterface {
|
|
|
42609
42710
|
* @memberof OrderApiInterface
|
|
42610
42711
|
*/
|
|
42611
42712
|
insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
42713
|
+
/**
|
|
42714
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
42715
|
+
* @summary Determine if an order can be refunded
|
|
42716
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
42717
|
+
* @param {*} [options] Override http request option.
|
|
42718
|
+
* @throws {RequiredError}
|
|
42719
|
+
* @memberof OrderApiInterface
|
|
42720
|
+
*/
|
|
42721
|
+
isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
|
|
42612
42722
|
/**
|
|
42613
42723
|
* Process payment on order
|
|
42614
42724
|
* @summary Process payment
|
|
@@ -42878,6 +42988,15 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
42878
42988
|
* @memberof OrderApi
|
|
42879
42989
|
*/
|
|
42880
42990
|
insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
42991
|
+
/**
|
|
42992
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
42993
|
+
* @summary Determine if an order can be refunded
|
|
42994
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
42995
|
+
* @param {*} [options] Override http request option.
|
|
42996
|
+
* @throws {RequiredError}
|
|
42997
|
+
* @memberof OrderApi
|
|
42998
|
+
*/
|
|
42999
|
+
isRefundableOrder(order_id: string, options?: any): Promise<OrderRefundableResponse>;
|
|
42881
43000
|
/**
|
|
42882
43001
|
* Process payment on order
|
|
42883
43002
|
* @summary Process payment
|
package/dist/api.js
CHANGED
|
@@ -505,6 +505,8 @@ var ConversationWebsocketMessage;
|
|
|
505
505
|
EventTypeEnum[EventTypeEnum["ParticipantUpdate"] = 'participant update'] = "ParticipantUpdate";
|
|
506
506
|
EventTypeEnum[EventTypeEnum["ReadMessage"] = 'read message'] = "ReadMessage";
|
|
507
507
|
EventTypeEnum[EventTypeEnum["Typing"] = 'typing'] = "Typing";
|
|
508
|
+
EventTypeEnum[EventTypeEnum["AddCoupon"] = 'add coupon'] = "AddCoupon";
|
|
509
|
+
EventTypeEnum[EventTypeEnum["AddItem"] = 'add item'] = "AddItem";
|
|
508
510
|
})(EventTypeEnum = ConversationWebsocketMessage.EventTypeEnum || (ConversationWebsocketMessage.EventTypeEnum = {}));
|
|
509
511
|
/**
|
|
510
512
|
* @export
|
|
@@ -15396,6 +15398,52 @@ var OrderApiFetchParamCreator = function (configuration) {
|
|
|
15396
15398
|
options: localVarRequestOptions,
|
|
15397
15399
|
};
|
|
15398
15400
|
},
|
|
15401
|
+
/**
|
|
15402
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
15403
|
+
* @summary Determine if an order can be refunded
|
|
15404
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
15405
|
+
* @param {*} [options] Override http request option.
|
|
15406
|
+
* @throws {RequiredError}
|
|
15407
|
+
*/
|
|
15408
|
+
isRefundableOrder: function (order_id, options) {
|
|
15409
|
+
if (options === void 0) { options = {}; }
|
|
15410
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
15411
|
+
if (order_id === null || order_id === undefined) {
|
|
15412
|
+
throw new RequiredError('order_id', 'Required parameter order_id was null or undefined when calling isRefundableOrder.');
|
|
15413
|
+
}
|
|
15414
|
+
var localVarPath = "/order/orders/{order_id}/refundable"
|
|
15415
|
+
.replace("{".concat("order_id", "}"), encodeURIComponent(String(order_id)));
|
|
15416
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
15417
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
15418
|
+
var localVarHeaderParameter = {};
|
|
15419
|
+
var localVarQueryParameter = {};
|
|
15420
|
+
if (configuration && configuration.apiVersion) {
|
|
15421
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
15422
|
+
}
|
|
15423
|
+
// authentication ultraCartOauth required
|
|
15424
|
+
// oauth required
|
|
15425
|
+
if (configuration && configuration.accessToken) {
|
|
15426
|
+
var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
15427
|
+
? configuration.accessToken("ultraCartOauth", ["order_write"])
|
|
15428
|
+
: configuration.accessToken;
|
|
15429
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
15430
|
+
}
|
|
15431
|
+
// authentication ultraCartSimpleApiKey required
|
|
15432
|
+
if (configuration && configuration.apiKey) {
|
|
15433
|
+
var localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
15434
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
15435
|
+
: configuration.apiKey;
|
|
15436
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
15437
|
+
}
|
|
15438
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
15439
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
15440
|
+
delete localVarUrlObj.search;
|
|
15441
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
15442
|
+
return {
|
|
15443
|
+
url: url.format(localVarUrlObj),
|
|
15444
|
+
options: localVarRequestOptions,
|
|
15445
|
+
};
|
|
15446
|
+
},
|
|
15399
15447
|
/**
|
|
15400
15448
|
* Process payment on order
|
|
15401
15449
|
* @summary Process payment
|
|
@@ -16187,6 +16235,28 @@ var OrderApiFp = function (configuration) {
|
|
|
16187
16235
|
});
|
|
16188
16236
|
};
|
|
16189
16237
|
},
|
|
16238
|
+
/**
|
|
16239
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
16240
|
+
* @summary Determine if an order can be refunded
|
|
16241
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
16242
|
+
* @param {*} [options] Override http request option.
|
|
16243
|
+
* @throws {RequiredError}
|
|
16244
|
+
*/
|
|
16245
|
+
isRefundableOrder: function (order_id, options) {
|
|
16246
|
+
var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).isRefundableOrder(order_id, options);
|
|
16247
|
+
return function (fetch, basePath) {
|
|
16248
|
+
if (fetch === void 0) { fetch = portableFetch; }
|
|
16249
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
16250
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
16251
|
+
if (response.status >= 200 && response.status < 300) {
|
|
16252
|
+
return response.json();
|
|
16253
|
+
}
|
|
16254
|
+
else {
|
|
16255
|
+
throw response;
|
|
16256
|
+
}
|
|
16257
|
+
});
|
|
16258
|
+
};
|
|
16259
|
+
},
|
|
16190
16260
|
/**
|
|
16191
16261
|
* Process payment on order
|
|
16192
16262
|
* @summary Process payment
|
|
@@ -16564,6 +16634,16 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
|
|
|
16564
16634
|
insertOrder: function (order, _expand, options) {
|
|
16565
16635
|
return (0, exports.OrderApiFp)(configuration).insertOrder(order, _expand, options)(fetch, basePath);
|
|
16566
16636
|
},
|
|
16637
|
+
/**
|
|
16638
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
16639
|
+
* @summary Determine if an order can be refunded
|
|
16640
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
16641
|
+
* @param {*} [options] Override http request option.
|
|
16642
|
+
* @throws {RequiredError}
|
|
16643
|
+
*/
|
|
16644
|
+
isRefundableOrder: function (order_id, options) {
|
|
16645
|
+
return (0, exports.OrderApiFp)(configuration).isRefundableOrder(order_id, options)(fetch, basePath);
|
|
16646
|
+
},
|
|
16567
16647
|
/**
|
|
16568
16648
|
* Process payment on order
|
|
16569
16649
|
* @summary Process payment
|
|
@@ -16878,6 +16958,17 @@ var OrderApi = /** @class */ (function (_super) {
|
|
|
16878
16958
|
OrderApi.prototype.insertOrder = function (order, _expand, options) {
|
|
16879
16959
|
return (0, exports.OrderApiFp)(this.configuration).insertOrder(order, _expand, options)(this.fetch, this.basePath);
|
|
16880
16960
|
};
|
|
16961
|
+
/**
|
|
16962
|
+
* Determine if an order can be refunded based upon payment method and age
|
|
16963
|
+
* @summary Determine if an order can be refunded
|
|
16964
|
+
* @param {string} order_id The order id to check for refundable order.
|
|
16965
|
+
* @param {*} [options] Override http request option.
|
|
16966
|
+
* @throws {RequiredError}
|
|
16967
|
+
* @memberof OrderApi
|
|
16968
|
+
*/
|
|
16969
|
+
OrderApi.prototype.isRefundableOrder = function (order_id, options) {
|
|
16970
|
+
return (0, exports.OrderApiFp)(this.configuration).isRefundableOrder(order_id, options)(this.fetch, this.basePath);
|
|
16971
|
+
};
|
|
16881
16972
|
/**
|
|
16882
16973
|
* Process payment on order
|
|
16883
16974
|
* @summary Process payment
|