ultracart_rest_api_v2_typescript 3.10.104 → 3.10.106
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.106
|
|
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.106 --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.106 | 01/25/2023 | order api method generateInvoice |
|
|
58
|
+
| 3.10.105 | 01/24/2023 | auto order - cancel minimum and change balance options |
|
|
57
59
|
| 3.10.104 | 01/23/2023 | conversation - method to fetch single engagement record |
|
|
58
60
|
| 3.10.103 | 01/19/2023 | added skip_on_rebill field to coupon object |
|
|
59
61
|
| 3.10.102 | 01/19/2023 | convo - getConversationPermissions added |
|
package/api.ts
CHANGED
|
@@ -22387,6 +22387,12 @@ export interface ItemAutoOrder {
|
|
|
22387
22387
|
* @memberof ItemAutoOrder
|
|
22388
22388
|
*/
|
|
22389
22389
|
auth_test_amount?: number;
|
|
22390
|
+
/**
|
|
22391
|
+
* If true, the cost of the cancel item will be the remaining balance of the minimum rebill or lifetime value
|
|
22392
|
+
* @type {boolean}
|
|
22393
|
+
* @memberof ItemAutoOrder
|
|
22394
|
+
*/
|
|
22395
|
+
auto_order_cancel_charge_minimum_balance?: boolean;
|
|
22390
22396
|
/**
|
|
22391
22397
|
* Item id to attempt charging the customer for if they cancel
|
|
22392
22398
|
* @type {string}
|
|
@@ -22399,6 +22405,18 @@ export interface ItemAutoOrder {
|
|
|
22399
22405
|
* @memberof ItemAutoOrder
|
|
22400
22406
|
*/
|
|
22401
22407
|
auto_order_cancel_item_oid?: number;
|
|
22408
|
+
/**
|
|
22409
|
+
* The minimum life time value that must be paid in order to not be charged the cancellation item.
|
|
22410
|
+
* @type {number}
|
|
22411
|
+
* @memberof ItemAutoOrder
|
|
22412
|
+
*/
|
|
22413
|
+
auto_order_cancel_minimum_life_time_value?: number;
|
|
22414
|
+
/**
|
|
22415
|
+
* The minimum rebill value that must be paid in order to not be charged the cancellation item.
|
|
22416
|
+
* @type {number}
|
|
22417
|
+
* @memberof ItemAutoOrder
|
|
22418
|
+
*/
|
|
22419
|
+
auto_order_cancel_minimum_rebill_value?: number;
|
|
22402
22420
|
/**
|
|
22403
22421
|
* List of downgrade items presented to customer service representatives
|
|
22404
22422
|
* @type {Array<string>}
|
|
@@ -29294,6 +29312,44 @@ export interface OrderInternal {
|
|
|
29294
29312
|
transactional_merchant_notes?: Array<OrderTransactionalMerchantNote>;
|
|
29295
29313
|
}
|
|
29296
29314
|
|
|
29315
|
+
/**
|
|
29316
|
+
*
|
|
29317
|
+
* @export
|
|
29318
|
+
* @interface OrderInvoiceResponse
|
|
29319
|
+
*/
|
|
29320
|
+
export interface OrderInvoiceResponse {
|
|
29321
|
+
/**
|
|
29322
|
+
*
|
|
29323
|
+
* @type {ModelError}
|
|
29324
|
+
* @memberof OrderInvoiceResponse
|
|
29325
|
+
*/
|
|
29326
|
+
error?: ModelError;
|
|
29327
|
+
/**
|
|
29328
|
+
*
|
|
29329
|
+
* @type {ResponseMetadata}
|
|
29330
|
+
* @memberof OrderInvoiceResponse
|
|
29331
|
+
*/
|
|
29332
|
+
metadata?: ResponseMetadata;
|
|
29333
|
+
/**
|
|
29334
|
+
* pdf_base64
|
|
29335
|
+
* @type {string}
|
|
29336
|
+
* @memberof OrderInvoiceResponse
|
|
29337
|
+
*/
|
|
29338
|
+
pdfBase64?: string;
|
|
29339
|
+
/**
|
|
29340
|
+
* Indicates if API call was successful
|
|
29341
|
+
* @type {boolean}
|
|
29342
|
+
* @memberof OrderInvoiceResponse
|
|
29343
|
+
*/
|
|
29344
|
+
success?: boolean;
|
|
29345
|
+
/**
|
|
29346
|
+
*
|
|
29347
|
+
* @type {Warning}
|
|
29348
|
+
* @memberof OrderInvoiceResponse
|
|
29349
|
+
*/
|
|
29350
|
+
warning?: Warning;
|
|
29351
|
+
}
|
|
29352
|
+
|
|
29297
29353
|
/**
|
|
29298
29354
|
*
|
|
29299
29355
|
* @export
|
|
@@ -56917,6 +56973,58 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
|
|
|
56917
56973
|
options: localVarRequestOptions,
|
|
56918
56974
|
};
|
|
56919
56975
|
},
|
|
56976
|
+
/**
|
|
56977
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
56978
|
+
* @summary Generate an invoice for this order.
|
|
56979
|
+
* @param {string} order_id Order ID
|
|
56980
|
+
* @param {*} [options] Override http request option.
|
|
56981
|
+
* @throws {RequiredError}
|
|
56982
|
+
*/
|
|
56983
|
+
generateInvoice(order_id: string, options: any = {}): FetchArgs {
|
|
56984
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
56985
|
+
if (order_id === null || order_id === undefined) {
|
|
56986
|
+
throw new RequiredError('order_id','Required parameter order_id was null or undefined when calling generateInvoice.');
|
|
56987
|
+
}
|
|
56988
|
+
const localVarPath = `/order/orders/{order_id}/invoice`
|
|
56989
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
56990
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
56991
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
56992
|
+
const localVarHeaderParameter = {} as any;
|
|
56993
|
+
const localVarQueryParameter = {} as any;
|
|
56994
|
+
|
|
56995
|
+
if(configuration && configuration.apiVersion) {
|
|
56996
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
56997
|
+
}
|
|
56998
|
+
|
|
56999
|
+
|
|
57000
|
+
|
|
57001
|
+
// authentication ultraCartOauth required
|
|
57002
|
+
// oauth required
|
|
57003
|
+
if (configuration && configuration.accessToken) {
|
|
57004
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
57005
|
+
? configuration.accessToken("ultraCartOauth", ["order_read"])
|
|
57006
|
+
: configuration.accessToken;
|
|
57007
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
57008
|
+
}
|
|
57009
|
+
|
|
57010
|
+
// authentication ultraCartSimpleApiKey required
|
|
57011
|
+
if (configuration && configuration.apiKey) {
|
|
57012
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
57013
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
57014
|
+
: configuration.apiKey;
|
|
57015
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
57016
|
+
}
|
|
57017
|
+
|
|
57018
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
57019
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
57020
|
+
delete localVarUrlObj.search;
|
|
57021
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
57022
|
+
|
|
57023
|
+
return {
|
|
57024
|
+
url: url.format(localVarUrlObj),
|
|
57025
|
+
options: localVarRequestOptions,
|
|
57026
|
+
};
|
|
57027
|
+
},
|
|
56920
57028
|
/**
|
|
56921
57029
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
56922
57030
|
* @summary Generate an order token for a given order id
|
|
@@ -58306,6 +58414,27 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
|
58306
58414
|
});
|
|
58307
58415
|
};
|
|
58308
58416
|
},
|
|
58417
|
+
/**
|
|
58418
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
58419
|
+
* @summary Generate an invoice for this order.
|
|
58420
|
+
* @param {string} order_id Order ID
|
|
58421
|
+
* @param {*} [options] Override http request option.
|
|
58422
|
+
* @throws {RequiredError}
|
|
58423
|
+
*/
|
|
58424
|
+
generateInvoice(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderInvoiceResponse> {
|
|
58425
|
+
const localVarFetchArgs = OrderApiFetchParamCreator(configuration).generateInvoice(order_id, options);
|
|
58426
|
+
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
|
58427
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
58428
|
+
|
|
58429
|
+
if (response.status >= 200 && response.status < 300) {
|
|
58430
|
+
return response.json();
|
|
58431
|
+
|
|
58432
|
+
} else {
|
|
58433
|
+
throw response;
|
|
58434
|
+
}
|
|
58435
|
+
});
|
|
58436
|
+
};
|
|
58437
|
+
},
|
|
58309
58438
|
/**
|
|
58310
58439
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
58311
58440
|
* @summary Generate an order token for a given order id
|
|
@@ -58818,6 +58947,16 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
58818
58947
|
format(order_id: string, format_options: OrderFormat, options?: any) {
|
|
58819
58948
|
return OrderApiFp(configuration).format(order_id, format_options, options)(fetch, basePath);
|
|
58820
58949
|
},
|
|
58950
|
+
/**
|
|
58951
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
58952
|
+
* @summary Generate an invoice for this order.
|
|
58953
|
+
* @param {string} order_id Order ID
|
|
58954
|
+
* @param {*} [options] Override http request option.
|
|
58955
|
+
* @throws {RequiredError}
|
|
58956
|
+
*/
|
|
58957
|
+
generateInvoice(order_id: string, options?: any) {
|
|
58958
|
+
return OrderApiFp(configuration).generateInvoice(order_id, options)(fetch, basePath);
|
|
58959
|
+
},
|
|
58821
58960
|
/**
|
|
58822
58961
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
58823
58962
|
* @summary Generate an order token for a given order id
|
|
@@ -59121,6 +59260,16 @@ export interface OrderApiInterface {
|
|
|
59121
59260
|
*/
|
|
59122
59261
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
59123
59262
|
|
|
59263
|
+
/**
|
|
59264
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
59265
|
+
* @summary Generate an invoice for this order.
|
|
59266
|
+
* @param {string} order_id Order ID
|
|
59267
|
+
* @param {*} [options] Override http request option.
|
|
59268
|
+
* @throws {RequiredError}
|
|
59269
|
+
* @memberof OrderApiInterface
|
|
59270
|
+
*/
|
|
59271
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
59272
|
+
|
|
59124
59273
|
/**
|
|
59125
59274
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
59126
59275
|
* @summary Generate an order token for a given order id
|
|
@@ -59434,6 +59583,18 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
59434
59583
|
return OrderApiFp(this.configuration).format(order_id, format_options, options)(this.fetch, this.basePath);
|
|
59435
59584
|
}
|
|
59436
59585
|
|
|
59586
|
+
/**
|
|
59587
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
59588
|
+
* @summary Generate an invoice for this order.
|
|
59589
|
+
* @param {string} order_id Order ID
|
|
59590
|
+
* @param {*} [options] Override http request option.
|
|
59591
|
+
* @throws {RequiredError}
|
|
59592
|
+
* @memberof OrderApi
|
|
59593
|
+
*/
|
|
59594
|
+
public generateInvoice(order_id: string, options?: any) {
|
|
59595
|
+
return OrderApiFp(this.configuration).generateInvoice(order_id, options)(this.fetch, this.basePath);
|
|
59596
|
+
}
|
|
59597
|
+
|
|
59437
59598
|
/**
|
|
59438
59599
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
59439
59600
|
* @summary Generate an order token for a given order id
|
package/dist/api.d.ts
CHANGED
|
@@ -21900,6 +21900,12 @@ export interface ItemAutoOrder {
|
|
|
21900
21900
|
* @memberof ItemAutoOrder
|
|
21901
21901
|
*/
|
|
21902
21902
|
auth_test_amount?: number;
|
|
21903
|
+
/**
|
|
21904
|
+
* If true, the cost of the cancel item will be the remaining balance of the minimum rebill or lifetime value
|
|
21905
|
+
* @type {boolean}
|
|
21906
|
+
* @memberof ItemAutoOrder
|
|
21907
|
+
*/
|
|
21908
|
+
auto_order_cancel_charge_minimum_balance?: boolean;
|
|
21903
21909
|
/**
|
|
21904
21910
|
* Item id to attempt charging the customer for if they cancel
|
|
21905
21911
|
* @type {string}
|
|
@@ -21912,6 +21918,18 @@ export interface ItemAutoOrder {
|
|
|
21912
21918
|
* @memberof ItemAutoOrder
|
|
21913
21919
|
*/
|
|
21914
21920
|
auto_order_cancel_item_oid?: number;
|
|
21921
|
+
/**
|
|
21922
|
+
* The minimum life time value that must be paid in order to not be charged the cancellation item.
|
|
21923
|
+
* @type {number}
|
|
21924
|
+
* @memberof ItemAutoOrder
|
|
21925
|
+
*/
|
|
21926
|
+
auto_order_cancel_minimum_life_time_value?: number;
|
|
21927
|
+
/**
|
|
21928
|
+
* The minimum rebill value that must be paid in order to not be charged the cancellation item.
|
|
21929
|
+
* @type {number}
|
|
21930
|
+
* @memberof ItemAutoOrder
|
|
21931
|
+
*/
|
|
21932
|
+
auto_order_cancel_minimum_rebill_value?: number;
|
|
21915
21933
|
/**
|
|
21916
21934
|
* List of downgrade items presented to customer service representatives
|
|
21917
21935
|
* @type {Array<string>}
|
|
@@ -28672,6 +28690,43 @@ export interface OrderInternal {
|
|
|
28672
28690
|
*/
|
|
28673
28691
|
transactional_merchant_notes?: Array<OrderTransactionalMerchantNote>;
|
|
28674
28692
|
}
|
|
28693
|
+
/**
|
|
28694
|
+
*
|
|
28695
|
+
* @export
|
|
28696
|
+
* @interface OrderInvoiceResponse
|
|
28697
|
+
*/
|
|
28698
|
+
export interface OrderInvoiceResponse {
|
|
28699
|
+
/**
|
|
28700
|
+
*
|
|
28701
|
+
* @type {ModelError}
|
|
28702
|
+
* @memberof OrderInvoiceResponse
|
|
28703
|
+
*/
|
|
28704
|
+
error?: ModelError;
|
|
28705
|
+
/**
|
|
28706
|
+
*
|
|
28707
|
+
* @type {ResponseMetadata}
|
|
28708
|
+
* @memberof OrderInvoiceResponse
|
|
28709
|
+
*/
|
|
28710
|
+
metadata?: ResponseMetadata;
|
|
28711
|
+
/**
|
|
28712
|
+
* pdf_base64
|
|
28713
|
+
* @type {string}
|
|
28714
|
+
* @memberof OrderInvoiceResponse
|
|
28715
|
+
*/
|
|
28716
|
+
pdfBase64?: string;
|
|
28717
|
+
/**
|
|
28718
|
+
* Indicates if API call was successful
|
|
28719
|
+
* @type {boolean}
|
|
28720
|
+
* @memberof OrderInvoiceResponse
|
|
28721
|
+
*/
|
|
28722
|
+
success?: boolean;
|
|
28723
|
+
/**
|
|
28724
|
+
*
|
|
28725
|
+
* @type {Warning}
|
|
28726
|
+
* @memberof OrderInvoiceResponse
|
|
28727
|
+
*/
|
|
28728
|
+
warning?: Warning;
|
|
28729
|
+
}
|
|
28675
28730
|
/**
|
|
28676
28731
|
*
|
|
28677
28732
|
* @export
|
|
@@ -45005,6 +45060,14 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
|
|
|
45005
45060
|
* @throws {RequiredError}
|
|
45006
45061
|
*/
|
|
45007
45062
|
format(order_id: string, format_options: OrderFormat, options?: any): FetchArgs;
|
|
45063
|
+
/**
|
|
45064
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45065
|
+
* @summary Generate an invoice for this order.
|
|
45066
|
+
* @param {string} order_id Order ID
|
|
45067
|
+
* @param {*} [options] Override http request option.
|
|
45068
|
+
* @throws {RequiredError}
|
|
45069
|
+
*/
|
|
45070
|
+
generateInvoice(order_id: string, options?: any): FetchArgs;
|
|
45008
45071
|
/**
|
|
45009
45072
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45010
45073
|
* @summary Generate an order token for a given order id
|
|
@@ -45257,6 +45320,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
|
45257
45320
|
* @throws {RequiredError}
|
|
45258
45321
|
*/
|
|
45259
45322
|
format(order_id: string, format_options: OrderFormat, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderFormatResponse>;
|
|
45323
|
+
/**
|
|
45324
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45325
|
+
* @summary Generate an invoice for this order.
|
|
45326
|
+
* @param {string} order_id Order ID
|
|
45327
|
+
* @param {*} [options] Override http request option.
|
|
45328
|
+
* @throws {RequiredError}
|
|
45329
|
+
*/
|
|
45330
|
+
generateInvoice(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderInvoiceResponse>;
|
|
45260
45331
|
/**
|
|
45261
45332
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45262
45333
|
* @summary Generate an order token for a given order id
|
|
@@ -45509,6 +45580,14 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
|
|
|
45509
45580
|
* @throws {RequiredError}
|
|
45510
45581
|
*/
|
|
45511
45582
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
45583
|
+
/**
|
|
45584
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45585
|
+
* @summary Generate an invoice for this order.
|
|
45586
|
+
* @param {string} order_id Order ID
|
|
45587
|
+
* @param {*} [options] Override http request option.
|
|
45588
|
+
* @throws {RequiredError}
|
|
45589
|
+
*/
|
|
45590
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
45512
45591
|
/**
|
|
45513
45592
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45514
45593
|
* @summary Generate an order token for a given order id
|
|
@@ -45767,6 +45846,15 @@ export interface OrderApiInterface {
|
|
|
45767
45846
|
* @memberof OrderApiInterface
|
|
45768
45847
|
*/
|
|
45769
45848
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
45849
|
+
/**
|
|
45850
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45851
|
+
* @summary Generate an invoice for this order.
|
|
45852
|
+
* @param {string} order_id Order ID
|
|
45853
|
+
* @param {*} [options] Override http request option.
|
|
45854
|
+
* @throws {RequiredError}
|
|
45855
|
+
* @memberof OrderApiInterface
|
|
45856
|
+
*/
|
|
45857
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
45770
45858
|
/**
|
|
45771
45859
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45772
45860
|
* @summary Generate an order token for a given order id
|
|
@@ -46045,6 +46133,15 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
46045
46133
|
* @memberof OrderApi
|
|
46046
46134
|
*/
|
|
46047
46135
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
46136
|
+
/**
|
|
46137
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
46138
|
+
* @summary Generate an invoice for this order.
|
|
46139
|
+
* @param {string} order_id Order ID
|
|
46140
|
+
* @param {*} [options] Override http request option.
|
|
46141
|
+
* @throws {RequiredError}
|
|
46142
|
+
* @memberof OrderApi
|
|
46143
|
+
*/
|
|
46144
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
46048
46145
|
/**
|
|
46049
46146
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
46050
46147
|
* @summary Generate an order token for a given order id
|
package/dist/api.js
CHANGED
|
@@ -17214,6 +17214,52 @@ var OrderApiFetchParamCreator = function (configuration) {
|
|
|
17214
17214
|
options: localVarRequestOptions,
|
|
17215
17215
|
};
|
|
17216
17216
|
},
|
|
17217
|
+
/**
|
|
17218
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
17219
|
+
* @summary Generate an invoice for this order.
|
|
17220
|
+
* @param {string} order_id Order ID
|
|
17221
|
+
* @param {*} [options] Override http request option.
|
|
17222
|
+
* @throws {RequiredError}
|
|
17223
|
+
*/
|
|
17224
|
+
generateInvoice: function (order_id, options) {
|
|
17225
|
+
if (options === void 0) { options = {}; }
|
|
17226
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
17227
|
+
if (order_id === null || order_id === undefined) {
|
|
17228
|
+
throw new RequiredError('order_id', 'Required parameter order_id was null or undefined when calling generateInvoice.');
|
|
17229
|
+
}
|
|
17230
|
+
var localVarPath = "/order/orders/{order_id}/invoice"
|
|
17231
|
+
.replace("{".concat("order_id", "}"), encodeURIComponent(String(order_id)));
|
|
17232
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
17233
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
17234
|
+
var localVarHeaderParameter = {};
|
|
17235
|
+
var localVarQueryParameter = {};
|
|
17236
|
+
if (configuration && configuration.apiVersion) {
|
|
17237
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
17238
|
+
}
|
|
17239
|
+
// authentication ultraCartOauth required
|
|
17240
|
+
// oauth required
|
|
17241
|
+
if (configuration && configuration.accessToken) {
|
|
17242
|
+
var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
17243
|
+
? configuration.accessToken("ultraCartOauth", ["order_read"])
|
|
17244
|
+
: configuration.accessToken;
|
|
17245
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
17246
|
+
}
|
|
17247
|
+
// authentication ultraCartSimpleApiKey required
|
|
17248
|
+
if (configuration && configuration.apiKey) {
|
|
17249
|
+
var localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
17250
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
17251
|
+
: configuration.apiKey;
|
|
17252
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
17253
|
+
}
|
|
17254
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
17255
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
17256
|
+
delete localVarUrlObj.search;
|
|
17257
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
17258
|
+
return {
|
|
17259
|
+
url: url.format(localVarUrlObj),
|
|
17260
|
+
options: localVarRequestOptions,
|
|
17261
|
+
};
|
|
17262
|
+
},
|
|
17217
17263
|
/**
|
|
17218
17264
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
17219
17265
|
* @summary Generate an order token for a given order id
|
|
@@ -18436,6 +18482,28 @@ var OrderApiFp = function (configuration) {
|
|
|
18436
18482
|
});
|
|
18437
18483
|
};
|
|
18438
18484
|
},
|
|
18485
|
+
/**
|
|
18486
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
18487
|
+
* @summary Generate an invoice for this order.
|
|
18488
|
+
* @param {string} order_id Order ID
|
|
18489
|
+
* @param {*} [options] Override http request option.
|
|
18490
|
+
* @throws {RequiredError}
|
|
18491
|
+
*/
|
|
18492
|
+
generateInvoice: function (order_id, options) {
|
|
18493
|
+
var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).generateInvoice(order_id, options);
|
|
18494
|
+
return function (fetch, basePath) {
|
|
18495
|
+
if (fetch === void 0) { fetch = portableFetch; }
|
|
18496
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
18497
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
18498
|
+
if (response.status >= 200 && response.status < 300) {
|
|
18499
|
+
return response.json();
|
|
18500
|
+
}
|
|
18501
|
+
else {
|
|
18502
|
+
throw response;
|
|
18503
|
+
}
|
|
18504
|
+
});
|
|
18505
|
+
};
|
|
18506
|
+
},
|
|
18439
18507
|
/**
|
|
18440
18508
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
18441
18509
|
* @summary Generate an order token for a given order id
|
|
@@ -18967,6 +19035,16 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
|
|
|
18967
19035
|
format: function (order_id, format_options, options) {
|
|
18968
19036
|
return (0, exports.OrderApiFp)(configuration).format(order_id, format_options, options)(fetch, basePath);
|
|
18969
19037
|
},
|
|
19038
|
+
/**
|
|
19039
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
19040
|
+
* @summary Generate an invoice for this order.
|
|
19041
|
+
* @param {string} order_id Order ID
|
|
19042
|
+
* @param {*} [options] Override http request option.
|
|
19043
|
+
* @throws {RequiredError}
|
|
19044
|
+
*/
|
|
19045
|
+
generateInvoice: function (order_id, options) {
|
|
19046
|
+
return (0, exports.OrderApiFp)(configuration).generateInvoice(order_id, options)(fetch, basePath);
|
|
19047
|
+
},
|
|
18970
19048
|
/**
|
|
18971
19049
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
18972
19050
|
* @summary Generate an order token for a given order id
|
|
@@ -19280,6 +19358,17 @@ var OrderApi = /** @class */ (function (_super) {
|
|
|
19280
19358
|
OrderApi.prototype.format = function (order_id, format_options, options) {
|
|
19281
19359
|
return (0, exports.OrderApiFp)(this.configuration).format(order_id, format_options, options)(this.fetch, this.basePath);
|
|
19282
19360
|
};
|
|
19361
|
+
/**
|
|
19362
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
19363
|
+
* @summary Generate an invoice for this order.
|
|
19364
|
+
* @param {string} order_id Order ID
|
|
19365
|
+
* @param {*} [options] Override http request option.
|
|
19366
|
+
* @throws {RequiredError}
|
|
19367
|
+
* @memberof OrderApi
|
|
19368
|
+
*/
|
|
19369
|
+
OrderApi.prototype.generateInvoice = function (order_id, options) {
|
|
19370
|
+
return (0, exports.OrderApiFp)(this.configuration).generateInvoice(order_id, options)(this.fetch, this.basePath);
|
|
19371
|
+
};
|
|
19283
19372
|
/**
|
|
19284
19373
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
19285
19374
|
* @summary Generate an order token for a given order id
|