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,231 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
import { FilePurpose, GetReturnFieldGroupEnum } from '../../../../enums/index.js';
|
|
3
|
+
import { CheckEligibilityRequest, CloseReturnRequest, CreateReturnRequest, DecideReturnRequest, EscalateRequest, GetEstimateRequest, MarkAsReceivedRequest, MarkAsShippedRequest, MarkRefundSentRequest, PostOrderIssueRefundRequest, ProvideLabelRequest, ReturnRequestType, SearchReturnParams, SendMessageRequest, SetReturnCreationSessionRequest, UpdateTrackingRequest, UploadFileRequest, VoidLabelRequest } from '../../../../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Post-Order Return API
|
|
6
|
+
*/
|
|
7
|
+
export default class Return extends Restful {
|
|
8
|
+
static id: string;
|
|
9
|
+
get basePath(): string;
|
|
10
|
+
get useIaf(): boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Create or update a shipping label provided by the seller.
|
|
13
|
+
*
|
|
14
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
15
|
+
* @param payload the ProvideLabelRequest
|
|
16
|
+
*/
|
|
17
|
+
addShippingLabelInfo(returnId: string, payload: ProvideLabelRequest): Promise<any>;
|
|
18
|
+
/**
|
|
19
|
+
* Cancel a return request.
|
|
20
|
+
*
|
|
21
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
22
|
+
* @param payload The CloseReturnRequest.
|
|
23
|
+
*/
|
|
24
|
+
cancelReturnRequest(returnId: string, payload?: CloseReturnRequest): Promise<any>;
|
|
25
|
+
/**
|
|
26
|
+
* Check to see if an item is eligible for a return.
|
|
27
|
+
*
|
|
28
|
+
* @param payload the CheckEligibilityRequest
|
|
29
|
+
*/
|
|
30
|
+
checkReturnEligibility(payload: CheckEligibilityRequest): Promise<any>;
|
|
31
|
+
/**
|
|
32
|
+
* Validate the eligibility of an existing shipping label.
|
|
33
|
+
*
|
|
34
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
35
|
+
*/
|
|
36
|
+
checkShippingLabelEligibility(returnId: string): Promise<any>;
|
|
37
|
+
/**
|
|
38
|
+
* Create a return draft.
|
|
39
|
+
*
|
|
40
|
+
* @param payload the SetReturnCreationSessionRequest
|
|
41
|
+
*/
|
|
42
|
+
createReturnDraft(payload: SetReturnCreationSessionRequest): Promise<any>;
|
|
43
|
+
/**
|
|
44
|
+
* Request a return for an item.
|
|
45
|
+
*
|
|
46
|
+
* @param payload the CreateReturnRequest
|
|
47
|
+
* @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
|
|
48
|
+
*/
|
|
49
|
+
createReturnRequest(payload: CreateReturnRequest, fieldGroups?: GetReturnFieldGroupEnum): Promise<any>;
|
|
50
|
+
/**
|
|
51
|
+
* Create an eBay shipping label for the buyer.
|
|
52
|
+
*
|
|
53
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
54
|
+
*/
|
|
55
|
+
createReturnShippingLabel(returnId: string): Promise<any>;
|
|
56
|
+
/**
|
|
57
|
+
* Delete a file associated with a return draft.
|
|
58
|
+
*
|
|
59
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
60
|
+
* @param fileId The unique eBay-assigned ID of the draft file.
|
|
61
|
+
*/
|
|
62
|
+
deleteReturnDraftFile(draftId: string, fileId: string): Promise<any>;
|
|
63
|
+
/**
|
|
64
|
+
* Escalate an existing return to eBay customer support.
|
|
65
|
+
*
|
|
66
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
67
|
+
* @param payload the EscalateRequest
|
|
68
|
+
*/
|
|
69
|
+
escalateReturn(returnId: string, payload?: EscalateRequest): Promise<any>;
|
|
70
|
+
/**
|
|
71
|
+
* Retrieve the details of a specific return.
|
|
72
|
+
*
|
|
73
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
74
|
+
* @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
|
|
75
|
+
*/
|
|
76
|
+
getReturn(returnId: string, fieldGroups?: GetReturnFieldGroupEnum): Promise<any>;
|
|
77
|
+
/**
|
|
78
|
+
* Retrieve a return draft.
|
|
79
|
+
*
|
|
80
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
81
|
+
*/
|
|
82
|
+
getReturnDraft(returnId: string): Promise<any>;
|
|
83
|
+
/**
|
|
84
|
+
* Retrieve the files associated with a return draft.
|
|
85
|
+
*
|
|
86
|
+
* @param returnId The unique eBay-assigned ID of the return draft.
|
|
87
|
+
*/
|
|
88
|
+
getReturnDraftFiles(returnId: string): Promise<any>;
|
|
89
|
+
/**
|
|
90
|
+
* Retrieve the cost estimate of a refund with its shipping cost.
|
|
91
|
+
*
|
|
92
|
+
* @param payload the GetEstimateRequest
|
|
93
|
+
*/
|
|
94
|
+
getReturnEstimate(payload: GetEstimateRequest): Promise<any>;
|
|
95
|
+
/**
|
|
96
|
+
* Retrieve the cost estimate of a refund with its shipping cost.
|
|
97
|
+
*
|
|
98
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
99
|
+
*/
|
|
100
|
+
getReturnFiles(returnId: string): Promise<any>;
|
|
101
|
+
/**
|
|
102
|
+
* Retrieve seller's return preferences.
|
|
103
|
+
*/
|
|
104
|
+
getReturnPreferences(): Promise<any>;
|
|
105
|
+
/**
|
|
106
|
+
* Retrieve the data for an existing shipping label.
|
|
107
|
+
*
|
|
108
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
109
|
+
*/
|
|
110
|
+
getReturnShippingLabel(returnId: string): Promise<any>;
|
|
111
|
+
/**
|
|
112
|
+
* Retrieve shipment tracking activity for a return.
|
|
113
|
+
*
|
|
114
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
115
|
+
* @param carrierUsed The shipping carrier used to to ship the package.
|
|
116
|
+
* @param trackingNumber The tracking number of the package.
|
|
117
|
+
*/
|
|
118
|
+
getShipmentTrackingInfo(returnId: string, carrierUsed: string, trackingNumber: string): Promise<any>;
|
|
119
|
+
/**
|
|
120
|
+
* Issue a refund.
|
|
121
|
+
*
|
|
122
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
123
|
+
* @param payload The IssueRefundRequest.
|
|
124
|
+
*/
|
|
125
|
+
issueReturnRefund(returnId: string, payload: PostOrderIssueRefundRequest): Promise<any>;
|
|
126
|
+
/**
|
|
127
|
+
* Mark a returned item as received.
|
|
128
|
+
*
|
|
129
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
130
|
+
* @param payload the MarkAsReceivedRequest
|
|
131
|
+
*/
|
|
132
|
+
markReturnReceived(returnId: string, payload?: MarkAsReceivedRequest): Promise<any>;
|
|
133
|
+
/**
|
|
134
|
+
* Mark a refund as received.
|
|
135
|
+
*
|
|
136
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
137
|
+
*/
|
|
138
|
+
markReturnRefundReceived(returnId: string): Promise<any>;
|
|
139
|
+
/**
|
|
140
|
+
* Notify the buyer that a refund has been issued.
|
|
141
|
+
*
|
|
142
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
143
|
+
* @param payload the MarkRefundSentRequest
|
|
144
|
+
*/
|
|
145
|
+
markReturnRefundSent(returnId: string, payload: MarkRefundSentRequest): Promise<any>;
|
|
146
|
+
/**
|
|
147
|
+
* Mark a return as shipped.
|
|
148
|
+
*
|
|
149
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
150
|
+
* @param payload the MarkAsShippedRequest
|
|
151
|
+
*/
|
|
152
|
+
markReturnShipped(returnId: string, payload?: MarkAsShippedRequest): Promise<any>;
|
|
153
|
+
/**
|
|
154
|
+
* Perform an action on a return, such as APPROVE.
|
|
155
|
+
*
|
|
156
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
157
|
+
* @param payload the DecideReturnRequest
|
|
158
|
+
*/
|
|
159
|
+
processReturnRequest(returnId: string, payload: DecideReturnRequest): Promise<any>;
|
|
160
|
+
/**
|
|
161
|
+
* Retrieve details on items being returned.
|
|
162
|
+
*
|
|
163
|
+
* @param params the SearchReturnParams
|
|
164
|
+
*/
|
|
165
|
+
search(params: SearchReturnParams): Promise<any>;
|
|
166
|
+
/**
|
|
167
|
+
* Send a message to the buyer or seller regarding a return.
|
|
168
|
+
*
|
|
169
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
170
|
+
* @param payload the SendMessageRequest
|
|
171
|
+
*/
|
|
172
|
+
sendReturnMessage(returnId: string, payload?: SendMessageRequest): Promise<any>;
|
|
173
|
+
/**
|
|
174
|
+
* Send a shipping label to an email address.
|
|
175
|
+
*
|
|
176
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
177
|
+
* @param toEmailAddress The recipient's email address is specified in this field.
|
|
178
|
+
*/
|
|
179
|
+
sendReturnShippingLabel(returnId: string, toEmailAddress?: string): Promise<any>;
|
|
180
|
+
/**
|
|
181
|
+
* Send a shipping label to an email address.
|
|
182
|
+
*
|
|
183
|
+
* @param rmaRequired This field is included and set to true if the seller wishes to require that the buyer provide
|
|
184
|
+
* a Return Merchandise Authorization (RMA) when returning an item.
|
|
185
|
+
*/
|
|
186
|
+
setReturnPreferences(rmaRequired: boolean): Promise<any>;
|
|
187
|
+
/**
|
|
188
|
+
* Activate the files associated with a return.
|
|
189
|
+
*
|
|
190
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
191
|
+
* @param filePurpose This value is used to indicate if the file(s) are being used to provide more information
|
|
192
|
+
* about the condition of the item, or intended to provide more information about shipment tracking or about
|
|
193
|
+
* the shipping label.
|
|
194
|
+
*/
|
|
195
|
+
submitReturnFile(returnId: string, filePurpose?: FilePurpose): Promise<any>;
|
|
196
|
+
/**
|
|
197
|
+
* Update an existing return draft.
|
|
198
|
+
*
|
|
199
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
200
|
+
* @param returnRequest the ReturnRequestType
|
|
201
|
+
*/
|
|
202
|
+
updateReturnDraft(draftId: string, returnRequest: ReturnRequestType): Promise<any>;
|
|
203
|
+
/**
|
|
204
|
+
* Update shipment tracking information.
|
|
205
|
+
*
|
|
206
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
207
|
+
* @param payload the UpdateTrackingRequest
|
|
208
|
+
*/
|
|
209
|
+
updateShipmentTrackingInfo(returnId: string, payload: UpdateTrackingRequest): Promise<any>;
|
|
210
|
+
/**
|
|
211
|
+
* Upload the files relating to a return draft.
|
|
212
|
+
*
|
|
213
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
214
|
+
* @param payload the UploadFileRequest
|
|
215
|
+
*/
|
|
216
|
+
uploadReturnDraftFile(draftId: string, payload: UploadFileRequest): Promise<any>;
|
|
217
|
+
/**
|
|
218
|
+
* Upload the files relating to a return.
|
|
219
|
+
*
|
|
220
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
221
|
+
* @param payload the UploadFileRequest
|
|
222
|
+
*/
|
|
223
|
+
uploadReturnFile(returnId: string, payload: UploadFileRequest): Promise<any>;
|
|
224
|
+
/**
|
|
225
|
+
* Void a shipping label.
|
|
226
|
+
*
|
|
227
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
228
|
+
* @param payload the VoidLabelRequest
|
|
229
|
+
*/
|
|
230
|
+
voidShippingLabel(returnId: string, payload: VoidLabelRequest): Promise<any>;
|
|
231
|
+
}
|
|
@@ -0,0 +1,354 @@
|
|
|
1
|
+
import Restful from '../../index.js';
|
|
2
|
+
/**
|
|
3
|
+
* Post-Order Return API
|
|
4
|
+
*/
|
|
5
|
+
export default class Return extends Restful {
|
|
6
|
+
get basePath() {
|
|
7
|
+
return '/post-order/v2';
|
|
8
|
+
}
|
|
9
|
+
get useIaf() {
|
|
10
|
+
return true;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create or update a shipping label provided by the seller.
|
|
14
|
+
*
|
|
15
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
16
|
+
* @param payload the ProvideLabelRequest
|
|
17
|
+
*/
|
|
18
|
+
addShippingLabelInfo(returnId, payload) {
|
|
19
|
+
const id = encodeURIComponent(returnId);
|
|
20
|
+
return this.post(`/return/${id}/add_shipping_label`, payload);
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Cancel a return request.
|
|
24
|
+
*
|
|
25
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
26
|
+
* @param payload The CloseReturnRequest.
|
|
27
|
+
*/
|
|
28
|
+
cancelReturnRequest(returnId, payload) {
|
|
29
|
+
const id = encodeURIComponent(returnId);
|
|
30
|
+
if (payload && payload.buyerCloseReason) {
|
|
31
|
+
payload.buyerCloseReason = payload.buyerCloseReason.trim();
|
|
32
|
+
}
|
|
33
|
+
return this.post(`/return/${id}/cancel`, payload);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Check to see if an item is eligible for a return.
|
|
37
|
+
*
|
|
38
|
+
* @param payload the CheckEligibilityRequest
|
|
39
|
+
*/
|
|
40
|
+
checkReturnEligibility(payload) {
|
|
41
|
+
return this.post(`/return/check_eligibility`, payload);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Validate the eligibility of an existing shipping label.
|
|
45
|
+
*
|
|
46
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
47
|
+
*/
|
|
48
|
+
checkShippingLabelEligibility(returnId) {
|
|
49
|
+
const id = encodeURIComponent(returnId);
|
|
50
|
+
return this.get(`/return/${id}/check_label_print_eligibility`);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Create a return draft.
|
|
54
|
+
*
|
|
55
|
+
* @param payload the SetReturnCreationSessionRequest
|
|
56
|
+
*/
|
|
57
|
+
createReturnDraft(payload) {
|
|
58
|
+
return this.post(`/return/draft`, payload);
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Request a return for an item.
|
|
62
|
+
*
|
|
63
|
+
* @param payload the CreateReturnRequest
|
|
64
|
+
* @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
|
|
65
|
+
*/
|
|
66
|
+
createReturnRequest(payload, fieldGroups) {
|
|
67
|
+
return this.post(`/return`, payload, {
|
|
68
|
+
params: {
|
|
69
|
+
fieldgroups: fieldGroups
|
|
70
|
+
}
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Create an eBay shipping label for the buyer.
|
|
75
|
+
*
|
|
76
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
77
|
+
*/
|
|
78
|
+
createReturnShippingLabel(returnId) {
|
|
79
|
+
const id = encodeURIComponent(returnId);
|
|
80
|
+
return this.post(`/return/${id}/initiate_shipping_label`);
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Delete a file associated with a return draft.
|
|
84
|
+
*
|
|
85
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
86
|
+
* @param fileId The unique eBay-assigned ID of the draft file.
|
|
87
|
+
*/
|
|
88
|
+
deleteReturnDraftFile(draftId, fileId) {
|
|
89
|
+
draftId = encodeURIComponent(draftId);
|
|
90
|
+
fileId = encodeURIComponent(fileId);
|
|
91
|
+
return this.delete(`/return/draft/${draftId}/file/${fileId}`);
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Escalate an existing return to eBay customer support.
|
|
95
|
+
*
|
|
96
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
97
|
+
* @param payload the EscalateRequest
|
|
98
|
+
*/
|
|
99
|
+
escalateReturn(returnId, payload) {
|
|
100
|
+
const id = encodeURIComponent(returnId);
|
|
101
|
+
return this.post(`/return/${id}/escalate`, payload);
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* Retrieve the details of a specific return.
|
|
105
|
+
*
|
|
106
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
107
|
+
* @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
|
|
108
|
+
*/
|
|
109
|
+
getReturn(returnId, fieldGroups) {
|
|
110
|
+
returnId = encodeURIComponent(returnId);
|
|
111
|
+
return this.get(`/return/${returnId}`, {
|
|
112
|
+
params: {
|
|
113
|
+
fieldgroups: fieldGroups
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Retrieve a return draft.
|
|
119
|
+
*
|
|
120
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
121
|
+
*/
|
|
122
|
+
getReturnDraft(returnId) {
|
|
123
|
+
const id = encodeURIComponent(returnId);
|
|
124
|
+
return this.get(`/return/draft/${id}`);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Retrieve the files associated with a return draft.
|
|
128
|
+
*
|
|
129
|
+
* @param returnId The unique eBay-assigned ID of the return draft.
|
|
130
|
+
*/
|
|
131
|
+
getReturnDraftFiles(returnId) {
|
|
132
|
+
const id = encodeURIComponent(returnId);
|
|
133
|
+
return this.get(`/return/draft/${id}/files`);
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Retrieve the cost estimate of a refund with its shipping cost.
|
|
137
|
+
*
|
|
138
|
+
* @param payload the GetEstimateRequest
|
|
139
|
+
*/
|
|
140
|
+
getReturnEstimate(payload) {
|
|
141
|
+
return this.post(`/return/estimate`, payload);
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Retrieve the cost estimate of a refund with its shipping cost.
|
|
145
|
+
*
|
|
146
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
147
|
+
*/
|
|
148
|
+
getReturnFiles(returnId) {
|
|
149
|
+
const id = encodeURIComponent(returnId);
|
|
150
|
+
return this.get(`/return/${id}/files`);
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* Retrieve seller's return preferences.
|
|
154
|
+
*/
|
|
155
|
+
getReturnPreferences() {
|
|
156
|
+
return this.get(`/return/preference`);
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Retrieve the data for an existing shipping label.
|
|
160
|
+
*
|
|
161
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
162
|
+
*/
|
|
163
|
+
getReturnShippingLabel(returnId) {
|
|
164
|
+
returnId = encodeURIComponent(returnId);
|
|
165
|
+
return this.get(`/return/${returnId}/get_shipping_label`);
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Retrieve shipment tracking activity for a return.
|
|
169
|
+
*
|
|
170
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
171
|
+
* @param carrierUsed The shipping carrier used to to ship the package.
|
|
172
|
+
* @param trackingNumber The tracking number of the package.
|
|
173
|
+
*/
|
|
174
|
+
getShipmentTrackingInfo(returnId, carrierUsed, trackingNumber) {
|
|
175
|
+
returnId = encodeURIComponent(returnId);
|
|
176
|
+
return this.get(`/return/${returnId}/tracking`, {
|
|
177
|
+
params: {
|
|
178
|
+
carrier_used: carrierUsed,
|
|
179
|
+
tracking_number: trackingNumber
|
|
180
|
+
}
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* Issue a refund.
|
|
185
|
+
*
|
|
186
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
187
|
+
* @param payload The IssueRefundRequest.
|
|
188
|
+
*/
|
|
189
|
+
issueReturnRefund(returnId, payload) {
|
|
190
|
+
returnId = encodeURIComponent(returnId);
|
|
191
|
+
return this.post(`/return/${returnId}/issue_refund`, payload);
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Mark a returned item as received.
|
|
195
|
+
*
|
|
196
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
197
|
+
* @param payload the MarkAsReceivedRequest
|
|
198
|
+
*/
|
|
199
|
+
markReturnReceived(returnId, payload) {
|
|
200
|
+
returnId = encodeURIComponent(returnId);
|
|
201
|
+
return this.post(`/return/${returnId}/mark_as_received`, payload);
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Mark a refund as received.
|
|
205
|
+
*
|
|
206
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
207
|
+
*/
|
|
208
|
+
markReturnRefundReceived(returnId) {
|
|
209
|
+
returnId = encodeURIComponent(returnId);
|
|
210
|
+
return this.post(`/return/${returnId}/mark_refund_received`);
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Notify the buyer that a refund has been issued.
|
|
214
|
+
*
|
|
215
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
216
|
+
* @param payload the MarkRefundSentRequest
|
|
217
|
+
*/
|
|
218
|
+
markReturnRefundSent(returnId, payload) {
|
|
219
|
+
returnId = encodeURIComponent(returnId);
|
|
220
|
+
return this.post(`/return/${returnId}/mark_refund_sent`, payload);
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Mark a return as shipped.
|
|
224
|
+
*
|
|
225
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
226
|
+
* @param payload the MarkAsShippedRequest
|
|
227
|
+
*/
|
|
228
|
+
markReturnShipped(returnId, payload) {
|
|
229
|
+
returnId = encodeURIComponent(returnId);
|
|
230
|
+
return this.post(`/return/${returnId}/mark_as_shipped`, payload);
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Perform an action on a return, such as APPROVE.
|
|
234
|
+
*
|
|
235
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
236
|
+
* @param payload the DecideReturnRequest
|
|
237
|
+
*/
|
|
238
|
+
processReturnRequest(returnId, payload) {
|
|
239
|
+
returnId = encodeURIComponent(returnId);
|
|
240
|
+
return this.post(`/return/${returnId}/decide`, payload);
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Retrieve details on items being returned.
|
|
244
|
+
*
|
|
245
|
+
* @param params the SearchReturnParams
|
|
246
|
+
*/
|
|
247
|
+
search(params) {
|
|
248
|
+
return this.get(`/return/search`, {
|
|
249
|
+
params
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Send a message to the buyer or seller regarding a return.
|
|
254
|
+
*
|
|
255
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
256
|
+
* @param payload the SendMessageRequest
|
|
257
|
+
*/
|
|
258
|
+
sendReturnMessage(returnId, payload) {
|
|
259
|
+
returnId = encodeURIComponent(returnId);
|
|
260
|
+
return this.post(`/return/${returnId}/send_message`, payload);
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Send a shipping label to an email address.
|
|
264
|
+
*
|
|
265
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
266
|
+
* @param toEmailAddress The recipient's email address is specified in this field.
|
|
267
|
+
*/
|
|
268
|
+
sendReturnShippingLabel(returnId, toEmailAddress) {
|
|
269
|
+
returnId = encodeURIComponent(returnId);
|
|
270
|
+
return this.post(`/return/${returnId}/send_shipping_label`, {}, {
|
|
271
|
+
params: {
|
|
272
|
+
to_email_address: toEmailAddress
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
/**
|
|
277
|
+
* Send a shipping label to an email address.
|
|
278
|
+
*
|
|
279
|
+
* @param rmaRequired This field is included and set to true if the seller wishes to require that the buyer provide
|
|
280
|
+
* a Return Merchandise Authorization (RMA) when returning an item.
|
|
281
|
+
*/
|
|
282
|
+
setReturnPreferences(rmaRequired) {
|
|
283
|
+
return this.post(`/return/preference`, {
|
|
284
|
+
rmaRequired
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Activate the files associated with a return.
|
|
289
|
+
*
|
|
290
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
291
|
+
* @param filePurpose This value is used to indicate if the file(s) are being used to provide more information
|
|
292
|
+
* about the condition of the item, or intended to provide more information about shipment tracking or about
|
|
293
|
+
* the shipping label.
|
|
294
|
+
*/
|
|
295
|
+
submitReturnFile(returnId, filePurpose) {
|
|
296
|
+
returnId = encodeURIComponent(returnId);
|
|
297
|
+
return this.post(`/return/${returnId}/file/submit`, {
|
|
298
|
+
filePurpose
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Update an existing return draft.
|
|
303
|
+
*
|
|
304
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
305
|
+
* @param returnRequest the ReturnRequestType
|
|
306
|
+
*/
|
|
307
|
+
updateReturnDraft(draftId, returnRequest) {
|
|
308
|
+
draftId = encodeURIComponent(draftId);
|
|
309
|
+
return this.put(`/return/draft/${draftId}`, {
|
|
310
|
+
returnRequest
|
|
311
|
+
});
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Update shipment tracking information.
|
|
315
|
+
*
|
|
316
|
+
* @param returnId The unique eBay-assigned ID of the return request.
|
|
317
|
+
* @param payload the UpdateTrackingRequest
|
|
318
|
+
*/
|
|
319
|
+
updateShipmentTrackingInfo(returnId, payload) {
|
|
320
|
+
returnId = encodeURIComponent(returnId);
|
|
321
|
+
return this.put(`/return/${returnId}/update_tracking`, payload);
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Upload the files relating to a return draft.
|
|
325
|
+
*
|
|
326
|
+
* @param draftId The unique eBay-assigned ID of the return draft.
|
|
327
|
+
* @param payload the UploadFileRequest
|
|
328
|
+
*/
|
|
329
|
+
uploadReturnDraftFile(draftId, payload) {
|
|
330
|
+
draftId = encodeURIComponent(draftId);
|
|
331
|
+
return this.post(`/return/draft/${draftId}/file/upload`, payload);
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Upload the files relating to a return.
|
|
335
|
+
*
|
|
336
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
337
|
+
* @param payload the UploadFileRequest
|
|
338
|
+
*/
|
|
339
|
+
uploadReturnFile(returnId, payload) {
|
|
340
|
+
returnId = encodeURIComponent(returnId);
|
|
341
|
+
return this.post(`/return/${returnId}/file/upload`, payload);
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* Void a shipping label.
|
|
345
|
+
*
|
|
346
|
+
* @param returnId The unique eBay-assigned ID of the return.
|
|
347
|
+
* @param payload the VoidLabelRequest
|
|
348
|
+
*/
|
|
349
|
+
voidShippingLabel(returnId, payload) {
|
|
350
|
+
returnId = encodeURIComponent(returnId);
|
|
351
|
+
return this.post(`/return/${returnId}/void_shipping_label`, payload);
|
|
352
|
+
}
|
|
353
|
+
}
|
|
354
|
+
Return.id = 'Return';
|