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.
Files changed (319) hide show
  1. package/README.md +59 -53
  2. package/dist/api/apiFactory.d.ts +27 -0
  3. package/dist/api/apiFactory.js +94 -0
  4. package/dist/api/base.d.ts +10 -0
  5. package/dist/api/base.js +10 -0
  6. package/dist/api/index.d.ts +11 -0
  7. package/dist/api/index.js +11 -0
  8. package/dist/api/restful/buy/browse/index.d.ts +84 -0
  9. package/dist/api/restful/buy/browse/index.js +135 -0
  10. package/dist/api/restful/buy/deal/index.d.ts +55 -0
  11. package/dist/api/restful/buy/deal/index.js +73 -0
  12. package/dist/api/restful/buy/feed/index.d.ts +43 -0
  13. package/dist/api/restful/buy/feed/index.js +78 -0
  14. package/dist/api/restful/buy/index.d.ts +17 -0
  15. package/dist/api/restful/buy/index.js +8 -0
  16. package/dist/api/restful/buy/marketing/index.d.ts +27 -0
  17. package/dist/api/restful/buy/marketing/index.js +44 -0
  18. package/dist/api/restful/buy/marketplaceInsights/index.d.ts +28 -0
  19. package/dist/api/restful/buy/marketplaceInsights/index.js +44 -0
  20. package/dist/api/restful/buy/offer/index.d.ts +23 -0
  21. package/dist/api/restful/buy/offer/index.js +30 -0
  22. package/dist/api/restful/buy/order/index.d.ts +264 -0
  23. package/dist/api/restful/buy/order/index.js +362 -0
  24. package/dist/api/restful/commerce/catalog/index.d.ts +73 -0
  25. package/dist/api/restful/commerce/catalog/index.js +101 -0
  26. package/dist/api/restful/commerce/charity/index.d.ts +34 -0
  27. package/dist/api/restful/commerce/charity/index.js +49 -0
  28. package/dist/api/restful/commerce/identity/index.d.ts +14 -0
  29. package/dist/api/restful/commerce/identity/index.js +20 -0
  30. package/dist/api/restful/commerce/index.d.ts +15 -0
  31. package/dist/api/restful/commerce/index.js +7 -0
  32. package/dist/api/restful/commerce/notification/index.d.ts +117 -0
  33. package/dist/api/restful/commerce/notification/index.js +180 -0
  34. package/dist/api/restful/commerce/taxonomy/index.d.ts +78 -0
  35. package/dist/api/restful/commerce/taxonomy/index.js +128 -0
  36. package/dist/api/restful/commerce/translation/index.d.ts +15 -0
  37. package/dist/api/restful/commerce/translation/index.js +18 -0
  38. package/dist/api/restful/developer/analytics/index.d.ts +22 -0
  39. package/dist/api/restful/developer/analytics/index.js +38 -0
  40. package/dist/api/restful/developer/index.d.ts +7 -0
  41. package/dist/api/restful/developer/index.js +3 -0
  42. package/dist/api/restful/developer/keyManagement/index.d.ts +26 -0
  43. package/dist/api/restful/developer/keyManagement/index.js +34 -0
  44. package/dist/api/restful/index.d.ts +62 -0
  45. package/dist/api/restful/index.js +164 -0
  46. package/dist/api/restful/postOrder/cancellation/index.d.ts +57 -0
  47. package/dist/api/restful/postOrder/cancellation/index.js +88 -0
  48. package/dist/api/restful/postOrder/case/index.d.ts +63 -0
  49. package/dist/api/restful/postOrder/case/index.js +88 -0
  50. package/dist/api/restful/postOrder/index.d.ts +11 -0
  51. package/dist/api/restful/postOrder/index.js +5 -0
  52. package/dist/api/restful/postOrder/inquiry/index.d.ts +82 -0
  53. package/dist/api/restful/postOrder/inquiry/index.js +124 -0
  54. package/dist/api/restful/postOrder/return/index.d.ts +231 -0
  55. package/dist/api/restful/postOrder/return/index.js +354 -0
  56. package/dist/api/restful/sell/account/index.d.ts +217 -0
  57. package/dist/api/restful/sell/account/index.js +330 -0
  58. package/dist/api/restful/sell/analytics/index.d.ts +41 -0
  59. package/dist/api/restful/sell/analytics/index.js +54 -0
  60. package/dist/api/restful/sell/compliance/index.d.ts +37 -0
  61. package/dist/api/restful/sell/compliance/index.js +50 -0
  62. package/dist/api/restful/sell/feed/index.d.ts +151 -0
  63. package/dist/api/restful/sell/feed/index.js +248 -0
  64. package/dist/api/restful/sell/finances/index.d.ts +78 -0
  65. package/dist/api/restful/sell/finances/index.js +102 -0
  66. package/dist/api/restful/sell/fulfillment/index.d.ts +137 -0
  67. package/dist/api/restful/sell/fulfillment/index.js +192 -0
  68. package/dist/api/restful/sell/index.d.ts +29 -0
  69. package/dist/api/restful/sell/index.js +14 -0
  70. package/dist/api/restful/sell/inventory/index.d.ts +248 -0
  71. package/dist/api/restful/sell/inventory/index.js +339 -0
  72. package/dist/api/restful/sell/listing/index.d.ts +14 -0
  73. package/dist/api/restful/sell/listing/index.js +18 -0
  74. package/dist/api/restful/sell/logistics/index.d.ts +44 -0
  75. package/dist/api/restful/sell/logistics/index.js +59 -0
  76. package/dist/api/restful/sell/marketing/index.d.ts +443 -0
  77. package/dist/api/restful/sell/marketing/index.js +602 -0
  78. package/dist/api/restful/sell/metadata/index.d.ts +77 -0
  79. package/dist/api/restful/sell/metadata/index.js +124 -0
  80. package/dist/api/restful/sell/negotiation/index.d.ts +24 -0
  81. package/dist/api/restful/sell/negotiation/index.js +32 -0
  82. package/dist/api/restful/sell/recommendation/index.d.ts +26 -0
  83. package/dist/api/restful/sell/recommendation/index.js +32 -0
  84. package/dist/api/traditional/XMLRequest.d.ts +107 -0
  85. package/dist/api/traditional/XMLRequest.js +173 -0
  86. package/dist/api/traditional/clientAlerts/index.d.ts +9 -0
  87. package/dist/api/traditional/clientAlerts/index.js +11 -0
  88. package/dist/api/traditional/clientAlerts/types.d.ts +31 -0
  89. package/dist/api/traditional/clientAlerts/types.js +32 -0
  90. package/dist/api/traditional/fields.d.ts +1948 -0
  91. package/dist/api/traditional/fields.js +1946 -0
  92. package/dist/api/traditional/finding/index.d.ts +12 -0
  93. package/dist/api/traditional/finding/index.js +13 -0
  94. package/dist/api/traditional/index.d.ts +17 -0
  95. package/dist/api/traditional/index.js +181 -0
  96. package/dist/api/traditional/merchandising/index.d.ts +7 -0
  97. package/dist/api/traditional/merchandising/index.js +8 -0
  98. package/dist/api/traditional/shopping/index.d.ts +11 -0
  99. package/dist/api/traditional/shopping/index.js +13 -0
  100. package/dist/api/traditional/trading/index.d.ts +142 -0
  101. package/dist/api/traditional/trading/index.js +143 -0
  102. package/dist/auth/authNAuth.d.ts +49 -0
  103. package/dist/auth/authNAuth.js +116 -0
  104. package/dist/auth/index.d.ts +17 -0
  105. package/dist/auth/index.js +25 -0
  106. package/dist/auth/oAuth2.d.ts +95 -0
  107. package/dist/auth/oAuth2.js +259 -0
  108. package/dist/eBayApi.d.ts +58 -0
  109. package/dist/eBayApi.js +93 -0
  110. package/dist/ebay-api.min.mjs +1 -0
  111. package/dist/enums/apiEnums.d.ts +49 -0
  112. package/dist/enums/apiEnums.js +51 -0
  113. package/dist/enums/index.d.ts +2 -0
  114. package/dist/enums/index.js +2 -0
  115. package/dist/enums/restfulEnums.d.ts +970 -0
  116. package/dist/enums/restfulEnums.js +1013 -0
  117. package/dist/errors/index.d.ts +66 -0
  118. package/dist/errors/index.js +184 -0
  119. package/dist/nanoevents.d.ts +6 -0
  120. package/dist/nanoevents.js +20 -0
  121. package/dist/request.d.ts +26 -0
  122. package/dist/request.js +43 -0
  123. package/dist/types/apiTypes.d.ts +33 -0
  124. package/dist/types/apiTypes.js +1 -0
  125. package/dist/types/index.d.ts +3 -0
  126. package/dist/types/index.js +3 -0
  127. package/dist/types/restfulTypes.d.ts +1082 -0
  128. package/dist/types/restfulTypes.js +1 -0
  129. package/dist/types/traditonalTypes.d.ts +34 -0
  130. package/dist/types/traditonalTypes.js +1 -0
  131. package/lib/api/apiFactory.d.ts +8 -8
  132. package/lib/api/apiFactory.js +41 -42
  133. package/lib/api/base.d.ts +3 -6
  134. package/lib/api/base.js +3 -15
  135. package/lib/api/index.d.ts +4 -4
  136. package/lib/api/index.js +4 -5
  137. package/lib/api/restful/buy/browse/index.d.ts +2 -2
  138. package/lib/api/restful/buy/browse/index.js +2 -3
  139. package/lib/api/restful/buy/deal/index.d.ts +1 -1
  140. package/lib/api/restful/buy/deal/index.js +2 -3
  141. package/lib/api/restful/buy/feed/index.d.ts +2 -2
  142. package/lib/api/restful/buy/feed/index.js +2 -3
  143. package/lib/api/restful/buy/index.d.ts +8 -8
  144. package/lib/api/restful/buy/index.js +14 -15
  145. package/lib/api/restful/buy/marketing/index.d.ts +2 -2
  146. package/lib/api/restful/buy/marketing/index.js +2 -3
  147. package/lib/api/restful/buy/marketplaceInsights/index.d.ts +2 -2
  148. package/lib/api/restful/buy/marketplaceInsights/index.js +2 -3
  149. package/lib/api/restful/buy/offer/index.d.ts +2 -2
  150. package/lib/api/restful/buy/offer/index.js +2 -3
  151. package/lib/api/restful/buy/order/index.d.ts +3 -3
  152. package/lib/api/restful/buy/order/index.js +3 -4
  153. package/lib/api/restful/commerce/catalog/index.d.ts +2 -2
  154. package/lib/api/restful/commerce/catalog/index.js +2 -3
  155. package/lib/api/restful/commerce/charity/index.d.ts +1 -1
  156. package/lib/api/restful/commerce/charity/index.js +2 -3
  157. package/lib/api/restful/commerce/identity/index.d.ts +1 -1
  158. package/lib/api/restful/commerce/identity/index.js +2 -3
  159. package/lib/api/restful/commerce/index.d.ts +7 -7
  160. package/lib/api/restful/commerce/index.js +12 -13
  161. package/lib/api/restful/commerce/notification/index.d.ts +2 -2
  162. package/lib/api/restful/commerce/notification/index.js +2 -3
  163. package/lib/api/restful/commerce/taxonomy/index.d.ts +1 -1
  164. package/lib/api/restful/commerce/taxonomy/index.js +2 -3
  165. package/lib/api/restful/commerce/translation/index.d.ts +2 -2
  166. package/lib/api/restful/commerce/translation/index.js +2 -3
  167. package/lib/api/restful/developer/analytics/index.d.ts +1 -1
  168. package/lib/api/restful/developer/analytics/index.js +2 -3
  169. package/lib/api/restful/developer/index.d.ts +3 -3
  170. package/lib/api/restful/developer/index.js +4 -5
  171. package/lib/api/restful/developer/keyManagement/index.d.ts +1 -1
  172. package/lib/api/restful/developer/keyManagement/index.js +2 -3
  173. package/lib/api/restful/index.d.ts +6 -6
  174. package/lib/api/restful/index.js +5 -6
  175. package/lib/api/restful/postOrder/cancellation/index.d.ts +2 -2
  176. package/lib/api/restful/postOrder/cancellation/index.js +2 -3
  177. package/lib/api/restful/postOrder/case/index.d.ts +2 -2
  178. package/lib/api/restful/postOrder/case/index.js +2 -3
  179. package/lib/api/restful/postOrder/index.d.ts +5 -5
  180. package/lib/api/restful/postOrder/index.js +8 -9
  181. package/lib/api/restful/postOrder/inquiry/index.d.ts +2 -2
  182. package/lib/api/restful/postOrder/inquiry/index.js +2 -3
  183. package/lib/api/restful/postOrder/return/index.d.ts +3 -3
  184. package/lib/api/restful/postOrder/return/index.js +2 -3
  185. package/lib/api/restful/sell/account/index.d.ts +3 -3
  186. package/lib/api/restful/sell/account/index.js +2 -3
  187. package/lib/api/restful/sell/analytics/index.d.ts +2 -2
  188. package/lib/api/restful/sell/analytics/index.js +2 -3
  189. package/lib/api/restful/sell/compliance/index.d.ts +2 -2
  190. package/lib/api/restful/sell/compliance/index.js +2 -3
  191. package/lib/api/restful/sell/feed/index.d.ts +2 -2
  192. package/lib/api/restful/sell/feed/index.js +4 -5
  193. package/lib/api/restful/sell/finances/index.d.ts +1 -1
  194. package/lib/api/restful/sell/finances/index.js +2 -3
  195. package/lib/api/restful/sell/fulfillment/index.d.ts +2 -2
  196. package/lib/api/restful/sell/fulfillment/index.js +4 -5
  197. package/lib/api/restful/sell/index.d.ts +14 -14
  198. package/lib/api/restful/sell/index.js +26 -27
  199. package/lib/api/restful/sell/inventory/index.d.ts +2 -2
  200. package/lib/api/restful/sell/inventory/index.js +2 -3
  201. package/lib/api/restful/sell/listing/index.d.ts +1 -1
  202. package/lib/api/restful/sell/listing/index.js +2 -3
  203. package/lib/api/restful/sell/logistics/index.d.ts +1 -1
  204. package/lib/api/restful/sell/logistics/index.js +2 -3
  205. package/lib/api/restful/sell/marketing/index.d.ts +2 -2
  206. package/lib/api/restful/sell/marketing/index.js +2 -3
  207. package/lib/api/restful/sell/metadata/index.d.ts +1 -1
  208. package/lib/api/restful/sell/metadata/index.js +2 -3
  209. package/lib/api/restful/sell/negotiation/index.d.ts +1 -1
  210. package/lib/api/restful/sell/negotiation/index.js +2 -3
  211. package/lib/api/restful/sell/recommendation/index.d.ts +2 -2
  212. package/lib/api/restful/sell/recommendation/index.js +2 -3
  213. package/lib/api/traditional/XMLRequest.d.ts +15 -11
  214. package/lib/api/traditional/XMLRequest.js +17 -33
  215. package/lib/api/traditional/clientAlerts/index.d.ts +1 -1
  216. package/lib/api/traditional/clientAlerts/index.js +2 -3
  217. package/lib/api/traditional/clientAlerts/types.js +0 -1
  218. package/lib/api/traditional/fields.d.ts +1 -1
  219. package/lib/api/traditional/fields.js +0 -1
  220. package/lib/api/traditional/finding/index.js +0 -1
  221. package/lib/api/traditional/index.d.ts +2 -2
  222. package/lib/api/traditional/index.js +26 -21
  223. package/lib/api/traditional/merchandising/index.js +0 -1
  224. package/lib/api/traditional/shopping/index.js +0 -1
  225. package/lib/api/traditional/trading/index.js +0 -1
  226. package/lib/auth/authNAuth.d.ts +4 -4
  227. package/lib/auth/authNAuth.js +12 -13
  228. package/lib/auth/index.d.ts +5 -5
  229. package/lib/auth/index.js +6 -7
  230. package/lib/auth/oAuth2.d.ts +11 -6
  231. package/lib/auth/oAuth2.js +11 -7
  232. package/lib/eBayApi.d.ts +58 -0
  233. package/lib/eBayApi.js +130 -0
  234. package/lib/ebay-api.min.js +1 -2
  235. package/lib/enums/apiEnums.js +0 -1
  236. package/lib/enums/index.d.ts +2 -2
  237. package/lib/enums/index.js +7 -4
  238. package/lib/enums/restfulEnums.js +0 -1
  239. package/lib/errors/index.js +0 -1
  240. package/lib/index.d.ts +1 -55
  241. package/lib/index.js +2 -92
  242. package/lib/nanoevents.d.ts +6 -0
  243. package/lib/nanoevents.js +24 -0
  244. package/lib/package.json +3 -0
  245. package/lib/request.d.ts +6 -6
  246. package/lib/request.js +2 -3
  247. package/lib/types/apiTypes.d.ts +10 -10
  248. package/lib/types/apiTypes.js +0 -1
  249. package/lib/types/index.d.ts +3 -3
  250. package/lib/types/index.js +8 -5
  251. package/lib/types/restfulTypes.d.ts +191 -191
  252. package/lib/types/restfulTypes.js +0 -1
  253. package/lib/types/traditonalTypes.d.ts +15 -15
  254. package/lib/types/traditonalTypes.js +0 -1
  255. package/package.json +98 -33
  256. package/lib/api/apiFactory.js.map +0 -1
  257. package/lib/api/base.js.map +0 -1
  258. package/lib/api/index.js.map +0 -1
  259. package/lib/api/restful/buy/browse/index.js.map +0 -1
  260. package/lib/api/restful/buy/deal/index.js.map +0 -1
  261. package/lib/api/restful/buy/feed/index.js.map +0 -1
  262. package/lib/api/restful/buy/index.js.map +0 -1
  263. package/lib/api/restful/buy/marketing/index.js.map +0 -1
  264. package/lib/api/restful/buy/marketplaceInsights/index.js.map +0 -1
  265. package/lib/api/restful/buy/offer/index.js.map +0 -1
  266. package/lib/api/restful/buy/order/index.js.map +0 -1
  267. package/lib/api/restful/commerce/catalog/index.js.map +0 -1
  268. package/lib/api/restful/commerce/charity/index.js.map +0 -1
  269. package/lib/api/restful/commerce/identity/index.js.map +0 -1
  270. package/lib/api/restful/commerce/index.js.map +0 -1
  271. package/lib/api/restful/commerce/notification/index.js.map +0 -1
  272. package/lib/api/restful/commerce/taxonomy/index.js.map +0 -1
  273. package/lib/api/restful/commerce/translation/index.js.map +0 -1
  274. package/lib/api/restful/developer/analytics/index.js.map +0 -1
  275. package/lib/api/restful/developer/index.js.map +0 -1
  276. package/lib/api/restful/developer/keyManagement/index.js.map +0 -1
  277. package/lib/api/restful/index.js.map +0 -1
  278. package/lib/api/restful/postOrder/cancellation/index.js.map +0 -1
  279. package/lib/api/restful/postOrder/case/index.js.map +0 -1
  280. package/lib/api/restful/postOrder/index.js.map +0 -1
  281. package/lib/api/restful/postOrder/inquiry/index.js.map +0 -1
  282. package/lib/api/restful/postOrder/return/index.js.map +0 -1
  283. package/lib/api/restful/sell/account/index.js.map +0 -1
  284. package/lib/api/restful/sell/analytics/index.js.map +0 -1
  285. package/lib/api/restful/sell/compliance/index.js.map +0 -1
  286. package/lib/api/restful/sell/feed/index.js.map +0 -1
  287. package/lib/api/restful/sell/finances/index.js.map +0 -1
  288. package/lib/api/restful/sell/fulfillment/index.js.map +0 -1
  289. package/lib/api/restful/sell/index.js.map +0 -1
  290. package/lib/api/restful/sell/inventory/index.js.map +0 -1
  291. package/lib/api/restful/sell/listing/index.js.map +0 -1
  292. package/lib/api/restful/sell/logistics/index.js.map +0 -1
  293. package/lib/api/restful/sell/marketing/index.js.map +0 -1
  294. package/lib/api/restful/sell/metadata/index.js.map +0 -1
  295. package/lib/api/restful/sell/negotiation/index.js.map +0 -1
  296. package/lib/api/restful/sell/recommendation/index.js.map +0 -1
  297. package/lib/api/traditional/XMLRequest.js.map +0 -1
  298. package/lib/api/traditional/clientAlerts/index.js.map +0 -1
  299. package/lib/api/traditional/clientAlerts/types.js.map +0 -1
  300. package/lib/api/traditional/fields.js.map +0 -1
  301. package/lib/api/traditional/finding/index.js.map +0 -1
  302. package/lib/api/traditional/index.js.map +0 -1
  303. package/lib/api/traditional/merchandising/index.js.map +0 -1
  304. package/lib/api/traditional/shopping/index.js.map +0 -1
  305. package/lib/api/traditional/trading/index.js.map +0 -1
  306. package/lib/auth/authNAuth.js.map +0 -1
  307. package/lib/auth/index.js.map +0 -1
  308. package/lib/auth/oAuth2.js.map +0 -1
  309. package/lib/ebay-api.min.js.map +0 -1
  310. package/lib/enums/apiEnums.js.map +0 -1
  311. package/lib/enums/index.js.map +0 -1
  312. package/lib/enums/restfulEnums.js.map +0 -1
  313. package/lib/errors/index.js.map +0 -1
  314. package/lib/index.js.map +0 -1
  315. package/lib/request.js.map +0 -1
  316. package/lib/types/apiTypes.js.map +0 -1
  317. package/lib/types/index.js.map +0 -1
  318. package/lib/types/restfulTypes.js.map +0 -1
  319. package/lib/types/traditonalTypes.js.map +0 -1
