ebay-api 7.1.3 → 8.0.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 +59 -53
- package/dist/api/apiFactory.d.ts +27 -0
- package/dist/api/apiFactory.js +94 -0
- package/dist/api/base.d.ts +10 -0
- package/dist/api/base.js +10 -0
- package/dist/api/index.d.ts +11 -0
- package/dist/api/index.js +11 -0
- package/dist/api/restful/buy/browse/index.d.ts +84 -0
- package/dist/api/restful/buy/browse/index.js +135 -0
- package/dist/api/restful/buy/deal/index.d.ts +55 -0
- package/dist/api/restful/buy/deal/index.js +73 -0
- package/dist/api/restful/buy/feed/index.d.ts +43 -0
- package/dist/api/restful/buy/feed/index.js +78 -0
- package/dist/api/restful/buy/index.d.ts +17 -0
- package/dist/api/restful/buy/index.js +8 -0
- package/dist/api/restful/buy/marketing/index.d.ts +27 -0
- package/dist/api/restful/buy/marketing/index.js +44 -0
- package/dist/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
- package/dist/api/restful/buy/marketplaceInsights/index.js +44 -0
- package/dist/api/restful/buy/offer/index.d.ts +23 -0
- package/dist/api/restful/buy/offer/index.js +30 -0
- package/dist/api/restful/buy/order/index.d.ts +264 -0
- package/dist/api/restful/buy/order/index.js +362 -0
- package/dist/api/restful/commerce/catalog/index.d.ts +73 -0
- package/dist/api/restful/commerce/catalog/index.js +101 -0
- package/dist/api/restful/commerce/charity/index.d.ts +34 -0
- package/dist/api/restful/commerce/charity/index.js +49 -0
- package/dist/api/restful/commerce/identity/index.d.ts +14 -0
- package/dist/api/restful/commerce/identity/index.js +20 -0
- package/dist/api/restful/commerce/index.d.ts +15 -0
- package/dist/api/restful/commerce/index.js +7 -0
- package/dist/api/restful/commerce/notification/index.d.ts +117 -0
- package/dist/api/restful/commerce/notification/index.js +180 -0
- package/dist/api/restful/commerce/taxonomy/index.d.ts +78 -0
- package/dist/api/restful/commerce/taxonomy/index.js +128 -0
- package/dist/api/restful/commerce/translation/index.d.ts +15 -0
- package/dist/api/restful/commerce/translation/index.js +18 -0
- package/dist/api/restful/developer/analytics/index.d.ts +22 -0
- package/dist/api/restful/developer/analytics/index.js +38 -0
- package/dist/api/restful/developer/index.d.ts +7 -0
- package/dist/api/restful/developer/index.js +3 -0
- package/dist/api/restful/developer/keyManagement/index.d.ts +26 -0
- package/dist/api/restful/developer/keyManagement/index.js +34 -0
- package/dist/api/restful/index.d.ts +62 -0
- package/dist/api/restful/index.js +164 -0
- package/dist/api/restful/postOrder/cancellation/index.d.ts +57 -0
- package/dist/api/restful/postOrder/cancellation/index.js +88 -0
- package/dist/api/restful/postOrder/case/index.d.ts +63 -0
- package/dist/api/restful/postOrder/case/index.js +88 -0
- package/dist/api/restful/postOrder/index.d.ts +11 -0
- package/dist/api/restful/postOrder/index.js +5 -0
- package/dist/api/restful/postOrder/inquiry/index.d.ts +82 -0
- package/dist/api/restful/postOrder/inquiry/index.js +124 -0
- package/dist/api/restful/postOrder/return/index.d.ts +231 -0
- package/dist/api/restful/postOrder/return/index.js +354 -0
- package/dist/api/restful/sell/account/index.d.ts +217 -0
- package/dist/api/restful/sell/account/index.js +330 -0
- package/dist/api/restful/sell/analytics/index.d.ts +41 -0
- package/dist/api/restful/sell/analytics/index.js +54 -0
- package/dist/api/restful/sell/compliance/index.d.ts +37 -0
- package/dist/api/restful/sell/compliance/index.js +50 -0
- package/dist/api/restful/sell/feed/index.d.ts +151 -0
- package/dist/api/restful/sell/feed/index.js +248 -0
- package/dist/api/restful/sell/finances/index.d.ts +78 -0
- package/dist/api/restful/sell/finances/index.js +102 -0
- package/dist/api/restful/sell/fulfillment/index.d.ts +137 -0
- package/dist/api/restful/sell/fulfillment/index.js +192 -0
- package/dist/api/restful/sell/index.d.ts +29 -0
- package/dist/api/restful/sell/index.js +14 -0
- package/dist/api/restful/sell/inventory/index.d.ts +248 -0
- package/dist/api/restful/sell/inventory/index.js +339 -0
- package/dist/api/restful/sell/listing/index.d.ts +14 -0
- package/dist/api/restful/sell/listing/index.js +18 -0
- package/dist/api/restful/sell/logistics/index.d.ts +44 -0
- package/dist/api/restful/sell/logistics/index.js +59 -0
- package/dist/api/restful/sell/marketing/index.d.ts +443 -0
- package/dist/api/restful/sell/marketing/index.js +602 -0
- package/dist/api/restful/sell/metadata/index.d.ts +77 -0
- package/dist/api/restful/sell/metadata/index.js +124 -0
- package/dist/api/restful/sell/negotiation/index.d.ts +24 -0
- package/dist/api/restful/sell/negotiation/index.js +32 -0
- package/dist/api/restful/sell/recommendation/index.d.ts +26 -0
- package/dist/api/restful/sell/recommendation/index.js +32 -0
- package/dist/api/traditional/XMLRequest.d.ts +107 -0
- package/dist/api/traditional/XMLRequest.js +173 -0
- package/dist/api/traditional/clientAlerts/index.d.ts +9 -0
- package/dist/api/traditional/clientAlerts/index.js +11 -0
- package/dist/api/traditional/clientAlerts/types.d.ts +31 -0
- package/dist/api/traditional/clientAlerts/types.js +32 -0
- package/dist/api/traditional/fields.d.ts +1948 -0
- package/dist/api/traditional/fields.js +1946 -0
- package/dist/api/traditional/finding/index.d.ts +12 -0
- package/dist/api/traditional/finding/index.js +13 -0
- package/dist/api/traditional/index.d.ts +17 -0
- package/dist/api/traditional/index.js +181 -0
- package/dist/api/traditional/merchandising/index.d.ts +7 -0
- package/dist/api/traditional/merchandising/index.js +8 -0
- package/dist/api/traditional/shopping/index.d.ts +11 -0
- package/dist/api/traditional/shopping/index.js +13 -0
- package/dist/api/traditional/trading/index.d.ts +142 -0
- package/dist/api/traditional/trading/index.js +143 -0
- package/dist/auth/authNAuth.d.ts +49 -0
- package/dist/auth/authNAuth.js +116 -0
- package/dist/auth/index.d.ts +17 -0
- package/dist/auth/index.js +25 -0
- package/dist/auth/oAuth2.d.ts +95 -0
- package/dist/auth/oAuth2.js +259 -0
- package/dist/eBayApi.d.ts +58 -0
- package/dist/eBayApi.js +93 -0
- package/dist/ebay-api.min.mjs +1 -0
- package/dist/enums/apiEnums.d.ts +49 -0
- package/dist/enums/apiEnums.js +51 -0
- package/dist/enums/index.d.ts +2 -0
- package/dist/enums/index.js +2 -0
- package/dist/enums/restfulEnums.d.ts +970 -0
- package/dist/enums/restfulEnums.js +1013 -0
- package/dist/errors/index.d.ts +66 -0
- package/dist/errors/index.js +184 -0
- package/dist/nanoevents.d.ts +6 -0
- package/dist/nanoevents.js +20 -0
- package/dist/request.d.ts +26 -0
- package/dist/request.js +43 -0
- package/dist/types/apiTypes.d.ts +33 -0
- package/dist/types/apiTypes.js +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +3 -0
- package/dist/types/restfulTypes.d.ts +1082 -0
- package/dist/types/restfulTypes.js +1 -0
- package/dist/types/traditonalTypes.d.ts +34 -0
- package/dist/types/traditonalTypes.js +1 -0
- package/lib/api/apiFactory.d.ts +8 -8
- package/lib/api/apiFactory.js +41 -42
- package/lib/api/base.d.ts +3 -6
- package/lib/api/base.js +3 -15
- package/lib/api/index.d.ts +4 -4
- package/lib/api/index.js +4 -5
- package/lib/api/restful/buy/browse/index.d.ts +2 -2
- package/lib/api/restful/buy/browse/index.js +2 -3
- package/lib/api/restful/buy/deal/index.d.ts +1 -1
- package/lib/api/restful/buy/deal/index.js +2 -3
- package/lib/api/restful/buy/feed/index.d.ts +2 -2
- package/lib/api/restful/buy/feed/index.js +2 -3
- package/lib/api/restful/buy/index.d.ts +8 -8
- package/lib/api/restful/buy/index.js +14 -15
- package/lib/api/restful/buy/marketing/index.d.ts +2 -2
- package/lib/api/restful/buy/marketing/index.js +2 -3
- package/lib/api/restful/buy/marketplaceInsights/index.d.ts +2 -2
- package/lib/api/restful/buy/marketplaceInsights/index.js +2 -3
- package/lib/api/restful/buy/offer/index.d.ts +2 -2
- package/lib/api/restful/buy/offer/index.js +2 -3
- package/lib/api/restful/buy/order/index.d.ts +3 -3
- package/lib/api/restful/buy/order/index.js +3 -4
- package/lib/api/restful/commerce/catalog/index.d.ts +2 -2
- package/lib/api/restful/commerce/catalog/index.js +2 -3
- package/lib/api/restful/commerce/charity/index.d.ts +1 -1
- package/lib/api/restful/commerce/charity/index.js +2 -3
- package/lib/api/restful/commerce/identity/index.d.ts +1 -1
- package/lib/api/restful/commerce/identity/index.js +2 -3
- package/lib/api/restful/commerce/index.d.ts +7 -7
- package/lib/api/restful/commerce/index.js +12 -13
- package/lib/api/restful/commerce/notification/index.d.ts +2 -2
- package/lib/api/restful/commerce/notification/index.js +2 -3
- package/lib/api/restful/commerce/taxonomy/index.d.ts +1 -1
- package/lib/api/restful/commerce/taxonomy/index.js +2 -3
- package/lib/api/restful/commerce/translation/index.d.ts +2 -2
- package/lib/api/restful/commerce/translation/index.js +2 -3
- package/lib/api/restful/developer/analytics/index.d.ts +1 -1
- package/lib/api/restful/developer/analytics/index.js +2 -3
- package/lib/api/restful/developer/index.d.ts +3 -3
- package/lib/api/restful/developer/index.js +4 -5
- package/lib/api/restful/developer/keyManagement/index.d.ts +1 -1
- package/lib/api/restful/developer/keyManagement/index.js +2 -3
- package/lib/api/restful/index.d.ts +6 -6
- package/lib/api/restful/index.js +5 -6
- package/lib/api/restful/postOrder/cancellation/index.d.ts +2 -2
- package/lib/api/restful/postOrder/cancellation/index.js +2 -3
- package/lib/api/restful/postOrder/case/index.d.ts +2 -2
- package/lib/api/restful/postOrder/case/index.js +2 -3
- package/lib/api/restful/postOrder/index.d.ts +5 -5
- package/lib/api/restful/postOrder/index.js +8 -9
- package/lib/api/restful/postOrder/inquiry/index.d.ts +2 -2
- package/lib/api/restful/postOrder/inquiry/index.js +2 -3
- package/lib/api/restful/postOrder/return/index.d.ts +3 -3
- package/lib/api/restful/postOrder/return/index.js +2 -3
- package/lib/api/restful/sell/account/index.d.ts +3 -3
- package/lib/api/restful/sell/account/index.js +2 -3
- package/lib/api/restful/sell/analytics/index.d.ts +2 -2
- package/lib/api/restful/sell/analytics/index.js +2 -3
- package/lib/api/restful/sell/compliance/index.d.ts +2 -2
- package/lib/api/restful/sell/compliance/index.js +2 -3
- package/lib/api/restful/sell/feed/index.d.ts +2 -2
- package/lib/api/restful/sell/feed/index.js +4 -5
- package/lib/api/restful/sell/finances/index.d.ts +1 -1
- package/lib/api/restful/sell/finances/index.js +2 -3
- package/lib/api/restful/sell/fulfillment/index.d.ts +2 -2
- package/lib/api/restful/sell/fulfillment/index.js +4 -5
- package/lib/api/restful/sell/index.d.ts +14 -14
- package/lib/api/restful/sell/index.js +26 -27
- package/lib/api/restful/sell/inventory/index.d.ts +2 -2
- package/lib/api/restful/sell/inventory/index.js +2 -3
- package/lib/api/restful/sell/listing/index.d.ts +1 -1
- package/lib/api/restful/sell/listing/index.js +2 -3
- package/lib/api/restful/sell/logistics/index.d.ts +1 -1
- package/lib/api/restful/sell/logistics/index.js +2 -3
- package/lib/api/restful/sell/marketing/index.d.ts +2 -2
- package/lib/api/restful/sell/marketing/index.js +2 -3
- package/lib/api/restful/sell/metadata/index.d.ts +1 -1
- package/lib/api/restful/sell/metadata/index.js +2 -3
- package/lib/api/restful/sell/negotiation/index.d.ts +1 -1
- package/lib/api/restful/sell/negotiation/index.js +2 -3
- package/lib/api/restful/sell/recommendation/index.d.ts +2 -2
- package/lib/api/restful/sell/recommendation/index.js +2 -3
- package/lib/api/traditional/XMLRequest.d.ts +15 -11
- package/lib/api/traditional/XMLRequest.js +17 -33
- package/lib/api/traditional/clientAlerts/index.d.ts +1 -1
- package/lib/api/traditional/clientAlerts/index.js +2 -3
- package/lib/api/traditional/clientAlerts/types.js +0 -1
- package/lib/api/traditional/fields.d.ts +1 -1
- package/lib/api/traditional/fields.js +0 -1
- package/lib/api/traditional/finding/index.js +0 -1
- package/lib/api/traditional/index.d.ts +2 -2
- package/lib/api/traditional/index.js +26 -21
- package/lib/api/traditional/merchandising/index.js +0 -1
- package/lib/api/traditional/shopping/index.js +0 -1
- package/lib/api/traditional/trading/index.js +0 -1
- package/lib/auth/authNAuth.d.ts +4 -4
- package/lib/auth/authNAuth.js +12 -13
- package/lib/auth/index.d.ts +5 -5
- package/lib/auth/index.js +6 -7
- package/lib/auth/oAuth2.d.ts +11 -6
- package/lib/auth/oAuth2.js +11 -7
- package/lib/eBayApi.d.ts +58 -0
- package/lib/eBayApi.js +130 -0
- package/lib/ebay-api.min.js +1 -2
- package/lib/enums/apiEnums.js +0 -1
- package/lib/enums/index.d.ts +2 -2
- package/lib/enums/index.js +7 -4
- package/lib/enums/restfulEnums.js +0 -1
- package/lib/errors/index.js +0 -1
- package/lib/index.d.ts +1 -55
- package/lib/index.js +2 -92
- package/lib/nanoevents.d.ts +6 -0
- package/lib/nanoevents.js +24 -0
- package/lib/package.json +3 -0
- package/lib/request.d.ts +6 -6
- package/lib/request.js +2 -3
- package/lib/types/apiTypes.d.ts +10 -10
- package/lib/types/apiTypes.js +0 -1
- package/lib/types/index.d.ts +3 -3
- package/lib/types/index.js +8 -5
- package/lib/types/restfulTypes.d.ts +191 -191
- package/lib/types/restfulTypes.js +0 -1
- package/lib/types/traditonalTypes.d.ts +15 -15
- package/lib/types/traditonalTypes.js +0 -1
- package/package.json +98 -33
- package/lib/api/apiFactory.js.map +0 -1
- package/lib/api/base.js.map +0 -1
- package/lib/api/index.js.map +0 -1
- package/lib/api/restful/buy/browse/index.js.map +0 -1
- package/lib/api/restful/buy/deal/index.js.map +0 -1
- package/lib/api/restful/buy/feed/index.js.map +0 -1
- package/lib/api/restful/buy/index.js.map +0 -1
- package/lib/api/restful/buy/marketing/index.js.map +0 -1
- package/lib/api/restful/buy/marketplaceInsights/index.js.map +0 -1
- package/lib/api/restful/buy/offer/index.js.map +0 -1
- package/lib/api/restful/buy/order/index.js.map +0 -1
- package/lib/api/restful/commerce/catalog/index.js.map +0 -1
- package/lib/api/restful/commerce/charity/index.js.map +0 -1
- package/lib/api/restful/commerce/identity/index.js.map +0 -1
- package/lib/api/restful/commerce/index.js.map +0 -1
- package/lib/api/restful/commerce/notification/index.js.map +0 -1
- package/lib/api/restful/commerce/taxonomy/index.js.map +0 -1
- package/lib/api/restful/commerce/translation/index.js.map +0 -1
- package/lib/api/restful/developer/analytics/index.js.map +0 -1
- package/lib/api/restful/developer/index.js.map +0 -1
- package/lib/api/restful/developer/keyManagement/index.js.map +0 -1
- package/lib/api/restful/index.js.map +0 -1
- package/lib/api/restful/postOrder/cancellation/index.js.map +0 -1
- package/lib/api/restful/postOrder/case/index.js.map +0 -1
- package/lib/api/restful/postOrder/index.js.map +0 -1
- package/lib/api/restful/postOrder/inquiry/index.js.map +0 -1
- package/lib/api/restful/postOrder/return/index.js.map +0 -1
- package/lib/api/restful/sell/account/index.js.map +0 -1
- package/lib/api/restful/sell/analytics/index.js.map +0 -1
- package/lib/api/restful/sell/compliance/index.js.map +0 -1
- package/lib/api/restful/sell/feed/index.js.map +0 -1
- package/lib/api/restful/sell/finances/index.js.map +0 -1
- package/lib/api/restful/sell/fulfillment/index.js.map +0 -1
- package/lib/api/restful/sell/index.js.map +0 -1
- package/lib/api/restful/sell/inventory/index.js.map +0 -1
- package/lib/api/restful/sell/listing/index.js.map +0 -1
- package/lib/api/restful/sell/logistics/index.js.map +0 -1
- package/lib/api/restful/sell/marketing/index.js.map +0 -1
- package/lib/api/restful/sell/metadata/index.js.map +0 -1
- package/lib/api/restful/sell/negotiation/index.js.map +0 -1
- package/lib/api/restful/sell/recommendation/index.js.map +0 -1
- package/lib/api/traditional/XMLRequest.js.map +0 -1
- package/lib/api/traditional/clientAlerts/index.js.map +0 -1
- package/lib/api/traditional/clientAlerts/types.js.map +0 -1
- package/lib/api/traditional/fields.js.map +0 -1
- package/lib/api/traditional/finding/index.js.map +0 -1
- package/lib/api/traditional/index.js.map +0 -1
- package/lib/api/traditional/merchandising/index.js.map +0 -1
- package/lib/api/traditional/shopping/index.js.map +0 -1
- package/lib/api/traditional/trading/index.js.map +0 -1
- package/lib/auth/authNAuth.js.map +0 -1
- package/lib/auth/index.js.map +0 -1
- package/lib/auth/oAuth2.js.map +0 -1
- package/lib/ebay-api.min.js.map +0 -1
- package/lib/enums/apiEnums.js.map +0 -1
- package/lib/enums/index.js.map +0 -1
- package/lib/enums/restfulEnums.js.map +0 -1
- package/lib/errors/index.js.map +0 -1
- package/lib/index.js.map +0 -1
- package/lib/request.js.map +0 -1
- package/lib/types/apiTypes.js.map +0 -1
- package/lib/types/index.js.map +0 -1
- package/lib/types/restfulTypes.js.map +0 -1
- package/lib/types/traditonalTypes.js.map +0 -1
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The Inventory API is used to create and manage inventory, and then to publish and manage this inventory on an eBay
|
|
4
|
+
* marketplace.
|
|
5
|
+
*/
|
|
6
|
+
export default class Inventory extends Restful {
|
|
7
|
+
get basePath() {
|
|
8
|
+
return '/sell/inventory/v1';
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This call retrieves all defined details of the inventory location that is specified by the
|
|
12
|
+
* <b>merchantLocationKey</b> path parameter.
|
|
13
|
+
*
|
|
14
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
15
|
+
*/
|
|
16
|
+
getInventoryLocation(merchantLocationKey) {
|
|
17
|
+
const key = encodeURIComponent(merchantLocationKey);
|
|
18
|
+
return this.get(`/location/${key}`);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* <p>This call disables the inventory location that is specified in the <code>merchantLocationKey</code> path
|
|
22
|
+
* parameter.
|
|
23
|
+
*
|
|
24
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
25
|
+
*/
|
|
26
|
+
disableInventoryLocation(merchantLocationKey) {
|
|
27
|
+
const key = encodeURIComponent(merchantLocationKey);
|
|
28
|
+
return this.post(`/location/${key}/disable`);
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* <p>This call enables a disabled inventory location that is specified in the <code>merchantLocationKey</code>
|
|
32
|
+
* path parameter.
|
|
33
|
+
*
|
|
34
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
35
|
+
*/
|
|
36
|
+
enableInventoryLocation(merchantLocationKey) {
|
|
37
|
+
const key = encodeURIComponent(merchantLocationKey);
|
|
38
|
+
return this.post(`/location/${key}/enable`);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This call retrieves all defined details for every inventory location associated with the seller's account.
|
|
42
|
+
*
|
|
43
|
+
* @param limit The value passed in this query parameter sets the maximum number of records to return per page of
|
|
44
|
+
* data.
|
|
45
|
+
* @param offset The value passed in this query parameter sets the page number to retrieve.
|
|
46
|
+
*/
|
|
47
|
+
getInventoryLocations({ limit, offset, } = {}) {
|
|
48
|
+
return this.get(`/location`, {
|
|
49
|
+
params: {
|
|
50
|
+
limit,
|
|
51
|
+
offset,
|
|
52
|
+
},
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* <p>Use this call to create a new inventory location.
|
|
57
|
+
*
|
|
58
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
59
|
+
* @param body Inventory Location details
|
|
60
|
+
*/
|
|
61
|
+
createInventoryLocation(merchantLocationKey, body) {
|
|
62
|
+
const key = encodeURIComponent(merchantLocationKey);
|
|
63
|
+
return this.post(`/location/${key}`, body);
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* <p>This call deletes the inventory location that is specified in the <code>merchantLocationKey</code> path
|
|
67
|
+
* parameter.
|
|
68
|
+
*
|
|
69
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
70
|
+
*/
|
|
71
|
+
deleteInventoryLocation(merchantLocationKey) {
|
|
72
|
+
const key = encodeURIComponent(merchantLocationKey);
|
|
73
|
+
return this.delete(`/location/${key}`);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* <p>Use this call to update non-physical location details for an existing inventory location.
|
|
77
|
+
*
|
|
78
|
+
* @param merchantLocationKey A unique merchant-defined key (ID) for an inventory location.
|
|
79
|
+
* @param body The inventory location details to be updated (other than the address and geo co-ordinates).
|
|
80
|
+
*/
|
|
81
|
+
updateInventoryLocation(merchantLocationKey, body) {
|
|
82
|
+
const key = encodeURIComponent(merchantLocationKey);
|
|
83
|
+
return this.post(`/location/${key}/update_location_details`, body);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* This call retrieves the inventory item record for a given SKU.
|
|
87
|
+
*
|
|
88
|
+
* @param sku his is the seller-defined SKU value of the product whose inventory item record you wish to
|
|
89
|
+
* retrieve.<br/><br/><strong>Max length</strong>: 50.
|
|
90
|
+
*/
|
|
91
|
+
getInventoryItem(sku) {
|
|
92
|
+
sku = encodeURIComponent(sku);
|
|
93
|
+
return this.get(`/inventory_item/${sku}`);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* This call creates a new inventory item record or replaces an existing inventory item record.
|
|
97
|
+
*
|
|
98
|
+
* @param sku The seller-defined SKU value for the inventory item is required whether the seller is creating a new
|
|
99
|
+
* inventory item, or updating an existing inventory item.
|
|
100
|
+
* @param body Details of the inventory item record.
|
|
101
|
+
*/
|
|
102
|
+
createOrReplaceInventoryItem(sku, body) {
|
|
103
|
+
sku = encodeURIComponent(sku);
|
|
104
|
+
return this.put(`/inventory_item/${sku}`, body);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* This call is used to delete an inventory item record associated with a specified SKU.
|
|
108
|
+
*
|
|
109
|
+
* @param sku The seller-defined SKU value for the inventory item is required whether the seller is creating a new
|
|
110
|
+
* inventory item, or updating an existing inventory item.
|
|
111
|
+
*/
|
|
112
|
+
deleteInventoryItem(sku) {
|
|
113
|
+
sku = encodeURIComponent(sku);
|
|
114
|
+
return this.delete(`/inventory_item/${sku}`);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* This call retrieves all inventory item records defined for the seller's account.
|
|
118
|
+
*
|
|
119
|
+
* @param limit The value passed in this query parameter sets the maximum number of records to return per page of
|
|
120
|
+
* data.
|
|
121
|
+
* @param offset The value passed in this query parameter sets the page number to retrieve.
|
|
122
|
+
*/
|
|
123
|
+
getInventoryItems({ limit, offset, } = {}) {
|
|
124
|
+
return this.get(`/inventory_item`, {
|
|
125
|
+
params: {
|
|
126
|
+
limit,
|
|
127
|
+
offset,
|
|
128
|
+
},
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* This call is used by the seller to update the total ship-to-home quantity of one inventory item,
|
|
133
|
+
* and/or to update the price and/or quantity of one or more offers associated with one inventory item.
|
|
134
|
+
*
|
|
135
|
+
* @param body BulkPriceQuantity
|
|
136
|
+
*/
|
|
137
|
+
bulkUpdatePriceQuantity(body) {
|
|
138
|
+
return this.post(`/bulk_update_price_quantity`, body);
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* This call can be used to create and/or update up to 25 new inventory item records.
|
|
142
|
+
*
|
|
143
|
+
* @param body BulkInventoryItem
|
|
144
|
+
*/
|
|
145
|
+
bulkCreateOrReplaceInventoryItem(body) {
|
|
146
|
+
return this.post(`/bulk_create_or_replace_inventory_item`, body);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* This call retrieves up to 25 inventory item records. The SKU value of each inventory item record to retrieve is
|
|
150
|
+
* specified in the request payload.
|
|
151
|
+
*
|
|
152
|
+
* @param body BulkInventoryItem
|
|
153
|
+
*/
|
|
154
|
+
bulkGetInventoryItem(body) {
|
|
155
|
+
return this.post(`/bulk_get_inventory_item`, body);
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* This call is used by the seller to retrieve the list of products that are compatible with the inventory item.
|
|
159
|
+
*
|
|
160
|
+
* @param sku A SKU (stock keeping unit) is an unique identifier defined by a seller for a product
|
|
161
|
+
*/
|
|
162
|
+
getProductCompatibility(sku) {
|
|
163
|
+
sku = encodeURIComponent(sku);
|
|
164
|
+
return this.get(`/inventory_item/${sku}/product_compatibility`);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* This call is used by the seller to create or replace a list of products that are compatible with the inventory
|
|
168
|
+
* item.
|
|
169
|
+
*
|
|
170
|
+
* @param sku A SKU (stock keeping unit) is an unique identifier defined by a seller for a product
|
|
171
|
+
* @param body Details of the compatibility
|
|
172
|
+
*/
|
|
173
|
+
createOrReplaceProductCompatibility(sku, body) {
|
|
174
|
+
sku = encodeURIComponent(sku);
|
|
175
|
+
return this.put(`/inventory_item/${sku}/product_compatibility`, body);
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* This call is used by the seller to delete the list of products that are compatible with the inventory item that
|
|
179
|
+
* is associated with the compatible product list.
|
|
180
|
+
*
|
|
181
|
+
* @param sku A SKU (stock keeping unit) is an unique identifier defined by a seller for a product
|
|
182
|
+
*/
|
|
183
|
+
deleteProductCompatibility(sku) {
|
|
184
|
+
sku = encodeURIComponent(sku);
|
|
185
|
+
return this.delete(`/inventory_item/${sku}/product_compatibility`);
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* This call retrieves all existing offers for the specified SKU value.
|
|
189
|
+
*
|
|
190
|
+
* @param sku The seller-defined SKU value is passed in as a query parameter.
|
|
191
|
+
* @param marketplace_id The unique identifier of the eBay marketplace.
|
|
192
|
+
* @param format This enumeration value sets the listing format for the offer.
|
|
193
|
+
* @param limit The value passed in this query parameter sets the maximum number of records to return per page of
|
|
194
|
+
* data.
|
|
195
|
+
* @param offset The value passed in this query parameter sets the page number to retrieve.
|
|
196
|
+
*/
|
|
197
|
+
getOffers({ sku, marketplaceId, format, limit, offset, } = {}) {
|
|
198
|
+
return this.get(`/offer`, {
|
|
199
|
+
params: {
|
|
200
|
+
sku,
|
|
201
|
+
marketplace_id: marketplaceId,
|
|
202
|
+
format,
|
|
203
|
+
limit,
|
|
204
|
+
offset,
|
|
205
|
+
},
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* This call retrieves a specific published or unpublished offer.
|
|
210
|
+
*
|
|
211
|
+
* @param offerId The unique identifier of the offer that is to be retrieved.
|
|
212
|
+
*/
|
|
213
|
+
getOffer(offerId) {
|
|
214
|
+
offerId = encodeURIComponent(offerId);
|
|
215
|
+
return this.get(`/offer/${offerId}`);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* This call creates an offer for a specific inventory item on a specific eBay marketplace.
|
|
219
|
+
*
|
|
220
|
+
* @param body Details of the offer for the channel
|
|
221
|
+
*/
|
|
222
|
+
createOffer(body) {
|
|
223
|
+
return this.post(`/offer`, body);
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* This call updates an existing offer.
|
|
227
|
+
*
|
|
228
|
+
* @param offerId The unique identifier of the offer that is being updated.
|
|
229
|
+
* @param body Details of the offer for the channel
|
|
230
|
+
*/
|
|
231
|
+
updateOffer(offerId, body) {
|
|
232
|
+
offerId = encodeURIComponent(offerId);
|
|
233
|
+
return this.put(`/offer/${offerId}`, body);
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* If used against an unpublished offer, this call will permanently delete that offer.
|
|
237
|
+
*
|
|
238
|
+
* @param offerId The unique identifier of the offer to delete.
|
|
239
|
+
*/
|
|
240
|
+
deleteOffer(offerId) {
|
|
241
|
+
return this.delete(`/offer/${offerId}`);
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
* This call is used to convert an unpublished offer into a published offer, or live eBay listing.
|
|
245
|
+
*
|
|
246
|
+
* @param offerId The unique identifier of the offer that is to be published.
|
|
247
|
+
*/
|
|
248
|
+
publishOffer(offerId) {
|
|
249
|
+
const id = encodeURIComponent(offerId);
|
|
250
|
+
return this.post(`/offer/${id}/publish/`);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* This call is used to convert all unpublished offers associated with an inventory item group into an active,
|
|
254
|
+
* multiple-variation listing.
|
|
255
|
+
*
|
|
256
|
+
* @param body PublishByInventoryItemGroupRequest
|
|
257
|
+
*/
|
|
258
|
+
publishOfferByInventoryItemGroup(body) {
|
|
259
|
+
return this.post(`/offer/publish_by_inventory_item_group/`, body);
|
|
260
|
+
}
|
|
261
|
+
/**
|
|
262
|
+
* This call is used to end a multiple-variation eBay listing that is associated with the specified inventory item
|
|
263
|
+
* group.
|
|
264
|
+
*
|
|
265
|
+
* @param body WithdrawByInventoryItemGroupRequest
|
|
266
|
+
*/
|
|
267
|
+
withdrawOfferByInventoryItemGroup(body) {
|
|
268
|
+
return this.post(`/offer/withdraw_by_inventory_item_group`, body);
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* This call is used to retrieve the expected listing fees for up to 250 unpublished offers.
|
|
272
|
+
*
|
|
273
|
+
* @param body OfferKeysWithId
|
|
274
|
+
*/
|
|
275
|
+
getListingFees(body) {
|
|
276
|
+
return this.post(`/offer/get_listing_fees`, body);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* This call creates multiple offers (up to 25) for specific inventory items on a specific eBay marketplace.
|
|
280
|
+
*
|
|
281
|
+
* @param body BulkEbayOfferDetailsWithKeys
|
|
282
|
+
*/
|
|
283
|
+
bulkCreateOffer(body) {
|
|
284
|
+
return this.post(`/bulk_create_offer`, body);
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* This call is used to convert unpublished offers (up to 25) into published offers, or live eBay listings.
|
|
288
|
+
*
|
|
289
|
+
* @param body BulkOffer
|
|
290
|
+
*/
|
|
291
|
+
bulkPublishOffer(body) {
|
|
292
|
+
return this.post(`/bulk_publish_offer`, body);
|
|
293
|
+
}
|
|
294
|
+
/**
|
|
295
|
+
* This call is used to end a single-variation listing that is associated with the specified offer.
|
|
296
|
+
*
|
|
297
|
+
* @param offerId he unique identifier of the offer that is to be withdrawn.
|
|
298
|
+
*/
|
|
299
|
+
withdrawOffer(offerId) {
|
|
300
|
+
const id = encodeURIComponent(offerId);
|
|
301
|
+
return this.post(`/offer/${id}/withdraw`);
|
|
302
|
+
}
|
|
303
|
+
/**
|
|
304
|
+
* This call retrieves the inventory item group for a given <strong>inventoryItemGroupKey</strong> value.
|
|
305
|
+
*
|
|
306
|
+
* @param inventoryItemGroupKey The unique identifier of an inventory item group.
|
|
307
|
+
*/
|
|
308
|
+
getInventoryItemGroup(inventoryItemGroupKey) {
|
|
309
|
+
inventoryItemGroupKey = encodeURIComponent(inventoryItemGroupKey);
|
|
310
|
+
return this.get(`/inventory_item_group/${inventoryItemGroupKey}`);
|
|
311
|
+
}
|
|
312
|
+
/**
|
|
313
|
+
* This call creates a new inventory item group or updates an existing inventory item group.
|
|
314
|
+
*
|
|
315
|
+
* @param inventoryItemGroupKey Unique identifier of the inventory item group.
|
|
316
|
+
* @param body Details of the inventory Item Group
|
|
317
|
+
*/
|
|
318
|
+
createOrReplaceInventoryItemGroup(inventoryItemGroupKey, body) {
|
|
319
|
+
inventoryItemGroupKey = encodeURIComponent(inventoryItemGroupKey);
|
|
320
|
+
return this.put(`/inventory_item_group/${inventoryItemGroupKey}`, body);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* This call deletes the inventory item group for a given <strong>inventoryItemGroupKey</strong> value.
|
|
324
|
+
*
|
|
325
|
+
* @param inventoryItemGroupKey Unique identifier of the inventory item group.
|
|
326
|
+
*/
|
|
327
|
+
deleteInventoryItemGroup(inventoryItemGroupKey) {
|
|
328
|
+
return this.delete(`/inventory_item_group/${inventoryItemGroupKey}`);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* This call is used to convert existing eBay Listings to the corresponding Inventory API objects.
|
|
332
|
+
*
|
|
333
|
+
* @param body BulkMigrateListing
|
|
334
|
+
*/
|
|
335
|
+
bulkMigrateListing(body) {
|
|
336
|
+
return this.post(`/bulk_migrate_listing`, body);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
Inventory.id = 'Inventory';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Enables a seller adding an ad or item on a Partner's site to automatically create an eBay listing draft using the item details from the Partner's site.
|
|
4
|
+
*/
|
|
5
|
+
export default class Listing extends Restful {
|
|
6
|
+
static id: string;
|
|
7
|
+
get basePath(): string;
|
|
8
|
+
/**
|
|
9
|
+
* This call gives Partners the ability to create an eBay draft of a item for their seller using information from their site.
|
|
10
|
+
*
|
|
11
|
+
* @param data The ItemDraft
|
|
12
|
+
*/
|
|
13
|
+
createItemDraft(data?: any): Promise<any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Enables a seller adding an ad or item on a Partner's site to automatically create an eBay listing draft using the item details from the Partner's site.
|
|
4
|
+
*/
|
|
5
|
+
export default class Listing extends Restful {
|
|
6
|
+
get basePath() {
|
|
7
|
+
return '/sell/listing/v1_beta';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* This call gives Partners the ability to create an eBay draft of a item for their seller using information from their site.
|
|
11
|
+
*
|
|
12
|
+
* @param data The ItemDraft
|
|
13
|
+
*/
|
|
14
|
+
createItemDraft(data) {
|
|
15
|
+
return this.post(`/item_draft/`, data);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
Listing.id = 'Listing';
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The <b>Logistics API</b> resources offer the following capabilities: <ul><li><b>shipping_quote</b> – Consolidates into a list a set of live shipping rates, or quotes, from which you can select a rate to ship a package.
|
|
4
|
+
*/
|
|
5
|
+
export default class Logistics extends Restful {
|
|
6
|
+
static id: string;
|
|
7
|
+
get basePath(): string;
|
|
8
|
+
/**
|
|
9
|
+
* The createShippingQuote method returns a shipping quote that contains a list of live "rates."
|
|
10
|
+
*
|
|
11
|
+
* @param data The ShippingQuoteRequest
|
|
12
|
+
*/
|
|
13
|
+
createShippingQuote(data: any): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* This method retrieves the complete details of the shipping quote associated with the specified shippingQuoteId value.
|
|
16
|
+
*
|
|
17
|
+
* @param shippingQuoteId This path parameter specifies the unique eBay-assigned ID of the shipping quote you want to retrieve.
|
|
18
|
+
*/
|
|
19
|
+
getShippingQuote(shippingQuoteId: string): Promise<any>;
|
|
20
|
+
/**
|
|
21
|
+
* This method creates a "shipment" based on the shippingQuoteId and rateId values supplied in the request.
|
|
22
|
+
*
|
|
23
|
+
* @param data The CreateShipmentFromQuoteRequest
|
|
24
|
+
*/
|
|
25
|
+
createFromShippingQuote(data: any): Promise<any>;
|
|
26
|
+
/**
|
|
27
|
+
* This method retrieves the shipment details for the specified shipment ID.
|
|
28
|
+
*
|
|
29
|
+
* @param shipmentId This path parameter specifies the unique eBay-assigned ID of the shipment you want to retrieve.
|
|
30
|
+
*/
|
|
31
|
+
getShipment(shipmentId: any): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* This method returns the shipping label file that was generated for the shipmentId value specified in the request.
|
|
34
|
+
*
|
|
35
|
+
* @param shipmentId This path parameter specifies the unique eBay-assigned ID of the shipment associated with the shipping label you want to download.
|
|
36
|
+
*/
|
|
37
|
+
downloadLabelFile(shipmentId: any): Promise<any>;
|
|
38
|
+
/**
|
|
39
|
+
* This method cancels the shipment associated with the specified shipment ID and the associated shipping label is deleted.
|
|
40
|
+
*
|
|
41
|
+
* @param shipmentId This path parameter specifies the unique eBay-assigned ID of the shipment to be canceled.
|
|
42
|
+
*/
|
|
43
|
+
cancelShipment(shipmentId: any): Promise<any>;
|
|
44
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* The <b>Logistics API</b> resources offer the following capabilities: <ul><li><b>shipping_quote</b> – Consolidates into a list a set of live shipping rates, or quotes, from which you can select a rate to ship a package.
|
|
4
|
+
*/
|
|
5
|
+
export default class Logistics extends Restful {
|
|
6
|
+
get basePath() {
|
|
7
|
+
return '/sell/logistics/v1_beta';
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The createShippingQuote method returns a shipping quote that contains a list of live "rates."
|
|
11
|
+
*
|
|
12
|
+
* @param data The ShippingQuoteRequest
|
|
13
|
+
*/
|
|
14
|
+
createShippingQuote(data) {
|
|
15
|
+
return this.post(`/shipping_quote`, data);
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* This method retrieves the complete details of the shipping quote associated with the specified shippingQuoteId value.
|
|
19
|
+
*
|
|
20
|
+
* @param shippingQuoteId This path parameter specifies the unique eBay-assigned ID of the shipping quote you want to retrieve.
|
|
21
|
+
*/
|
|
22
|
+
getShippingQuote(shippingQuoteId) {
|
|
23
|
+
shippingQuoteId = encodeURIComponent(shippingQuoteId);
|
|
24
|
+
return this.get(`/shipping_quote/${shippingQuoteId}`);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* This method creates a "shipment" based on the shippingQuoteId and rateId values supplied in the request.
|
|
28
|
+
*
|
|
29
|
+
* @param data The CreateShipmentFromQuoteRequest
|
|
30
|
+
*/
|
|
31
|
+
createFromShippingQuote(data) {
|
|
32
|
+
return this.post(`/shipment/create_from_shipping_quote`, data);
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* This method retrieves the shipment details for the specified shipment ID.
|
|
36
|
+
*
|
|
37
|
+
* @param shipmentId This path parameter specifies the unique eBay-assigned ID of the shipment you want to retrieve.
|
|
38
|
+
*/
|
|
39
|
+
getShipment(shipmentId) {
|
|
40
|
+
return this.get(`/shipment/${shipmentId}`);
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* This method returns the shipping label file that was generated for the shipmentId value specified in the request.
|
|
44
|
+
*
|
|
45
|
+
* @param shipmentId This path parameter specifies the unique eBay-assigned ID of the shipment associated with the shipping label you want to download.
|
|
46
|
+
*/
|
|
47
|
+
downloadLabelFile(shipmentId) {
|
|
48
|
+
return this.get(`/shipment/${shipmentId}/download_label_file`);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* This method cancels the shipment associated with the specified shipment ID and the associated shipping label is deleted.
|
|
52
|
+
*
|
|
53
|
+
* @param shipmentId This path parameter specifies the unique eBay-assigned ID of the shipment to be canceled.
|
|
54
|
+
*/
|
|
55
|
+
cancelShipment(shipmentId) {
|
|
56
|
+
return this.post(`/shipment/${shipmentId}/cancel`);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
Logistics.id = 'Logistics';
|