ebay-api 1.13.4 → 6.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.
Files changed (218) hide show
  1. package/LICENSE +18 -19
  2. package/README.md +512 -118
  3. package/lib/api/apiFactory.d.ts +27 -0
  4. package/lib/api/apiFactory.js +100 -0
  5. package/lib/api/apiFactory.js.map +1 -0
  6. package/lib/api/base.d.ts +13 -0
  7. package/lib/api/base.js +25 -0
  8. package/lib/api/base.js.map +1 -0
  9. package/lib/api/index.d.ts +11 -0
  10. package/lib/api/index.js +18 -0
  11. package/lib/api/index.js.map +1 -0
  12. package/lib/api/restful/buy/browse/index.d.ts +84 -0
  13. package/lib/api/restful/buy/browse/index.js +142 -0
  14. package/lib/api/restful/buy/browse/index.js.map +1 -0
  15. package/lib/api/restful/buy/deal/index.d.ts +55 -0
  16. package/lib/api/restful/buy/deal/index.js +80 -0
  17. package/lib/api/restful/buy/deal/index.js.map +1 -0
  18. package/lib/api/restful/buy/feed/index.d.ts +43 -0
  19. package/lib/api/restful/buy/feed/index.js +85 -0
  20. package/lib/api/restful/buy/feed/index.js.map +1 -0
  21. package/lib/api/restful/buy/index.d.ts +17 -0
  22. package/lib/api/restful/buy/index.js +21 -0
  23. package/lib/api/restful/buy/index.js.map +1 -0
  24. package/lib/api/restful/buy/marketing/index.d.ts +27 -0
  25. package/lib/api/restful/buy/marketing/index.js +51 -0
  26. package/lib/api/restful/buy/marketing/index.js.map +1 -0
  27. package/lib/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
  28. package/lib/api/restful/buy/marketplaceInsights/index.js +51 -0
  29. package/lib/api/restful/buy/marketplaceInsights/index.js.map +1 -0
  30. package/lib/api/restful/buy/offer/index.d.ts +23 -0
  31. package/lib/api/restful/buy/offer/index.js +37 -0
  32. package/lib/api/restful/buy/offer/index.js.map +1 -0
  33. package/lib/api/restful/buy/order/index.d.ts +264 -0
  34. package/lib/api/restful/buy/order/index.js +369 -0
  35. package/lib/api/restful/buy/order/index.js.map +1 -0
  36. package/lib/api/restful/commerce/catalog/index.d.ts +73 -0
  37. package/lib/api/restful/commerce/catalog/index.js +108 -0
  38. package/lib/api/restful/commerce/catalog/index.js.map +1 -0
  39. package/lib/api/restful/commerce/charity/index.d.ts +34 -0
  40. package/lib/api/restful/commerce/charity/index.js +56 -0
  41. package/lib/api/restful/commerce/charity/index.js.map +1 -0
  42. package/lib/api/restful/commerce/identity/index.d.ts +14 -0
  43. package/lib/api/restful/commerce/identity/index.js +27 -0
  44. package/lib/api/restful/commerce/identity/index.js.map +1 -0
  45. package/lib/api/restful/commerce/index.d.ts +15 -0
  46. package/lib/api/restful/commerce/index.js +19 -0
  47. package/lib/api/restful/commerce/index.js.map +1 -0
  48. package/lib/api/restful/commerce/notification/index.d.ts +117 -0
  49. package/lib/api/restful/commerce/notification/index.js +187 -0
  50. package/lib/api/restful/commerce/notification/index.js.map +1 -0
  51. package/lib/api/restful/commerce/taxonomy/index.d.ts +78 -0
  52. package/lib/api/restful/commerce/taxonomy/index.js +135 -0
  53. package/lib/api/restful/commerce/taxonomy/index.js.map +1 -0
  54. package/lib/api/restful/commerce/translation/index.d.ts +15 -0
  55. package/lib/api/restful/commerce/translation/index.js +25 -0
  56. package/lib/api/restful/commerce/translation/index.js.map +1 -0
  57. package/lib/api/restful/developer/analytics/index.d.ts +22 -0
  58. package/lib/api/restful/developer/analytics/index.js +45 -0
  59. package/lib/api/restful/developer/analytics/index.js.map +1 -0
  60. package/lib/api/restful/developer/index.d.ts +5 -0
  61. package/lib/api/restful/developer/index.js +9 -0
  62. package/lib/api/restful/developer/index.js.map +1 -0
  63. package/lib/api/restful/index.d.ts +63 -0
  64. package/lib/api/restful/index.js +165 -0
  65. package/lib/api/restful/index.js.map +1 -0
  66. package/lib/api/restful/postOrder/cancellation/index.d.ts +57 -0
  67. package/lib/api/restful/postOrder/cancellation/index.js +95 -0
  68. package/lib/api/restful/postOrder/cancellation/index.js.map +1 -0
  69. package/lib/api/restful/postOrder/case/index.d.ts +63 -0
  70. package/lib/api/restful/postOrder/case/index.js +97 -0
  71. package/lib/api/restful/postOrder/case/index.js.map +1 -0
  72. package/lib/api/restful/postOrder/index.d.ts +11 -0
  73. package/lib/api/restful/postOrder/index.js +15 -0
  74. package/lib/api/restful/postOrder/index.js.map +1 -0
  75. package/lib/api/restful/postOrder/inquiry/index.d.ts +82 -0
  76. package/lib/api/restful/postOrder/inquiry/index.js +131 -0
  77. package/lib/api/restful/postOrder/inquiry/index.js.map +1 -0
  78. package/lib/api/restful/postOrder/return/index.d.ts +231 -0
  79. package/lib/api/restful/postOrder/return/index.js +361 -0
  80. package/lib/api/restful/postOrder/return/index.js.map +1 -0
  81. package/lib/api/restful/sell/account/index.d.ts +217 -0
  82. package/lib/api/restful/sell/account/index.js +337 -0
  83. package/lib/api/restful/sell/account/index.js.map +1 -0
  84. package/lib/api/restful/sell/analytics/index.d.ts +41 -0
  85. package/lib/api/restful/sell/analytics/index.js +61 -0
  86. package/lib/api/restful/sell/analytics/index.js.map +1 -0
  87. package/lib/api/restful/sell/compliance/index.d.ts +37 -0
  88. package/lib/api/restful/sell/compliance/index.js +57 -0
  89. package/lib/api/restful/sell/compliance/index.js.map +1 -0
  90. package/lib/api/restful/sell/feed/index.d.ts +151 -0
  91. package/lib/api/restful/sell/feed/index.js +255 -0
  92. package/lib/api/restful/sell/feed/index.js.map +1 -0
  93. package/lib/api/restful/sell/finances/index.d.ts +74 -0
  94. package/lib/api/restful/sell/finances/index.js +105 -0
  95. package/lib/api/restful/sell/finances/index.js.map +1 -0
  96. package/lib/api/restful/sell/fulfillment/index.d.ts +137 -0
  97. package/lib/api/restful/sell/fulfillment/index.js +199 -0
  98. package/lib/api/restful/sell/fulfillment/index.js.map +1 -0
  99. package/lib/api/restful/sell/index.d.ts +29 -0
  100. package/lib/api/restful/sell/index.js +33 -0
  101. package/lib/api/restful/sell/index.js.map +1 -0
  102. package/lib/api/restful/sell/inventory/index.d.ts +248 -0
  103. package/lib/api/restful/sell/inventory/index.js +346 -0
  104. package/lib/api/restful/sell/inventory/index.js.map +1 -0
  105. package/lib/api/restful/sell/listing/index.d.ts +14 -0
  106. package/lib/api/restful/sell/listing/index.js +25 -0
  107. package/lib/api/restful/sell/listing/index.js.map +1 -0
  108. package/lib/api/restful/sell/logistics/index.d.ts +44 -0
  109. package/lib/api/restful/sell/logistics/index.js +66 -0
  110. package/lib/api/restful/sell/logistics/index.js.map +1 -0
  111. package/lib/api/restful/sell/marketing/index.d.ts +443 -0
  112. package/lib/api/restful/sell/marketing/index.js +609 -0
  113. package/lib/api/restful/sell/marketing/index.js.map +1 -0
  114. package/lib/api/restful/sell/metadata/index.d.ts +77 -0
  115. package/lib/api/restful/sell/metadata/index.js +131 -0
  116. package/lib/api/restful/sell/metadata/index.js.map +1 -0
  117. package/lib/api/restful/sell/negotiation/index.d.ts +24 -0
  118. package/lib/api/restful/sell/negotiation/index.js +39 -0
  119. package/lib/api/restful/sell/negotiation/index.js.map +1 -0
  120. package/lib/api/restful/sell/recommendation/index.d.ts +26 -0
  121. package/lib/api/restful/sell/recommendation/index.js +39 -0
  122. package/lib/api/restful/sell/recommendation/index.js.map +1 -0
  123. package/lib/api/traditional/XMLRequest.d.ts +98 -0
  124. package/lib/api/traditional/XMLRequest.js +191 -0
  125. package/lib/api/traditional/XMLRequest.js.map +1 -0
  126. package/lib/api/traditional/clientAlerts/index.d.ts +9 -0
  127. package/lib/api/traditional/clientAlerts/index.js +15 -0
  128. package/lib/api/traditional/clientAlerts/index.js.map +1 -0
  129. package/lib/api/traditional/clientAlerts/types.d.ts +31 -0
  130. package/lib/api/traditional/clientAlerts/types.js +36 -0
  131. package/lib/api/traditional/clientAlerts/types.js.map +1 -0
  132. package/lib/api/traditional/fields.d.ts +1948 -0
  133. package/lib/api/traditional/fields.js +1949 -0
  134. package/lib/api/traditional/fields.js.map +1 -0
  135. package/lib/api/traditional/finding/index.d.ts +12 -0
  136. package/lib/api/traditional/finding/index.js +16 -0
  137. package/lib/api/traditional/finding/index.js.map +1 -0
  138. package/lib/api/traditional/index.d.ts +17 -0
  139. package/lib/api/traditional/index.js +207 -0
  140. package/lib/api/traditional/index.js.map +1 -0
  141. package/lib/api/traditional/merchandising/index.d.ts +7 -0
  142. package/lib/api/traditional/merchandising/index.js +11 -0
  143. package/lib/api/traditional/merchandising/index.js.map +1 -0
  144. package/lib/api/traditional/shopping/index.d.ts +11 -0
  145. package/lib/api/traditional/shopping/index.js +16 -0
  146. package/lib/api/traditional/shopping/index.js.map +1 -0
  147. package/lib/api/traditional/trading/index.d.ts +142 -0
  148. package/lib/api/traditional/trading/index.js +146 -0
  149. package/lib/api/traditional/trading/index.js.map +1 -0
  150. package/lib/auth/authNAuth.d.ts +49 -0
  151. package/lib/auth/authNAuth.js +122 -0
  152. package/lib/auth/authNAuth.js.map +1 -0
  153. package/lib/auth/index.d.ts +17 -0
  154. package/lib/auth/index.js +32 -0
  155. package/lib/auth/index.js.map +1 -0
  156. package/lib/auth/oAuth2.d.ts +90 -0
  157. package/lib/auth/oAuth2.js +258 -0
  158. package/lib/auth/oAuth2.js.map +1 -0
  159. package/lib/ebay-api.min.js +2 -0
  160. package/lib/ebay-api.min.js.map +1 -0
  161. package/lib/enums/apiEnums.d.ts +49 -0
  162. package/lib/enums/apiEnums.js +55 -0
  163. package/lib/enums/apiEnums.js.map +1 -0
  164. package/lib/enums/index.d.ts +2 -0
  165. package/lib/enums/index.js +15 -0
  166. package/lib/enums/index.js.map +1 -0
  167. package/lib/enums/restfulEnums.d.ts +672 -0
  168. package/lib/enums/restfulEnums.js +714 -0
  169. package/lib/enums/restfulEnums.js.map +1 -0
  170. package/lib/errors/index.d.ts +66 -0
  171. package/lib/errors/index.js +208 -0
  172. package/lib/errors/index.js.map +1 -0
  173. package/lib/index.d.ts +55 -0
  174. package/lib/index.js +98 -0
  175. package/lib/index.js.map +1 -0
  176. package/lib/request.d.ts +26 -0
  177. package/lib/request.js +51 -0
  178. package/lib/request.js.map +1 -0
  179. package/lib/types/apiTypes.d.ts +28 -0
  180. package/lib/types/apiTypes.js +3 -0
  181. package/lib/types/apiTypes.js.map +1 -0
  182. package/lib/types/index.d.ts +3 -0
  183. package/lib/types/index.js +16 -0
  184. package/lib/types/index.js.map +1 -0
  185. package/lib/types/restfulTypes.d.ts +1067 -0
  186. package/lib/types/restfulTypes.js +3 -0
  187. package/lib/types/restfulTypes.js.map +1 -0
  188. package/lib/types/traditonalTypes.d.ts +34 -0
  189. package/lib/types/traditonalTypes.js +3 -0
  190. package/lib/types/traditonalTypes.js.map +1 -0
  191. package/package.json +115 -21
  192. package/.npmignore +0 -17
  193. package/.travis.yml +0 -7
  194. package/examples/Finding-FindItemsByKeywords.js +0 -46
  195. package/examples/Merchandising-GetMostWatchedItemsRequest.js +0 -16
  196. package/examples/Shopping-GetSingleItem.js +0 -18
  197. package/examples/Trading-GetOrders.js +0 -26
  198. package/index.js +0 -10
  199. package/lib/deep-to-array.js +0 -42
  200. package/lib/defaults.js +0 -69
  201. package/lib/errors.js +0 -44
  202. package/lib/json-parser.js +0 -336
  203. package/lib/key-lists.js +0 -64
  204. package/lib/urls.js +0 -64
  205. package/lib/versions.js +0 -35
  206. package/lib/xml-converter.js +0 -21
  207. package/lib/xml-request.js +0 -207
  208. package/scripts/parse-input-xml.js +0 -41
  209. package/test/deep-to-array.test.js +0 -100
  210. package/test/errors.test.js +0 -75
  211. package/test/helpers.js +0 -22
  212. package/test/mocha.opts +0 -1
  213. package/test/mocks/GetMultipleItems.xml +0 -115
  214. package/test/mocks/GetOrders-empty.xml +0 -17
  215. package/test/mocks/GetOrders.xml +0 -463
  216. package/test/pagination.test.js +0 -5
  217. package/test/parsing.test.js +0 -248
  218. package/test/xml-request.test.js +0 -447