@@ -0,0 +1,602 @@
1
+ import Restful from '../../index.js';
2
+ /**
3
+ * <p>The <i>Marketing API </i> offers two platforms that sellers can use to promote and advertise their products:
4
+ * </p> <ul><li><b>Promoted Listings</b> is an eBay ad service that lets sellers set up <i>ad campaigns </i>
5
+ * for the products they want to promote. eBay displays the ads in search results and in other
6
+ * marketing modules as <b>SPONSORED</b> listings.
7
+ */
8
+ export default class Marketing extends Restful {
9
+ get basePath() {
10
+ return '/sell/marketing/v1';
11
+ }
12
+ /**
13
+ * This method creates an ad for each inventory reference ID specified in the request and associates the newly
14
+ * created ads with the specified campaign.
15
+ *
16
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created.
17
+ * @param body This type defines the fields for the bulkCreateAdsByInventoryReference request.
18
+ */
19
+ bulkCreateAdsByInventoryReference(campaignId, body) {
20
+ campaignId = encodeURIComponent(campaignId);
21
+ return this.post(`/ad_campaign/${campaignId}/bulk_create_ads_by_inventory_reference`, body);
22
+ }
23
+ /**
24
+ * This method creates an ad for each listing ID specified in the request and associates the newly created ads with
25
+ * the specified campaign.
26
+ *
27
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
28
+ * a seller's campaign IDs by calling getCampaigns.
29
+ * @param body The container for the bulk request to create ads for eBay listing IDs. eBay listing IDs are
30
+ * generated when the listing is created on eBay.
31
+ */
32
+ bulkCreateAdsByListingId(campaignId, body) {
33
+ campaignId = encodeURIComponent(campaignId);
34
+ return this.post(`/ad_campaign/${campaignId}/bulk_create_ads_by_listing_id`, body);
35
+ }
36
+ /**
37
+ * This method deletes a set of ads, as specified by a list of inventory reference IDs, from the specified
38
+ * campaign.
39
+ *
40
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
41
+ * a seller's campaign IDs by calling getCampaigns.
42
+ * @param body This type defines the fields for a bulkDeleteAdsByInventoryReference request.
43
+ */
44
+ bulkDeleteAdsByInventoryReference(campaignId, body) {
45
+ campaignId = encodeURIComponent(campaignId);
46
+ return this.post(`/ad_campaign/${campaignId}/bulk_delete_ads_by_inventory_reference`, body);
47
+ }
48
+ /**
49
+ * This method deletes a set of ads, as specified by a list of listing IDs, from the specified campaign.
50
+ *
51
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
52
+ * a seller's campaign IDs by calling getCampaigns.
53
+ * @param body This type defines the fields for the bulkDeleteAdsByListingId request.
54
+ */
55
+ bulkDeleteAdsByListingId(campaignId, body) {
56
+ campaignId = encodeURIComponent(campaignId);
57
+ return this.post(`/ad_campaign/${campaignId}/bulk_delete_ads_by_listing_id`, body);
58
+ }
59
+ /**
60
+ * This method replaces an ad bid based on a list of inventory references IDs associated with the specified
61
+ * campaign.
62
+ *
63
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created.
64
+ * @param body This type defines the fields for the BulkCreateAdsByInventoryReference request.
65
+ */
66
+ bulkUpdateAdsBidByInventoryReference(campaignId, body) {
67
+ campaignId = encodeURIComponent(campaignId);
68
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_bid_by_inventory_reference`, body);
69
+ }
70
+ /**
71
+ * This method replaces an ad bid based on a supplied list of listing IDs that are associated with the specified
72
+ * campaign.
73
+ *
74
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
75
+ * a seller's campaign IDs by calling getCampaigns.
76
+ * @param body Container for the bulk request to update ads.
77
+ */
78
+ bulkUpdateAdsBidByListingId(campaignId, body) {
79
+ campaignId = encodeURIComponent(campaignId);
80
+ return this.post(`/ad_campaign/${campaignId}/bulk_update_ads_bid_by_listing_id`, body);
81
+ }
82
+ /**
83
+ * This method retrieves all the ads for the specified campaign.
84
+ *
85
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
86
+ * a seller's campaign IDs by calling getCampaigns.
87
+ * @param limit Specifies the maximum number of ads to return on a page in the paginated response. Default: 10
88
+ * Maximum: 500
89
+ * @param listingIds A comma separated list of eBay listing IDs. The response includes only active ads (ads
90
+ * associated with a RUNNING campaign).
91
+ * @param offset Specifies the number of ads to skip in the result set before returning the first ad in the
92
+ * paginated response.
93
+ */
94
+ getAds(campaignId, { limit, listingIds, offset } = {}) {
95
+ campaignId = encodeURIComponent(campaignId);
96
+ return this.get(`/ad_campaign/${campaignId}/ad`, {
97
+ params: {
98
+ limit,
99
+ listing_ids: listingIds,
100
+ offset
101
+ }
102
+ });
103
+ }
104
+ /**
105
+ * This method creates an ad for the specified listing ID, sets the bid percentage for that specific item, and
106
+ * associates the ad with the specified campaign.
107
+ *
108
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
109
+ * a seller's campaign IDs by calling getCampaigns.
110
+ * @param body This type defines the fields for the createAd request.
111
+ */
112
+ createAdByListingId(campaignId, body) {
113
+ campaignId = encodeURIComponent(campaignId);
114
+ return this.post(`/ad_campaign/${campaignId}/ad`, body);
115
+ }
116
+ /**
117
+ * This method creates an ad for the specified inventory reference ID, sets the bid percentage for that specific
118
+ * item, and associates the ad with the specified campaign.
119
+ *
120
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
121
+ * a seller's campaign IDs by calling getCampaigns.
122
+ * @param body This type defines the fields for the createAdsByInventoryReference request.
123
+ */
124
+ createAdsByInventoryReference(campaignId, body) {
125
+ campaignId = encodeURIComponent(campaignId);
126
+ return this.post(`/ad_campaign/${campaignId}/create_ads_by_inventory_reference`, body);
127
+ }
128
+ /**
129
+ * This method retrieves the specified ad from the specified campaign.
130
+ *
131
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
132
+ * a seller's campaign IDs by calling getCampaigns.
133
+ * @param adId Identifier of an ad. This ID was generated when the ad was created.
134
+ */
135
+ getAd(campaignId, adId) {
136
+ campaignId = encodeURIComponent(campaignId);
137
+ adId = encodeURIComponent(adId);
138
+ return this.get(`/ad_campaign/${campaignId}/ad/${adId}`);
139
+ }
140
+ /**
141
+ * This method retrieves the specified ad from the specified campaign.
142
+ *
143
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created.
144
+ * @param adId Identifier of an ad. This ID was generated when the ad was created.
145
+ */
146
+ deleteAd(campaignId, adId) {
147
+ campaignId = encodeURIComponent(campaignId);
148
+ adId = encodeURIComponent(adId);
149
+ return this.delete(`/ad_campaign/${campaignId}/ad/${adId}`);
150
+ }
151
+ /**
152
+ * This method deletes ads using a list of seller inventory reference IDs that are associated with the specified
153
+ * campaign ID.
154
+ *
155
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
156
+ * a seller's campaign IDs by calling getCampaigns.
157
+ */
158
+ deleteAdsByInventoryReference(campaignId) {
159
+ campaignId = encodeURIComponent(campaignId);
160
+ return this.post(`/ad_campaign/${campaignId}/delete_ads_by_inventory_reference`);
161
+ }
162
+ /**
163
+ * This method retrieves ads from the specified campaign using the seller's inventory reference ID and inventory
164
+ * reference type.
165
+ *
166
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
167
+ * a seller's campaign IDs by calling getCampaigns.
168
+ * @param inventoryReferenceId The inventory reference ID associated with the ad you want returned.
169
+ * @param inventoryReferenceType The type of the inventory reference ID. Set this value to either INVENTORY_ITEM (a
170
+ * single listing) or INVENTORY_ITEM_GROUP (a multi-variation listing).
171
+ */
172
+ getAdsByInventoryReference(campaignId, inventoryReferenceId, inventoryReferenceType) {
173
+ campaignId = encodeURIComponent(campaignId);
174
+ return this.get(`/ad_campaign/${campaignId}/get_ads_by_inventory_reference`, {
175
+ params: {
176
+ inventory_reference_id: inventoryReferenceId,
177
+ inventory_reference_type: inventoryReferenceType
178
+ }
179
+ });
180
+ }
181
+ /**
182
+ * This method updates the bid for the specified ad in the specified campaign. In the request, supply the
183
+ * campaign_id and ad_id as a URI parameters.
184
+ *
185
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
186
+ * a seller's campaign IDs by calling getCampaigns.
187
+ * @param adId A unique eBay-assigned ID for an ad that's generated when an ad is created.
188
+ * @param body This type defines the fields for the updateBid request.
189
+ */
190
+ updateBid(campaignId, adId, body) {
191
+ campaignId = encodeURIComponent(campaignId);
192
+ adId = encodeURIComponent(adId);
193
+ return this.post(`/ad_campaign/${campaignId}/ad/${adId}/update_bid`, body);
194
+ }
195
+ /**
196
+ * This method clones (makes a copy of) the specified campaign.
197
+ *
198
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
199
+ * a seller's campaign IDs by calling getCampaigns.
200
+ * @param body This type defines the fields for a clone campaign request.
201
+ */
202
+ cloneCampaign(campaignId, body) {
203
+ campaignId = encodeURIComponent(campaignId);
204
+ return this.post(`/ad_campaign/${campaignId}/clone`, body);
205
+ }
206
+ /**
207
+ * This method retrieves the details for all the campaigns of a seller, including the campaign's the selection
208
+ * rules.
209
+ *
210
+ * @param campaignName Specifies the campaign name. The results are filtered to include only the campaign by the
211
+ * specified name.
212
+ * @param campaignStatus Specifies the campaign status. The results are filtered to include only campaigns that are
213
+ * in the specified states.
214
+ * @param endDateRange Specifies the range of a campaign's end date. The results are filtered to include only
215
+ * campaigns with an end date that is within specified range.
216
+ * @param limit Specifies the maximum number of campaigns to return on a page in the paginated response. Default:
217
+ * 10 Maximum: 500
218
+ * @param offset Specifies the number of campaigns to skip in the result set before returning the first report in
219
+ * the paginated response.
220
+ * @param startDateRange Specifies the range of a campaign's start date in which to filter the results.
221
+ */
222
+ getCampaigns({ campaignName, campaignStatus, endDateRange, limit, offset, startDateRange } = {}) {
223
+ return this.get(`/ad_campaign`, {
224
+ params: {
225
+ campaign_name: campaignName,
226
+ campaign_status: campaignStatus,
227
+ end_date_range: endDateRange,
228
+ limit,
229
+ offset,
230
+ start_date_range: startDateRange
231
+ }
232
+ });
233
+ }
234
+ /**
235
+ * This method retrieves the details of a single campaign, as specified with the campaign_id query parameter.
236
+ *
237
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
238
+ * a seller's campaign IDs by calling getCampaigns.
239
+ */
240
+ getCampaign(campaignId) {
241
+ campaignId = encodeURIComponent(campaignId);
242
+ return this.get(`/ad_campaign/${campaignId}`);
243
+ }
244
+ /**
245
+ * This method creates a Promoted Listings ad campaign.
246
+ *
247
+ * @param body his type defines the fields for the create campaign request.
248
+ */
249
+ createCampaign(body) {
250
+ return this.post(`/ad_campaign`, body);
251
+ }
252
+ /**
253
+ * This method deletes the campaign specified by the campaign_id query parameter.
254
+ *
255
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
256
+ * a seller's campaign IDs by calling getCampaigns.
257
+ */
258
+ deleteCampaign(campaignId) {
259
+ campaignId = encodeURIComponent(campaignId);
260
+ return this.delete(`/ad_campaign/${campaignId}`);
261
+ }
262
+ /**
263
+ * This method ends an active (RUNNINGM) or paused campaign. Specify the campaign you want to end by supplying its
264
+ * campaign ID in a query parameter.
265
+ *
266
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
267
+ * a seller's campaign IDs by calling getCampaigns.
268
+ */
269
+ endCampaign(campaignId) {
270
+ campaignId = encodeURIComponent(campaignId);
271
+ return this.post(`/ad_campaign/${campaignId}/end`);
272
+ }
273
+ /**
274
+ * This method retrieves the campaign containing the listing that is specified using either an eBay listing ID or
275
+ * an inventory reference ID and inventory reference type.
276
+ *
277
+ * @param inventoryReferenceId The seller's inventory reference ID of the listing to be used to find the campaign
278
+ * in which it is associated.
279
+ * @param inventoryReferenceType The type of the seller's inventory reference ID, which is a listing or group of
280
+ * items.
281
+ * @param listingId Identifier of the eBay listing associated with the ad.
282
+ */
283
+ findCampaignByAdReference({ inventoryReferenceId, inventoryReferenceType, listingId } = {}) {
284
+ return this.get(`/ad_campaign/find_campaign_by_ad_reference`, {
285
+ params: {
286
+ inventory_reference_id: inventoryReferenceId,
287
+ inventory_reference_type: inventoryReferenceType,
288
+ listing_id: listingId
289
+ }
290
+ });
291
+ }
292
+ /**
293
+ * This method retrieves the details of a single campaign, as specified with the campaign_name query parameter.
294
+ *
295
+ * @param campaignName Name of the campaign.
296
+ */
297
+ getCampaignByName(campaignName) {
298
+ return this.get(`/ad_campaign/get_campaign_by_name`, {
299
+ params: {
300
+ campaign_name: campaignName
301
+ }
302
+ });
303
+ }
304
+ /**
305
+ * This method pauses an active (RUNNING) campaign. You can restarted by calling resumeCampaign, as long as the
306
+ * campaign's end date is in the future..
307
+ *
308
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
309
+ * a seller's campaign IDs by calling getCampaigns.
310
+ */
311
+ pauseCampaign(campaignId) {
312
+ campaignId = encodeURIComponent(campaignId);
313
+ return this.post(`/ad_campaign/${campaignId}/pause`);
314
+ }
315
+ /**
316
+ * This method resumes a paused campaign, as long as it's end date is in the future.
317
+ *
318
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
319
+ * a seller's campaign IDs by calling getCampaigns.
320
+ */
321
+ resumeCampaign(campaignId) {
322
+ campaignId = encodeURIComponent(campaignId);
323
+ return this.post(`/ad_campaign/${campaignId}/resume`);
324
+ }
325
+ /**
326
+ * This method replaces the name and the start and end dates of a campaign.
327
+ *
328
+ * @param campaignId A unique eBay-assigned ID for an ad campaign that's generated when a campaign is created. Get
329
+ * a seller's campaign IDs by calling getCampaigns.
330
+ * @param body This type defines the fields to updated the campaign name and start and end dates.
331
+ */
332
+ updateCampaignIdentification(campaignId, body) {
333
+ campaignId = encodeURIComponent(campaignId);
334
+ return this.post(`/ad_campaign/${campaignId}/update_campaign_identification`, body);
335
+ }
336
+ /**
337
+ * This call downloads the report as specified by the report_id path parameter.
338
+ *
339
+ * @param reportId The unique ID of the Promoted Listings report you want to get. This ID is generated by eBay when
340
+ * you run a report task with a call to createReportTask.
341
+ */
342
+ getReport(reportId) {
343
+ reportId = encodeURIComponent(reportId);
344
+ return this.get(`/ad_report/${reportId}`);
345
+ }
346
+ /**
347
+ * This call retrieves information that details the fields used in each of the Promoted Listings reports.
348
+ */
349
+ getReportMetadata() {
350
+ return this.get(`/ad_report_metadata`);
351
+ }
352
+ /**
353
+ * This call retrieves metadata that details the fields used by the Promoted Listings report type that's specified
354
+ * by the report_type path parameter.
355
+ *
356
+ * @param reportType The name of the report type whose metadata you want to get.
357
+ */
358
+ getReportMetadataForReportType(reportType) {
359
+ reportType = encodeURIComponent(reportType);
360
+ return this.get(`/ad_report_metadata/${reportType}`);
361
+ }
362
+ /**
363
+ * This method returns information on all the existing report tasks related to a seller.
364
+ *
365
+ * @param limit Specifies the maximum number of report tasks to return on a page in the paginated response.
366
+ * Default: 10 Maximum: 500
367
+ * @param offset Specifies the number of report tasks to skip in the result set before returning the first report
368
+ * in the paginated response.
369
+ * @param reportTaskStatuses This parameter filters the returned report tasks by their status. Supply a
370
+ * comma-separated list of the report statuses you want returned.
371
+ */
372
+ getReportTasks({ limit, offset, reportTaskStatuses } = {}) {
373
+ return this.get(`/ad_report_task`, {
374
+ params: {
375
+ limit,
376
+ offset,
377
+ report_task_statuses: reportTaskStatuses
378
+ }
379
+ });
380
+ }
381
+ /**
382
+ * This call returns the details of a specific Promoted Listings report task, as specified by the report_task_id
383
+ * path parameter. T
384
+ *
385
+ * @param reportTaskId A unique eBay-assigned ID for the report task that's generated when the report task is
386
+ * created by a call to createReportTask.
387
+ */
388
+ getReportTask(reportTaskId) {
389
+ reportTaskId = encodeURIComponent(reportTaskId);
390
+ return this.get(`/ad_report_task/${reportTaskId}`);
391
+ }
392
+ /**
393
+ * This method creates a report task, which generates a Promoted Listings report based on the values specified in
394
+ * the call.
395
+ *
396
+ * @param body The container for the fields that define the report task.
397
+ */
398
+ createReportTask(body) {
399
+ return this.post(`/ad_report_task`, body);
400
+ }
401
+ /**
402
+ * This call deletes the report task specified by the report_task_id path parameter.
403
+ *
404
+ * @param reportTaskId A unique eBay-assigned ID for the report task that's generated when the report task is
405
+ * created by a call to createReportTask.
406
+ */
407
+ deleteReportTask(reportTaskId) {
408
+ reportTaskId = encodeURIComponent(reportTaskId);
409
+ return this.delete(`/ad_report_task/${reportTaskId}`);
410
+ }
411
+ /**
412
+ * This method creates an item price markdown promotion (know simply as a &quot;markdown promotion&quot;) where a
413
+ * discount amount is applied directly to the items included the promotion.
414
+ *
415
+ * @param body This type defines the fields that describe an item price markdown promotion.
416
+ */
417
+ createItemPriceMarkdownPromotion(body) {
418
+ return this.post(`/item_price_markdown`, body);
419
+ }
420
+ /**
421
+ * This method updates the specified item price markdown promotion with the new configuration that you supply in
422
+ * the payload of the request.
423
+ *
424
+ * @param promotionId The ID of the promotion you want to update.
425
+ * @param body This type defines the fields that describe an item price markdown promotion.
426
+ */
427
+ updateItemPriceMarkdownPromotion(promotionId, body) {
428
+ promotionId = encodeURIComponent(promotionId);
429
+ return this.put(`/item_price_markdown/${promotionId}`, body);
430
+ }
431
+ /**
432
+ * This method deletes the item price markdown promotion specified by the promotion_id path parameter.
433
+ *
434
+ * @param promotionId The ID of the promotion you want to delete.
435
+ */
436
+ deleteItemPriceMarkdownPromotion(promotionId) {
437
+ promotionId = encodeURIComponent(promotionId);
438
+ return this.delete(`/item_price_markdown/${promotionId}`);
439
+ }
440
+ /**
441
+ * This method returns the complete details of the item price markdown promotion that's indicated by the
442
+ * promotion_id path parameter.
443
+ *
444
+ * @param promotionId The ID of the promotion you want to retrieve.
445
+ */
446
+ getItemPriceMarkdownPromotion(promotionId) {
447
+ promotionId = encodeURIComponent(promotionId);
448
+ return this.get(`/item_price_markdown/${promotionId}`);
449
+ }
450
+ /**
451
+ * This method creates an item promotion (known casually as a &quot;threshold promotion&quot;) where the buyer
452
+ * receives a discount when they meet the buying criteria that's set for the promotion.
453
+ *
454
+ * @param body This type defines the fields that describe an item promotion.
455
+ */
456
+ createItemPromotion(body) {
457
+ return this.post(`/item_promotion`, body);
458
+ }
459
+ /**
460
+ * This method updates the specified threshold promotion with the new configuration that you supply in the request.
461
+ *
462
+ * @param promotionId The ID of the promotion you want to retrieve. The promotion ID is a unique eBay-assigned
463
+ * value that's generated when the promotion is created.
464
+ * @param body type defines the fields that describe an item promotion.
465
+ */
466
+ updateItemPromotion(promotionId, body) {
467
+ promotionId = encodeURIComponent(promotionId);
468
+ return this.put(`/item_promotion/${promotionId}`, body);
469
+ }
470
+ /**
471
+ * This method deletes the threshold promotion specified by the promotion_id path parameter.
472
+ *
473
+ * @param promotionId The ID of the promotion you want to retrieve. The promotion ID is a unique eBay-assigned
474
+ * value that's generated when the promotion is created.
475
+ */
476
+ deleteItemPromotion(promotionId) {
477
+ promotionId = encodeURIComponent(promotionId);
478
+ return this.delete(`/item_promotion/${promotionId}`);
479
+ }
480
+ /**
481
+ * This method returns the complete details of the threshold promotion specified by the promotion_id path
482
+ * parameter.
483
+ *
484
+ * @param promotionId The ID of the promotion you want to retrieve. The promotion ID is a unique eBay-assigned
485
+ * value that's generated when the promotion is created.
486
+ */
487
+ getItemPromotion(promotionId) {
488
+ promotionId = encodeURIComponent(promotionId);
489
+ return this.get(`/item_promotion/${promotionId}`);
490
+ }
491
+ /**
492
+ * This method returns the set of listings associated with the promotion_id specified in the path parameter.
493
+ *
494
+ * @param promotionId The ID of the promotion whose associated listings you want to retrieve.
495
+ * @param limit Specifies the maximum number of promotions returned on a page from the result set. Default: 200
496
+ * Maximum: 200
497
+ * @param offset Specifies the number of promotions to skip in the result set before returning the first promotion
498
+ * in the paginated response.
499
+ * @param q Reserved for future use.
500
+ * @param sort Specifies the order in which to sort the associated listings in the response.
501
+ * @param status This query parameter applies only to markdown promotions.
502
+ */
503
+ getListingSet(promotionId, { limit, offset, q, sort, status } = {}) {
504
+ promotionId = encodeURIComponent(promotionId);
505
+ return this.get(`/promotion/${promotionId}/get_listing_set`, {
506
+ params: {
507
+ limit,
508
+ offset,
509
+ q,
510
+ sort,
511
+ status
512
+ }
513
+ });
514
+ }
515
+ /**
516
+ * This method returns a list of a seller's undeleted promotions.
517
+ *
518
+ * @param marketplaceId The eBay marketplace ID of the site where the promotion is hosted.
519
+ * @param limit Specifies the maximum number of promotions returned on a page from the result set. Default: 200
520
+ * Maximum: 200
521
+ * @param offset Specifies the number of promotions to skip in the result set before returning the first promotion
522
+ * in the paginated response.
523
+ * @param promotionStatus Specifies the promotion state by which you want to filter the results.
524
+ * @param promotionType Filters the returned promotions based on the their campaign promotion type.
525
+ * @param q A string consisting of one or more keywords.
526
+ * @param sort Specifies the order for how to sort the response.
527
+ */
528
+ getPromotions(marketplaceId, { limit, offset, promotionStatus, promotionType, q, sort } = {}) {
529
+ return this.get(`/promotion`, {
530
+ params: {
531
+ marketplace_id: marketplaceId,
532
+ limit,
533
+ offset,
534
+ promotion_status: promotionStatus,
535
+ promotion_type: promotionType,
536
+ q,
537
+ sort
538
+ }
539
+ });
540
+ }
541
+ /**
542
+ * This method pauses a currently-active (RUNNING) threshold promotion and changes the state of the promotion from
543
+ * RUNNING to PAUSED.
544
+ *
545
+ * @param promotionId Identifier of the promotion you want to pause.
546
+ */
547
+ pausePromotion(promotionId) {
548
+ const id = encodeURIComponent(promotionId);
549
+ return this.post(`/promotion/${id}/pause`);
550
+ }
551
+ /**
552
+ * This method restarts a threshold promotion that was previously paused and changes the state of the promotion
553
+ * from PAUSED to RUNNING.
554
+ *
555
+ * @param promotionId Identifier of the promotion you want to make active. The ID is a unique eBay-assigned value
556
+ * that's generated when the promotion is created.
557
+ */
558
+ resumePromotion(promotionId) {
559
+ const id = encodeURIComponent(promotionId);
560
+ return this.post(`/promotion/${id}/resume`);
561
+ }
562
+ /**
563
+ * This method generates a report that lists the seller's running, paused, and ended promotions for the specified
564
+ * eBay marketplace.
565
+ *
566
+ * @param marketplaceId The eBay marketplace ID of the siteId for which you want the promotions report.
567
+ * @param limit Specifies the maximum number of promotions returned on a page from the result set. Default: 200
568
+ * Maximum: 200
569
+ * @param offset Specifies the number of promotions to skip in the result set before returning the first promotion
570
+ * in the paginated response.
571
+ * @param promotionStatus Limits the results to the promotions that are in the state specified by this query
572
+ * parameter.
573
+ * @param promotionType Filters the returned promotions in the report based on the their campaign promotion type.
574
+ * @param q A string consisting of one or more keywords. eBay filters the response by returning only the promotions
575
+ * that contain the supplied keywords in the promotion title.
576
+ */
577
+ getPromotionReports(marketplaceId, { limit, offset, promotionStatus, promotionType, q } = {}) {
578
+ return this.get(`/promotion_report`, {
579
+ params: {
580
+ marketplace_id: marketplaceId,
581
+ limit,
582
+ offset,
583
+ promotion_status: promotionStatus,
584
+ promotion_type: promotionType,
585
+ q
586
+ }
587
+ });
588
+ }
589
+ /**
590
+ * This method generates a report that summarizes the seller's promotions for the specified eBay marketplace.
591
+ *
592
+ * @param marketplaceId The eBay marketplace ID of the siteId you for which you want a promotion summary report.
593
+ */
594
+ getPromotionSummaryReport(marketplaceId) {
595
+ return this.get(`/promotion_summary_report`, {
596
+ params: {
597
+ marketplace_id: marketplaceId
598
+ }
599
+ });
600
+ }
601
+ }
602
+ Marketing.id = 'Marketing';
@@ -0,0 +1,77 @@
1
+ import Restful from '../../index.js';
2
+ /**
3
+ * The Metadata API has operations that retrieve configuration details pertaining to the different eBay marketplaces.
4
+ */
5
+ export default class Metadata extends Restful {
6
+ static id: string;
7
+ get basePath(): string;
8
+ /**
9
+ * This method retrieves all the sales tax jurisdictions for the country that you specify in the countryCode path
10
+ * parameter.
11
+ *
12
+ * @param countryCode This path parameter specifies the two-letter ISO 3166-1 Alpha-2 country code for the country
13
+ * whose jurisdictions you want to retrieve.
14
+ */
15
+ getSalesTaxJurisdictions(countryCode: string): Promise<any>;
16
+ /**
17
+ * This method returns the eBay policies that define how to list automotive-parts-compatibility items in the
18
+ * categories of a specific marketplace.
19
+ *
20
+ * @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
21
+ * retrieved.
22
+ * @param filter This query parameter limits the response by returning eBay policy information for only the leaf
23
+ * categories specified by this parameter.
24
+ */
25
+ getAutomotivePartsCompatibilityPolicies(marketplaceId: string, filter?: string): Promise<any>;
26
+ /**
27
+ * This method returns the eBay policies that define how to specify item conditions in the categories of a specific
28
+ * marketplace.
29
+ *
30
+ * @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
31
+ * retrieved.
32
+ * @param filter This query parameter limits the response by returning eBay policy information for only the leaf
33
+ * categories specified by this parameter.
34
+ */
35
+ getItemConditionPolicies(marketplaceId: string, filter?: string): Promise<any>;
36
+ /**
37
+ * This method returns the eBay policies that define the allowed listing structures for the categories of a
38
+ * specific marketplace.
39
+ *
40
+ * @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
41
+ * retrieved.
42
+ * @param filter This query parameter limits the response by returning eBay policy information for only the leaf
43
+ * categories specified by this parameter.
44
+ */
45
+ getListingStructurePolicies(marketplaceId: string, filter?: string): Promise<any>;
46
+ /**
47
+ * This method returns the eBay policies that define the supported negotiated price features (like &quot;best
48
+ * offer&quot;) for the categories of a specific marketplace.
49
+ *
50
+ * @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
51
+ * retrieved.
52
+ * @param filter This query parameter limits the response by returning eBay policy information for only the leaf
53
+ * categories specified by this parameter.
54
+ */
55
+ getNegotiatedPricePolicies(marketplaceId: string, filter?: string): Promise<any>;
56
+ /**
57
+ * This method retrieves a list of leaf categories for a marketplace and identifies the categories that require
58
+ * items to have an eBay product ID value in order to be listed in those categories.
59
+ *
60
+ * @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
61
+ * retrieved.
62
+ * @param filter This query parameter limits the response by returning eBay policy information for only the leaf
63
+ * categories specified by this parameter.
64
+ */
65
+ getProductAdoptionPolicies(marketplaceId: string, filter?: string): Promise<any>;
66
+ /**
67
+ * This method returns the eBay policies that define whether or not you must include a return policy for the
68
+ * items you list in the categories of a specific marketplace, plus the guidelines for creating domestic and
69
+ * international return policies in the different eBay categories.
70
+ *
71
+ * @param marketplaceId This path parameter specifies the eBay marketplace for which policy information is
72
+ * retrieved.
73
+ * @param filter This query parameter limits the response by returning eBay policy information for only the leaf
74
+ * categories specified by this parameter.
75
+ */
76
+ getReturnPolicies(marketplaceId: string, filter?: string): Promise<any>;
77
+ }