ebay-api 1.13.7 → 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,337 @@
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 <b>Account API</b> gives sellers the ability to configure their eBay seller accounts,
9
+ * including the seller's policies (the Fulfillment Policy, Payment Policy, and Return Policy),
10
+ * opt in and out of eBay seller programs, configure sales tax tables, and get account information.
11
+ */
12
+ class Account extends __1.default {
13
+ get basePath() {
14
+ return '/sell/account/v1';
15
+ }
16
+ /**
17
+ * This method retrieves all the fulfillment policies configured for the marketplace you specify using the
18
+ * marketplace_id query parameter.
19
+ *
20
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policies you want to retrieve.
21
+ */
22
+ getFulfillmentPolicies(marketplaceId) {
23
+ return this.get(`/fulfillment_policy`, {
24
+ params: {
25
+ marketplace_id: marketplaceId
26
+ }
27
+ });
28
+ }
29
+ /**
30
+ * This method creates a new fulfillment policy where the policy encapsulates seller's terms for fulfilling item
31
+ * purchases.
32
+ *
33
+ * @param body Request to create a seller account fulfillment policy.
34
+ */
35
+ createFulfillmentPolicy(body) {
36
+ return this.post(`/fulfillment_policy`, body);
37
+ }
38
+ /**
39
+ * This method updates an existing fulfillment policy.
40
+ *
41
+ * @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy you want to update.
42
+ * @param body Request to create a seller account fulfillment policy.
43
+ */
44
+ updateFulfillmentPolicy(fulfillmentPolicyId, body) {
45
+ const id = encodeURIComponent(fulfillmentPolicyId);
46
+ return this.put(`/fulfillment_policy/${id}`, body);
47
+ }
48
+ /**
49
+ * This method deletes a fulfillment policy.
50
+ *
51
+ * @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy to delete.
52
+ */
53
+ deleteFulfillmentPolicy(fulfillmentPolicyId) {
54
+ const id = encodeURIComponent(fulfillmentPolicyId);
55
+ return this.delete(`/fulfillment_policy/${id}`);
56
+ }
57
+ /**
58
+ * This method retrieves the complete details of a fulfillment policy.
59
+ * Supply the ID of the policy you want to retrieve using the fulfillmentPolicyId path parameter.
60
+ *
61
+ * @param fulfillmentPolicyId This path parameter specifies the ID of the fulfillment policy you want to retrieve.
62
+ */
63
+ getFulfillmentPolicy(fulfillmentPolicyId) {
64
+ return this.get(`/fulfillment_policy/${fulfillmentPolicyId}`);
65
+ }
66
+ /**
67
+ * This method retrieves the complete details for a single fulfillment policy.
68
+ *
69
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
70
+ * @param name This query parameter specifies the user-defined name of the fulfillment policy you want to retrieve.
71
+ */
72
+ getFulfillmentPolicyByName(marketplaceId, name) {
73
+ return this.get(`/fulfillment_policy/get_by_policy_name`, {
74
+ params: {
75
+ marketplace_id: marketplaceId,
76
+ name
77
+ }
78
+ });
79
+ }
80
+ /**
81
+ * This method retrieves all the payment policies configured for the marketplace you specify using the
82
+ * marketplace_id query parameter.
83
+ *
84
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
85
+ */
86
+ getPaymentPolicies(marketplaceId) {
87
+ return this.get(`/payment_policy`, {
88
+ params: {
89
+ marketplace_id: marketplaceId
90
+ }
91
+ });
92
+ }
93
+ /**
94
+ * This method retrieves the complete details of a payment policy. Supply the ID of the policy you want to retrieve
95
+ * using the paymentPolicyId path parameter.
96
+ *
97
+ * @param paymentPolicyId This path parameter specifies the ID of the payment policy you want to retrieve.
98
+ */
99
+ getPaymentPolicy(paymentPolicyId) {
100
+ paymentPolicyId = encodeURIComponent(paymentPolicyId);
101
+ return this.get(`/payment_policy/${paymentPolicyId}`);
102
+ }
103
+ /**
104
+ * This method creates a new payment policy where the policy encapsulates seller's terms for purchase payments.
105
+ *
106
+ * @param body Payment policy request
107
+ */
108
+ createPaymentPolicy(body) {
109
+ return this.post(`/payment_policy`, body);
110
+ }
111
+ /**
112
+ * This method updates an existing payment policy.
113
+ *
114
+ * @param paymentPolicyId This path parameter specifies the ID of the payment policy you want to update.
115
+ * @param body Payment policy request
116
+ */
117
+ updatePaymentPolicy(paymentPolicyId, body) {
118
+ paymentPolicyId = encodeURIComponent(paymentPolicyId);
119
+ return this.put(`/payment_policy/${paymentPolicyId}`, body);
120
+ }
121
+ /**
122
+ * This method updates an existing payment policy.
123
+ *
124
+ * @param paymentPolicyId This path parameter specifies the ID of the payment policy you want to delete.
125
+ */
126
+ deletePaymentPolicy(paymentPolicyId) {
127
+ paymentPolicyId = encodeURIComponent(paymentPolicyId);
128
+ return this.delete(`/payment_policy/${paymentPolicyId}`);
129
+ }
130
+ /**
131
+ * This method retrieves the complete details of a single payment policy.
132
+ *
133
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
134
+ * @param name This query parameter specifies the user-defined name of the payment policy you want to retrieve.
135
+ */
136
+ getPaymentPolicyByName(marketplaceId, name) {
137
+ return this.get(`/payment_policy/get_by_policy_name`, {
138
+ params: {
139
+ marketplace_id: marketplaceId,
140
+ name
141
+ }
142
+ });
143
+ }
144
+ /**
145
+ * This method returns whether or not the user is opted-in to the payment program.
146
+ *
147
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
148
+ * @param paymentsProgramType This path parameter specifies the payments program whose status is returned by the
149
+ * call.
150
+ */
151
+ getPaymentsProgram(marketplaceId, paymentsProgramType) {
152
+ marketplaceId = encodeURIComponent(marketplaceId);
153
+ const type = encodeURIComponent(paymentsProgramType);
154
+ return this.get(`/payments_program/${marketplaceId}/${type}`);
155
+ }
156
+ /**
157
+ * This method retrieves a seller's onboarding status of eBay managed payments for a specified marketplace.
158
+ *
159
+ * @param marketplaceId This query parameter specifies the eBay marketplace of the policy you want to retrieve.
160
+ * @param paymentsProgramType This path parameter specifies the payments program whose status is returned by the
161
+ * call.
162
+ */
163
+ getPaymentsProgramOnboarding(marketplaceId, paymentsProgramType) {
164
+ marketplaceId = encodeURIComponent(marketplaceId);
165
+ const type = encodeURIComponent(paymentsProgramType);
166
+ return this.get(`/payments_program/${marketplaceId}/${type}/onboarding`);
167
+ }
168
+ /**
169
+ * This method retrieves the seller's current set of privileges.
170
+ */
171
+ getPrivileges() {
172
+ return this.get(`/privilege`);
173
+ }
174
+ /**
175
+ * This method gets a list of the seller programs that the seller has opted-in to.
176
+ */
177
+ getOptedInPrograms() {
178
+ return this.get(`/program/get_opted_in_programs`);
179
+ }
180
+ /**
181
+ * This method opts the seller in to an eBay seller program.
182
+ *
183
+ * @param body Program being opted-in to.
184
+ */
185
+ optInToProgram(body) {
186
+ return this.post(`/program/opt_in`, body);
187
+ }
188
+ /**
189
+ * This method opts the seller out of a seller program to which you have previously opted-in to.
190
+ *
191
+ * @param body Program being opted-out of.
192
+ */
193
+ optOutOfProgram(body) {
194
+ return this.post(`/program/opt_out`, body);
195
+ }
196
+ /**
197
+ * This method retrieves a seller's shipping rate tables for the country specified in the country_code query
198
+ * parameter.
199
+ *
200
+ * @param countryCode This query parameter specifies the two-letter ISO 3166-1 Alpha-2 code of country for which
201
+ * you want shipping-rate table information.
202
+ */
203
+ getRateTables(countryCode) {
204
+ return this.get(`/rate_table`, {
205
+ params: {
206
+ country_code: countryCode
207
+ }
208
+ });
209
+ }
210
+ /**
211
+ * This method retrieves all the return policies configured for the marketplace you specify using the
212
+ * marketplace_id query parameter.
213
+ *
214
+ * @param marketplaceId This query parameter specifies the ID of the eBay marketplace of the policy you want to
215
+ * retrieve.
216
+ */
217
+ getReturnPolicies(marketplaceId) {
218
+ return this.get(`/return_policy`, {
219
+ params: {
220
+ marketplace_id: marketplaceId
221
+ }
222
+ });
223
+ }
224
+ /**
225
+ * This method retrieves the complete details of the return policy specified by the returnPolicyId path parameter.
226
+ *
227
+ * @param returnPolicyId This path parameter specifies the of the return policy you want to retrieve.
228
+ */
229
+ getReturnPolicy(returnPolicyId) {
230
+ returnPolicyId = encodeURIComponent(returnPolicyId);
231
+ return this.get(`/return_policy/${returnPolicyId}`);
232
+ }
233
+ /**
234
+ * This method creates a new return policy where the policy encapsulates seller's terms for returning items.
235
+ *
236
+ * @param body Return policy request
237
+ */
238
+ createReturnPolicy(body) {
239
+ return this.post(`/return_policy`, body);
240
+ }
241
+ /**
242
+ * This method creates a new return policy where the policy encapsulates seller's terms for returning items.
243
+ *
244
+ * @param returnPolicyId This path parameter specifies the ID of the return policy you want to update.
245
+ * @param body Return policy request
246
+ */
247
+ updateReturnPolicy(returnPolicyId, body) {
248
+ returnPolicyId = encodeURIComponent(returnPolicyId);
249
+ return this.put(`/return_policy/${returnPolicyId}`, body);
250
+ }
251
+ /**
252
+ * This method deletes a return policy.
253
+ *
254
+ * @param returnPolicyId This path parameter specifies the ID of the return policy you want to delete.
255
+ */
256
+ deleteReturnPolicy(returnPolicyId) {
257
+ returnPolicyId = encodeURIComponent(returnPolicyId);
258
+ return this.delete(`/return_policy/${returnPolicyId}`);
259
+ }
260
+ /**
261
+ * This method retrieves the complete details of a single return policy.
262
+ *
263
+ * @param marketplaceId This query parameter specifies the ID of the eBay marketplace of the policy you want to
264
+ * retrieve.
265
+ * @param name This query parameter specifies the user-defined name of the return policy you want to retrieve.
266
+ */
267
+ getReturnPolicyByName(marketplaceId, name) {
268
+ return this.get(`/return_policy/get_by_policy_name`, {
269
+ params: {
270
+ marketplace_id: marketplaceId,
271
+ name
272
+ }
273
+ });
274
+ }
275
+ /**
276
+ * This call gets the current tax table entry for a specific tax jurisdiction.
277
+ *
278
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country whose
279
+ * tax table you want to retrieve.
280
+ * @param jurisdictionId This path parameter specifies the ID of the sales tax jurisdiction for the tax table entry
281
+ * you want to retrieve.
282
+ */
283
+ getSalesTax(countryCode, jurisdictionId) {
284
+ countryCode = encodeURIComponent(countryCode);
285
+ jurisdictionId = encodeURIComponent(jurisdictionId);
286
+ return this.get(`/sales_tax/${countryCode}/${jurisdictionId}`);
287
+ }
288
+ /**
289
+ * This method creates or updates a sales tax table entry for a jurisdiction.
290
+ *
291
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country for
292
+ * which you want to create tax table entry.
293
+ * @param jurisdictionId This path parameter specifies the ID of the sales-tax jurisdiction for the table entry you
294
+ * want to create.
295
+ * @param body A container that describes the how the sales tax is calculated.
296
+ */
297
+ createOrReplaceSalesTax(countryCode, jurisdictionId, body) {
298
+ countryCode = encodeURIComponent(countryCode);
299
+ jurisdictionId = encodeURIComponent(jurisdictionId);
300
+ return this.put(`/sales_tax/${countryCode}/${jurisdictionId}`, body);
301
+ }
302
+ /**
303
+ * This call deletes a tax table entry for a jurisdiction.
304
+ *
305
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country for
306
+ * which you want to create tax table entry.
307
+ * @param jurisdictionId This path parameter specifies the ID of the sales-tax jurisdiction for the table entry you
308
+ * want to delete.
309
+ */
310
+ deleteSalesTax(countryCode, jurisdictionId) {
311
+ countryCode = encodeURIComponent(countryCode);
312
+ jurisdictionId = encodeURIComponent(jurisdictionId);
313
+ return this.delete(`/sales_tax/${countryCode}/${jurisdictionId}`);
314
+ }
315
+ /**
316
+ * Use this call to retrieve a sales tax table that the seller established for a specific country.
317
+ *
318
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 code for the country whose
319
+ * tax table you want to retrieve.
320
+ */
321
+ getSalesTaxes(countryCode) {
322
+ return this.get(`/sales_tax`, {
323
+ params: {
324
+ country_code: countryCode
325
+ }
326
+ });
327
+ }
328
+ /**
329
+ * 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.
330
+ */
331
+ getKYC() {
332
+ return this.get(`/kyc`);
333
+ }
334
+ }
335
+ exports.default = Account;
336
+ Account.id = 'Account';
337
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/sell/account/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAS7B;;;;GAIG;AACH,MAAqB,OAAQ,SAAQ,WAAO;IAI1C,IAAI,QAAQ;QACV,OAAO,kBAAkB,CAAC;IAC5B,CAAC;IAED;;;;;OAKG;IACI,sBAAsB,CAAC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IAED;;;;;OAKG;IACI,aAAa,CAAC,WAAmB;QACtC,OAAO,IAAI,CAAC,GAAG,CAAC,YAAY,EAAE;YAC5B,MAAM,EAAE;gBACN,YAAY,EAAE,WAAW;aAC1B;SACF,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACI,MAAM;QACX,OAAO,IAAI,CAAC,GAAG,CAAC,MAAM,CAAG,CAAC;IAC5B,CAAC;;AAnWH,0BAoWC;AAlWQ,UAAE,GAAG,SAAS,CAAC"}
@@ -0,0 +1,41 @@
1
+ import Restful from '../../';
2
+ import { Metric } from '../../../../enums';
3
+ /**
4
+ * The Analytics API provides information about a seller's business performance.
5
+ */
6
+ export default class Analytics extends Restful {
7
+ static id: string;
8
+ get basePath(): string;
9
+ /**
10
+ * This call retrieves all the profiles for the associated seller.
11
+ */
12
+ findSellerStandardsProfiles(): Promise<any>;
13
+ /**
14
+ * This call retrieves seller's profiles based on a program or cycle.
15
+ *
16
+ * @param program Specifies the program of the requested profile.
17
+ * @param cycle Specifies the cycle of the requested profile.
18
+ */
19
+ getSellerStandardsProfile(program: string, cycle: string): Promise<any>;
20
+ /**
21
+ * This call returns a report that details the user-traffic a seller's listings receives.
22
+ *
23
+ * @param dimension Specifies the basis of the report data.
24
+ * @param filter Limits the report data returned.
25
+ * @param metric Specifies a comma separated list of the metrics you want included in the report.
26
+ * @param sort Specifies a single metric to be sorted and whether you want to sort in ascending or descending order.
27
+ */
28
+ getTrafficReport({ dimension, filter, metric, sort }?: {
29
+ dimension?: string;
30
+ filter?: string;
31
+ metric?: Metric;
32
+ sort?: string;
33
+ }): Promise<any>;
34
+ /**
35
+ * Use this method to retrieve a seller's performance and rating for the customer service metric.
36
+ *
37
+ * @param customerServiceMetricType Use this path parameter to specify the type of customer service metrics and benchmark data you want returned for the seller.
38
+ * @param evaluationType Use this query parameter to specify the Marketplace ID to evaluate for the customer service metrics and benchmark data.
39
+ */
40
+ getCustomerServiceMetric(customerServiceMetricType: string, evaluationType: string): Promise<any>;
41
+ }
@@ -0,0 +1,61 @@
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 Analytics API provides information about a seller's business performance.
9
+ */
10
+ class Analytics extends __1.default {
11
+ get basePath() {
12
+ return '/sell/analytics/v1';
13
+ }
14
+ /**
15
+ * This call retrieves all the profiles for the associated seller.
16
+ */
17
+ findSellerStandardsProfiles() {
18
+ return this.get(`/seller_standards_profile`);
19
+ }
20
+ /**
21
+ * This call retrieves seller's profiles based on a program or cycle.
22
+ *
23
+ * @param program Specifies the program of the requested profile.
24
+ * @param cycle Specifies the cycle of the requested profile.
25
+ */
26
+ getSellerStandardsProfile(program, cycle) {
27
+ program = encodeURIComponent(program);
28
+ cycle = encodeURIComponent(cycle);
29
+ return this.get(`/seller_standards_profile/${program}/${cycle}`);
30
+ }
31
+ /**
32
+ * This call returns a report that details the user-traffic a seller's listings receives.
33
+ *
34
+ * @param dimension Specifies the basis of the report data.
35
+ * @param filter Limits the report data returned.
36
+ * @param metric Specifies a comma separated list of the metrics you want included in the report.
37
+ * @param sort Specifies a single metric to be sorted and whether you want to sort in ascending or descending order.
38
+ */
39
+ getTrafficReport({ dimension, filter, metric, sort } = {}) {
40
+ return this.get(`/traffic_report`, {
41
+ params: {
42
+ dimension,
43
+ filter,
44
+ metric,
45
+ sort
46
+ }
47
+ });
48
+ }
49
+ /**
50
+ * Use this method to retrieve a seller's performance and rating for the customer service metric.
51
+ *
52
+ * @param customerServiceMetricType Use this path parameter to specify the type of customer service metrics and benchmark data you want returned for the seller.
53
+ * @param evaluationType Use this query parameter to specify the Marketplace ID to evaluate for the customer service metrics and benchmark data.
54
+ */
55
+ getCustomerServiceMetric(customerServiceMetricType, evaluationType) {
56
+ return this.get(`/customer_service_metric/${customerServiceMetricType}/${evaluationType}`);
57
+ }
58
+ }
59
+ exports.default = Analytics;
60
+ Analytics.id = 'Analytics';
61
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/sell/analytics/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAG7B;;GAEG;AACH,MAAqB,SAAU,SAAQ,WAAO;IAI5C,IAAI,QAAQ;QACV,OAAO,oBAAoB,CAAC;IAC9B,CAAC;IAED;;OAEG;IACI,2BAA2B;QAChC,OAAO,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;IAC/C,CAAC;IAED;;;;;OAKG;IACI,yBAAyB,CAAC,OAAe,EAAE,KAAa;QAC7D,OAAO,GAAG,kBAAkB,CAAC,OAAO,CAAC,CAAC;QACtC,KAAK,GAAG,kBAAkB,CAAC,KAAK,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC,GAAG,CAAC,6BAA6B,OAAO,IAAI,KAAK,EAAE,CAAC,CAAC;IACnE,CAAC;IAED;;;;;;;OAOG;IACI,gBAAgB,CAAC,EAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,KAC4C,EAAE;QACpG,OAAO,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE;YACjC,MAAM,EAAE;gBACN,SAAS;gBACT,MAAM;gBACN,MAAM;gBACN,IAAI;aACL;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;OAKG;IACI,wBAAwB,CAAC,yBAAiC,EAAE,cAAsB;QACvF,OAAO,IAAI,CAAC,GAAG,CAAC,4BAA4B,yBAAyB,IAAI,cAAc,EAAE,CAAC,CAAC;IAC7F,CAAC;;AAvDH,4BAwDC;AAtDQ,YAAE,GAAG,WAAW,CAAC"}
@@ -0,0 +1,37 @@
1
+ import Restful from '../../';
2
+ import { SuppressViolationRequest } from '../../../../types';
3
+ /**
4
+ * Service for providing the compliance violations of seller account/listings
5
+ */
6
+ export default class Compliance extends Restful {
7
+ static id: string;
8
+ get basePath(): string;
9
+ /**
10
+ * This call returns listing violation counts for a seller.
11
+ *
12
+ * @param complianceType A user passes in one or more compliance type values through this query parameter.
13
+ */
14
+ getListingViolationsSummary(complianceType?: string): Promise<any>;
15
+ /**
16
+ * This call returns specific listing violations for five different compliance types.
17
+ *
18
+ * @param complianceType A user passes in one or more compliance type values through this query parameter.
19
+ * @param offset The first policy violation to return based on its position in the collection of listing
20
+ * violations.
21
+ * @param listingId
22
+ * @param limit This query parameter is used if the user wants to set a limit on the number of listing violations
23
+ * that are returned in the current result set.
24
+ */
25
+ getListingViolations({ complianceType, offset, listingId, limit }?: {
26
+ complianceType?: string;
27
+ offset?: number;
28
+ listingId?: string;
29
+ limit?: number;
30
+ }): Promise<any>;
31
+ /**
32
+ * This call suppresses a listing violation for a specific listing. Only listing violations in the AT_RISK state (returned in the violations.complianceState field of the getListingViolations call) can be suppressed.
33
+ *
34
+ * @param body SuppressViolationRequest
35
+ */
36
+ suppressViolation(body: SuppressViolationRequest): Promise<any>;
37
+ }
@@ -0,0 +1,57 @@
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
+ * Service for providing the compliance violations of seller account/listings
9
+ */
10
+ class Compliance extends __1.default {
11
+ get basePath() {
12
+ return '/sell/compliance/v1';
13
+ }
14
+ /**
15
+ * This call returns listing violation counts for a seller.
16
+ *
17
+ * @param complianceType A user passes in one or more compliance type values through this query parameter.
18
+ */
19
+ getListingViolationsSummary(complianceType) {
20
+ return this.get(`/listing_violation_summary`, {
21
+ params: {
22
+ compliance_type: complianceType
23
+ }
24
+ });
25
+ }
26
+ /**
27
+ * This call returns specific listing violations for five different compliance types.
28
+ *
29
+ * @param complianceType A user passes in one or more compliance type values through this query parameter.
30
+ * @param offset The first policy violation to return based on its position in the collection of listing
31
+ * violations.
32
+ * @param listingId
33
+ * @param limit This query parameter is used if the user wants to set a limit on the number of listing violations
34
+ * that are returned in the current result set.
35
+ */
36
+ getListingViolations({ complianceType, offset, listingId, limit } = {}) {
37
+ return this.get(`/listing_violation`, {
38
+ params: {
39
+ compliance_type: complianceType,
40
+ offset,
41
+ listing_id: listingId,
42
+ limit
43
+ }
44
+ });
45
+ }
46
+ /**
47
+ * This call suppresses a listing violation for a specific listing. Only listing violations in the AT_RISK state (returned in the violations.complianceState field of the getListingViolations call) can be suppressed.
48
+ *
49
+ * @param body SuppressViolationRequest
50
+ */
51
+ suppressViolation(body) {
52
+ return this.post(`/suppress_listing_violation`, body);
53
+ }
54
+ }
55
+ exports.default = Compliance;
56
+ Compliance.id = 'Compliance';
57
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/api/restful/sell/compliance/index.ts"],"names":[],"mappings":";;;;;AAAA,+CAA6B;AAG7B;;GAEG;AACH,MAAqB,UAAW,SAAQ,WAAO;IAI7C,IAAI,QAAQ;QACV,OAAO,qBAAqB,CAAC;IAC/B,CAAC;IAED;;;;OAIG;IACI,2BAA2B,CAAC,cAAuB;QACxD,OAAO,IAAI,CAAC,GAAG,CAAC,4BAA4B,EAAE;YAC5C,MAAM,EAAE;gBACN,eAAe,EAAE,cAAc;aAChC;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;OASG;IACI,oBAAoB,CAAC,EAAC,cAAc,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,KAC4C,EAAE;QACjH,OAAO,IAAI,CAAC,GAAG,CAAC,oBAAoB,EAAE;YACpC,MAAM,EAAE;gBACN,eAAe,EAAE,cAAc;gBAC/B,MAAM;gBACN,UAAU,EAAE,SAAS;gBACrB,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED;;;;OAIG;IACI,iBAAiB,CAAC,IAA8B;QACrD,OAAO,IAAI,CAAC,IAAI,CAAC,6BAA6B,EAAE,IAAI,CAAC,CAAC;IACxD,CAAC;;AAlDH,6BAmDC;AAjDQ,aAAE,GAAG,YAAY,CAAC"}