ebay-api 1.13.5 → 6.1.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/LICENSE +18 -19
- package/README.md +512 -118
- package/lib/api/apiFactory.d.ts +27 -0
- package/lib/api/apiFactory.js +100 -0
- package/lib/api/apiFactory.js.map +1 -0
- package/lib/api/base.d.ts +13 -0
- package/lib/api/base.js +25 -0
- package/lib/api/base.js.map +1 -0
- package/lib/api/index.d.ts +11 -0
- package/lib/api/index.js +18 -0
- package/lib/api/index.js.map +1 -0
- package/lib/api/restful/buy/browse/index.d.ts +84 -0
- package/lib/api/restful/buy/browse/index.js +142 -0
- package/lib/api/restful/buy/browse/index.js.map +1 -0
- package/lib/api/restful/buy/deal/index.d.ts +55 -0
- package/lib/api/restful/buy/deal/index.js +80 -0
- package/lib/api/restful/buy/deal/index.js.map +1 -0
- package/lib/api/restful/buy/feed/index.d.ts +43 -0
- package/lib/api/restful/buy/feed/index.js +85 -0
- package/lib/api/restful/buy/feed/index.js.map +1 -0
- package/lib/api/restful/buy/index.d.ts +17 -0
- package/lib/api/restful/buy/index.js +21 -0
- package/lib/api/restful/buy/index.js.map +1 -0
- package/lib/api/restful/buy/marketing/index.d.ts +27 -0
- package/lib/api/restful/buy/marketing/index.js +51 -0
- package/lib/api/restful/buy/marketing/index.js.map +1 -0
- package/lib/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
- package/lib/api/restful/buy/marketplaceInsights/index.js +51 -0
- package/lib/api/restful/buy/marketplaceInsights/index.js.map +1 -0
- package/lib/api/restful/buy/offer/index.d.ts +23 -0
- package/lib/api/restful/buy/offer/index.js +37 -0
- package/lib/api/restful/buy/offer/index.js.map +1 -0
- package/lib/api/restful/buy/order/index.d.ts +264 -0
- package/lib/api/restful/buy/order/index.js +369 -0
- package/lib/api/restful/buy/order/index.js.map +1 -0
- package/lib/api/restful/commerce/catalog/index.d.ts +73 -0
- package/lib/api/restful/commerce/catalog/index.js +108 -0
- package/lib/api/restful/commerce/catalog/index.js.map +1 -0
- package/lib/api/restful/commerce/charity/index.d.ts +34 -0
- package/lib/api/restful/commerce/charity/index.js +56 -0
- package/lib/api/restful/commerce/charity/index.js.map +1 -0
- package/lib/api/restful/commerce/identity/index.d.ts +14 -0
- package/lib/api/restful/commerce/identity/index.js +27 -0
- package/lib/api/restful/commerce/identity/index.js.map +1 -0
- package/lib/api/restful/commerce/index.d.ts +15 -0
- package/lib/api/restful/commerce/index.js +19 -0
- package/lib/api/restful/commerce/index.js.map +1 -0
- package/lib/api/restful/commerce/notification/index.d.ts +117 -0
- package/lib/api/restful/commerce/notification/index.js +187 -0
- package/lib/api/restful/commerce/notification/index.js.map +1 -0
- package/lib/api/restful/commerce/taxonomy/index.d.ts +78 -0
- package/lib/api/restful/commerce/taxonomy/index.js +135 -0
- package/lib/api/restful/commerce/taxonomy/index.js.map +1 -0
- package/lib/api/restful/commerce/translation/index.d.ts +15 -0
- package/lib/api/restful/commerce/translation/index.js +25 -0
- package/lib/api/restful/commerce/translation/index.js.map +1 -0
- package/lib/api/restful/developer/analytics/index.d.ts +22 -0
- package/lib/api/restful/developer/analytics/index.js +45 -0
- package/lib/api/restful/developer/analytics/index.js.map +1 -0
- package/lib/api/restful/developer/index.d.ts +5 -0
- package/lib/api/restful/developer/index.js +9 -0
- package/lib/api/restful/developer/index.js.map +1 -0
- package/lib/api/restful/index.d.ts +63 -0
- package/lib/api/restful/index.js +165 -0
- package/lib/api/restful/index.js.map +1 -0
- package/lib/api/restful/postOrder/cancellation/index.d.ts +57 -0
- package/lib/api/restful/postOrder/cancellation/index.js +95 -0
- package/lib/api/restful/postOrder/cancellation/index.js.map +1 -0
- package/lib/api/restful/postOrder/case/index.d.ts +63 -0
- package/lib/api/restful/postOrder/case/index.js +97 -0
- package/lib/api/restful/postOrder/case/index.js.map +1 -0
- package/lib/api/restful/postOrder/index.d.ts +11 -0
- package/lib/api/restful/postOrder/index.js +15 -0
- package/lib/api/restful/postOrder/index.js.map +1 -0
- package/lib/api/restful/postOrder/inquiry/index.d.ts +82 -0
- package/lib/api/restful/postOrder/inquiry/index.js +131 -0
- package/lib/api/restful/postOrder/inquiry/index.js.map +1 -0
- package/lib/api/restful/postOrder/return/index.d.ts +231 -0
- package/lib/api/restful/postOrder/return/index.js +361 -0
- package/lib/api/restful/postOrder/return/index.js.map +1 -0
- package/lib/api/restful/sell/account/index.d.ts +217 -0
- package/lib/api/restful/sell/account/index.js +337 -0
- package/lib/api/restful/sell/account/index.js.map +1 -0
- package/lib/api/restful/sell/analytics/index.d.ts +41 -0
- package/lib/api/restful/sell/analytics/index.js +61 -0
- package/lib/api/restful/sell/analytics/index.js.map +1 -0
- package/lib/api/restful/sell/compliance/index.d.ts +37 -0
- package/lib/api/restful/sell/compliance/index.js +57 -0
- package/lib/api/restful/sell/compliance/index.js.map +1 -0
- package/lib/api/restful/sell/feed/index.d.ts +151 -0
- package/lib/api/restful/sell/feed/index.js +255 -0
- package/lib/api/restful/sell/feed/index.js.map +1 -0
- package/lib/api/restful/sell/finances/index.d.ts +74 -0
- package/lib/api/restful/sell/finances/index.js +105 -0
- package/lib/api/restful/sell/finances/index.js.map +1 -0
- package/lib/api/restful/sell/fulfillment/index.d.ts +137 -0
- package/lib/api/restful/sell/fulfillment/index.js +199 -0
- package/lib/api/restful/sell/fulfillment/index.js.map +1 -0
- package/lib/api/restful/sell/index.d.ts +29 -0
- package/lib/api/restful/sell/index.js +33 -0
- package/lib/api/restful/sell/index.js.map +1 -0
- package/lib/api/restful/sell/inventory/index.d.ts +248 -0
- package/lib/api/restful/sell/inventory/index.js +346 -0
- package/lib/api/restful/sell/inventory/index.js.map +1 -0
- package/lib/api/restful/sell/listing/index.d.ts +14 -0
- package/lib/api/restful/sell/listing/index.js +25 -0
- package/lib/api/restful/sell/listing/index.js.map +1 -0
- package/lib/api/restful/sell/logistics/index.d.ts +44 -0
- package/lib/api/restful/sell/logistics/index.js +66 -0
- package/lib/api/restful/sell/logistics/index.js.map +1 -0
- package/lib/api/restful/sell/marketing/index.d.ts +443 -0
- package/lib/api/restful/sell/marketing/index.js +609 -0
- package/lib/api/restful/sell/marketing/index.js.map +1 -0
- package/lib/api/restful/sell/metadata/index.d.ts +77 -0
- package/lib/api/restful/sell/metadata/index.js +131 -0
- package/lib/api/restful/sell/metadata/index.js.map +1 -0
- package/lib/api/restful/sell/negotiation/index.d.ts +24 -0
- package/lib/api/restful/sell/negotiation/index.js +39 -0
- package/lib/api/restful/sell/negotiation/index.js.map +1 -0
- package/lib/api/restful/sell/recommendation/index.d.ts +26 -0
- package/lib/api/restful/sell/recommendation/index.js +39 -0
- package/lib/api/restful/sell/recommendation/index.js.map +1 -0
- package/lib/api/traditional/XMLRequest.d.ts +98 -0
- package/lib/api/traditional/XMLRequest.js +191 -0
- package/lib/api/traditional/XMLRequest.js.map +1 -0
- package/lib/api/traditional/clientAlerts/index.d.ts +9 -0
- package/lib/api/traditional/clientAlerts/index.js +15 -0
- package/lib/api/traditional/clientAlerts/index.js.map +1 -0
- package/lib/api/traditional/clientAlerts/types.d.ts +31 -0
- package/lib/api/traditional/clientAlerts/types.js +36 -0
- package/lib/api/traditional/clientAlerts/types.js.map +1 -0
- package/lib/api/traditional/fields.d.ts +1948 -0
- package/lib/api/traditional/fields.js +1949 -0
- package/lib/api/traditional/fields.js.map +1 -0
- package/lib/api/traditional/finding/index.d.ts +12 -0
- package/lib/api/traditional/finding/index.js +16 -0
- package/lib/api/traditional/finding/index.js.map +1 -0
- package/lib/api/traditional/index.d.ts +17 -0
- package/lib/api/traditional/index.js +207 -0
- package/lib/api/traditional/index.js.map +1 -0
- package/lib/api/traditional/merchandising/index.d.ts +7 -0
- package/lib/api/traditional/merchandising/index.js +11 -0
- package/lib/api/traditional/merchandising/index.js.map +1 -0
- package/lib/api/traditional/shopping/index.d.ts +11 -0
- package/lib/api/traditional/shopping/index.js +16 -0
- package/lib/api/traditional/shopping/index.js.map +1 -0
- package/lib/api/traditional/trading/index.d.ts +142 -0
- package/lib/api/traditional/trading/index.js +146 -0
- package/lib/api/traditional/trading/index.js.map +1 -0
- package/lib/auth/authNAuth.d.ts +49 -0
- package/lib/auth/authNAuth.js +122 -0
- package/lib/auth/authNAuth.js.map +1 -0
- package/lib/auth/index.d.ts +17 -0
- package/lib/auth/index.js +32 -0
- package/lib/auth/index.js.map +1 -0
- package/lib/auth/oAuth2.d.ts +90 -0
- package/lib/auth/oAuth2.js +258 -0
- package/lib/auth/oAuth2.js.map +1 -0
- package/lib/ebay-api.min.js +2 -0
- package/lib/ebay-api.min.js.map +1 -0
- package/lib/enums/apiEnums.d.ts +49 -0
- package/lib/enums/apiEnums.js +55 -0
- package/lib/enums/apiEnums.js.map +1 -0
- package/lib/enums/index.d.ts +2 -0
- package/lib/enums/index.js +15 -0
- package/lib/enums/index.js.map +1 -0
- package/lib/enums/restfulEnums.d.ts +672 -0
- package/lib/enums/restfulEnums.js +714 -0
- package/lib/enums/restfulEnums.js.map +1 -0
- package/lib/errors/index.d.ts +66 -0
- package/lib/errors/index.js +208 -0
- package/lib/errors/index.js.map +1 -0
- package/lib/index.d.ts +55 -0
- package/lib/index.js +98 -0
- package/lib/index.js.map +1 -0
- package/lib/request.d.ts +26 -0
- package/lib/request.js +51 -0
- package/lib/request.js.map +1 -0
- package/lib/types/apiTypes.d.ts +28 -0
- package/lib/types/apiTypes.js +3 -0
- package/lib/types/apiTypes.js.map +1 -0
- package/lib/types/index.d.ts +3 -0
- package/lib/types/index.js +16 -0
- package/lib/types/index.js.map +1 -0
- package/lib/types/restfulTypes.d.ts +1067 -0
- package/lib/types/restfulTypes.js +3 -0
- package/lib/types/restfulTypes.js.map +1 -0
- package/lib/types/traditonalTypes.d.ts +34 -0
- package/lib/types/traditonalTypes.js +3 -0
- package/lib/types/traditonalTypes.js.map +1 -0
- package/package.json +115 -21
- package/.npmignore +0 -17
- package/.travis.yml +0 -7
- package/examples/Finding-FindItemsByKeywords.js +0 -46
- package/examples/Merchandising-GetMostWatchedItemsRequest.js +0 -16
- package/examples/Shopping-GetSingleItem.js +0 -18
- package/examples/Trading-GetOrders.js +0 -26
- package/index.js +0 -10
- package/lib/deep-to-array.js +0 -42
- package/lib/defaults.js +0 -69
- package/lib/errors.js +0 -44
- package/lib/json-parser.js +0 -336
- package/lib/key-lists.js +0 -64
- package/lib/urls.js +0 -64
- package/lib/versions.js +0 -35
- package/lib/xml-converter.js +0 -21
- package/lib/xml-request.js +0 -207
- package/scripts/parse-input-xml.js +0 -41
- package/test/deep-to-array.test.js +0 -100
- package/test/errors.test.js +0 -75
- package/test/helpers.js +0 -22
- package/test/mocha.opts +0 -1
- package/test/mocks/GetMultipleItems.xml +0 -115
- package/test/mocks/GetOrders-empty.xml +0 -17
- package/test/mocks/GetOrders.xml +0 -463
- package/test/pagination.test.js +0 -5
- package/test/parsing.test.js +0 -248
- package/test/xml-request.test.js +0 -447
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const __1 = __importDefault(require("../../"));
|
|
7
|
+
/**
|
|
8
|
+
* The Order API provides interfaces that lets shoppers pay for items (for both eBay guest and eBay member buyers).
|
|
9
|
+
* Client Credentials: https://api.ebay.com/oauth/api_scope/buy.order
|
|
10
|
+
*/
|
|
11
|
+
class Order extends __1.default {
|
|
12
|
+
get basePath() {
|
|
13
|
+
return '/buy/order/v1';
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* (Limited Release) You must be whitelisted to use this method.
|
|
17
|
+
* This method adds a coupon to an eBay proxy guest checkout session and applies it to all the eligible items in
|
|
18
|
+
* the order.
|
|
19
|
+
*
|
|
20
|
+
* @param {String} checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is
|
|
21
|
+
* returned by the initiateCheckoutSession method.
|
|
22
|
+
* @param body The container for the fields used to apply a coupon to a checkout session.
|
|
23
|
+
*/
|
|
24
|
+
applyCoupon(checkoutSessionId, body) {
|
|
25
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
26
|
+
return this.post(`/checkout_session/${checkoutSessionId}/apply_coupon`, body);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* This method returns the details of the specified eBay member checkout session.
|
|
30
|
+
*
|
|
31
|
+
* @param {String} checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is
|
|
32
|
+
* returned by the initiateCheckoutSession method.
|
|
33
|
+
*/
|
|
34
|
+
getCheckoutSession(checkoutSessionId) {
|
|
35
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
36
|
+
return this.get(`/checkout_session/${checkoutSessionId}`);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* This method creates a eBay member checkout session, which is the first step in performing a checkout.
|
|
40
|
+
*
|
|
41
|
+
* @param body The container for the fields used by the initiateCheckoutSession method.
|
|
42
|
+
*/
|
|
43
|
+
initiateCheckoutSession(body) {
|
|
44
|
+
return this.post(`/checkout_session/initiate`, body);
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* This method creates the purchase order, pays for the items, and terminates the specified eBay member checkout
|
|
48
|
+
* session.
|
|
49
|
+
*
|
|
50
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
51
|
+
* initiateCheckoutSession method.
|
|
52
|
+
*/
|
|
53
|
+
placeOrder(checkoutSessionId) {
|
|
54
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
55
|
+
return this.post(`/checkout_session/${checkoutSessionId}/place_order`);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* (Limited Release) You must be whitelisted to use this method. This method removes a coupon from an eBay member
|
|
59
|
+
* checkout session.
|
|
60
|
+
*
|
|
61
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
62
|
+
* initiateCheckoutSession method.
|
|
63
|
+
* @param body CouponRequest
|
|
64
|
+
*/
|
|
65
|
+
removeCoupon(checkoutSessionId, body) {
|
|
66
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
67
|
+
return this.post(`/checkout_session/${checkoutSessionId}/remove_coupon`, body);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* This method changes the payment method information of the specified eBay member checkout session.
|
|
71
|
+
*
|
|
72
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
73
|
+
* initiateCheckoutSession method.
|
|
74
|
+
* @param body UpdatePaymentInformation
|
|
75
|
+
*/
|
|
76
|
+
updatePaymentInfo(checkoutSessionId, body) {
|
|
77
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
78
|
+
return this.post(`/checkout_session/${checkoutSessionId}/update_payment_info`, body);
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* This method changes the quantity of the specified line item in an eBay member checkout session.
|
|
82
|
+
*
|
|
83
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
84
|
+
* initiateCheckoutSession method.
|
|
85
|
+
* @param body UpdateQuantity
|
|
86
|
+
*/
|
|
87
|
+
updateQuantity(checkoutSessionId, body) {
|
|
88
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
89
|
+
return this.post(`/checkout_session/${checkoutSessionId}/update_quantity`, body);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* This method changes the quantity of the specified line item in an eBay member checkout session.
|
|
93
|
+
*
|
|
94
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
95
|
+
* initiateCheckoutSession method.
|
|
96
|
+
* @param body UpdateQuantity
|
|
97
|
+
*/
|
|
98
|
+
checkoutSessionId(checkoutSessionId, body) {
|
|
99
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
100
|
+
return this.post(`/checkout_session/${checkoutSessionId}/update_quantity`, body);
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* This method changes the shipping address for in an eBay member checkout session.
|
|
104
|
+
*
|
|
105
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
106
|
+
* initiateCheckoutSession method.
|
|
107
|
+
* @param body ShippingAddressImpl
|
|
108
|
+
*/
|
|
109
|
+
updateShippingAddress(checkoutSessionId, body) {
|
|
110
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
111
|
+
return this.post(`/checkout_session/${checkoutSessionId}/update_shipping_address`, body);
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* This method changes the shipping method for the specified line item in an eBay member checkout session.
|
|
115
|
+
*
|
|
116
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
117
|
+
* initiateCheckoutSession method.
|
|
118
|
+
* @param body UpdateShippingOption
|
|
119
|
+
*/
|
|
120
|
+
updateShippingOption(checkoutSessionId, body) {
|
|
121
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
122
|
+
return this.post(`/checkout_session/${checkoutSessionId}/update_shipping_option`, body);
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* (Limited Release) You must be whitelisted to use this method. This method adds a coupon to an eBay guest
|
|
126
|
+
* checkout
|
|
127
|
+
* session and applies it to all the eligible items in the order.
|
|
128
|
+
*
|
|
129
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
130
|
+
* initiateCheckoutSession method.
|
|
131
|
+
* @param body CouponRequest
|
|
132
|
+
*/
|
|
133
|
+
applyGuestCoupon(checkoutSessionId, body) {
|
|
134
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
135
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/apply_coupon`, body);
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* This method returns the details of the specified guest checkout session. The checkoutSessionId is passed in as a
|
|
139
|
+
* URI parameter and is required.
|
|
140
|
+
*
|
|
141
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
142
|
+
* initiateCheckoutSession method.
|
|
143
|
+
*/
|
|
144
|
+
getGuestCheckoutSession(checkoutSessionId) {
|
|
145
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
146
|
+
return this.get(`/guest_checkout_session/${checkoutSessionId}`);
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* This method creates an eBay guest checkout session, which is the first step in performing a checkout.
|
|
150
|
+
*
|
|
151
|
+
* @param body CheckoutSessionRequest
|
|
152
|
+
*/
|
|
153
|
+
initiateGuestCheckoutSession(body) {
|
|
154
|
+
return this.post(`/guest_checkout_session/initiate`, body);
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* This method is used only in the PayPal Smart Button eBay guest payment flow.
|
|
158
|
+
*
|
|
159
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
160
|
+
* initiateCheckoutSession method.
|
|
161
|
+
* @param body InitiatePaymentRequest
|
|
162
|
+
*/
|
|
163
|
+
initiateGuestPayment(checkoutSessionId, body) {
|
|
164
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
165
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/initiate_payment`, body);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* This method creates the purchase order, pays for the items, and terminates the specified guest checkout session.
|
|
169
|
+
*
|
|
170
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
171
|
+
* initiateCheckoutSession method.
|
|
172
|
+
* @param body GuestPlaceOrderRequest
|
|
173
|
+
*/
|
|
174
|
+
placeGuestOrder(checkoutSessionId, body) {
|
|
175
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
176
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/place_order`, body);
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* (Limited Release) You must be whitelisted to use this method. This method removes a coupon from an eBay guest
|
|
180
|
+
* checkout session.
|
|
181
|
+
*
|
|
182
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
183
|
+
* initiateCheckoutSession method.
|
|
184
|
+
* @param body CouponRequest
|
|
185
|
+
*/
|
|
186
|
+
removeGuestCoupon(checkoutSessionId, body) {
|
|
187
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
188
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/remove_coupon`, body);
|
|
189
|
+
}
|
|
190
|
+
/**
|
|
191
|
+
* This method changes the payment method information of the specified guest checkout session.
|
|
192
|
+
*
|
|
193
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
194
|
+
* initiateCheckoutSession method.
|
|
195
|
+
* @param body UpdatePaymentInformation
|
|
196
|
+
*/
|
|
197
|
+
updateGuestPaymentInfo(checkoutSessionId, body) {
|
|
198
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
199
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/update_payment_info`, body);
|
|
200
|
+
}
|
|
201
|
+
/**
|
|
202
|
+
* This method changes the quantity of the specified line item in an eBay guest checkout session.
|
|
203
|
+
*
|
|
204
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
205
|
+
* initiateCheckoutSession method.
|
|
206
|
+
* @param body UpdateQuantity
|
|
207
|
+
*/
|
|
208
|
+
updateGuestQuantity(checkoutSessionId, body) {
|
|
209
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
210
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/update_quantity`, body);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* This method changes the shipping address for the order in an eBay guest checkout session.
|
|
214
|
+
*
|
|
215
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
216
|
+
* initiateCheckoutSession method.
|
|
217
|
+
* @param body ShippingAddressImpl
|
|
218
|
+
*/
|
|
219
|
+
updateGuestShippingAddress(checkoutSessionId, body) {
|
|
220
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
221
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/update_shipping_address`, body);
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* This method changes the shipping method for the specified line item in an eBay guest checkout session.
|
|
225
|
+
*
|
|
226
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
227
|
+
* initiateCheckoutSession method.
|
|
228
|
+
* @param body UpdateShippingOption
|
|
229
|
+
*/
|
|
230
|
+
updateGuestShippingOption(checkoutSessionId, body) {
|
|
231
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
232
|
+
return this.post(`/guest_checkout_session/${checkoutSessionId}/update_shipping_option`, body);
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* (Limited Release) You must be whitelisted to use this method. This method adds a coupon to an eBay proxy guest
|
|
236
|
+
* checkout session and applies it to all the eligible items in the order.
|
|
237
|
+
*
|
|
238
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
239
|
+
* initiateCheckoutSession method.
|
|
240
|
+
* @param body CouponRequest
|
|
241
|
+
*/
|
|
242
|
+
applyProxyGuestCoupon(checkoutSessionId, body) {
|
|
243
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
244
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/apply_coupon`, body);
|
|
245
|
+
}
|
|
246
|
+
/**
|
|
247
|
+
* This method returns the details of the specified eBay proxy guest checkout session.
|
|
248
|
+
*
|
|
249
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
250
|
+
* initiateCheckoutSession method.
|
|
251
|
+
*/
|
|
252
|
+
getProxyGuestCheckoutSession(checkoutSessionId) {
|
|
253
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
254
|
+
return this.get(`/proxy_guest_checkout_session/${checkoutSessionId}`);
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* This method creates an eBay proxy guest checkout session, which is a payment flow that requires integration
|
|
258
|
+
* with a VSP (vault service provider), such as Braintree. The VSP handles only the methods within this flow that
|
|
259
|
+
* contain payment information.
|
|
260
|
+
*
|
|
261
|
+
* @param body CheckoutSessionRequest
|
|
262
|
+
*/
|
|
263
|
+
initiateProxyGuestCheckoutSession(body) {
|
|
264
|
+
return this.post(`/proxy_guest_checkout_session/initiate`, body);
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* This method creates the proxy guest purchase order, pays for the items, and terminates the specified guest
|
|
268
|
+
* checkout session.
|
|
269
|
+
*
|
|
270
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
271
|
+
* initiateCheckoutSession method.
|
|
272
|
+
* @param body GuestPlaceOrderRequest
|
|
273
|
+
*/
|
|
274
|
+
placeProxyGuestOrder(checkoutSessionId, body) {
|
|
275
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
276
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/place_order`, body);
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* (Limited Release) You must be whitelisted to use this method. This method removes a coupon from an eBay proxy
|
|
280
|
+
* guest checkout session. The checkoutSessionId is passed in as a URI parameter and is required.
|
|
281
|
+
*
|
|
282
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
283
|
+
* initiateCheckoutSession method.
|
|
284
|
+
* @param body CouponRequest
|
|
285
|
+
*/
|
|
286
|
+
removeProxyGuestCoupon(checkoutSessionId, body) {
|
|
287
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
288
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/remove_coupon`, body);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* This method adds or changes the payment information of the specified proxy guest checkout session.
|
|
292
|
+
*
|
|
293
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
294
|
+
* initiateCheckoutSession method.
|
|
295
|
+
* @param authorization The oAuth2 token. Note: The eBay partner must include this header in the request.
|
|
296
|
+
* @param date The UTC timestamp of the request, which is generated and added to the request by the VSP.
|
|
297
|
+
* @param requestNonce A UUID (a 128-bit universal unique ID), which is generated and added to the request by the
|
|
298
|
+
* VSP.
|
|
299
|
+
* @param signature The HMAC signature, which is generated and added to the request by the VSP.
|
|
300
|
+
* @param body UpdatePaymentInformation
|
|
301
|
+
*/
|
|
302
|
+
updateProxyGuestPaymentInfo(checkoutSessionId, authorization, date, requestNonce, signature, body) {
|
|
303
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
304
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/update_payment_info`, body, {
|
|
305
|
+
headers: {
|
|
306
|
+
'Authorization': authorization,
|
|
307
|
+
'X-EBAY-C-DATE': date,
|
|
308
|
+
'X-EBAY-C-REQUEST-NONCE': requestNonce,
|
|
309
|
+
'X-EBAY-C-SIGNATURE': signature
|
|
310
|
+
}
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* This method changes the quantity of the specified line item in an eBay proxy guest checkout session.
|
|
315
|
+
*
|
|
316
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
317
|
+
* initiateCheckoutSession method.
|
|
318
|
+
* @param body UpdateQuantity
|
|
319
|
+
*/
|
|
320
|
+
updateProxyGuestQuantity(checkoutSessionId, body) {
|
|
321
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
322
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/update_quantity`, body);
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* This method changes the shipping address for the order in an eBay proxy guest checkout session.
|
|
326
|
+
*
|
|
327
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
328
|
+
* initiateCheckoutSession method.
|
|
329
|
+
* @param body ShippingAddressImpl
|
|
330
|
+
*/
|
|
331
|
+
updateProxyGuestShippingAddress(checkoutSessionId, body) {
|
|
332
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
333
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/update_shipping_address`, body);
|
|
334
|
+
}
|
|
335
|
+
/**
|
|
336
|
+
* This method changes the shipping method for the specified line item in an eBay proxy guest checkout session.
|
|
337
|
+
*
|
|
338
|
+
* @param checkoutSessionId The eBay-assigned session ID, for a specific eBay marketplace, that is returned by the
|
|
339
|
+
* initiateCheckoutSession method.
|
|
340
|
+
* @param body UpdateShippingOption
|
|
341
|
+
*/
|
|
342
|
+
updateProxyGuestShippingOption(checkoutSessionId, body) {
|
|
343
|
+
checkoutSessionId = encodeURIComponent(checkoutSessionId);
|
|
344
|
+
return this.post(`/proxy_guest_checkout_session/${checkoutSessionId}/update_shipping_option`, body);
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* This method retrieves the details about a specific guest purchase order.
|
|
348
|
+
*
|
|
349
|
+
* @param purchaseOrderId The unique identifier of a purchase order made by a guest buyer, for which details are to
|
|
350
|
+
* be retrieved.
|
|
351
|
+
*/
|
|
352
|
+
getGuestPurchaseOrder(purchaseOrderId) {
|
|
353
|
+
purchaseOrderId = encodeURIComponent(purchaseOrderId);
|
|
354
|
+
return this.get(`/guest_purchase_order/${purchaseOrderId}`);
|
|
355
|
+
}
|
|
356
|
+
/**
|
|
357
|
+
* This method retrieves the details about a specific eBay member purchase order.
|
|
358
|
+
*
|
|
359
|
+
* @param purchaseOrderId The unique identifier of a purchase order made by an eBay member, for which details are
|
|
360
|
+
* to be retrieved.
|
|
361
|
+
*/
|
|
362
|
+
getPurchaseOrder(purchaseOrderId) {
|
|
363
|
+
purchaseOrderId = encodeURIComponent(purchaseOrderId);
|
|
364
|
+
return this.get(`/purchase_order/${purchaseOrderId}`);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
exports.default = Order;
|
|
368
|
+
Order.id = 'Order';
|
|
369
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/buy/order/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAAyB;AAazB;;;GAGG;AACH,MAAqB,KAAM,SAAQ,WAAG;IAIpC,IAAI,QAAQ;QACV,OAAO,eAAe,CAAC;IACzB,CAAC;IAED;;;;;;;;OAQG;IACI,WAAW,CAAC,iBAAyB,EAAE,IAAmB;QAC/D,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,qBAAqB,iBAAiB,eAAe,EAAE,IAAI,CAAC,CAAC;IAChF,CAAC;IAED;;;;;OAKG;IACI,kBAAkB,CAAC,iBAAyB;QACjD,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,GAAG,CAAC,qBAAqB,iBAAiB,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAAC,IAAyC;QACtE,OAAO,IAAI,CAAC,IAAI,CAAC,4BAA4B,EAAE,IAAI,CAAC,CAAC;IACvD,CAAC;IAED;;;;;;OAMG;IACI,UAAU,CAAC,iBAAyB;QACzC,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,CA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C/F,CAAC;IAED;;;;;;OAMG;IACI,+BAA+B,CAAC,iBAAyB,EAAE,IAA0B;QAC1F,iBAAiB,GAAG,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,iCAAiC,iBAAiB,0BAA0B,EAAE,IAAI,CAAC,CAAC;IACvG,CAAC;IAED;;;;;;OAMG;IACI,8BAA8B,CAAC,iBAAyB,EAAE,IAA2B;QAC1F,iBAAiB,GAAE,kBAAkB,CAAC,iBAAiB,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC,IAAI,CAAC,iCAAiC,iBAAiB,yBAAyB,EAAE,IAAI,CAAC,CAAC;IACtG,CAAC;IAED;;;;;OAKG;IACI,qBAAqB,CAAC,eAAuB;QAClD,eAAe,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,yBAAyB,eAAe,EAAE,CAAC,CAAC;IAC9D,CAAC;IAED;;;;;OAKG;IACI,gBAAgB,CAAC,eAAuB;QAC7C,eAAe,GAAG,kBAAkB,CAAC,eAAe,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC,GAAG,CAAC,mBAAmB,eAAe,EAAE,CAAC,CAAC;IACxD,CAAC;;AA3YH,wBA4YC;AA1YQ,QAAE,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import Restful from '../../';
|
|
2
|
+
import { CatalogSearchParams } from '../../../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Use the Catalog API to search the eBay catalog for products on which to base a seller's item listing;
|
|
5
|
+
*/
|
|
6
|
+
export default class Catalog extends Restful {
|
|
7
|
+
static id: string;
|
|
8
|
+
get basePath(): string;
|
|
9
|
+
/**
|
|
10
|
+
* Note: The three catalog change request methods in the Catalog API are deprecated, and are scheduled to be
|
|
11
|
+
* decommissioned in Q1 of 2020.
|
|
12
|
+
*
|
|
13
|
+
* @param changeRequestId The unique identifier of the change request being requested.
|
|
14
|
+
*/
|
|
15
|
+
getChangeRequest(changeRequestId: string): Promise<any>;
|
|
16
|
+
/**
|
|
17
|
+
* Note: The three catalog change request methods in the Catalog API are deprecated, and are scheduled to be
|
|
18
|
+
* decommissioned in Q1 of 2020.
|
|
19
|
+
*
|
|
20
|
+
* @param filter One or more comma-separated criteria for narrowing down the collection of change requests returned
|
|
21
|
+
* by this call.
|
|
22
|
+
* @param limit The number of change requests to return. This is the result set, a subset of the full collection of
|
|
23
|
+
* change requests that match the filter criteria of this call.
|
|
24
|
+
* @param offset The first change request to return based on its position in the returned collection of change
|
|
25
|
+
* requests.
|
|
26
|
+
*/
|
|
27
|
+
getChangeRequests({ filter, limit, offset }?: {
|
|
28
|
+
filter?: string;
|
|
29
|
+
limit?: number;
|
|
30
|
+
offset?: number;
|
|
31
|
+
}): Promise<any>;
|
|
32
|
+
/**
|
|
33
|
+
* This call retrieves details of the catalog product identified by the eBay product identifier (ePID) specified in
|
|
34
|
+
* the request.
|
|
35
|
+
*
|
|
36
|
+
* @param epid The ePID of the product being requested.
|
|
37
|
+
*/
|
|
38
|
+
getProduct(epid: string): Promise<any>;
|
|
39
|
+
/**
|
|
40
|
+
* This call searches for and retrieves summaries of one or more products in the eBay catalog that match the search
|
|
41
|
+
* criteria provided by a seller.
|
|
42
|
+
*
|
|
43
|
+
* @param params SearchCatalogParams
|
|
44
|
+
*/
|
|
45
|
+
search(params?: CatalogSearchParams): Promise<any>;
|
|
46
|
+
/**
|
|
47
|
+
* This call retrieves an array of all supported aspects, aspect constraints, and aspect values for the specified
|
|
48
|
+
* catalog product and its associated or suggested categories, as well as the values currently associated with that
|
|
49
|
+
* product.
|
|
50
|
+
*
|
|
51
|
+
* @param epid The unique eBay product identifier of the catalog product that you want to update.
|
|
52
|
+
* @param acceptLanguage This request header sets the natural language that will be provided in the field values of
|
|
53
|
+
* the response payload.
|
|
54
|
+
* @param otherApplicableCategoryIds Use only if you are also including the primary_category_id parameter in the
|
|
55
|
+
* request.
|
|
56
|
+
* @param primaryCategoryId Use only if the seller believes this product is associated with the wrong primary
|
|
57
|
+
* category.
|
|
58
|
+
* @param marketplaceId Use this header to specify the eBay marketplace identifier.
|
|
59
|
+
*/
|
|
60
|
+
getProductMetadata(epid: string, { otherApplicableCategoryIds, primaryCategoryId }?: {
|
|
61
|
+
otherApplicableCategoryIds?: string;
|
|
62
|
+
primaryCategoryId?: string;
|
|
63
|
+
}): Promise<any>;
|
|
64
|
+
/**
|
|
65
|
+
* This call retrieves an array of all supported aspects, aspect constraints, and aspect values for the specified
|
|
66
|
+
* eBay categories.
|
|
67
|
+
*
|
|
68
|
+
* @param primaryCategoryId The unique identifier of the primary eBay category for which you will retrieve product
|
|
69
|
+
* aspects.
|
|
70
|
+
* @param otherApplicableCategoryIds A string of comma-separated category IDs.
|
|
71
|
+
*/
|
|
72
|
+
getProductMetadataForCategories(primaryCategoryId: string, otherApplicableCategoryIds?: string): Promise<any>;
|
|
73
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const __1 = __importDefault(require("../../"));
|
|
7
|
+
/**
|
|
8
|
+
* Use the Catalog API to search the eBay catalog for products on which to base a seller's item listing;
|
|
9
|
+
*/
|
|
10
|
+
class Catalog extends __1.default {
|
|
11
|
+
get basePath() {
|
|
12
|
+
return '/commerce/catalog/v1_beta';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Note: The three catalog change request methods in the Catalog API are deprecated, and are scheduled to be
|
|
16
|
+
* decommissioned in Q1 of 2020.
|
|
17
|
+
*
|
|
18
|
+
* @param changeRequestId The unique identifier of the change request being requested.
|
|
19
|
+
*/
|
|
20
|
+
getChangeRequest(changeRequestId) {
|
|
21
|
+
return this.get(`/change_request/${changeRequestId}`);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Note: The three catalog change request methods in the Catalog API are deprecated, and are scheduled to be
|
|
25
|
+
* decommissioned in Q1 of 2020.
|
|
26
|
+
*
|
|
27
|
+
* @param filter One or more comma-separated criteria for narrowing down the collection of change requests returned
|
|
28
|
+
* by this call.
|
|
29
|
+
* @param limit The number of change requests to return. This is the result set, a subset of the full collection of
|
|
30
|
+
* change requests that match the filter criteria of this call.
|
|
31
|
+
* @param offset The first change request to return based on its position in the returned collection of change
|
|
32
|
+
* requests.
|
|
33
|
+
*/
|
|
34
|
+
getChangeRequests({ filter, limit, offset } = {}) {
|
|
35
|
+
return this.get(`/change_request`, {
|
|
36
|
+
params: {
|
|
37
|
+
filter,
|
|
38
|
+
limit,
|
|
39
|
+
offset
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* This call retrieves details of the catalog product identified by the eBay product identifier (ePID) specified in
|
|
45
|
+
* the request.
|
|
46
|
+
*
|
|
47
|
+
* @param epid The ePID of the product being requested.
|
|
48
|
+
*/
|
|
49
|
+
getProduct(epid) {
|
|
50
|
+
const e = encodeURIComponent(epid);
|
|
51
|
+
return this.get(`/product/${e}`);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* This call searches for and retrieves summaries of one or more products in the eBay catalog that match the search
|
|
55
|
+
* criteria provided by a seller.
|
|
56
|
+
*
|
|
57
|
+
* @param params SearchCatalogParams
|
|
58
|
+
*/
|
|
59
|
+
search(params) {
|
|
60
|
+
return this.get(`/product_summary/search`, {
|
|
61
|
+
params: {
|
|
62
|
+
...(params && params)
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* This call retrieves an array of all supported aspects, aspect constraints, and aspect values for the specified
|
|
68
|
+
* catalog product and its associated or suggested categories, as well as the values currently associated with that
|
|
69
|
+
* product.
|
|
70
|
+
*
|
|
71
|
+
* @param epid The unique eBay product identifier of the catalog product that you want to update.
|
|
72
|
+
* @param acceptLanguage This request header sets the natural language that will be provided in the field values of
|
|
73
|
+
* the response payload.
|
|
74
|
+
* @param otherApplicableCategoryIds Use only if you are also including the primary_category_id parameter in the
|
|
75
|
+
* request.
|
|
76
|
+
* @param primaryCategoryId Use only if the seller believes this product is associated with the wrong primary
|
|
77
|
+
* category.
|
|
78
|
+
* @param marketplaceId Use this header to specify the eBay marketplace identifier.
|
|
79
|
+
*/
|
|
80
|
+
getProductMetadata(epid, { otherApplicableCategoryIds, primaryCategoryId } = {}) {
|
|
81
|
+
return this.get(`/get_product_metadata`, {
|
|
82
|
+
params: {
|
|
83
|
+
epid,
|
|
84
|
+
other_applicable_category_ids: otherApplicableCategoryIds,
|
|
85
|
+
primary_category_id: primaryCategoryId
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* This call retrieves an array of all supported aspects, aspect constraints, and aspect values for the specified
|
|
91
|
+
* eBay categories.
|
|
92
|
+
*
|
|
93
|
+
* @param primaryCategoryId The unique identifier of the primary eBay category for which you will retrieve product
|
|
94
|
+
* aspects.
|
|
95
|
+
* @param otherApplicableCategoryIds A string of comma-separated category IDs.
|
|
96
|
+
*/
|
|
97
|
+
getProductMetadataForCategories(primaryCategoryId, otherApplicableCategoryIds) {
|
|
98
|
+
return this.get(`/get_product_metadata_for_categories`, {
|
|
99
|
+
params: {
|
|
100
|
+
primary_category_id: primaryCategoryId,
|
|
101
|
+
other_applicable_category_ids: otherApplicableCategoryIds
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.default = Catalog;
|
|
107
|
+
Catalog.id = 'Catalog';
|
|
108
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/commerce/catalog/index.ts"],"names":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D,MAAM,EAAE;gBACN,mBAAmB,EAAE,iBAAiB;gBACtC,6BAA6B,EAAE,0BAA0B;aAC1D;SACF,CAAC,CAAC;IACL,CAAC;;AA3GH,0BA4GC;AA1GQ,UAAE,GAAG,SAAS,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import Restful from '../../';
|
|
2
|
+
/**
|
|
3
|
+
* The Charity API allows third-party developers to search for and access details on supported charitable organizations.
|
|
4
|
+
*/
|
|
5
|
+
export default class Charity extends Restful {
|
|
6
|
+
static id: string;
|
|
7
|
+
get basePath(): string;
|
|
8
|
+
/**
|
|
9
|
+
* This call is used to retrieve detailed information about supported charitable organizations.
|
|
10
|
+
*
|
|
11
|
+
* @param charityOrgId The unique ID of the charitable organization.
|
|
12
|
+
*/
|
|
13
|
+
getCharityOrg(charityOrgId: string): Promise<any>;
|
|
14
|
+
/**
|
|
15
|
+
* This call is used to retrieve detailed information about supported charitable organizations.
|
|
16
|
+
*
|
|
17
|
+
* @param limit The number of items, from the result set, returned in a single page. Valid Values: 1-100 Default: 20
|
|
18
|
+
* @param offset The number of items that will be skipped in the result set.
|
|
19
|
+
* @param q A query string that matches the keywords in name, mission statement, or description.
|
|
20
|
+
* @param registrationIds A comma-separated list of charitable organization registration IDs.
|
|
21
|
+
*/
|
|
22
|
+
getCharityOrgs({ limit, offset, q, registrationIds }: {
|
|
23
|
+
limit?: string;
|
|
24
|
+
offset?: string;
|
|
25
|
+
q?: string;
|
|
26
|
+
registrationIds?: string;
|
|
27
|
+
}): Promise<any>;
|
|
28
|
+
/**
|
|
29
|
+
* This call allows users to retrieve the details for a specific charitable organization using its legacy charity ID, which has also been referred to as the charity number, external ID, and PayPal Giving Fund ID.
|
|
30
|
+
*
|
|
31
|
+
* @param legacyCharityOrgId The legacy ID of the charitable organization.
|
|
32
|
+
*/
|
|
33
|
+
getCharityOrgByLegacyId(legacyCharityOrgId: string): Promise<any>;
|
|
34
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const __1 = __importDefault(require("../../"));
|
|
7
|
+
/**
|
|
8
|
+
* The Charity API allows third-party developers to search for and access details on supported charitable organizations.
|
|
9
|
+
*/
|
|
10
|
+
class Charity extends __1.default {
|
|
11
|
+
get basePath() {
|
|
12
|
+
return '/commerce/charity/v1';
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* This call is used to retrieve detailed information about supported charitable organizations.
|
|
16
|
+
*
|
|
17
|
+
* @param charityOrgId The unique ID of the charitable organization.
|
|
18
|
+
*/
|
|
19
|
+
getCharityOrg(charityOrgId) {
|
|
20
|
+
charityOrgId = encodeURIComponent(charityOrgId);
|
|
21
|
+
return this.get(`/charity_org/${charityOrgId}`);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* This call is used to retrieve detailed information about supported charitable organizations.
|
|
25
|
+
*
|
|
26
|
+
* @param limit The number of items, from the result set, returned in a single page. Valid Values: 1-100 Default: 20
|
|
27
|
+
* @param offset The number of items that will be skipped in the result set.
|
|
28
|
+
* @param q A query string that matches the keywords in name, mission statement, or description.
|
|
29
|
+
* @param registrationIds A comma-separated list of charitable organization registration IDs.
|
|
30
|
+
*/
|
|
31
|
+
getCharityOrgs({ limit, offset, q, registrationIds }) {
|
|
32
|
+
return this.get(`/charity_org`, {
|
|
33
|
+
params: {
|
|
34
|
+
limit,
|
|
35
|
+
offset,
|
|
36
|
+
q,
|
|
37
|
+
registration_ids: registrationIds
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* This call allows users to retrieve the details for a specific charitable organization using its legacy charity ID, which has also been referred to as the charity number, external ID, and PayPal Giving Fund ID.
|
|
43
|
+
*
|
|
44
|
+
* @param legacyCharityOrgId The legacy ID of the charitable organization.
|
|
45
|
+
*/
|
|
46
|
+
getCharityOrgByLegacyId(legacyCharityOrgId) {
|
|
47
|
+
return this.get(`/charity_org/get_charity_org_by_legacy_id`, {
|
|
48
|
+
params: {
|
|
49
|
+
legacy_charity_org_id: legacyCharityOrgId
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
exports.default = Charity;
|
|
55
|
+
Charity.id = 'Charity';
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/commerce/charity/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAE7B;;GAEG;AACH,MAAqB,OAAQ,SAAQ,WAAO;IAI1C,IAAI,QAAQ;QACV,OAAO,sBAAsB,CAAC;IAChC,CAAC;IAED;;;;OAIG;IACI,aAAa,CAAC,YAAoB;QACvC,YAAY,GAAG,kBAAkB,CAAC,YAAY,CAAC,CAAA;QAC/C,OAAO,IAAI,CAAC,GAAG,CAAC,gBAAgB,YAAY,EAAE,CAAC,CAAC;IAClD,CAAC;IAED;;;;;;;OAOG;IACI,cAAc,CAAC,EACpB,KAAK,EACL,MAAM,EACN,CAAC,EACD,eAAe,EAC2D;QAC1E,OAAO,IAAI,CAAC,GAAG,CAAC,cAAc,EAAE;YAC9B,MAAM,EAAE;gBACN,KAAK;gBACL,MAAM;gBACN,CAAC;gBACD,gBAAgB,EAAE,eAAe;aAClC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,uBAAuB,CAAC,kBAA0B;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,2CAA2C,EAAE;YAC3D,MAAM,EAAE;gBACN,qBAAqB,EAAE,kBAAkB;aAC1C;SACF,CAAC,CAAC;IACL,CAAC;;AArDH,0BAsDC;AApDQ,UAAE,GAAG,SAAS,CAAC"}
|