ultracart_rest_api_v2_typescript 3.10.63 → 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 +4 -2
- package/api.ts +161 -0
- package/dist/api.d.ts +97 -0
- package/dist/api.js +89 -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.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.
|
|
39
|
+
npm install ultracart_rest_api_v2_typescript@3.10.65 --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.65 | 11/15/2022 | order api new method is order refundable |
|
|
58
|
+
| 3.10.64 | 11/15/2022 | increase order property length to 10k char |
|
|
57
59
|
| 3.10.63 | 11/14/2022 | conversations - add allowed values for update agent status |
|
|
58
60
|
| 3.10.62 | 11/09/2022 | conversations - add an enum of event typing |
|
|
59
61
|
| 3.10.61 | 11/04/2022 | new coupon type percent based on msrp |
|
package/api.ts
CHANGED
|
@@ -712,12 +712,24 @@ export interface AffiliateClick {
|
|
|
712
712
|
* @memberof AffiliateClick
|
|
713
713
|
*/
|
|
714
714
|
referrer_query_string?: string;
|
|
715
|
+
/**
|
|
716
|
+
* Screen recording UUID
|
|
717
|
+
* @type {string}
|
|
718
|
+
* @memberof AffiliateClick
|
|
719
|
+
*/
|
|
720
|
+
screen_recording_uuid?: string;
|
|
715
721
|
/**
|
|
716
722
|
* Sub ID value passed on the click
|
|
717
723
|
* @type {string}
|
|
718
724
|
* @memberof AffiliateClick
|
|
719
725
|
*/
|
|
720
726
|
sub_id?: string;
|
|
727
|
+
/**
|
|
728
|
+
* UC Analytics Identifier
|
|
729
|
+
* @type {string}
|
|
730
|
+
* @memberof AffiliateClick
|
|
731
|
+
*/
|
|
732
|
+
ucacid?: string;
|
|
721
733
|
}
|
|
722
734
|
|
|
723
735
|
/**
|
|
@@ -6277,6 +6289,12 @@ export interface CityStateZip {
|
|
|
6277
6289
|
* @interface Conversation
|
|
6278
6290
|
*/
|
|
6279
6291
|
export interface Conversation {
|
|
6292
|
+
/**
|
|
6293
|
+
* The base language iso code for the StoreFront that everything is translated into
|
|
6294
|
+
* @type {string}
|
|
6295
|
+
* @memberof Conversation
|
|
6296
|
+
*/
|
|
6297
|
+
base_language_iso_code?: string;
|
|
6280
6298
|
/**
|
|
6281
6299
|
*
|
|
6282
6300
|
* @type {boolean}
|
|
@@ -28933,6 +28951,44 @@ export interface OrderQuote {
|
|
|
28933
28951
|
quoted_dts?: string;
|
|
28934
28952
|
}
|
|
28935
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
|
+
|
|
28936
28992
|
/**
|
|
28937
28993
|
*
|
|
28938
28994
|
* @export
|
|
@@ -52666,6 +52722,58 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
|
|
|
52666
52722
|
options: localVarRequestOptions,
|
|
52667
52723
|
};
|
|
52668
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
|
+
},
|
|
52669
52777
|
/**
|
|
52670
52778
|
* Process payment on order
|
|
52671
52779
|
* @summary Process payment
|
|
@@ -53496,6 +53604,27 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
|
53496
53604
|
});
|
|
53497
53605
|
};
|
|
53498
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
|
+
},
|
|
53499
53628
|
/**
|
|
53500
53629
|
* Process payment on order
|
|
53501
53630
|
* @summary Process payment
|
|
@@ -53866,6 +53995,16 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
53866
53995
|
insertOrder(order: Order, _expand?: string, options?: any) {
|
|
53867
53996
|
return OrderApiFp(configuration).insertOrder(order, _expand, options)(fetch, basePath);
|
|
53868
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
|
+
},
|
|
53869
54008
|
/**
|
|
53870
54009
|
* Process payment on order
|
|
53871
54010
|
* @summary Process payment
|
|
@@ -54159,6 +54298,16 @@ export interface OrderApiInterface {
|
|
|
54159
54298
|
*/
|
|
54160
54299
|
insertOrder(order: Order, _expand?: string, options?: any): Promise<OrderResponse>;
|
|
54161
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
|
+
|
|
54162
54311
|
/**
|
|
54163
54312
|
* Process payment on order
|
|
54164
54313
|
* @summary Process payment
|
|
@@ -54484,6 +54633,18 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
54484
54633
|
return OrderApiFp(this.configuration).insertOrder(order, _expand, options)(this.fetch, this.basePath);
|
|
54485
54634
|
}
|
|
54486
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
|
+
|
|
54487
54648
|
/**
|
|
54488
54649
|
* Process payment on order
|
|
54489
54650
|
* @summary Process payment
|
package/dist/api.d.ts
CHANGED
|
@@ -683,12 +683,24 @@ export interface AffiliateClick {
|
|
|
683
683
|
* @memberof AffiliateClick
|
|
684
684
|
*/
|
|
685
685
|
referrer_query_string?: string;
|
|
686
|
+
/**
|
|
687
|
+
* Screen recording UUID
|
|
688
|
+
* @type {string}
|
|
689
|
+
* @memberof AffiliateClick
|
|
690
|
+
*/
|
|
691
|
+
screen_recording_uuid?: string;
|
|
686
692
|
/**
|
|
687
693
|
* Sub ID value passed on the click
|
|
688
694
|
* @type {string}
|
|
689
695
|
* @memberof AffiliateClick
|
|
690
696
|
*/
|
|
691
697
|
sub_id?: string;
|
|
698
|
+
/**
|
|
699
|
+
* UC Analytics Identifier
|
|
700
|
+
* @type {string}
|
|
701
|
+
* @memberof AffiliateClick
|
|
702
|
+
*/
|
|
703
|
+
ucacid?: string;
|
|
692
704
|
}
|
|
693
705
|
/**
|
|
694
706
|
*
|
|
@@ -6130,6 +6142,12 @@ export interface CityStateZip {
|
|
|
6130
6142
|
* @interface Conversation
|
|
6131
6143
|
*/
|
|
6132
6144
|
export interface Conversation {
|
|
6145
|
+
/**
|
|
6146
|
+
* The base language iso code for the StoreFront that everything is translated into
|
|
6147
|
+
* @type {string}
|
|
6148
|
+
* @memberof Conversation
|
|
6149
|
+
*/
|
|
6150
|
+
base_language_iso_code?: string;
|
|
6133
6151
|
/**
|
|
6134
6152
|
*
|
|
6135
6153
|
* @type {boolean}
|
|
@@ -28326,6 +28344,43 @@ export interface OrderQuote {
|
|
|
28326
28344
|
*/
|
|
28327
28345
|
quoted_dts?: string;
|
|
28328
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
|
+
}
|
|
28329
28384
|
/**
|
|
28330
28385
|
*
|
|
28331
28386
|
* @export
|
|
@@ -41842,6 +41897,14 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
|
|
|
41842
41897
|
* @throws {RequiredError}
|
|
41843
41898
|
*/
|
|
41844
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;
|
|
41845
41908
|
/**
|
|
41846
41909
|
* Process payment on order
|
|
41847
41910
|
* @summary Process payment
|
|
@@ -42086,6 +42149,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
|
42086
42149
|
* @throws {RequiredError}
|
|
42087
42150
|
*/
|
|
42088
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>;
|
|
42089
42160
|
/**
|
|
42090
42161
|
* Process payment on order
|
|
42091
42162
|
* @summary Process payment
|
|
@@ -42330,6 +42401,14 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
|
|
|
42330
42401
|
* @throws {RequiredError}
|
|
42331
42402
|
*/
|
|
42332
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>;
|
|
42333
42412
|
/**
|
|
42334
42413
|
* Process payment on order
|
|
42335
42414
|
* @summary Process payment
|
|
@@ -42591,6 +42670,15 @@ export interface OrderApiInterface {
|
|
|
42591
42670
|
* @memberof OrderApiInterface
|
|
42592
42671
|
*/
|
|
42593
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>;
|
|
42594
42682
|
/**
|
|
42595
42683
|
* Process payment on order
|
|
42596
42684
|
* @summary Process payment
|
|
@@ -42860,6 +42948,15 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
42860
42948
|
* @memberof OrderApi
|
|
42861
42949
|
*/
|
|
42862
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>;
|
|
42863
42960
|
/**
|
|
42864
42961
|
* Process payment on order
|
|
42865
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
|