@@ -0,0 +1,361 @@
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
+ * Post-Order Return API
9
+ */
10
+ class Return extends __1.default {
11
+ get basePath() {
12
+ return '/post-order/v2';
13
+ }
14
+ get useIaf() {
15
+ return true;
16
+ }
17
+ /**
18
+ * Create or update a shipping label provided by the seller.
19
+ *
20
+ * @param returnId The unique eBay-assigned ID of the return.
21
+ * @param payload the ProvideLabelRequest
22
+ */
23
+ addShippingLabelInfo(returnId, payload) {
24
+ const id = encodeURIComponent(returnId);
25
+ return this.post(`/return/${id}/add_shipping_label`, payload);
26
+ }
27
+ /**
28
+ * Cancel a return request.
29
+ *
30
+ * @param returnId The unique eBay-assigned ID of the return request.
31
+ * @param payload The CloseReturnRequest.
32
+ */
33
+ cancelReturnRequest(returnId, payload) {
34
+ const id = encodeURIComponent(returnId);
35
+ if (payload && payload.buyerCloseReason) {
36
+ payload.buyerCloseReason = payload.buyerCloseReason.trim();
37
+ }
38
+ return this.post(`/return/${id}/cancel`, payload);
39
+ }
40
+ /**
41
+ * Check to see if an item is eligible for a return.
42
+ *
43
+ * @param payload the CheckEligibilityRequest
44
+ */
45
+ checkReturnEligibility(payload) {
46
+ return this.post(`/return/check_eligibility`, payload);
47
+ }
48
+ /**
49
+ * Validate the eligibility of an existing shipping label.
50
+ *
51
+ * @param returnId The unique eBay-assigned ID of the return.
52
+ */
53
+ checkShippingLabelEligibility(returnId) {
54
+ const id = encodeURIComponent(returnId);
55
+ return this.get(`/return/${id}/check_label_print_eligibility`);
56
+ }
57
+ /**
58
+ * Create a return draft.
59
+ *
60
+ * @param payload the SetReturnCreationSessionRequest
61
+ */
62
+ createReturnDraft(payload) {
63
+ return this.post(`/return/draft`, payload);
64
+ }
65
+ /**
66
+ * Request a return for an item.
67
+ *
68
+ * @param payload the CreateReturnRequest
69
+ * @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
70
+ */
71
+ createReturnRequest(payload, fieldGroups) {
72
+ return this.post(`/return`, payload, {
73
+ params: {
74
+ fieldgroups: fieldGroups
75
+ }
76
+ });
77
+ }
78
+ /**
79
+ * Create an eBay shipping label for the buyer.
80
+ *
81
+ * @param returnId The unique eBay-assigned ID of the return.
82
+ */
83
+ createReturnShippingLabel(returnId) {
84
+ const id = encodeURIComponent(returnId);
85
+ return this.post(`/return/${id}/initiate_shipping_label`);
86
+ }
87
+ /**
88
+ * Delete a file associated with a return draft.
89
+ *
90
+ * @param draftId The unique eBay-assigned ID of the return draft.
91
+ * @param fileId The unique eBay-assigned ID of the draft file.
92
+ */
93
+ deleteReturnDraftFile(draftId, fileId) {
94
+ draftId = encodeURIComponent(draftId);
95
+ fileId = encodeURIComponent(fileId);
96
+ return this.delete(`/return/draft/${draftId}/file/${fileId}`);
97
+ }
98
+ /**
99
+ * Escalate an existing return to eBay customer support.
100
+ *
101
+ * @param returnId The unique eBay-assigned ID of the return request.
102
+ * @param payload the EscalateRequest
103
+ */
104
+ escalateReturn(returnId, payload) {
105
+ const id = encodeURIComponent(returnId);
106
+ return this.post(`/return/${id}/escalate`, payload);
107
+ }
108
+ /**
109
+ * Retrieve the details of a specific return.
110
+ *
111
+ * @param returnId The unique eBay-assigned ID of the return request.
112
+ * @param fieldGroups can be used in the call URI to control the detail level that is returned in response.
113
+ */
114
+ getReturn(returnId, fieldGroups) {
115
+ returnId = encodeURIComponent(returnId);
116
+ return this.get(`/return/${returnId}`, {
117
+ params: {
118
+ fieldgroups: fieldGroups
119
+ }
120
+ });
121
+ }
122
+ /**
123
+ * Retrieve a return draft.
124
+ *
125
+ * @param returnId The unique eBay-assigned ID of the return request.
126
+ */
127
+ getReturnDraft(returnId) {
128
+ const id = encodeURIComponent(returnId);
129
+ return this.get(`/return/draft/${id}`);
130
+ }
131
+ /**
132
+ * Retrieve the files associated with a return draft.
133
+ *
134
+ * @param returnId The unique eBay-assigned ID of the return draft.
135
+ */
136
+ getReturnDraftFiles(returnId) {
137
+ const id = encodeURIComponent(returnId);
138
+ return this.get(`/return/draft/${id}/files`);
139
+ }
140
+ /**
141
+ * Retrieve the cost estimate of a refund with its shipping cost.
142
+ *
143
+ * @param payload the GetEstimateRequest
144
+ */
145
+ getReturnEstimate(payload) {
146
+ return this.post(`/return/estimate`, payload);
147
+ }
148
+ /**
149
+ * Retrieve the cost estimate of a refund with its shipping cost.
150
+ *
151
+ * @param returnId The unique eBay-assigned ID of the return.
152
+ */
153
+ getReturnFiles(returnId) {
154
+ const id = encodeURIComponent(returnId);
155
+ return this.get(`/return/${id}/files`);
156
+ }
157
+ /**
158
+ * Retrieve seller's return preferences.
159
+ */
160
+ getReturnPreferences() {
161
+ return this.get(`/return/preference`);
162
+ }
163
+ /**
164
+ * Retrieve the data for an existing shipping label.
165
+ *
166
+ * @param returnId The unique eBay-assigned ID of the return.
167
+ */
168
+ getReturnShippingLabel(returnId) {
169
+ returnId = encodeURIComponent(returnId);
170
+ return this.get(`/return/${returnId}/get_shipping_label`);
171
+ }
172
+ /**
173
+ * Retrieve shipment tracking activity for a return.
174
+ *
175
+ * @param returnId The unique eBay-assigned ID of the return.
176
+ * @param carrierUsed The shipping carrier used to to ship the package.
177
+ * @param trackingNumber The tracking number of the package.
178
+ */
179
+ getShipmentTrackingInfo(returnId, carrierUsed, trackingNumber) {
180
+ returnId = encodeURIComponent(returnId);
181
+ return this.get(`/return/${returnId}/tracking`, {
182
+ params: {
183
+ carrier_used: carrierUsed,
184
+ tracking_number: trackingNumber
185
+ }
186
+ });
187
+ }
188
+ /**
189
+ * Issue a refund.
190
+ *
191
+ * @param returnId The unique eBay-assigned ID of the return.
192
+ * @param payload The IssueRefundRequest.
193
+ */
194
+ issueReturnRefund(returnId, payload) {
195
+ returnId = encodeURIComponent(returnId);
196
+ return this.post(`/return/${returnId}/issue_refund`, payload);
197
+ }
198
+ /**
199
+ * Mark a returned item as received.
200
+ *
201
+ * @param returnId The unique eBay-assigned ID of the return.
202
+ * @param payload the MarkAsReceivedRequest
203
+ */
204
+ markReturnReceived(returnId, payload) {
205
+ returnId = encodeURIComponent(returnId);
206
+ return this.post(`/return/${returnId}/mark_as_received`, payload);
207
+ }
208
+ /**
209
+ * Mark a refund as received.
210
+ *
211
+ * @param returnId The unique eBay-assigned ID of the return.
212
+ */
213
+ markReturnRefundReceived(returnId) {
214
+ returnId = encodeURIComponent(returnId);
215
+ return this.post(`/return/${returnId}/mark_refund_received`);
216
+ }
217
+ /**
218
+ * Notify the buyer that a refund has been issued.
219
+ *
220
+ * @param returnId The unique eBay-assigned ID of the return.
221
+ * @param payload the MarkRefundSentRequest
222
+ */
223
+ markReturnRefundSent(returnId, payload) {
224
+ returnId = encodeURIComponent(returnId);
225
+ return this.post(`/return/${returnId}/mark_refund_sent`, payload);
226
+ }
227
+ /**
228
+ * Mark a return as shipped.
229
+ *
230
+ * @param returnId The unique eBay-assigned ID of the return.
231
+ * @param payload the MarkAsShippedRequest
232
+ */
233
+ markReturnShipped(returnId, payload) {
234
+ returnId = encodeURIComponent(returnId);
235
+ return this.post(`/return/${returnId}/mark_as_shipped`, payload);
236
+ }
237
+ /**
238
+ * Perform an action on a return, such as APPROVE.
239
+ *
240
+ * @param returnId The unique eBay-assigned ID of the return.
241
+ * @param payload the DecideReturnRequest
242
+ */
243
+ processReturnRequest(returnId, payload) {
244
+ returnId = encodeURIComponent(returnId);
245
+ return this.post(`/return/${returnId}/decide`, payload);
246
+ }
247
+ /**
248
+ * Retrieve details on items being returned.
249
+ *
250
+ * @param params the SearchReturnParams
251
+ */
252
+ search(params) {
253
+ return this.get(`/return/search`, {
254
+ params
255
+ });
256
+ }
257
+ /**
258
+ * Send a message to the buyer or seller regarding a return.
259
+ *
260
+ * @param returnId The unique eBay-assigned ID of the return.
261
+ * @param payload the SendMessageRequest
262
+ */
263
+ sendReturnMessage(returnId, payload) {
264
+ returnId = encodeURIComponent(returnId);
265
+ return this.post(`/return/${returnId}/send_message`, payload);
266
+ }
267
+ /**
268
+ * Send a shipping label to an email address.
269
+ *
270
+ * @param returnId The unique eBay-assigned ID of the return.
271
+ * @param toEmailAddress The recipient's email address is specified in this field.
272
+ */
273
+ sendReturnShippingLabel(returnId, toEmailAddress) {
274
+ returnId = encodeURIComponent(returnId);
275
+ return this.post(`/return/${returnId}/send_shipping_label`, {}, {
276
+ params: {
277
+ to_email_address: toEmailAddress
278
+ }
279
+ });
280
+ }
281
+ /**
282
+ * Send a shipping label to an email address.
283
+ *
284
+ * @param rmaRequired This field is included and set to true if the seller wishes to require that the buyer provide
285
+ * a Return Merchandise Authorization (RMA) when returning an item.
286
+ */
287
+ setReturnPreferences(rmaRequired) {
288
+ return this.post(`/return/preference`, {
289
+ rmaRequired
290
+ });
291
+ }
292
+ /**
293
+ * Activate the files associated with a return.
294
+ *
295
+ * @param returnId The unique eBay-assigned ID of the return.
296
+ * @param filePurpose This value is used to indicate if the file(s) are being used to provide more information
297
+ * about the condition of the item, or intended to provide more information about shipment tracking or about
298
+ * the shipping label.
299
+ */
300
+ submitReturnFile(returnId, filePurpose) {
301
+ returnId = encodeURIComponent(returnId);
302
+ return this.post(`/return/${returnId}/file/submit`, {
303
+ filePurpose
304
+ });
305
+ }
306
+ /**
307
+ * Update an existing return draft.
308
+ *
309
+ * @param draftId The unique eBay-assigned ID of the return draft.
310
+ * @param returnRequest the ReturnRequestType
311
+ */
312
+ updateReturnDraft(draftId, returnRequest) {
313
+ draftId = encodeURIComponent(draftId);
314
+ return this.put(`/return/draft/${draftId}`, {
315
+ returnRequest
316
+ });
317
+ }
318
+ /**
319
+ * Update shipment tracking information.
320
+ *
321
+ * @param returnId The unique eBay-assigned ID of the return request.
322
+ * @param payload the UpdateTrackingRequest
323
+ */
324
+ updateShipmentTrackingInfo(returnId, payload) {
325
+ returnId = encodeURIComponent(returnId);
326
+ return this.put(`/return/${returnId}/update_tracking`, payload);
327
+ }
328
+ /**
329
+ * Upload the files relating to a return draft.
330
+ *
331
+ * @param draftId The unique eBay-assigned ID of the return draft.
332
+ * @param payload the UploadFileRequest
333
+ */
334
+ uploadReturnDraftFile(draftId, payload) {
335
+ draftId = encodeURIComponent(draftId);
336
+ return this.post(`/return/draft/${draftId}/file/upload`, payload);
337
+ }
338
+ /**
339
+ * Upload the files relating to a return.
340
+ *
341
+ * @param returnId The unique eBay-assigned ID of the return.
342
+ * @param payload the UploadFileRequest
343
+ */
344
+ uploadReturnFile(returnId, payload) {
345
+ returnId = encodeURIComponent(returnId);
346
+ return this.post(`/return/${returnId}/file/upload`, payload);
347
+ }
348
+ /**
349
+ * Void a shipping label.
350
+ *
351
+ * @param returnId The unique eBay-assigned ID of the return.
352
+ * @param payload the VoidLabelRequest
353
+ */
354
+ voidShippingLabel(returnId, payload) {
355
+ returnId = encodeURIComponent(returnId);
356
+ return this.post(`/return/${returnId}/void_shipping_label`, payload);
357
+ }
358
+ }
359
+ exports.default = Return;
360
+ Return.id = 'Return';
361
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/postOrder/return/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAuB7B;;GAEG;AACH,MAAqB,MAAO,SAAQ,WAAO;IAIzC,IAAI,QAAQ;QACV,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,IAAI,MAAM;QACR,OAAO,IAAI,CAAC;IACd,CAAC;IAED;;;;;OAKG;IACI,oBAAoB,CAAC,QAAgB,EAAE,OAA4B;QACxE,MAAM,EAAE,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAC;IAChE,CAAC;IAED;;;;;OAKG;IACI,mBAAmB,CAAC,QAAgB,EAAE,OAA4B;QACvE,MAAM,EAAE,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACxC,IAAI,OAAO,IAAI,OAAO,CAAC,gBAAgB,EAAE;YACvC,OAAO,CAAC,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,IAAI,EAAE,CAAC;SAC5D;QACD,OA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KG;IACI,iBAAiB,CAAC,OAAe,EAAE,aAAgC;QACxE,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,OAAO,EAAE,EAAE;YAC1C,aAAa;SACd,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,0BAA0B,CAAC,QAAgB,EAAE,OAA8B;QAChF,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,GAAG,CAAC,WAAW,QAAQ,kBAAkB,EAAE,OAAO,CAAC,CAAC;IAClE,CAAC;IAED;;;;;OAKG;IACI,qBAAqB,CAAC,OAAe,EAAE,OAA0B;QACtE,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACtC,OAAO,IAAI,CAAC,IAAI,CAAC,iBAAiB,OAAO,cAAc,EAAE,OAAO,CAAC,CAAC;IACpE,CAAC;IAED;;;;;OAKG;IACI,gBAAgB,CAAC,QAAgB,EAAE,OAA0B;QAClE,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,QAAQ,cAAc,EAAE,OAAO,CAAC,CAAC;IAC/D,CAAC;IAED;;;;;OAKG;IACI,iBAAiB,CAAC,QAAgB,EAAE,OAAyB;QAClE,QAAQ,GAAG,kBAAkB,CAAC,QAAQ,CAAC,CAAC;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,QAAQ,sBAAsB,EAAE,OAAO,CAAC,CAAC;IACvE,CAAC;;AAjYH,yBAkYC;AAhYQ,SAAE,GAAG,QAAQ,CAAC"}
@@ -0,0 +1,217 @@
1
+ import Restful from '../../';
2
+ import { FulfillmentPolicyRequest, PaymentPolicyRequest, Program, ReturnPolicyRequest, SalesTaxBase } from '../../../../types';
3
+ import { PaymentsProgramType } from '../../../../enums';
4
+ /**
5
+ * The <b>Account API</b> gives sellers the ability to configure their eBay seller accounts,
6
+ * including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy),
7
+ * opt in and out of eBay seller programs, configure sales tax tables, and get account information.
8
+ */
9
+ export default class Account extends Restful {
10
+ static id: string;
11
+ get basePath(): string;
12
+ /**
13
+ * This method retrieves all the fulfillment policies configured for the marketplace you specify using the
14
+ * marketplace_id query parameter.
15
+ *
16
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policies you want to retrieve.
17
+ */
18
+ getFulfillmentPolicies(marketplaceId: string): Promise<any>;
19
+ /**
20
+ * This method creates a new fulfillment policy where the policy encapsulates seller's terms for fulfilling item
21
+ * purchases.
22
+ *
23
+ * @param body Request to create a seller account fulfillment policy.
24
+ */
25
+ createFulfillmentPolicy(body: FulfillmentPolicyRequest): Promise<any>;
26
+ /**
27
+ * This method updates an existing fulfillment policy.
28
+ *
29
+ * @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy you want to update.
30
+ * @param body Request to create a seller account fulfillment policy.
31
+ */
32
+ updateFulfillmentPolicy(fulfillmentPolicyId: string, body: FulfillmentPolicyRequest): Promise<any>;
33
+ /**
34
+ * This method deletes a fulfillment policy.
35
+ *
36
+ * @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy to delete.
37
+ */
38
+ deleteFulfillmentPolicy(fulfillmentPolicyId: string): Promise<any>;
39
+ /**
40
+ * This method retrieves the complete details of a fulfillment policy.
41
+ * Supply the ID of the policy you want to retrieve using the fulfillmentPolicyId path parameter.
42
+ *
43
+ * @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy you want to retrieve.
44
+ */
45
+ getFulfillmentPolicy(fulfillmentPolicyId: string): Promise<any>;
46
+ /**
47
+ * This method retrieves the complete details for a single fulfillment policy.
48
+ *
49
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
50
+ * @param name This query parameter specifies the user-defined name of the fulfillment policy you want to retrieve.
51
+ */
52
+ getFulfillmentPolicyByName(marketplaceId: string, name: string): Promise<any>;
53
+ /**
54
+ * This method retrieves all the payment policies configured for the marketplace you specify using the
55
+ * marketplace_id query parameter.
56
+ *
57
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
58
+ */
59
+ getPaymentPolicies(marketplaceId: string): Promise<any>;
60
+ /**
61
+ * This method retrieves the complete details of a payment policy. Supply the ID of the policy you want to retrieve
62
+ * using the paymentPolicyId path parameter.
63
+ *
64
+ * @param paymentPolicyId This path parameter specifies the ID of the payment policy you want to retrieve.
65
+ */
66
+ getPaymentPolicy(paymentPolicyId: string): Promise<any>;
67
+ /**
68
+ * This method creates a new payment policy where the policy encapsulates seller's terms for purchase payments.
69
+ *
70
+ * @param body Payment policy request
71
+ */
72
+ createPaymentPolicy(body: PaymentPolicyRequest): Promise<any>;
73
+ /**
74
+ * This method updates an existing payment policy.
75
+ *
76
+ * @param paymentPolicyId This path parameter specifies the ID of the payment policy you want to update.
77
+ * @param body Payment policy request
78
+ */
79
+ updatePaymentPolicy(paymentPolicyId: string, body: PaymentPolicyRequest): Promise<any>;
80
+ /**
81
+ * This method updates an existing payment policy.
82
+ *
83
+ * @param paymentPolicyId This path parameter specifies the ID of the payment policy you want to delete.
84
+ */
85
+ deletePaymentPolicy(paymentPolicyId: string): Promise<any>;
86
+ /**
87
+ * This method retrieves the complete details of a single payment policy.
88
+ *
89
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
90
+ * @param name This query parameter specifies the user-defined name of the payment policy you want to retrieve.
91
+ */
92
+ getPaymentPolicyByName(marketplaceId: string, name: string): Promise<any>;
93
+ /**
94
+ * This method returns whether or not the user is opted-in to the payment program.
95
+ *
96
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
97
+ * @param paymentsProgramType This path parameter specifies the payments program whose status is returned by the
98
+ * call.
99
+ */
100
+ getPaymentsProgram(marketplaceId: string, paymentsProgramType: PaymentsProgramType): Promise<any>;
101
+ /**
102
+ * This method retrieves a seller's onboarding status of eBay managed payments for a specified marketplace.
103
+ *
104
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
105
+ * @param paymentsProgramType This path parameter specifies the payments program whose status is returned by the
106
+ * call.
107
+ */
108
+ getPaymentsProgramOnboarding(marketplaceId: string, paymentsProgramType: PaymentsProgramType): Promise<any>;
109
+ /**
110
+ * This method retrieves the seller's current set of privileges.
111
+ */
112
+ getPrivileges(): Promise<any>;
113
+ /**
114
+ * This method gets a list of the seller programs that the seller has opted-in to.
115
+ */
116
+ getOptedInPrograms(): Promise<any>;
117
+ /**
118
+ * This method opts the seller in to an eBay seller program.
119
+ *
120
+ * @param body Program being opted-in to.
121
+ */
122
+ optInToProgram(body?: Program): Promise<any>;
123
+ /**
124
+ * This method opts the seller out of a seller program to which you have previously opted-in to.
125
+ *
126
+ * @param body Program being opted-out of.
127
+ */
128
+ optOutOfProgram(body?: Program): Promise<any>;
129
+ /**
130
+ * This method retrieves a seller's shipping rate tables for the country specified in the country_code query
131
+ * parameter.
132
+ *
133
+ * @param countryCode This query parameter specifies the two-letter ISO 3166-1 Alpha-2 code of country for which
134
+ * you want shipping-rate table information.
135
+ */
136
+ getRateTables(countryCode?: string): Promise<any>;
137
+ /**
138
+ * This method retrieves all the return policies configured for the marketplace you specify using the
139
+ * marketplace_id query parameter.
140
+ *
141
+ * @param marketplaceId This query parameter specifies the ID of the eBay marketplace of the policy you want to
142
+ * retrieve.
143
+ */
144
+ getReturnPolicies(marketplaceId: string): Promise<any>;
145
+ /**
146
+ * This method retrieves the complete details of the return policy specified by the returnPolicyId path parameter.
147
+ *
148
+ * @param returnPolicyId This path parameter specifies the of the return policy you want to retrieve.
149
+ */
150
+ getReturnPolicy(returnPolicyId: string): Promise<any>;
151
+ /**
152
+ * This method creates a new return policy where the policy encapsulates seller's terms for returning items.
153
+ *
154
+ * @param body Return policy request
155
+ */
156
+ createReturnPolicy(body: ReturnPolicyRequest): Promise<any>;
157
+ /**
158
+ * This method creates a new return policy where the policy encapsulates seller's terms for returning items.
159
+ *
160
+ * @param returnPolicyId This path parameter specifies the ID of the return policy you want to update.
161
+ * @param body Return policy request
162
+ */
163
+ updateReturnPolicy(returnPolicyId: string, body: ReturnPolicyRequest): Promise<any>;
164
+ /**
165
+ * This method deletes a return policy.
166
+ *
167
+ * @param returnPolicyId This path parameter specifies the ID of the return policy you want to delete.
168
+ */
169
+ deleteReturnPolicy(returnPolicyId: string): Promise<any>;
170
+ /**
171
+ * This method retrieves the complete details of a single return policy.
172
+ *
173
+ * @param marketplaceId This query parameter specifies the ID of the eBay marketplace of the policy you want to
174
+ * retrieve.
175
+ * @param name This query parameter specifies the user-defined name of the return policy you want to retrieve.
176
+ */
177
+ getReturnPolicyByName(marketplaceId: string, name: string): Promise<any>;
178
+ /**
179
+ * This call gets the current tax table entry for a specific tax jurisdiction.
180
+ *
181
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country whose
182
+ * tax table you want to retrieve.
183
+ * @param jurisdictionId This path parameter specifies the ID of the sales tax jurisdiction for the tax table entry
184
+ * you want to retrieve.
185
+ */
186
+ getSalesTax(countryCode: string, jurisdictionId: string): Promise<any>;
187
+ /**
188
+ * This method creates or updates a sales tax table entry for a jurisdiction.
189
+ *
190
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country for
191
+ * which you want to create tax table entry.
192
+ * @param jurisdictionId This path parameter specifies the ID of the sales-tax jurisdiction for the table entry you
193
+ * want to create.
194
+ * @param body A container that describes the how the sales tax is calculated.
195
+ */
196
+ createOrReplaceSalesTax(countryCode: string, jurisdictionId: string, body: SalesTaxBase): Promise<any>;
197
+ /**
198
+ * This call deletes a tax table entry for a jurisdiction.
199
+ *
200
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country for
201
+ * which you want to create tax table entry.
202
+ * @param jurisdictionId This path parameter specifies the ID of the sales-tax jurisdiction for the table entry you
203
+ * want to delete.
204
+ */
205
+ deleteSalesTax(countryCode: string, jurisdictionId: string): Promise<any>;
206
+ /**
207
+ * Use this call to retrieve a sales tax table that the seller established for a specific country.
208
+ *
209
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country whose
210
+ * tax table you want to retrieve.
211
+ */
212
+ getSalesTaxes(countryCode: string): Promise<any>;
213
+ /**
214
+ * his method is used by sellers onboarded for eBay managed payments, or sellers who are currently going through, or who are eligible for onboarding for eBay managed payments.
215
+ */
216
+ getKYC(): Promise<any>;
217
+ }