@teemill/orders 1.19.2 → 1.21.0
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 +125 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +74 -1
- package/dist/api.js +79 -1
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/esm/api.d.ts +74 -1
- package/dist/esm/api.js +79 -1
- package/dist/esm/base.d.ts +1 -1
- package/dist/esm/base.js +1 -1
- package/dist/esm/common.d.ts +1 -1
- package/dist/esm/common.js +1 -1
- package/dist/esm/configuration.d.ts +1 -1
- package/dist/esm/configuration.js +1 -1
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/Order.md +2 -0
- package/docs/OrdersApi.md +60 -0
- package/docs/PaymentMethod.md +20 -0
- package/index.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @teemill/orders@1.
|
|
1
|
+
## @teemill/orders@1.21.0
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). 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 @teemill/orders@1.
|
|
39
|
+
npm install @teemill/orders@1.21.0 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -54,6 +54,7 @@ Class | Method | HTTP request | Description
|
|
|
54
54
|
*OrdersApi* | [**cancelOrder**](docs/OrdersApi.md#cancelorder) | **DELETE** /v1/orders/{orderId} | Cancel order
|
|
55
55
|
*OrdersApi* | [**confirmOrder**](docs/OrdersApi.md#confirmorder) | **POST** /v1/orders/{orderId}/confirm | Confirm order
|
|
56
56
|
*OrdersApi* | [**createOrder**](docs/OrdersApi.md#createorder) | **POST** /v1/orders | Create order
|
|
57
|
+
*OrdersApi* | [**downloadInvoice**](docs/OrdersApi.md#downloadinvoice) | **GET** /v1/orders/{orderId}/invoice | Download order invoice
|
|
57
58
|
*OrdersApi* | [**exportOrders**](docs/OrdersApi.md#exportorders) | **GET** /v1/orders/export | Export orders
|
|
58
59
|
*OrdersApi* | [**getOrder**](docs/OrdersApi.md#getorder) | **GET** /v1/orders/{orderId} | Get order
|
|
59
60
|
*OrdersApi* | [**getOrders**](docs/OrdersApi.md#getorders) | **GET** /v1/orders | List orders
|
|
@@ -90,6 +91,7 @@ Class | Method | HTTP request | Description
|
|
|
90
91
|
- [OrdersResponse](docs/OrdersResponse.md)
|
|
91
92
|
- [Origin](docs/Origin.md)
|
|
92
93
|
- [PaymentAttempt](docs/PaymentAttempt.md)
|
|
94
|
+
- [PaymentMethod](docs/PaymentMethod.md)
|
|
93
95
|
- [Price](docs/Price.md)
|
|
94
96
|
- [ShippingMethod](docs/ShippingMethod.md)
|
|
95
97
|
- [Status](docs/Status.md)
|
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -590,6 +590,12 @@ export interface Order {
|
|
|
590
590
|
* @memberof Order
|
|
591
591
|
*/
|
|
592
592
|
'contactInformation': ContactInformation;
|
|
593
|
+
/**
|
|
594
|
+
*
|
|
595
|
+
* @type {PaymentMethod}
|
|
596
|
+
* @memberof Order
|
|
597
|
+
*/
|
|
598
|
+
'paymentMethod'?: PaymentMethod;
|
|
593
599
|
/**
|
|
594
600
|
*
|
|
595
601
|
* @type {Address}
|
|
@@ -929,6 +935,19 @@ export const PaymentAttemptStatusEnum = {
|
|
|
929
935
|
|
|
930
936
|
export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
|
|
931
937
|
|
|
938
|
+
/**
|
|
939
|
+
*
|
|
940
|
+
* @export
|
|
941
|
+
* @interface PaymentMethod
|
|
942
|
+
*/
|
|
943
|
+
export interface PaymentMethod {
|
|
944
|
+
/**
|
|
945
|
+
*
|
|
946
|
+
* @type {string}
|
|
947
|
+
* @memberof PaymentMethod
|
|
948
|
+
*/
|
|
949
|
+
'type'?: string;
|
|
950
|
+
}
|
|
932
951
|
/**
|
|
933
952
|
* Standard price definition that defines the amount and currency.
|
|
934
953
|
* @export
|
|
@@ -1216,6 +1235,54 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
|
|
|
1216
1235
|
options: localVarRequestOptions,
|
|
1217
1236
|
};
|
|
1218
1237
|
},
|
|
1238
|
+
/**
|
|
1239
|
+
* Download an order invoice.
|
|
1240
|
+
* @summary Download order invoice
|
|
1241
|
+
* @param {string} project What project it is
|
|
1242
|
+
* @param {string} orderId Unique identifier of an order
|
|
1243
|
+
* @param {*} [options] Override http request option.
|
|
1244
|
+
* @throws {RequiredError}
|
|
1245
|
+
*/
|
|
1246
|
+
downloadInvoice: async (project: string, orderId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
1247
|
+
// verify required parameter 'project' is not null or undefined
|
|
1248
|
+
assertParamExists('downloadInvoice', 'project', project)
|
|
1249
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
1250
|
+
assertParamExists('downloadInvoice', 'orderId', orderId)
|
|
1251
|
+
const localVarPath = `/v1/orders/{orderId}/invoice`
|
|
1252
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
1253
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1254
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1255
|
+
let baseOptions;
|
|
1256
|
+
if (configuration) {
|
|
1257
|
+
baseOptions = configuration.baseOptions;
|
|
1258
|
+
}
|
|
1259
|
+
|
|
1260
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
1261
|
+
const localVarHeaderParameter = {} as any;
|
|
1262
|
+
const localVarQueryParameter = {} as any;
|
|
1263
|
+
|
|
1264
|
+
// authentication session-oauth required
|
|
1265
|
+
// oauth required
|
|
1266
|
+
await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
|
|
1267
|
+
|
|
1268
|
+
// authentication api-key required
|
|
1269
|
+
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
|
|
1270
|
+
|
|
1271
|
+
if (project !== undefined) {
|
|
1272
|
+
localVarQueryParameter['project'] = project;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1278
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1279
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
1280
|
+
|
|
1281
|
+
return {
|
|
1282
|
+
url: toPathString(localVarUrlObj),
|
|
1283
|
+
options: localVarRequestOptions,
|
|
1284
|
+
};
|
|
1285
|
+
},
|
|
1219
1286
|
/**
|
|
1220
1287
|
* Export orders as a CSV file
|
|
1221
1288
|
* @summary Export orders
|
|
@@ -1536,6 +1603,20 @@ export const OrdersApiFp = function(configuration?: Configuration) {
|
|
|
1536
1603
|
const localVarOperationServerBasePath = operationServerMap['OrdersApi.createOrder']?.[localVarOperationServerIndex]?.url;
|
|
1537
1604
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1538
1605
|
},
|
|
1606
|
+
/**
|
|
1607
|
+
* Download an order invoice.
|
|
1608
|
+
* @summary Download order invoice
|
|
1609
|
+
* @param {string} project What project it is
|
|
1610
|
+
* @param {string} orderId Unique identifier of an order
|
|
1611
|
+
* @param {*} [options] Override http request option.
|
|
1612
|
+
* @throws {RequiredError}
|
|
1613
|
+
*/
|
|
1614
|
+
async downloadInvoice(project: string, orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
|
|
1615
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.downloadInvoice(project, orderId, options);
|
|
1616
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1617
|
+
const localVarOperationServerBasePath = operationServerMap['OrdersApi.downloadInvoice']?.[localVarOperationServerIndex]?.url;
|
|
1618
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
1619
|
+
},
|
|
1539
1620
|
/**
|
|
1540
1621
|
* Export orders as a CSV file
|
|
1541
1622
|
* @summary Export orders
|
|
@@ -1644,6 +1725,16 @@ export const OrdersApiFactory = function (configuration?: Configuration, basePat
|
|
|
1644
1725
|
createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order> {
|
|
1645
1726
|
return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
1646
1727
|
},
|
|
1728
|
+
/**
|
|
1729
|
+
* Download an order invoice.
|
|
1730
|
+
* @summary Download order invoice
|
|
1731
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
1732
|
+
* @param {*} [options] Override http request option.
|
|
1733
|
+
* @throws {RequiredError}
|
|
1734
|
+
*/
|
|
1735
|
+
downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
|
|
1736
|
+
return localVarFp.downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
1737
|
+
},
|
|
1647
1738
|
/**
|
|
1648
1739
|
* Export orders as a CSV file
|
|
1649
1740
|
* @summary Export orders
|
|
@@ -1778,6 +1869,27 @@ export interface OrdersApiCreateOrderRequest {
|
|
|
1778
1869
|
readonly fields?: string
|
|
1779
1870
|
}
|
|
1780
1871
|
|
|
1872
|
+
/**
|
|
1873
|
+
* Request parameters for downloadInvoice operation in OrdersApi.
|
|
1874
|
+
* @export
|
|
1875
|
+
* @interface OrdersApiDownloadInvoiceRequest
|
|
1876
|
+
*/
|
|
1877
|
+
export interface OrdersApiDownloadInvoiceRequest {
|
|
1878
|
+
/**
|
|
1879
|
+
* What project it is
|
|
1880
|
+
* @type {string}
|
|
1881
|
+
* @memberof OrdersApiDownloadInvoice
|
|
1882
|
+
*/
|
|
1883
|
+
readonly project: string
|
|
1884
|
+
|
|
1885
|
+
/**
|
|
1886
|
+
* Unique identifier of an order
|
|
1887
|
+
* @type {string}
|
|
1888
|
+
* @memberof OrdersApiDownloadInvoice
|
|
1889
|
+
*/
|
|
1890
|
+
readonly orderId: string
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1781
1893
|
/**
|
|
1782
1894
|
* Request parameters for exportOrders operation in OrdersApi.
|
|
1783
1895
|
* @export
|
|
@@ -1989,6 +2101,18 @@ export class OrdersApi extends BaseAPI {
|
|
|
1989
2101
|
return OrdersApiFp(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
1990
2102
|
}
|
|
1991
2103
|
|
|
2104
|
+
/**
|
|
2105
|
+
* Download an order invoice.
|
|
2106
|
+
* @summary Download order invoice
|
|
2107
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
2108
|
+
* @param {*} [options] Override http request option.
|
|
2109
|
+
* @throws {RequiredError}
|
|
2110
|
+
* @memberof OrdersApi
|
|
2111
|
+
*/
|
|
2112
|
+
public downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig) {
|
|
2113
|
+
return OrdersApiFp(this.configuration).downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
|
2114
|
+
}
|
|
2115
|
+
|
|
1992
2116
|
/**
|
|
1993
2117
|
* Export orders as a CSV file
|
|
1994
2118
|
* @summary Export orders
|
package/base.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/common.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/configuration.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -572,6 +572,12 @@ export interface Order {
|
|
|
572
572
|
* @memberof Order
|
|
573
573
|
*/
|
|
574
574
|
'contactInformation': ContactInformation;
|
|
575
|
+
/**
|
|
576
|
+
*
|
|
577
|
+
* @type {PaymentMethod}
|
|
578
|
+
* @memberof Order
|
|
579
|
+
*/
|
|
580
|
+
'paymentMethod'?: PaymentMethod;
|
|
575
581
|
/**
|
|
576
582
|
*
|
|
577
583
|
* @type {Address}
|
|
@@ -905,6 +911,19 @@ export declare const PaymentAttemptStatusEnum: {
|
|
|
905
911
|
readonly Cancelled: "cancelled";
|
|
906
912
|
};
|
|
907
913
|
export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
|
|
914
|
+
/**
|
|
915
|
+
*
|
|
916
|
+
* @export
|
|
917
|
+
* @interface PaymentMethod
|
|
918
|
+
*/
|
|
919
|
+
export interface PaymentMethod {
|
|
920
|
+
/**
|
|
921
|
+
*
|
|
922
|
+
* @type {string}
|
|
923
|
+
* @memberof PaymentMethod
|
|
924
|
+
*/
|
|
925
|
+
'type'?: string;
|
|
926
|
+
}
|
|
908
927
|
/**
|
|
909
928
|
* Standard price definition that defines the amount and currency.
|
|
910
929
|
* @export
|
|
@@ -1048,6 +1067,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1048
1067
|
* @throws {RequiredError}
|
|
1049
1068
|
*/
|
|
1050
1069
|
createOrder: (project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Download an order invoice.
|
|
1072
|
+
* @summary Download order invoice
|
|
1073
|
+
* @param {string} project What project it is
|
|
1074
|
+
* @param {string} orderId Unique identifier of an order
|
|
1075
|
+
* @param {*} [options] Override http request option.
|
|
1076
|
+
* @throws {RequiredError}
|
|
1077
|
+
*/
|
|
1078
|
+
downloadInvoice: (project: string, orderId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1051
1079
|
/**
|
|
1052
1080
|
* Export orders as a CSV file
|
|
1053
1081
|
* @summary Export orders
|
|
@@ -1133,6 +1161,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
1133
1161
|
* @throws {RequiredError}
|
|
1134
1162
|
*/
|
|
1135
1163
|
createOrder(project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Download an order invoice.
|
|
1166
|
+
* @summary Download order invoice
|
|
1167
|
+
* @param {string} project What project it is
|
|
1168
|
+
* @param {string} orderId Unique identifier of an order
|
|
1169
|
+
* @param {*} [options] Override http request option.
|
|
1170
|
+
* @throws {RequiredError}
|
|
1171
|
+
*/
|
|
1172
|
+
downloadInvoice(project: string, orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
|
|
1136
1173
|
/**
|
|
1137
1174
|
* Export orders as a CSV file
|
|
1138
1175
|
* @summary Export orders
|
|
@@ -1211,6 +1248,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
1211
1248
|
* @throws {RequiredError}
|
|
1212
1249
|
*/
|
|
1213
1250
|
createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Download an order invoice.
|
|
1253
|
+
* @summary Download order invoice
|
|
1254
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
1255
|
+
* @param {*} [options] Override http request option.
|
|
1256
|
+
* @throws {RequiredError}
|
|
1257
|
+
*/
|
|
1258
|
+
downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<File>;
|
|
1214
1259
|
/**
|
|
1215
1260
|
* Export orders as a CSV file
|
|
1216
1261
|
* @summary Export orders
|
|
@@ -1325,6 +1370,25 @@ export interface OrdersApiCreateOrderRequest {
|
|
|
1325
1370
|
*/
|
|
1326
1371
|
readonly fields?: string;
|
|
1327
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* Request parameters for downloadInvoice operation in OrdersApi.
|
|
1375
|
+
* @export
|
|
1376
|
+
* @interface OrdersApiDownloadInvoiceRequest
|
|
1377
|
+
*/
|
|
1378
|
+
export interface OrdersApiDownloadInvoiceRequest {
|
|
1379
|
+
/**
|
|
1380
|
+
* What project it is
|
|
1381
|
+
* @type {string}
|
|
1382
|
+
* @memberof OrdersApiDownloadInvoice
|
|
1383
|
+
*/
|
|
1384
|
+
readonly project: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* Unique identifier of an order
|
|
1387
|
+
* @type {string}
|
|
1388
|
+
* @memberof OrdersApiDownloadInvoice
|
|
1389
|
+
*/
|
|
1390
|
+
readonly orderId: string;
|
|
1391
|
+
}
|
|
1328
1392
|
/**
|
|
1329
1393
|
* Request parameters for exportOrders operation in OrdersApi.
|
|
1330
1394
|
* @export
|
|
@@ -1507,6 +1571,15 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
1507
1571
|
* @memberof OrdersApi
|
|
1508
1572
|
*/
|
|
1509
1573
|
createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Order, any>>;
|
|
1574
|
+
/**
|
|
1575
|
+
* Download an order invoice.
|
|
1576
|
+
* @summary Download order invoice
|
|
1577
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
1578
|
+
* @param {*} [options] Override http request option.
|
|
1579
|
+
* @throws {RequiredError}
|
|
1580
|
+
* @memberof OrdersApi
|
|
1581
|
+
*/
|
|
1582
|
+
downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any>>;
|
|
1510
1583
|
/**
|
|
1511
1584
|
* Export orders as a CSV file
|
|
1512
1585
|
* @summary Export orders
|
package/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.21.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -206,6 +206,46 @@ const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
206
206
|
options: localVarRequestOptions,
|
|
207
207
|
};
|
|
208
208
|
}),
|
|
209
|
+
/**
|
|
210
|
+
* Download an order invoice.
|
|
211
|
+
* @summary Download order invoice
|
|
212
|
+
* @param {string} project What project it is
|
|
213
|
+
* @param {string} orderId Unique identifier of an order
|
|
214
|
+
* @param {*} [options] Override http request option.
|
|
215
|
+
* @throws {RequiredError}
|
|
216
|
+
*/
|
|
217
|
+
downloadInvoice: (project_1, orderId_1, ...args_1) => __awaiter(this, [project_1, orderId_1, ...args_1], void 0, function* (project, orderId, options = {}) {
|
|
218
|
+
// verify required parameter 'project' is not null or undefined
|
|
219
|
+
(0, common_1.assertParamExists)('downloadInvoice', 'project', project);
|
|
220
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
221
|
+
(0, common_1.assertParamExists)('downloadInvoice', 'orderId', orderId);
|
|
222
|
+
const localVarPath = `/v1/orders/{orderId}/invoice`
|
|
223
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
224
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
225
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
226
|
+
let baseOptions;
|
|
227
|
+
if (configuration) {
|
|
228
|
+
baseOptions = configuration.baseOptions;
|
|
229
|
+
}
|
|
230
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
231
|
+
const localVarHeaderParameter = {};
|
|
232
|
+
const localVarQueryParameter = {};
|
|
233
|
+
// authentication session-oauth required
|
|
234
|
+
// oauth required
|
|
235
|
+
yield (0, common_1.setOAuthToObject)(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
236
|
+
// authentication api-key required
|
|
237
|
+
yield (0, common_1.setApiKeyToObject)(localVarHeaderParameter, "Authorization", configuration);
|
|
238
|
+
if (project !== undefined) {
|
|
239
|
+
localVarQueryParameter['project'] = project;
|
|
240
|
+
}
|
|
241
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
242
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
243
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
244
|
+
return {
|
|
245
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
246
|
+
options: localVarRequestOptions,
|
|
247
|
+
};
|
|
248
|
+
}),
|
|
209
249
|
/**
|
|
210
250
|
* Export orders as a CSV file
|
|
211
251
|
* @summary Export orders
|
|
@@ -489,6 +529,23 @@ const OrdersApiFp = function (configuration) {
|
|
|
489
529
|
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
490
530
|
});
|
|
491
531
|
},
|
|
532
|
+
/**
|
|
533
|
+
* Download an order invoice.
|
|
534
|
+
* @summary Download order invoice
|
|
535
|
+
* @param {string} project What project it is
|
|
536
|
+
* @param {string} orderId Unique identifier of an order
|
|
537
|
+
* @param {*} [options] Override http request option.
|
|
538
|
+
* @throws {RequiredError}
|
|
539
|
+
*/
|
|
540
|
+
downloadInvoice(project, orderId, options) {
|
|
541
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
542
|
+
var _a, _b, _c;
|
|
543
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoice(project, orderId, options);
|
|
544
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
545
|
+
const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OrdersApi.downloadInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
546
|
+
return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
547
|
+
});
|
|
548
|
+
},
|
|
492
549
|
/**
|
|
493
550
|
* Export orders as a CSV file
|
|
494
551
|
* @summary Export orders
|
|
@@ -609,6 +666,16 @@ const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
609
666
|
createOrder(requestParameters, options) {
|
|
610
667
|
return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
611
668
|
},
|
|
669
|
+
/**
|
|
670
|
+
* Download an order invoice.
|
|
671
|
+
* @summary Download order invoice
|
|
672
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
673
|
+
* @param {*} [options] Override http request option.
|
|
674
|
+
* @throws {RequiredError}
|
|
675
|
+
*/
|
|
676
|
+
downloadInvoice(requestParameters, options) {
|
|
677
|
+
return localVarFp.downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
678
|
+
},
|
|
612
679
|
/**
|
|
613
680
|
* Export orders as a CSV file
|
|
614
681
|
* @summary Export orders
|
|
@@ -692,6 +759,17 @@ class OrdersApi extends base_1.BaseAPI {
|
|
|
692
759
|
createOrder(requestParameters, options) {
|
|
693
760
|
return (0, exports.OrdersApiFp)(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
694
761
|
}
|
|
762
|
+
/**
|
|
763
|
+
* Download an order invoice.
|
|
764
|
+
* @summary Download order invoice
|
|
765
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
766
|
+
* @param {*} [options] Override http request option.
|
|
767
|
+
* @throws {RequiredError}
|
|
768
|
+
* @memberof OrdersApi
|
|
769
|
+
*/
|
|
770
|
+
downloadInvoice(requestParameters, options) {
|
|
771
|
+
return (0, exports.OrdersApiFp)(this.configuration).downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
|
772
|
+
}
|
|
695
773
|
/**
|
|
696
774
|
* Export orders as a CSV file
|
|
697
775
|
* @summary Export orders
|
package/dist/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/base.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.21.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/common.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/common.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.21.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.21.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -572,6 +572,12 @@ export interface Order {
|
|
|
572
572
|
* @memberof Order
|
|
573
573
|
*/
|
|
574
574
|
'contactInformation': ContactInformation;
|
|
575
|
+
/**
|
|
576
|
+
*
|
|
577
|
+
* @type {PaymentMethod}
|
|
578
|
+
* @memberof Order
|
|
579
|
+
*/
|
|
580
|
+
'paymentMethod'?: PaymentMethod;
|
|
575
581
|
/**
|
|
576
582
|
*
|
|
577
583
|
* @type {Address}
|
|
@@ -905,6 +911,19 @@ export declare const PaymentAttemptStatusEnum: {
|
|
|
905
911
|
readonly Cancelled: "cancelled";
|
|
906
912
|
};
|
|
907
913
|
export type PaymentAttemptStatusEnum = typeof PaymentAttemptStatusEnum[keyof typeof PaymentAttemptStatusEnum];
|
|
914
|
+
/**
|
|
915
|
+
*
|
|
916
|
+
* @export
|
|
917
|
+
* @interface PaymentMethod
|
|
918
|
+
*/
|
|
919
|
+
export interface PaymentMethod {
|
|
920
|
+
/**
|
|
921
|
+
*
|
|
922
|
+
* @type {string}
|
|
923
|
+
* @memberof PaymentMethod
|
|
924
|
+
*/
|
|
925
|
+
'type'?: string;
|
|
926
|
+
}
|
|
908
927
|
/**
|
|
909
928
|
* Standard price definition that defines the amount and currency.
|
|
910
929
|
* @export
|
|
@@ -1048,6 +1067,15 @@ export declare const OrdersApiAxiosParamCreator: (configuration?: Configuration)
|
|
|
1048
1067
|
* @throws {RequiredError}
|
|
1049
1068
|
*/
|
|
1050
1069
|
createOrder: (project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1070
|
+
/**
|
|
1071
|
+
* Download an order invoice.
|
|
1072
|
+
* @summary Download order invoice
|
|
1073
|
+
* @param {string} project What project it is
|
|
1074
|
+
* @param {string} orderId Unique identifier of an order
|
|
1075
|
+
* @param {*} [options] Override http request option.
|
|
1076
|
+
* @throws {RequiredError}
|
|
1077
|
+
*/
|
|
1078
|
+
downloadInvoice: (project: string, orderId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
|
|
1051
1079
|
/**
|
|
1052
1080
|
* Export orders as a CSV file
|
|
1053
1081
|
* @summary Export orders
|
|
@@ -1133,6 +1161,15 @@ export declare const OrdersApiFp: (configuration?: Configuration) => {
|
|
|
1133
1161
|
* @throws {RequiredError}
|
|
1134
1162
|
*/
|
|
1135
1163
|
createOrder(project: string, createOrder: CreateOrder, fields?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Order>>;
|
|
1164
|
+
/**
|
|
1165
|
+
* Download an order invoice.
|
|
1166
|
+
* @summary Download order invoice
|
|
1167
|
+
* @param {string} project What project it is
|
|
1168
|
+
* @param {string} orderId Unique identifier of an order
|
|
1169
|
+
* @param {*} [options] Override http request option.
|
|
1170
|
+
* @throws {RequiredError}
|
|
1171
|
+
*/
|
|
1172
|
+
downloadInvoice(project: string, orderId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>>;
|
|
1136
1173
|
/**
|
|
1137
1174
|
* Export orders as a CSV file
|
|
1138
1175
|
* @summary Export orders
|
|
@@ -1211,6 +1248,14 @@ export declare const OrdersApiFactory: (configuration?: Configuration, basePath?
|
|
|
1211
1248
|
* @throws {RequiredError}
|
|
1212
1249
|
*/
|
|
1213
1250
|
createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): AxiosPromise<Order>;
|
|
1251
|
+
/**
|
|
1252
|
+
* Download an order invoice.
|
|
1253
|
+
* @summary Download order invoice
|
|
1254
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
1255
|
+
* @param {*} [options] Override http request option.
|
|
1256
|
+
* @throws {RequiredError}
|
|
1257
|
+
*/
|
|
1258
|
+
downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): AxiosPromise<File>;
|
|
1214
1259
|
/**
|
|
1215
1260
|
* Export orders as a CSV file
|
|
1216
1261
|
* @summary Export orders
|
|
@@ -1325,6 +1370,25 @@ export interface OrdersApiCreateOrderRequest {
|
|
|
1325
1370
|
*/
|
|
1326
1371
|
readonly fields?: string;
|
|
1327
1372
|
}
|
|
1373
|
+
/**
|
|
1374
|
+
* Request parameters for downloadInvoice operation in OrdersApi.
|
|
1375
|
+
* @export
|
|
1376
|
+
* @interface OrdersApiDownloadInvoiceRequest
|
|
1377
|
+
*/
|
|
1378
|
+
export interface OrdersApiDownloadInvoiceRequest {
|
|
1379
|
+
/**
|
|
1380
|
+
* What project it is
|
|
1381
|
+
* @type {string}
|
|
1382
|
+
* @memberof OrdersApiDownloadInvoice
|
|
1383
|
+
*/
|
|
1384
|
+
readonly project: string;
|
|
1385
|
+
/**
|
|
1386
|
+
* Unique identifier of an order
|
|
1387
|
+
* @type {string}
|
|
1388
|
+
* @memberof OrdersApiDownloadInvoice
|
|
1389
|
+
*/
|
|
1390
|
+
readonly orderId: string;
|
|
1391
|
+
}
|
|
1328
1392
|
/**
|
|
1329
1393
|
* Request parameters for exportOrders operation in OrdersApi.
|
|
1330
1394
|
* @export
|
|
@@ -1507,6 +1571,15 @@ export declare class OrdersApi extends BaseAPI {
|
|
|
1507
1571
|
* @memberof OrdersApi
|
|
1508
1572
|
*/
|
|
1509
1573
|
createOrder(requestParameters: OrdersApiCreateOrderRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<Order, any>>;
|
|
1574
|
+
/**
|
|
1575
|
+
* Download an order invoice.
|
|
1576
|
+
* @summary Download order invoice
|
|
1577
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
1578
|
+
* @param {*} [options] Override http request option.
|
|
1579
|
+
* @throws {RequiredError}
|
|
1580
|
+
* @memberof OrdersApi
|
|
1581
|
+
*/
|
|
1582
|
+
downloadInvoice(requestParameters: OrdersApiDownloadInvoiceRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<File, any>>;
|
|
1510
1583
|
/**
|
|
1511
1584
|
* Export orders as a CSV file
|
|
1512
1585
|
* @summary Export orders
|
package/dist/esm/api.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -203,6 +203,46 @@ export const OrdersApiAxiosParamCreator = function (configuration) {
|
|
|
203
203
|
options: localVarRequestOptions,
|
|
204
204
|
};
|
|
205
205
|
}),
|
|
206
|
+
/**
|
|
207
|
+
* Download an order invoice.
|
|
208
|
+
* @summary Download order invoice
|
|
209
|
+
* @param {string} project What project it is
|
|
210
|
+
* @param {string} orderId Unique identifier of an order
|
|
211
|
+
* @param {*} [options] Override http request option.
|
|
212
|
+
* @throws {RequiredError}
|
|
213
|
+
*/
|
|
214
|
+
downloadInvoice: (project_1, orderId_1, ...args_1) => __awaiter(this, [project_1, orderId_1, ...args_1], void 0, function* (project, orderId, options = {}) {
|
|
215
|
+
// verify required parameter 'project' is not null or undefined
|
|
216
|
+
assertParamExists('downloadInvoice', 'project', project);
|
|
217
|
+
// verify required parameter 'orderId' is not null or undefined
|
|
218
|
+
assertParamExists('downloadInvoice', 'orderId', orderId);
|
|
219
|
+
const localVarPath = `/v1/orders/{orderId}/invoice`
|
|
220
|
+
.replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
|
|
221
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
222
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
223
|
+
let baseOptions;
|
|
224
|
+
if (configuration) {
|
|
225
|
+
baseOptions = configuration.baseOptions;
|
|
226
|
+
}
|
|
227
|
+
const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
|
|
228
|
+
const localVarHeaderParameter = {};
|
|
229
|
+
const localVarQueryParameter = {};
|
|
230
|
+
// authentication session-oauth required
|
|
231
|
+
// oauth required
|
|
232
|
+
yield setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration);
|
|
233
|
+
// authentication api-key required
|
|
234
|
+
yield setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration);
|
|
235
|
+
if (project !== undefined) {
|
|
236
|
+
localVarQueryParameter['project'] = project;
|
|
237
|
+
}
|
|
238
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
239
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
240
|
+
localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
241
|
+
return {
|
|
242
|
+
url: toPathString(localVarUrlObj),
|
|
243
|
+
options: localVarRequestOptions,
|
|
244
|
+
};
|
|
245
|
+
}),
|
|
206
246
|
/**
|
|
207
247
|
* Export orders as a CSV file
|
|
208
248
|
* @summary Export orders
|
|
@@ -485,6 +525,23 @@ export const OrdersApiFp = function (configuration) {
|
|
|
485
525
|
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
486
526
|
});
|
|
487
527
|
},
|
|
528
|
+
/**
|
|
529
|
+
* Download an order invoice.
|
|
530
|
+
* @summary Download order invoice
|
|
531
|
+
* @param {string} project What project it is
|
|
532
|
+
* @param {string} orderId Unique identifier of an order
|
|
533
|
+
* @param {*} [options] Override http request option.
|
|
534
|
+
* @throws {RequiredError}
|
|
535
|
+
*/
|
|
536
|
+
downloadInvoice(project, orderId, options) {
|
|
537
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
538
|
+
var _a, _b, _c;
|
|
539
|
+
const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadInvoice(project, orderId, options);
|
|
540
|
+
const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
541
|
+
const localVarOperationServerBasePath = (_c = (_b = operationServerMap['OrdersApi.downloadInvoice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
542
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
543
|
+
});
|
|
544
|
+
},
|
|
488
545
|
/**
|
|
489
546
|
* Export orders as a CSV file
|
|
490
547
|
* @summary Export orders
|
|
@@ -604,6 +661,16 @@ export const OrdersApiFactory = function (configuration, basePath, axios) {
|
|
|
604
661
|
createOrder(requestParameters, options) {
|
|
605
662
|
return localVarFp.createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(axios, basePath));
|
|
606
663
|
},
|
|
664
|
+
/**
|
|
665
|
+
* Download an order invoice.
|
|
666
|
+
* @summary Download order invoice
|
|
667
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
668
|
+
* @param {*} [options] Override http request option.
|
|
669
|
+
* @throws {RequiredError}
|
|
670
|
+
*/
|
|
671
|
+
downloadInvoice(requestParameters, options) {
|
|
672
|
+
return localVarFp.downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(axios, basePath));
|
|
673
|
+
},
|
|
607
674
|
/**
|
|
608
675
|
* Export orders as a CSV file
|
|
609
676
|
* @summary Export orders
|
|
@@ -686,6 +753,17 @@ export class OrdersApi extends BaseAPI {
|
|
|
686
753
|
createOrder(requestParameters, options) {
|
|
687
754
|
return OrdersApiFp(this.configuration).createOrder(requestParameters.project, requestParameters.createOrder, requestParameters.fields, options).then((request) => request(this.axios, this.basePath));
|
|
688
755
|
}
|
|
756
|
+
/**
|
|
757
|
+
* Download an order invoice.
|
|
758
|
+
* @summary Download order invoice
|
|
759
|
+
* @param {OrdersApiDownloadInvoiceRequest} requestParameters Request parameters.
|
|
760
|
+
* @param {*} [options] Override http request option.
|
|
761
|
+
* @throws {RequiredError}
|
|
762
|
+
* @memberof OrdersApi
|
|
763
|
+
*/
|
|
764
|
+
downloadInvoice(requestParameters, options) {
|
|
765
|
+
return OrdersApiFp(this.configuration).downloadInvoice(requestParameters.project, requestParameters.orderId, options).then((request) => request(this.axios, this.basePath));
|
|
766
|
+
}
|
|
689
767
|
/**
|
|
690
768
|
* Export orders as a CSV file
|
|
691
769
|
* @summary Export orders
|
package/dist/esm/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/base.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/common.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/common.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/esm/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Orders API
|
|
3
3
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
4
4
|
*
|
|
5
|
-
* The version of the OpenAPI document: 1.
|
|
5
|
+
* The version of the OpenAPI document: 1.21.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Orders API
|
|
6
6
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 1.
|
|
8
|
+
* The version of the OpenAPI document: 1.21.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/docs/Order.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
|
|
|
9
9
|
**ref** | **string** | A reference to the resource location | [optional] [default to undefined]
|
|
10
10
|
**status** | [**Status**](Status.md) | | [optional] [default to undefined]
|
|
11
11
|
**contactInformation** | [**ContactInformation**](ContactInformation.md) | | [default to undefined]
|
|
12
|
+
**paymentMethod** | [**PaymentMethod**](PaymentMethod.md) | | [optional] [default to undefined]
|
|
12
13
|
**shippingAddress** | [**Address**](Address.md) | | [default to undefined]
|
|
13
14
|
**customsInformation** | [**CustomsInformation1**](CustomsInformation1.md) | | [optional] [default to undefined]
|
|
14
15
|
**createdAt** | **string** | ISO 8601 Timestamp | [optional] [default to undefined]
|
|
@@ -37,6 +38,7 @@ const instance: Order = {
|
|
|
37
38
|
ref,
|
|
38
39
|
status,
|
|
39
40
|
contactInformation,
|
|
41
|
+
paymentMethod,
|
|
40
42
|
shippingAddress,
|
|
41
43
|
customsInformation,
|
|
42
44
|
createdAt,
|
package/docs/OrdersApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://api.localhost:8080*
|
|
|
7
7
|
|[**cancelOrder**](#cancelorder) | **DELETE** /v1/orders/{orderId} | Cancel order|
|
|
8
8
|
|[**confirmOrder**](#confirmorder) | **POST** /v1/orders/{orderId}/confirm | Confirm order|
|
|
9
9
|
|[**createOrder**](#createorder) | **POST** /v1/orders | Create order|
|
|
10
|
+
|[**downloadInvoice**](#downloadinvoice) | **GET** /v1/orders/{orderId}/invoice | Download order invoice|
|
|
10
11
|
|[**exportOrders**](#exportorders) | **GET** /v1/orders/export | Export orders|
|
|
11
12
|
|[**getOrder**](#getorder) | **GET** /v1/orders/{orderId} | Get order|
|
|
12
13
|
|[**getOrders**](#getorders) | **GET** /v1/orders | List orders|
|
|
@@ -202,6 +203,65 @@ const { status, data } = await apiInstance.createOrder(
|
|
|
202
203
|
|
|
203
204
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
204
205
|
|
|
206
|
+
# **downloadInvoice**
|
|
207
|
+
> File downloadInvoice()
|
|
208
|
+
|
|
209
|
+
Download an order invoice.
|
|
210
|
+
|
|
211
|
+
### Example
|
|
212
|
+
|
|
213
|
+
```typescript
|
|
214
|
+
import {
|
|
215
|
+
OrdersApi,
|
|
216
|
+
Configuration
|
|
217
|
+
} from '@teemill/orders';
|
|
218
|
+
|
|
219
|
+
const configuration = new Configuration();
|
|
220
|
+
const apiInstance = new OrdersApi(configuration);
|
|
221
|
+
|
|
222
|
+
let project: string; //What project it is (default to undefined)
|
|
223
|
+
let orderId: string; //Unique identifier of an order (default to undefined)
|
|
224
|
+
|
|
225
|
+
const { status, data } = await apiInstance.downloadInvoice(
|
|
226
|
+
project,
|
|
227
|
+
orderId
|
|
228
|
+
);
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### Parameters
|
|
232
|
+
|
|
233
|
+
|Name | Type | Description | Notes|
|
|
234
|
+
|------------- | ------------- | ------------- | -------------|
|
|
235
|
+
| **project** | [**string**] | What project it is | defaults to undefined|
|
|
236
|
+
| **orderId** | [**string**] | Unique identifier of an order | defaults to undefined|
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
### Return type
|
|
240
|
+
|
|
241
|
+
**File**
|
|
242
|
+
|
|
243
|
+
### Authorization
|
|
244
|
+
|
|
245
|
+
[session-oauth](../README.md#session-oauth), [api-key](../README.md#api-key)
|
|
246
|
+
|
|
247
|
+
### HTTP request headers
|
|
248
|
+
|
|
249
|
+
- **Content-Type**: Not defined
|
|
250
|
+
- **Accept**: application/pdf, application/json
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
### HTTP response details
|
|
254
|
+
| Status code | Description | Response headers |
|
|
255
|
+
|-------------|-------------|------------------|
|
|
256
|
+
|**200** | The invoice PDF | - |
|
|
257
|
+
|**400** | Failed validation | - |
|
|
258
|
+
|**401** | Not authorised to access this resource | - |
|
|
259
|
+
|**403** | Refuse to authorize | - |
|
|
260
|
+
|**404** | Resource not found | - |
|
|
261
|
+
|**500** | Unknown server error | - |
|
|
262
|
+
|
|
263
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
264
|
+
|
|
205
265
|
# **exportOrders**
|
|
206
266
|
> File exportOrders()
|
|
207
267
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# PaymentMethod
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
## Properties
|
|
5
|
+
|
|
6
|
+
Name | Type | Description | Notes
|
|
7
|
+
------------ | ------------- | ------------- | -------------
|
|
8
|
+
**type** | **string** | | [optional] [default to undefined]
|
|
9
|
+
|
|
10
|
+
## Example
|
|
11
|
+
|
|
12
|
+
```typescript
|
|
13
|
+
import { PaymentMethod } from '@teemill/orders';
|
|
14
|
+
|
|
15
|
+
const instance: PaymentMethod = {
|
|
16
|
+
type,
|
|
17
|
+
};
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
package/index.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Orders API
|
|
5
5
|
* Use this API to create and retrieve updates for print-on-demand orders. Use it to request fulfillment for variants of products attached to the given project. You can fetch details and references to these products and variants from the Product Catalog API.
|
|
6
6
|
*
|
|
7
|
-
* The version of the OpenAPI document: 1.
|
|
7
|
+
* The version of the OpenAPI document: 1.21.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|