ultracart_rest_api_v2_typescript 3.10.105 → 3.10.107
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 +146 -2
- package/dist/api.d.ts +82 -2
- package/dist/api.js +91 -1
- 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.107
|
|
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.107 --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.107 | 01/25/2023 | convo event for engage customer |
|
|
58
|
+
| 3.10.106 | 01/25/2023 | order api method generateInvoice |
|
|
57
59
|
| 3.10.105 | 01/24/2023 | auto order - cancel minimum and change balance options |
|
|
58
60
|
| 3.10.104 | 01/23/2023 | conversation - method to fetch single engagement record |
|
|
59
61
|
| 3.10.103 | 01/19/2023 | added skip_on_rebill field to coupon object |
|
package/api.ts
CHANGED
|
@@ -8958,12 +8958,13 @@ export namespace ConversationWebsocketMessage {
|
|
|
8958
8958
|
Rrweb = <any> 'rrweb',
|
|
8959
8959
|
ParticipantUpdate = <any> 'participant update',
|
|
8960
8960
|
ParticipantJoin = <any> 'participant join',
|
|
8961
|
-
|
|
8961
|
+
ParticipantLeave = <any> 'participant leave',
|
|
8962
8962
|
ReadMessage = <any> 'read message',
|
|
8963
8963
|
Typing = <any> 'typing',
|
|
8964
8964
|
AddCoupon = <any> 'add coupon',
|
|
8965
8965
|
AddItem = <any> 'add item',
|
|
8966
|
-
WebchatContext = <any> 'webchat context'
|
|
8966
|
+
WebchatContext = <any> 'webchat context',
|
|
8967
|
+
EngageCustomer = <any> 'engage customer'
|
|
8967
8968
|
}
|
|
8968
8969
|
/**
|
|
8969
8970
|
* @export
|
|
@@ -29312,6 +29313,44 @@ export interface OrderInternal {
|
|
|
29312
29313
|
transactional_merchant_notes?: Array<OrderTransactionalMerchantNote>;
|
|
29313
29314
|
}
|
|
29314
29315
|
|
|
29316
|
+
/**
|
|
29317
|
+
*
|
|
29318
|
+
* @export
|
|
29319
|
+
* @interface OrderInvoiceResponse
|
|
29320
|
+
*/
|
|
29321
|
+
export interface OrderInvoiceResponse {
|
|
29322
|
+
/**
|
|
29323
|
+
*
|
|
29324
|
+
* @type {ModelError}
|
|
29325
|
+
* @memberof OrderInvoiceResponse
|
|
29326
|
+
*/
|
|
29327
|
+
error?: ModelError;
|
|
29328
|
+
/**
|
|
29329
|
+
*
|
|
29330
|
+
* @type {ResponseMetadata}
|
|
29331
|
+
* @memberof OrderInvoiceResponse
|
|
29332
|
+
*/
|
|
29333
|
+
metadata?: ResponseMetadata;
|
|
29334
|
+
/**
|
|
29335
|
+
* pdf_base64
|
|
29336
|
+
* @type {string}
|
|
29337
|
+
* @memberof OrderInvoiceResponse
|
|
29338
|
+
*/
|
|
29339
|
+
pdfBase64?: string;
|
|
29340
|
+
/**
|
|
29341
|
+
* Indicates if API call was successful
|
|
29342
|
+
* @type {boolean}
|
|
29343
|
+
* @memberof OrderInvoiceResponse
|
|
29344
|
+
*/
|
|
29345
|
+
success?: boolean;
|
|
29346
|
+
/**
|
|
29347
|
+
*
|
|
29348
|
+
* @type {Warning}
|
|
29349
|
+
* @memberof OrderInvoiceResponse
|
|
29350
|
+
*/
|
|
29351
|
+
warning?: Warning;
|
|
29352
|
+
}
|
|
29353
|
+
|
|
29315
29354
|
/**
|
|
29316
29355
|
*
|
|
29317
29356
|
* @export
|
|
@@ -56935,6 +56974,58 @@ export const OrderApiFetchParamCreator = function (configuration?: Configuration
|
|
|
56935
56974
|
options: localVarRequestOptions,
|
|
56936
56975
|
};
|
|
56937
56976
|
},
|
|
56977
|
+
/**
|
|
56978
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
56979
|
+
* @summary Generate an invoice for this order.
|
|
56980
|
+
* @param {string} order_id Order ID
|
|
56981
|
+
* @param {*} [options] Override http request option.
|
|
56982
|
+
* @throws {RequiredError}
|
|
56983
|
+
*/
|
|
56984
|
+
generateInvoice(order_id: string, options: any = {}): FetchArgs {
|
|
56985
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
56986
|
+
if (order_id === null || order_id === undefined) {
|
|
56987
|
+
throw new RequiredError('order_id','Required parameter order_id was null or undefined when calling generateInvoice.');
|
|
56988
|
+
}
|
|
56989
|
+
const localVarPath = `/order/orders/{order_id}/invoice`
|
|
56990
|
+
.replace(`{${"order_id"}}`, encodeURIComponent(String(order_id)));
|
|
56991
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
56992
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
56993
|
+
const localVarHeaderParameter = {} as any;
|
|
56994
|
+
const localVarQueryParameter = {} as any;
|
|
56995
|
+
|
|
56996
|
+
if(configuration && configuration.apiVersion) {
|
|
56997
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
56998
|
+
}
|
|
56999
|
+
|
|
57000
|
+
|
|
57001
|
+
|
|
57002
|
+
// authentication ultraCartOauth required
|
|
57003
|
+
// oauth required
|
|
57004
|
+
if (configuration && configuration.accessToken) {
|
|
57005
|
+
const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
57006
|
+
? configuration.accessToken("ultraCartOauth", ["order_read"])
|
|
57007
|
+
: configuration.accessToken;
|
|
57008
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
57009
|
+
}
|
|
57010
|
+
|
|
57011
|
+
// authentication ultraCartSimpleApiKey required
|
|
57012
|
+
if (configuration && configuration.apiKey) {
|
|
57013
|
+
const localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
57014
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
57015
|
+
: configuration.apiKey;
|
|
57016
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
57017
|
+
}
|
|
57018
|
+
|
|
57019
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
57020
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
57021
|
+
delete localVarUrlObj.search;
|
|
57022
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
57023
|
+
|
|
57024
|
+
return {
|
|
57025
|
+
url: url.format(localVarUrlObj),
|
|
57026
|
+
options: localVarRequestOptions,
|
|
57027
|
+
};
|
|
57028
|
+
},
|
|
56938
57029
|
/**
|
|
56939
57030
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
56940
57031
|
* @summary Generate an order token for a given order id
|
|
@@ -58324,6 +58415,27 @@ export const OrderApiFp = function(configuration?: Configuration) {
|
|
|
58324
58415
|
});
|
|
58325
58416
|
};
|
|
58326
58417
|
},
|
|
58418
|
+
/**
|
|
58419
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
58420
|
+
* @summary Generate an invoice for this order.
|
|
58421
|
+
* @param {string} order_id Order ID
|
|
58422
|
+
* @param {*} [options] Override http request option.
|
|
58423
|
+
* @throws {RequiredError}
|
|
58424
|
+
*/
|
|
58425
|
+
generateInvoice(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderInvoiceResponse> {
|
|
58426
|
+
const localVarFetchArgs = OrderApiFetchParamCreator(configuration).generateInvoice(order_id, options);
|
|
58427
|
+
return (fetch: FetchAPI = portableFetch, basePath: string = BASE_PATH) => {
|
|
58428
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
58429
|
+
|
|
58430
|
+
if (response.status >= 200 && response.status < 300) {
|
|
58431
|
+
return response.json();
|
|
58432
|
+
|
|
58433
|
+
} else {
|
|
58434
|
+
throw response;
|
|
58435
|
+
}
|
|
58436
|
+
});
|
|
58437
|
+
};
|
|
58438
|
+
},
|
|
58327
58439
|
/**
|
|
58328
58440
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
58329
58441
|
* @summary Generate an order token for a given order id
|
|
@@ -58836,6 +58948,16 @@ export const OrderApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
58836
58948
|
format(order_id: string, format_options: OrderFormat, options?: any) {
|
|
58837
58949
|
return OrderApiFp(configuration).format(order_id, format_options, options)(fetch, basePath);
|
|
58838
58950
|
},
|
|
58951
|
+
/**
|
|
58952
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
58953
|
+
* @summary Generate an invoice for this order.
|
|
58954
|
+
* @param {string} order_id Order ID
|
|
58955
|
+
* @param {*} [options] Override http request option.
|
|
58956
|
+
* @throws {RequiredError}
|
|
58957
|
+
*/
|
|
58958
|
+
generateInvoice(order_id: string, options?: any) {
|
|
58959
|
+
return OrderApiFp(configuration).generateInvoice(order_id, options)(fetch, basePath);
|
|
58960
|
+
},
|
|
58839
58961
|
/**
|
|
58840
58962
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
58841
58963
|
* @summary Generate an order token for a given order id
|
|
@@ -59139,6 +59261,16 @@ export interface OrderApiInterface {
|
|
|
59139
59261
|
*/
|
|
59140
59262
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
59141
59263
|
|
|
59264
|
+
/**
|
|
59265
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
59266
|
+
* @summary Generate an invoice for this order.
|
|
59267
|
+
* @param {string} order_id Order ID
|
|
59268
|
+
* @param {*} [options] Override http request option.
|
|
59269
|
+
* @throws {RequiredError}
|
|
59270
|
+
* @memberof OrderApiInterface
|
|
59271
|
+
*/
|
|
59272
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
59273
|
+
|
|
59142
59274
|
/**
|
|
59143
59275
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
59144
59276
|
* @summary Generate an order token for a given order id
|
|
@@ -59452,6 +59584,18 @@ export class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
59452
59584
|
return OrderApiFp(this.configuration).format(order_id, format_options, options)(this.fetch, this.basePath);
|
|
59453
59585
|
}
|
|
59454
59586
|
|
|
59587
|
+
/**
|
|
59588
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
59589
|
+
* @summary Generate an invoice for this order.
|
|
59590
|
+
* @param {string} order_id Order ID
|
|
59591
|
+
* @param {*} [options] Override http request option.
|
|
59592
|
+
* @throws {RequiredError}
|
|
59593
|
+
* @memberof OrderApi
|
|
59594
|
+
*/
|
|
59595
|
+
public generateInvoice(order_id: string, options?: any) {
|
|
59596
|
+
return OrderApiFp(this.configuration).generateInvoice(order_id, options)(this.fetch, this.basePath);
|
|
59597
|
+
}
|
|
59598
|
+
|
|
59455
59599
|
/**
|
|
59456
59600
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
59457
59601
|
* @summary Generate an order token for a given order id
|
package/dist/api.d.ts
CHANGED
|
@@ -8743,12 +8743,13 @@ export declare namespace ConversationWebsocketMessage {
|
|
|
8743
8743
|
Rrweb,
|
|
8744
8744
|
ParticipantUpdate,
|
|
8745
8745
|
ParticipantJoin,
|
|
8746
|
-
|
|
8746
|
+
ParticipantLeave,
|
|
8747
8747
|
ReadMessage,
|
|
8748
8748
|
Typing,
|
|
8749
8749
|
AddCoupon,
|
|
8750
8750
|
AddItem,
|
|
8751
|
-
WebchatContext
|
|
8751
|
+
WebchatContext,
|
|
8752
|
+
EngageCustomer
|
|
8752
8753
|
}
|
|
8753
8754
|
/**
|
|
8754
8755
|
* @export
|
|
@@ -28690,6 +28691,43 @@ export interface OrderInternal {
|
|
|
28690
28691
|
*/
|
|
28691
28692
|
transactional_merchant_notes?: Array<OrderTransactionalMerchantNote>;
|
|
28692
28693
|
}
|
|
28694
|
+
/**
|
|
28695
|
+
*
|
|
28696
|
+
* @export
|
|
28697
|
+
* @interface OrderInvoiceResponse
|
|
28698
|
+
*/
|
|
28699
|
+
export interface OrderInvoiceResponse {
|
|
28700
|
+
/**
|
|
28701
|
+
*
|
|
28702
|
+
* @type {ModelError}
|
|
28703
|
+
* @memberof OrderInvoiceResponse
|
|
28704
|
+
*/
|
|
28705
|
+
error?: ModelError;
|
|
28706
|
+
/**
|
|
28707
|
+
*
|
|
28708
|
+
* @type {ResponseMetadata}
|
|
28709
|
+
* @memberof OrderInvoiceResponse
|
|
28710
|
+
*/
|
|
28711
|
+
metadata?: ResponseMetadata;
|
|
28712
|
+
/**
|
|
28713
|
+
* pdf_base64
|
|
28714
|
+
* @type {string}
|
|
28715
|
+
* @memberof OrderInvoiceResponse
|
|
28716
|
+
*/
|
|
28717
|
+
pdfBase64?: string;
|
|
28718
|
+
/**
|
|
28719
|
+
* Indicates if API call was successful
|
|
28720
|
+
* @type {boolean}
|
|
28721
|
+
* @memberof OrderInvoiceResponse
|
|
28722
|
+
*/
|
|
28723
|
+
success?: boolean;
|
|
28724
|
+
/**
|
|
28725
|
+
*
|
|
28726
|
+
* @type {Warning}
|
|
28727
|
+
* @memberof OrderInvoiceResponse
|
|
28728
|
+
*/
|
|
28729
|
+
warning?: Warning;
|
|
28730
|
+
}
|
|
28693
28731
|
/**
|
|
28694
28732
|
*
|
|
28695
28733
|
* @export
|
|
@@ -45023,6 +45061,14 @@ export declare const OrderApiFetchParamCreator: (configuration?: Configuration)
|
|
|
45023
45061
|
* @throws {RequiredError}
|
|
45024
45062
|
*/
|
|
45025
45063
|
format(order_id: string, format_options: OrderFormat, options?: any): FetchArgs;
|
|
45064
|
+
/**
|
|
45065
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45066
|
+
* @summary Generate an invoice for this order.
|
|
45067
|
+
* @param {string} order_id Order ID
|
|
45068
|
+
* @param {*} [options] Override http request option.
|
|
45069
|
+
* @throws {RequiredError}
|
|
45070
|
+
*/
|
|
45071
|
+
generateInvoice(order_id: string, options?: any): FetchArgs;
|
|
45026
45072
|
/**
|
|
45027
45073
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45028
45074
|
* @summary Generate an order token for a given order id
|
|
@@ -45275,6 +45321,14 @@ export declare const OrderApiFp: (configuration?: Configuration) => {
|
|
|
45275
45321
|
* @throws {RequiredError}
|
|
45276
45322
|
*/
|
|
45277
45323
|
format(order_id: string, format_options: OrderFormat, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderFormatResponse>;
|
|
45324
|
+
/**
|
|
45325
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45326
|
+
* @summary Generate an invoice for this order.
|
|
45327
|
+
* @param {string} order_id Order ID
|
|
45328
|
+
* @param {*} [options] Override http request option.
|
|
45329
|
+
* @throws {RequiredError}
|
|
45330
|
+
*/
|
|
45331
|
+
generateInvoice(order_id: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<OrderInvoiceResponse>;
|
|
45278
45332
|
/**
|
|
45279
45333
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45280
45334
|
* @summary Generate an order token for a given order id
|
|
@@ -45527,6 +45581,14 @@ export declare const OrderApiFactory: (configuration?: Configuration, fetch?: Fe
|
|
|
45527
45581
|
* @throws {RequiredError}
|
|
45528
45582
|
*/
|
|
45529
45583
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
45584
|
+
/**
|
|
45585
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45586
|
+
* @summary Generate an invoice for this order.
|
|
45587
|
+
* @param {string} order_id Order ID
|
|
45588
|
+
* @param {*} [options] Override http request option.
|
|
45589
|
+
* @throws {RequiredError}
|
|
45590
|
+
*/
|
|
45591
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
45530
45592
|
/**
|
|
45531
45593
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45532
45594
|
* @summary Generate an order token for a given order id
|
|
@@ -45785,6 +45847,15 @@ export interface OrderApiInterface {
|
|
|
45785
45847
|
* @memberof OrderApiInterface
|
|
45786
45848
|
*/
|
|
45787
45849
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
45850
|
+
/**
|
|
45851
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
45852
|
+
* @summary Generate an invoice for this order.
|
|
45853
|
+
* @param {string} order_id Order ID
|
|
45854
|
+
* @param {*} [options] Override http request option.
|
|
45855
|
+
* @throws {RequiredError}
|
|
45856
|
+
* @memberof OrderApiInterface
|
|
45857
|
+
*/
|
|
45858
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
45788
45859
|
/**
|
|
45789
45860
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
45790
45861
|
* @summary Generate an order token for a given order id
|
|
@@ -46063,6 +46134,15 @@ export declare class OrderApi extends BaseAPI implements OrderApiInterface {
|
|
|
46063
46134
|
* @memberof OrderApi
|
|
46064
46135
|
*/
|
|
46065
46136
|
format(order_id: string, format_options: OrderFormat, options?: any): Promise<OrderFormatResponse>;
|
|
46137
|
+
/**
|
|
46138
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
46139
|
+
* @summary Generate an invoice for this order.
|
|
46140
|
+
* @param {string} order_id Order ID
|
|
46141
|
+
* @param {*} [options] Override http request option.
|
|
46142
|
+
* @throws {RequiredError}
|
|
46143
|
+
* @memberof OrderApi
|
|
46144
|
+
*/
|
|
46145
|
+
generateInvoice(order_id: string, options?: any): Promise<OrderInvoiceResponse>;
|
|
46066
46146
|
/**
|
|
46067
46147
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
46068
46148
|
* @summary Generate an order token for a given order id
|
package/dist/api.js
CHANGED
|
@@ -605,12 +605,13 @@ var ConversationWebsocketMessage;
|
|
|
605
605
|
EventTypeEnum[EventTypeEnum["Rrweb"] = 'rrweb'] = "Rrweb";
|
|
606
606
|
EventTypeEnum[EventTypeEnum["ParticipantUpdate"] = 'participant update'] = "ParticipantUpdate";
|
|
607
607
|
EventTypeEnum[EventTypeEnum["ParticipantJoin"] = 'participant join'] = "ParticipantJoin";
|
|
608
|
-
EventTypeEnum[EventTypeEnum["
|
|
608
|
+
EventTypeEnum[EventTypeEnum["ParticipantLeave"] = 'participant leave'] = "ParticipantLeave";
|
|
609
609
|
EventTypeEnum[EventTypeEnum["ReadMessage"] = 'read message'] = "ReadMessage";
|
|
610
610
|
EventTypeEnum[EventTypeEnum["Typing"] = 'typing'] = "Typing";
|
|
611
611
|
EventTypeEnum[EventTypeEnum["AddCoupon"] = 'add coupon'] = "AddCoupon";
|
|
612
612
|
EventTypeEnum[EventTypeEnum["AddItem"] = 'add item'] = "AddItem";
|
|
613
613
|
EventTypeEnum[EventTypeEnum["WebchatContext"] = 'webchat context'] = "WebchatContext";
|
|
614
|
+
EventTypeEnum[EventTypeEnum["EngageCustomer"] = 'engage customer'] = "EngageCustomer";
|
|
614
615
|
})(EventTypeEnum = ConversationWebsocketMessage.EventTypeEnum || (ConversationWebsocketMessage.EventTypeEnum = {}));
|
|
615
616
|
/**
|
|
616
617
|
* @export
|
|
@@ -17214,6 +17215,52 @@ var OrderApiFetchParamCreator = function (configuration) {
|
|
|
17214
17215
|
options: localVarRequestOptions,
|
|
17215
17216
|
};
|
|
17216
17217
|
},
|
|
17218
|
+
/**
|
|
17219
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
17220
|
+
* @summary Generate an invoice for this order.
|
|
17221
|
+
* @param {string} order_id Order ID
|
|
17222
|
+
* @param {*} [options] Override http request option.
|
|
17223
|
+
* @throws {RequiredError}
|
|
17224
|
+
*/
|
|
17225
|
+
generateInvoice: function (order_id, options) {
|
|
17226
|
+
if (options === void 0) { options = {}; }
|
|
17227
|
+
// verify required parameter 'order_id' is not null or undefined
|
|
17228
|
+
if (order_id === null || order_id === undefined) {
|
|
17229
|
+
throw new RequiredError('order_id', 'Required parameter order_id was null or undefined when calling generateInvoice.');
|
|
17230
|
+
}
|
|
17231
|
+
var localVarPath = "/order/orders/{order_id}/invoice"
|
|
17232
|
+
.replace("{".concat("order_id", "}"), encodeURIComponent(String(order_id)));
|
|
17233
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
17234
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
17235
|
+
var localVarHeaderParameter = {};
|
|
17236
|
+
var localVarQueryParameter = {};
|
|
17237
|
+
if (configuration && configuration.apiVersion) {
|
|
17238
|
+
localVarHeaderParameter["X-UltraCart-Api-Version"] = configuration.apiVersion;
|
|
17239
|
+
}
|
|
17240
|
+
// authentication ultraCartOauth required
|
|
17241
|
+
// oauth required
|
|
17242
|
+
if (configuration && configuration.accessToken) {
|
|
17243
|
+
var localVarAccessTokenValue = typeof configuration.accessToken === 'function'
|
|
17244
|
+
? configuration.accessToken("ultraCartOauth", ["order_read"])
|
|
17245
|
+
: configuration.accessToken;
|
|
17246
|
+
localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
|
|
17247
|
+
}
|
|
17248
|
+
// authentication ultraCartSimpleApiKey required
|
|
17249
|
+
if (configuration && configuration.apiKey) {
|
|
17250
|
+
var localVarApiKeyValue = typeof configuration.apiKey === 'function'
|
|
17251
|
+
? configuration.apiKey("x-ultracart-simple-key")
|
|
17252
|
+
: configuration.apiKey;
|
|
17253
|
+
localVarHeaderParameter["x-ultracart-simple-key"] = localVarApiKeyValue;
|
|
17254
|
+
}
|
|
17255
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
17256
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
17257
|
+
delete localVarUrlObj.search;
|
|
17258
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
17259
|
+
return {
|
|
17260
|
+
url: url.format(localVarUrlObj),
|
|
17261
|
+
options: localVarRequestOptions,
|
|
17262
|
+
};
|
|
17263
|
+
},
|
|
17217
17264
|
/**
|
|
17218
17265
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
17219
17266
|
* @summary Generate an order token for a given order id
|
|
@@ -18436,6 +18483,28 @@ var OrderApiFp = function (configuration) {
|
|
|
18436
18483
|
});
|
|
18437
18484
|
};
|
|
18438
18485
|
},
|
|
18486
|
+
/**
|
|
18487
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
18488
|
+
* @summary Generate an invoice for this order.
|
|
18489
|
+
* @param {string} order_id Order ID
|
|
18490
|
+
* @param {*} [options] Override http request option.
|
|
18491
|
+
* @throws {RequiredError}
|
|
18492
|
+
*/
|
|
18493
|
+
generateInvoice: function (order_id, options) {
|
|
18494
|
+
var localVarFetchArgs = (0, exports.OrderApiFetchParamCreator)(configuration).generateInvoice(order_id, options);
|
|
18495
|
+
return function (fetch, basePath) {
|
|
18496
|
+
if (fetch === void 0) { fetch = portableFetch; }
|
|
18497
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
18498
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
18499
|
+
if (response.status >= 200 && response.status < 300) {
|
|
18500
|
+
return response.json();
|
|
18501
|
+
}
|
|
18502
|
+
else {
|
|
18503
|
+
throw response;
|
|
18504
|
+
}
|
|
18505
|
+
});
|
|
18506
|
+
};
|
|
18507
|
+
},
|
|
18439
18508
|
/**
|
|
18440
18509
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
18441
18510
|
* @summary Generate an order token for a given order id
|
|
@@ -18967,6 +19036,16 @@ var OrderApiFactory = function (configuration, fetch, basePath) {
|
|
|
18967
19036
|
format: function (order_id, format_options, options) {
|
|
18968
19037
|
return (0, exports.OrderApiFp)(configuration).format(order_id, format_options, options)(fetch, basePath);
|
|
18969
19038
|
},
|
|
19039
|
+
/**
|
|
19040
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
19041
|
+
* @summary Generate an invoice for this order.
|
|
19042
|
+
* @param {string} order_id Order ID
|
|
19043
|
+
* @param {*} [options] Override http request option.
|
|
19044
|
+
* @throws {RequiredError}
|
|
19045
|
+
*/
|
|
19046
|
+
generateInvoice: function (order_id, options) {
|
|
19047
|
+
return (0, exports.OrderApiFp)(configuration).generateInvoice(order_id, options)(fetch, basePath);
|
|
19048
|
+
},
|
|
18970
19049
|
/**
|
|
18971
19050
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
18972
19051
|
* @summary Generate an order token for a given order id
|
|
@@ -19280,6 +19359,17 @@ var OrderApi = /** @class */ (function (_super) {
|
|
|
19280
19359
|
OrderApi.prototype.format = function (order_id, format_options, options) {
|
|
19281
19360
|
return (0, exports.OrderApiFp)(this.configuration).format(order_id, format_options, options)(this.fetch, this.basePath);
|
|
19282
19361
|
};
|
|
19362
|
+
/**
|
|
19363
|
+
* The invoice PDF that is returned is base 64 encoded
|
|
19364
|
+
* @summary Generate an invoice for this order.
|
|
19365
|
+
* @param {string} order_id Order ID
|
|
19366
|
+
* @param {*} [options] Override http request option.
|
|
19367
|
+
* @throws {RequiredError}
|
|
19368
|
+
* @memberof OrderApi
|
|
19369
|
+
*/
|
|
19370
|
+
OrderApi.prototype.generateInvoice = function (order_id, options) {
|
|
19371
|
+
return (0, exports.OrderApiFp)(this.configuration).generateInvoice(order_id, options)(this.fetch, this.basePath);
|
|
19372
|
+
};
|
|
19283
19373
|
/**
|
|
19284
19374
|
* Retrieves a single order token for a given order id. The token can be used with the getOrderByToken API.
|
|
19285
19375
|
* @summary Generate an order token for a given order id
|