@sp-api-sdk/vendor-orders-api-v1 1.6.15
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/LICENSE +21 -0
- package/README.md +58 -0
- package/dist/cjs/index.js +6 -0
- package/dist/cjs/src/api-model/api/vendor-orders-api.js +438 -0
- package/dist/cjs/src/api-model/api.js +17 -0
- package/dist/cjs/src/api-model/base.js +62 -0
- package/dist/cjs/src/api-model/common.js +137 -0
- package/dist/cjs/src/api-model/configuration.js +42 -0
- package/dist/cjs/src/api-model/index.js +19 -0
- package/dist/cjs/src/api-model/models/acknowledgement-status-details.js +15 -0
- package/dist/cjs/src/api-model/models/address.js +15 -0
- package/dist/cjs/src/api-model/models/get-purchase-order-response.js +15 -0
- package/dist/cjs/src/api-model/models/get-purchase-orders-response.js +15 -0
- package/dist/cjs/src/api-model/models/get-purchase-orders-status-response.js +15 -0
- package/dist/cjs/src/api-model/models/import-details.js +47 -0
- package/dist/cjs/src/api-model/models/index.js +31 -0
- package/dist/cjs/src/api-model/models/item-quantity.js +25 -0
- package/dist/cjs/src/api-model/models/model-error.js +15 -0
- package/dist/cjs/src/api-model/models/money.js +15 -0
- package/dist/cjs/src/api-model/models/order-acknowledgement-item.js +15 -0
- package/dist/cjs/src/api-model/models/order-acknowledgement.js +15 -0
- package/dist/cjs/src/api-model/models/order-details.js +38 -0
- package/dist/cjs/src/api-model/models/order-item-acknowledgement.js +36 -0
- package/dist/cjs/src/api-model/models/order-item-status-acknowledgement-status.js +27 -0
- package/dist/cjs/src/api-model/models/order-item-status-ordered-quantity.js +15 -0
- package/dist/cjs/src/api-model/models/order-item-status.js +15 -0
- package/dist/cjs/src/api-model/models/order-item.js +15 -0
- package/dist/cjs/src/api-model/models/order-list-status.js +15 -0
- package/dist/cjs/src/api-model/models/order-list.js +15 -0
- package/dist/cjs/src/api-model/models/order-status.js +25 -0
- package/dist/cjs/src/api-model/models/order.js +26 -0
- package/dist/cjs/src/api-model/models/ordered-quantity-details.js +15 -0
- package/dist/cjs/src/api-model/models/pagination.js +15 -0
- package/dist/cjs/src/api-model/models/party-identification.js +15 -0
- package/dist/cjs/src/api-model/models/submit-acknowledgement-request.js +15 -0
- package/dist/cjs/src/api-model/models/submit-acknowledgement-response.js +15 -0
- package/dist/cjs/src/api-model/models/tax-registration-details.js +25 -0
- package/dist/cjs/src/api-model/models/transaction-id.js +15 -0
- package/dist/cjs/src/client.js +53 -0
- package/dist/cjs/src/error.js +10 -0
- package/dist/es/index.js +3 -0
- package/dist/es/src/api-model/api/vendor-orders-api.js +430 -0
- package/dist/es/src/api-model/api.js +14 -0
- package/dist/es/src/api-model/base.js +56 -0
- package/dist/es/src/api-model/common.js +125 -0
- package/dist/es/src/api-model/configuration.js +38 -0
- package/dist/es/src/api-model/index.js +16 -0
- package/dist/es/src/api-model/models/acknowledgement-status-details.js +14 -0
- package/dist/es/src/api-model/models/address.js +14 -0
- package/dist/es/src/api-model/models/get-purchase-order-response.js +14 -0
- package/dist/es/src/api-model/models/get-purchase-orders-response.js +14 -0
- package/dist/es/src/api-model/models/get-purchase-orders-status-response.js +14 -0
- package/dist/es/src/api-model/models/import-details.js +44 -0
- package/dist/es/src/api-model/models/index.js +28 -0
- package/dist/es/src/api-model/models/item-quantity.js +22 -0
- package/dist/es/src/api-model/models/model-error.js +14 -0
- package/dist/es/src/api-model/models/money.js +14 -0
- package/dist/es/src/api-model/models/order-acknowledgement-item.js +14 -0
- package/dist/es/src/api-model/models/order-acknowledgement.js +14 -0
- package/dist/es/src/api-model/models/order-details.js +35 -0
- package/dist/es/src/api-model/models/order-item-acknowledgement.js +33 -0
- package/dist/es/src/api-model/models/order-item-status-acknowledgement-status.js +24 -0
- package/dist/es/src/api-model/models/order-item-status-ordered-quantity.js +14 -0
- package/dist/es/src/api-model/models/order-item-status.js +14 -0
- package/dist/es/src/api-model/models/order-item.js +14 -0
- package/dist/es/src/api-model/models/order-list-status.js +14 -0
- package/dist/es/src/api-model/models/order-list.js +14 -0
- package/dist/es/src/api-model/models/order-status.js +22 -0
- package/dist/es/src/api-model/models/order.js +23 -0
- package/dist/es/src/api-model/models/ordered-quantity-details.js +14 -0
- package/dist/es/src/api-model/models/pagination.js +14 -0
- package/dist/es/src/api-model/models/party-identification.js +14 -0
- package/dist/es/src/api-model/models/submit-acknowledgement-request.js +14 -0
- package/dist/es/src/api-model/models/submit-acknowledgement-response.js +14 -0
- package/dist/es/src/api-model/models/tax-registration-details.js +22 -0
- package/dist/es/src/api-model/models/transaction-id.js +14 -0
- package/dist/es/src/client.js +49 -0
- package/dist/es/src/error.js +6 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/src/api-model/api/vendor-orders-api.d.ts +411 -0
- package/dist/types/src/api-model/api.d.ts +12 -0
- package/dist/types/src/api-model/base.d.ts +55 -0
- package/dist/types/src/api-model/common.d.ts +65 -0
- package/dist/types/src/api-model/configuration.d.ts +83 -0
- package/dist/types/src/api-model/index.d.ts +14 -0
- package/dist/types/src/api-model/models/acknowledgement-status-details.d.ts +37 -0
- package/dist/types/src/api-model/models/address.d.ts +84 -0
- package/dist/types/src/api-model/models/get-purchase-order-response.d.ts +31 -0
- package/dist/types/src/api-model/models/get-purchase-orders-response.d.ts +31 -0
- package/dist/types/src/api-model/models/get-purchase-orders-status-response.d.ts +31 -0
- package/dist/types/src/api-model/models/import-details.d.ts +77 -0
- package/dist/types/src/api-model/models/index.d.ts +28 -0
- package/dist/types/src/api-model/models/item-quantity.d.ts +44 -0
- package/dist/types/src/api-model/models/model-error.d.ts +36 -0
- package/dist/types/src/api-model/models/money.d.ts +30 -0
- package/dist/types/src/api-model/models/order-acknowledgement-item.d.ts +69 -0
- package/dist/types/src/api-model/models/order-acknowledgement.d.ts +44 -0
- package/dist/types/src/api-model/models/order-details.d.ts +125 -0
- package/dist/types/src/api-model/models/order-item-acknowledgement.d.ts +67 -0
- package/dist/types/src/api-model/models/order-item-status-acknowledgement-status.d.ts +54 -0
- package/dist/types/src/api-model/models/order-item-status-ordered-quantity.d.ts +32 -0
- package/dist/types/src/api-model/models/order-item-status.d.ts +63 -0
- package/dist/types/src/api-model/models/order-item.d.ts +62 -0
- package/dist/types/src/api-model/models/order-list-status.d.ts +32 -0
- package/dist/types/src/api-model/models/order-list.d.ts +32 -0
- package/dist/types/src/api-model/models/order-status.d.ts +70 -0
- package/dist/types/src/api-model/models/order.d.ts +46 -0
- package/dist/types/src/api-model/models/ordered-quantity-details.d.ts +37 -0
- package/dist/types/src/api-model/models/pagination.d.ts +24 -0
- package/dist/types/src/api-model/models/party-identification.d.ts +38 -0
- package/dist/types/src/api-model/models/submit-acknowledgement-request.d.ts +25 -0
- package/dist/types/src/api-model/models/submit-acknowledgement-response.d.ts +31 -0
- package/dist/types/src/api-model/models/tax-registration-details.d.ts +38 -0
- package/dist/types/src/api-model/models/transaction-id.d.ts +24 -0
- package/dist/types/src/client.d.ts +13 -0
- package/dist/types/src/error.d.ts +3 -0
- package/package.json +53 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021 Bizon
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# `vendor-orders-api-v1`
|
|
2
|
+
|
|
3
|
+
The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
|
|
4
|
+
|
|
5
|
+
## Installing
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
yarn add @sp-api-sdk/vendor-orders-api-v1
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
npm install @sp-api-sdk/vendor-orders-api-v1
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Getting Started
|
|
16
|
+
|
|
17
|
+
```javascript
|
|
18
|
+
import {SellingPartnerApiAuth} from '@sp-api-sdk/auth'
|
|
19
|
+
import {VendorOrdersApiClient} from '@sp-api-sdk/vendor-orders-api-v1'
|
|
20
|
+
|
|
21
|
+
const auth = new SellingPartnerApiAuth({
|
|
22
|
+
clientId: '',
|
|
23
|
+
clientSecret: '',
|
|
24
|
+
refreshToken: '',
|
|
25
|
+
secretAccessKey: '',
|
|
26
|
+
accessKeyId: '',
|
|
27
|
+
region: '',
|
|
28
|
+
role: {
|
|
29
|
+
arn: '',
|
|
30
|
+
}
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
const client = new VendorOrdersApiClient({
|
|
34
|
+
auth,
|
|
35
|
+
region: 'eu' // or 'eu-west-1'
|
|
36
|
+
})
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Handle Rate Limiting
|
|
40
|
+
|
|
41
|
+
If you want to let the SDK retry after each 429 responses, instanciate the client like this:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
const client = new VendorOrdersApiClient({
|
|
45
|
+
auth,
|
|
46
|
+
region: 'eu',
|
|
47
|
+
rateLimiting: {
|
|
48
|
+
retry: true,
|
|
49
|
+
onRetry: (retryInfo) => console.log(retryInfo) // Optional
|
|
50
|
+
}
|
|
51
|
+
})
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The SDK gets the rate limits for each routes from the API documentation
|
|
55
|
+
|
|
56
|
+
## API documentation
|
|
57
|
+
|
|
58
|
+
See [here](https://github.com/amzn/selling-partner-api-docs/tree/main/references/vendor-orders-api/vendorOrders.md)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
(0, tslib_1.__exportStar)(require("./src/client"), exports);
|
|
5
|
+
(0, tslib_1.__exportStar)(require("./src/error"), exports);
|
|
6
|
+
(0, tslib_1.__exportStar)(require("./src/api-model/models"), exports);
|
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Selling Partner API for Retail Procurement Orders
|
|
6
|
+
* The Selling Partner API for Retail Procurement Orders provides programmatic access to vendor orders data.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: v1
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.VendorOrdersApi = exports.VendorOrdersApiFactory = exports.VendorOrdersApiFp = exports.VendorOrdersApiAxiosParamCreator = void 0;
|
|
17
|
+
const tslib_1 = require("tslib");
|
|
18
|
+
const axios_1 = (0, tslib_1.__importDefault)(require("axios"));
|
|
19
|
+
// Some imports not used depending on template conditions
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
const common_1 = require("../common");
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
const base_1 = require("../base");
|
|
24
|
+
/**
|
|
25
|
+
* VendorOrdersApi - axios parameter creator
|
|
26
|
+
* @export
|
|
27
|
+
*/
|
|
28
|
+
const VendorOrdersApiAxiosParamCreator = function (configuration) {
|
|
29
|
+
return {
|
|
30
|
+
/**
|
|
31
|
+
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
32
|
+
* @param {string} purchaseOrderNumber The purchase order identifier for the order that you want. Formatting Notes: 8-character alpha-numeric code.
|
|
33
|
+
* @param {*} [options] Override http request option.
|
|
34
|
+
* @throws {RequiredError}
|
|
35
|
+
*/
|
|
36
|
+
getPurchaseOrder: async (purchaseOrderNumber, options = {}) => {
|
|
37
|
+
// verify required parameter 'purchaseOrderNumber' is not null or undefined
|
|
38
|
+
(0, common_1.assertParamExists)('getPurchaseOrder', 'purchaseOrderNumber', purchaseOrderNumber);
|
|
39
|
+
const localVarPath = `/vendor/orders/v1/purchaseOrders/{purchaseOrderNumber}`
|
|
40
|
+
.replace(`{${"purchaseOrderNumber"}}`, encodeURIComponent(String(purchaseOrderNumber)));
|
|
41
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
42
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
43
|
+
let baseOptions;
|
|
44
|
+
if (configuration) {
|
|
45
|
+
baseOptions = configuration.baseOptions;
|
|
46
|
+
}
|
|
47
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
48
|
+
const localVarHeaderParameter = {};
|
|
49
|
+
const localVarQueryParameter = {};
|
|
50
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
51
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
52
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
53
|
+
return {
|
|
54
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
55
|
+
options: localVarRequestOptions,
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
/**
|
|
59
|
+
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
60
|
+
* @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
|
|
61
|
+
* @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
62
|
+
* @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
63
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
64
|
+
* @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
|
|
65
|
+
* @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
|
|
66
|
+
* @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
67
|
+
* @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
68
|
+
* @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
|
|
69
|
+
* @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
|
|
70
|
+
* @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
|
|
71
|
+
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
|
|
72
|
+
* @param {*} [options] Override http request option.
|
|
73
|
+
* @throws {RequiredError}
|
|
74
|
+
*/
|
|
75
|
+
getPurchaseOrders: async (limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options = {}) => {
|
|
76
|
+
const localVarPath = `/vendor/orders/v1/purchaseOrders`;
|
|
77
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
78
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
79
|
+
let baseOptions;
|
|
80
|
+
if (configuration) {
|
|
81
|
+
baseOptions = configuration.baseOptions;
|
|
82
|
+
}
|
|
83
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
84
|
+
const localVarHeaderParameter = {};
|
|
85
|
+
const localVarQueryParameter = {};
|
|
86
|
+
if (limit !== undefined) {
|
|
87
|
+
localVarQueryParameter['limit'] = limit;
|
|
88
|
+
}
|
|
89
|
+
if (createdAfter !== undefined) {
|
|
90
|
+
localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
|
|
91
|
+
createdAfter.toISOString() :
|
|
92
|
+
createdAfter;
|
|
93
|
+
}
|
|
94
|
+
if (createdBefore !== undefined) {
|
|
95
|
+
localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
|
|
96
|
+
createdBefore.toISOString() :
|
|
97
|
+
createdBefore;
|
|
98
|
+
}
|
|
99
|
+
if (sortOrder !== undefined) {
|
|
100
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
101
|
+
}
|
|
102
|
+
if (nextToken !== undefined) {
|
|
103
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
104
|
+
}
|
|
105
|
+
if (includeDetails !== undefined) {
|
|
106
|
+
localVarQueryParameter['includeDetails'] = includeDetails;
|
|
107
|
+
}
|
|
108
|
+
if (changedAfter !== undefined) {
|
|
109
|
+
localVarQueryParameter['changedAfter'] = (changedAfter instanceof Date) ?
|
|
110
|
+
changedAfter.toISOString() :
|
|
111
|
+
changedAfter;
|
|
112
|
+
}
|
|
113
|
+
if (changedBefore !== undefined) {
|
|
114
|
+
localVarQueryParameter['changedBefore'] = (changedBefore instanceof Date) ?
|
|
115
|
+
changedBefore.toISOString() :
|
|
116
|
+
changedBefore;
|
|
117
|
+
}
|
|
118
|
+
if (poItemState !== undefined) {
|
|
119
|
+
localVarQueryParameter['poItemState'] = poItemState;
|
|
120
|
+
}
|
|
121
|
+
if (isPOChanged !== undefined) {
|
|
122
|
+
localVarQueryParameter['isPOChanged'] = isPOChanged;
|
|
123
|
+
}
|
|
124
|
+
if (purchaseOrderState !== undefined) {
|
|
125
|
+
localVarQueryParameter['purchaseOrderState'] = purchaseOrderState;
|
|
126
|
+
}
|
|
127
|
+
if (orderingVendorCode !== undefined) {
|
|
128
|
+
localVarQueryParameter['orderingVendorCode'] = orderingVendorCode;
|
|
129
|
+
}
|
|
130
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
131
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
132
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
133
|
+
return {
|
|
134
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
135
|
+
options: localVarRequestOptions,
|
|
136
|
+
};
|
|
137
|
+
},
|
|
138
|
+
/**
|
|
139
|
+
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
140
|
+
* @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
|
|
141
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
142
|
+
* @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
|
|
143
|
+
* @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
144
|
+
* @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
145
|
+
* @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
146
|
+
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
147
|
+
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
|
|
148
|
+
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
|
|
149
|
+
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
|
|
150
|
+
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
|
|
151
|
+
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
|
|
152
|
+
* @param {*} [options] Override http request option.
|
|
153
|
+
* @throws {RequiredError}
|
|
154
|
+
*/
|
|
155
|
+
getPurchaseOrdersStatus: async (limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options = {}) => {
|
|
156
|
+
const localVarPath = `/vendor/orders/v1/purchaseOrdersStatus`;
|
|
157
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
158
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
159
|
+
let baseOptions;
|
|
160
|
+
if (configuration) {
|
|
161
|
+
baseOptions = configuration.baseOptions;
|
|
162
|
+
}
|
|
163
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
|
|
164
|
+
const localVarHeaderParameter = {};
|
|
165
|
+
const localVarQueryParameter = {};
|
|
166
|
+
if (limit !== undefined) {
|
|
167
|
+
localVarQueryParameter['limit'] = limit;
|
|
168
|
+
}
|
|
169
|
+
if (sortOrder !== undefined) {
|
|
170
|
+
localVarQueryParameter['sortOrder'] = sortOrder;
|
|
171
|
+
}
|
|
172
|
+
if (nextToken !== undefined) {
|
|
173
|
+
localVarQueryParameter['nextToken'] = nextToken;
|
|
174
|
+
}
|
|
175
|
+
if (createdAfter !== undefined) {
|
|
176
|
+
localVarQueryParameter['createdAfter'] = (createdAfter instanceof Date) ?
|
|
177
|
+
createdAfter.toISOString() :
|
|
178
|
+
createdAfter;
|
|
179
|
+
}
|
|
180
|
+
if (createdBefore !== undefined) {
|
|
181
|
+
localVarQueryParameter['createdBefore'] = (createdBefore instanceof Date) ?
|
|
182
|
+
createdBefore.toISOString() :
|
|
183
|
+
createdBefore;
|
|
184
|
+
}
|
|
185
|
+
if (updatedAfter !== undefined) {
|
|
186
|
+
localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
|
|
187
|
+
updatedAfter.toISOString() :
|
|
188
|
+
updatedAfter;
|
|
189
|
+
}
|
|
190
|
+
if (updatedBefore !== undefined) {
|
|
191
|
+
localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
|
|
192
|
+
updatedBefore.toISOString() :
|
|
193
|
+
updatedBefore;
|
|
194
|
+
}
|
|
195
|
+
if (purchaseOrderNumber !== undefined) {
|
|
196
|
+
localVarQueryParameter['purchaseOrderNumber'] = purchaseOrderNumber;
|
|
197
|
+
}
|
|
198
|
+
if (purchaseOrderStatus !== undefined) {
|
|
199
|
+
localVarQueryParameter['purchaseOrderStatus'] = purchaseOrderStatus;
|
|
200
|
+
}
|
|
201
|
+
if (itemConfirmationStatus !== undefined) {
|
|
202
|
+
localVarQueryParameter['itemConfirmationStatus'] = itemConfirmationStatus;
|
|
203
|
+
}
|
|
204
|
+
if (orderingVendorCode !== undefined) {
|
|
205
|
+
localVarQueryParameter['orderingVendorCode'] = orderingVendorCode;
|
|
206
|
+
}
|
|
207
|
+
if (shipToPartyId !== undefined) {
|
|
208
|
+
localVarQueryParameter['shipToPartyId'] = shipToPartyId;
|
|
209
|
+
}
|
|
210
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
211
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
212
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
213
|
+
return {
|
|
214
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
215
|
+
options: localVarRequestOptions,
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
/**
|
|
219
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
220
|
+
* @param {SubmitAcknowledgementRequest} body
|
|
221
|
+
* @param {*} [options] Override http request option.
|
|
222
|
+
* @throws {RequiredError}
|
|
223
|
+
*/
|
|
224
|
+
submitAcknowledgement: async (body, options = {}) => {
|
|
225
|
+
// verify required parameter 'body' is not null or undefined
|
|
226
|
+
(0, common_1.assertParamExists)('submitAcknowledgement', 'body', body);
|
|
227
|
+
const localVarPath = `/vendor/orders/v1/acknowledgements`;
|
|
228
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
229
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
230
|
+
let baseOptions;
|
|
231
|
+
if (configuration) {
|
|
232
|
+
baseOptions = configuration.baseOptions;
|
|
233
|
+
}
|
|
234
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
235
|
+
const localVarHeaderParameter = {};
|
|
236
|
+
const localVarQueryParameter = {};
|
|
237
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
238
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter, options.query);
|
|
239
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
240
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
241
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(body, localVarRequestOptions, configuration);
|
|
242
|
+
return {
|
|
243
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
244
|
+
options: localVarRequestOptions,
|
|
245
|
+
};
|
|
246
|
+
},
|
|
247
|
+
};
|
|
248
|
+
};
|
|
249
|
+
exports.VendorOrdersApiAxiosParamCreator = VendorOrdersApiAxiosParamCreator;
|
|
250
|
+
/**
|
|
251
|
+
* VendorOrdersApi - functional programming interface
|
|
252
|
+
* @export
|
|
253
|
+
*/
|
|
254
|
+
const VendorOrdersApiFp = function (configuration) {
|
|
255
|
+
const localVarAxiosParamCreator = (0, exports.VendorOrdersApiAxiosParamCreator)(configuration);
|
|
256
|
+
return {
|
|
257
|
+
/**
|
|
258
|
+
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
259
|
+
* @param {string} purchaseOrderNumber The purchase order identifier for the order that you want. Formatting Notes: 8-character alpha-numeric code.
|
|
260
|
+
* @param {*} [options] Override http request option.
|
|
261
|
+
* @throws {RequiredError}
|
|
262
|
+
*/
|
|
263
|
+
async getPurchaseOrder(purchaseOrderNumber, options) {
|
|
264
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrder(purchaseOrderNumber, options);
|
|
265
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
269
|
+
* @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
|
|
270
|
+
* @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
271
|
+
* @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
272
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
273
|
+
* @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
|
|
274
|
+
* @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
|
|
275
|
+
* @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
276
|
+
* @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
277
|
+
* @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
|
|
278
|
+
* @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
|
|
279
|
+
* @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
|
|
280
|
+
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
|
|
281
|
+
* @param {*} [options] Override http request option.
|
|
282
|
+
* @throws {RequiredError}
|
|
283
|
+
*/
|
|
284
|
+
async getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options) {
|
|
285
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options);
|
|
286
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
287
|
+
},
|
|
288
|
+
/**
|
|
289
|
+
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
290
|
+
* @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
|
|
291
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
292
|
+
* @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
|
|
293
|
+
* @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
294
|
+
* @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
295
|
+
* @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
296
|
+
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
297
|
+
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
|
|
298
|
+
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
|
|
299
|
+
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
|
|
300
|
+
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
|
|
301
|
+
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
|
|
302
|
+
* @param {*} [options] Override http request option.
|
|
303
|
+
* @throws {RequiredError}
|
|
304
|
+
*/
|
|
305
|
+
async getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options) {
|
|
306
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options);
|
|
307
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
308
|
+
},
|
|
309
|
+
/**
|
|
310
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
311
|
+
* @param {SubmitAcknowledgementRequest} body
|
|
312
|
+
* @param {*} [options] Override http request option.
|
|
313
|
+
* @throws {RequiredError}
|
|
314
|
+
*/
|
|
315
|
+
async submitAcknowledgement(body, options) {
|
|
316
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.submitAcknowledgement(body, options);
|
|
317
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
318
|
+
},
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
exports.VendorOrdersApiFp = VendorOrdersApiFp;
|
|
322
|
+
/**
|
|
323
|
+
* VendorOrdersApi - factory interface
|
|
324
|
+
* @export
|
|
325
|
+
*/
|
|
326
|
+
const VendorOrdersApiFactory = function (configuration, basePath, axios) {
|
|
327
|
+
const localVarFp = (0, exports.VendorOrdersApiFp)(configuration);
|
|
328
|
+
return {
|
|
329
|
+
/**
|
|
330
|
+
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
331
|
+
* @param {string} purchaseOrderNumber The purchase order identifier for the order that you want. Formatting Notes: 8-character alpha-numeric code.
|
|
332
|
+
* @param {*} [options] Override http request option.
|
|
333
|
+
* @throws {RequiredError}
|
|
334
|
+
*/
|
|
335
|
+
getPurchaseOrder(purchaseOrderNumber, options) {
|
|
336
|
+
return localVarFp.getPurchaseOrder(purchaseOrderNumber, options).then((request) => request(axios, basePath));
|
|
337
|
+
},
|
|
338
|
+
/**
|
|
339
|
+
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
340
|
+
* @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
|
|
341
|
+
* @param {string} [createdAfter] Purchase orders that became available after this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
342
|
+
* @param {string} [createdBefore] Purchase orders that became available before this time will be included in the result. Must be in ISO-8601 date/time format.
|
|
343
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
344
|
+
* @param {string} [nextToken] Used for pagination when there is more purchase orders than the specified result size limit. The token value is returned in the previous API call
|
|
345
|
+
* @param {boolean} [includeDetails] When true, returns purchase orders with complete details. Otherwise, only purchase order numbers are returned. Default value is true.
|
|
346
|
+
* @param {string} [changedAfter] Purchase orders that changed after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
347
|
+
* @param {string} [changedBefore] Purchase orders that changed before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
348
|
+
* @param {'Cancelled'} [poItemState] Current state of the purchase order item. If this value is Cancelled, this API will return purchase orders which have one or more items cancelled by Amazon with updated item quantity as zero.
|
|
349
|
+
* @param {boolean} [isPOChanged] When true, returns purchase orders which were modified after the order was placed. Vendors are required to pull the changed purchase order and fulfill the updated purchase order and not the original one. Default value is false.
|
|
350
|
+
* @param {'New' | 'Acknowledged' | 'Closed'} [purchaseOrderState] Filters purchase orders based on the purchase order state.
|
|
351
|
+
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in the filter, all purchase orders for all of the vendor codes that exist in the vendor group used to authorize the API client application are returned.
|
|
352
|
+
* @param {*} [options] Override http request option.
|
|
353
|
+
* @throws {RequiredError}
|
|
354
|
+
*/
|
|
355
|
+
getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options) {
|
|
356
|
+
return localVarFp.getPurchaseOrders(limit, createdAfter, createdBefore, sortOrder, nextToken, includeDetails, changedAfter, changedBefore, poItemState, isPOChanged, purchaseOrderState, orderingVendorCode, options).then((request) => request(axios, basePath));
|
|
357
|
+
},
|
|
358
|
+
/**
|
|
359
|
+
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
360
|
+
* @param {number} [limit] The limit to the number of records returned. Default value is 100 records.
|
|
361
|
+
* @param {'ASC' | 'DESC'} [sortOrder] Sort in ascending or descending order by purchase order creation date.
|
|
362
|
+
* @param {string} [nextToken] Used for pagination when there are more purchase orders than the specified result size limit.
|
|
363
|
+
* @param {string} [createdAfter] Purchase orders that became available after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
364
|
+
* @param {string} [createdBefore] Purchase orders that became available before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
365
|
+
* @param {string} [updatedAfter] Purchase orders for which the last purchase order update happened after this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
366
|
+
* @param {string} [updatedBefore] Purchase orders for which the last purchase order update happened before this timestamp will be included in the result. Must be in ISO-8601 date/time format.
|
|
367
|
+
* @param {string} [purchaseOrderNumber] Provides purchase order status for the specified purchase order number.
|
|
368
|
+
* @param {'OPEN' | 'CLOSED'} [purchaseOrderStatus] Filters purchase orders based on the specified purchase order status. If not included in filter, this will return purchase orders for all statuses.
|
|
369
|
+
* @param {'ACCEPTED' | 'PARTIALLY_ACCEPTED' | 'REJECTED' | 'UNCONFIRMED'} [itemConfirmationStatus] Filters purchase orders based on the specified purchase order item status. If not included in filter, purchase orders for all statuses are included.
|
|
370
|
+
* @param {string} [orderingVendorCode] Filters purchase orders based on the specified ordering vendor code. This value should be same as \'sellingParty.partyId\' in the purchase order. If not included in filter, all purchase orders for all the vendor codes that exist in the vendor group used to authorize API client application are returned.
|
|
371
|
+
* @param {string} [shipToPartyId] Filters purchase orders for a specific buyer\'s Fulfillment Center/warehouse by providing ship to location id here. This value should be same as \'shipToParty.partyId\' in the purchase order. If not included in filter, this will return purchase orders for all the buyer\'s warehouses used for vendor group purchase orders.
|
|
372
|
+
* @param {*} [options] Override http request option.
|
|
373
|
+
* @throws {RequiredError}
|
|
374
|
+
*/
|
|
375
|
+
getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options) {
|
|
376
|
+
return localVarFp.getPurchaseOrdersStatus(limit, sortOrder, nextToken, createdAfter, createdBefore, updatedAfter, updatedBefore, purchaseOrderNumber, purchaseOrderStatus, itemConfirmationStatus, orderingVendorCode, shipToPartyId, options).then((request) => request(axios, basePath));
|
|
377
|
+
},
|
|
378
|
+
/**
|
|
379
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
380
|
+
* @param {SubmitAcknowledgementRequest} body
|
|
381
|
+
* @param {*} [options] Override http request option.
|
|
382
|
+
* @throws {RequiredError}
|
|
383
|
+
*/
|
|
384
|
+
submitAcknowledgement(body, options) {
|
|
385
|
+
return localVarFp.submitAcknowledgement(body, options).then((request) => request(axios, basePath));
|
|
386
|
+
},
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
exports.VendorOrdersApiFactory = VendorOrdersApiFactory;
|
|
390
|
+
/**
|
|
391
|
+
* VendorOrdersApi - object-oriented interface
|
|
392
|
+
* @export
|
|
393
|
+
* @class VendorOrdersApi
|
|
394
|
+
* @extends {BaseAPI}
|
|
395
|
+
*/
|
|
396
|
+
class VendorOrdersApi extends base_1.BaseAPI {
|
|
397
|
+
/**
|
|
398
|
+
* Returns a purchase order based on the purchaseOrderNumber value that you specify. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
399
|
+
* @param {VendorOrdersApiGetPurchaseOrderRequest} requestParameters Request parameters.
|
|
400
|
+
* @param {*} [options] Override http request option.
|
|
401
|
+
* @throws {RequiredError}
|
|
402
|
+
* @memberof VendorOrdersApi
|
|
403
|
+
*/
|
|
404
|
+
getPurchaseOrder(requestParameters, options) {
|
|
405
|
+
return (0, exports.VendorOrdersApiFp)(this.configuration).getPurchaseOrder(requestParameters.purchaseOrderNumber, options).then((request) => request(this.axios, this.basePath));
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Returns a list of purchase orders created or changed during the time frame that you specify. You define the time frame using the createdAfter, createdBefore, changedAfter and changedBefore parameters. The date range to search must not be more than 7 days. You can choose to get only the purchase order numbers by setting includeDetails to false. You can then use the getPurchaseOrder operation to receive details for a specific purchase order. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
409
|
+
* @param {VendorOrdersApiGetPurchaseOrdersRequest} requestParameters Request parameters.
|
|
410
|
+
* @param {*} [options] Override http request option.
|
|
411
|
+
* @throws {RequiredError}
|
|
412
|
+
* @memberof VendorOrdersApi
|
|
413
|
+
*/
|
|
414
|
+
getPurchaseOrders(requestParameters = {}, options) {
|
|
415
|
+
return (0, exports.VendorOrdersApiFp)(this.configuration).getPurchaseOrders(requestParameters.limit, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.includeDetails, requestParameters.changedAfter, requestParameters.changedBefore, requestParameters.poItemState, requestParameters.isPOChanged, requestParameters.purchaseOrderState, requestParameters.orderingVendorCode, options).then((request) => request(this.axios, this.basePath));
|
|
416
|
+
}
|
|
417
|
+
/**
|
|
418
|
+
* Returns purchase order statuses based on the filters that you specify. Date range to search must not be more than 7 days. You can return a list of purchase order statuses using the available filters, or a single purchase order status by providing the purchase order number. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
419
|
+
* @param {VendorOrdersApiGetPurchaseOrdersStatusRequest} requestParameters Request parameters.
|
|
420
|
+
* @param {*} [options] Override http request option.
|
|
421
|
+
* @throws {RequiredError}
|
|
422
|
+
* @memberof VendorOrdersApi
|
|
423
|
+
*/
|
|
424
|
+
getPurchaseOrdersStatus(requestParameters = {}, options) {
|
|
425
|
+
return (0, exports.VendorOrdersApiFp)(this.configuration).getPurchaseOrdersStatus(requestParameters.limit, requestParameters.sortOrder, requestParameters.nextToken, requestParameters.createdAfter, requestParameters.createdBefore, requestParameters.updatedAfter, requestParameters.updatedBefore, requestParameters.purchaseOrderNumber, requestParameters.purchaseOrderStatus, requestParameters.itemConfirmationStatus, requestParameters.orderingVendorCode, requestParameters.shipToPartyId, options).then((request) => request(this.axios, this.basePath));
|
|
426
|
+
}
|
|
427
|
+
/**
|
|
428
|
+
* Submits acknowledgements for one or more purchase orders. **Usage Plans:** | Plan type | Rate (requests per second) | Burst | | ---- | ---- | ---- | |Default| 10 | 10 | |Selling partner specific| Variable | Variable | The x-amzn-RateLimit-Limit response header returns the usage plan rate limits that were applied to the requested operation. Rate limits for some selling partners will vary from the default rate and burst shown in the table above. For more information, see \"Usage Plans and Rate Limits\" in the Selling Partner API documentation.
|
|
429
|
+
* @param {VendorOrdersApiSubmitAcknowledgementRequest} requestParameters Request parameters.
|
|
430
|
+
* @param {*} [options] Override http request option.
|
|
431
|
+
* @throws {RequiredError}
|
|
432
|
+
* @memberof VendorOrdersApi
|
|
433
|
+
*/
|
|
434
|
+
submitAcknowledgement(requestParameters, options) {
|
|
435
|
+
return (0, exports.VendorOrdersApiFp)(this.configuration).submitAcknowledgement(requestParameters.body, options).then((request) => request(this.axios, this.basePath));
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
exports.VendorOrdersApi = VendorOrdersApi;
|