python-amazon-sp-api 1.7.5__py3-none-any.whl → 2.0.10__py3-none-any.whl

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 (214) hide show
  1. {python_amazon_sp_api-1.7.5.data → python_amazon_sp_api-2.0.10.data}/scripts/make_endpoint +2 -2
  2. {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info}/METADATA +58 -8
  3. python_amazon_sp_api-2.0.10.dist-info/RECORD +253 -0
  4. {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info}/WHEEL +1 -1
  5. {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info}/top_level.txt +0 -1
  6. sp_api/__version__.py +1 -1
  7. sp_api/api/__init__.py +48 -41
  8. sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +82 -76
  9. sp_api/api/aplus_content/aplus_content.py +76 -45
  10. sp_api/api/application_integrations/application_integrations.py +118 -0
  11. sp_api/api/application_management/application_management.py +6 -7
  12. sp_api/api/authorization/authorization.py +5 -5
  13. sp_api/api/catalog/catalog.py +9 -10
  14. sp_api/api/catalog_items/catalog_items.py +10 -13
  15. sp_api/api/customer_feedback/customer_feedback.py +110 -0
  16. sp_api/api/data_kiosk/data_kiosk.py +59 -39
  17. sp_api/api/easy_ship/easy_ship.py +190 -0
  18. sp_api/api/external_fulfillment/external_fulfillment.py +706 -0
  19. sp_api/api/fba_inbound_eligibility/fba_inbound_eligibility.py +23 -13
  20. sp_api/api/fba_small_and_light/fba_small_and_light.py +46 -20
  21. sp_api/api/feeds/feeds.py +60 -39
  22. sp_api/api/finances/finances.py +40 -9
  23. sp_api/api/fulfillment_inbound/fulfillment_inbound.py +844 -619
  24. sp_api/api/fulfillment_outbound/fulfillment_outbound.py +63 -57
  25. sp_api/api/inventories/inventories.py +13 -11
  26. sp_api/api/listings_items/listings_items.py +38 -25
  27. sp_api/api/listings_restrictions/listings_restrictions.py +6 -7
  28. sp_api/api/merchant_fulfillment/merchant_fulfillment.py +49 -36
  29. sp_api/api/messaging/messaging.py +129 -25
  30. sp_api/api/notifications/notifications.py +85 -45
  31. sp_api/api/orders/orders.py +123 -38
  32. sp_api/api/orders/orders_2026_01_01.py +54 -0
  33. sp_api/api/product_fees/product_fees.py +75 -67
  34. sp_api/api/product_type_definitions/product_type_definitions.py +9 -10
  35. sp_api/api/products/products.py +177 -53
  36. sp_api/api/products/products_definitions.py +11 -82
  37. sp_api/api/replenishment/replenishment.py +13 -11
  38. sp_api/api/reports/reports.py +113 -95
  39. sp_api/api/sales/sales.py +23 -13
  40. sp_api/api/sellers/sellers.py +3 -3
  41. sp_api/api/services/services.py +41 -30
  42. sp_api/api/shipping/shipping.py +39 -37
  43. sp_api/api/shipping/shippingV2.py +46 -30
  44. sp_api/api/solicitations/solicitations.py +20 -11
  45. sp_api/api/supply_sources/supply_sources.py +45 -37
  46. sp_api/api/tokens/tokens.py +4 -6
  47. sp_api/api/upload/upload.py +10 -8
  48. sp_api/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +10 -6
  49. sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +12 -14
  50. sp_api/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +4 -6
  51. sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +42 -37
  52. sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +8 -6
  53. sp_api/api/vendor_invoices/vendor_invoices.py +6 -4
  54. sp_api/api/vendor_orders/vendor_orders.py +16 -19
  55. sp_api/api/vendor_shipments/vendor_shipments.py +91 -262
  56. sp_api/api/vendor_transaction_status/vendor_transaction_status.py +6 -6
  57. sp_api/asyncio/api/__init__.py +167 -0
  58. sp_api/asyncio/api/amazon_warehousing_and_distribu/__init__.py +9 -0
  59. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +130 -0
  60. sp_api/asyncio/api/aplus_content/__init__.py +5 -0
  61. sp_api/asyncio/api/aplus_content/aplus_content.py +330 -0
  62. sp_api/asyncio/api/application_integrations/__init__.py +5 -0
  63. sp_api/asyncio/api/application_integrations/application_integrations.py +119 -0
  64. sp_api/asyncio/api/application_management/__init__.py +5 -0
  65. sp_api/asyncio/api/application_management/application_management.py +36 -0
  66. sp_api/asyncio/api/authorization/__init__.py +5 -0
  67. sp_api/asyncio/api/authorization/authorization.py +54 -0
  68. sp_api/asyncio/api/catalog/__init__.py +5 -0
  69. sp_api/asyncio/api/catalog/catalog.py +111 -0
  70. sp_api/asyncio/api/catalog_items/__init__.py +6 -0
  71. sp_api/asyncio/api/catalog_items/catalog_items.py +93 -0
  72. sp_api/asyncio/api/clients/__init__.py +1 -0
  73. sp_api/asyncio/api/customer_feedback/__init__.py +5 -0
  74. sp_api/asyncio/api/customer_feedback/customer_feedback.py +111 -0
  75. sp_api/asyncio/api/data_kiosk/__init__.py +5 -0
  76. sp_api/asyncio/api/data_kiosk/data_kiosk.py +236 -0
  77. sp_api/asyncio/api/easy_ship/__init__.py +5 -0
  78. sp_api/asyncio/api/easy_ship/easy_ship.py +191 -0
  79. sp_api/asyncio/api/external_fulfillment/__init__.py +5 -0
  80. sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +706 -0
  81. sp_api/asyncio/api/fba_inbound_eligibility/__init__.py +5 -0
  82. sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +96 -0
  83. sp_api/asyncio/api/fba_small_and_light/__init__.py +5 -0
  84. sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +213 -0
  85. sp_api/asyncio/api/feeds/feeds.py +260 -0
  86. sp_api/asyncio/api/finances/finances.py +100 -0
  87. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
  88. sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -0
  89. sp_api/asyncio/api/inventories/inventories.py +74 -0
  90. sp_api/asyncio/api/listings_items/__init__.py +0 -0
  91. sp_api/asyncio/api/listings_items/listings_items.py +170 -0
  92. sp_api/asyncio/api/listings_restrictions/__init__.py +0 -0
  93. sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +36 -0
  94. sp_api/asyncio/api/merchant_fulfillment/__init__.py +0 -0
  95. sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +384 -0
  96. sp_api/asyncio/api/messaging/__init__.py +0 -0
  97. sp_api/asyncio/api/messaging/messaging.py +511 -0
  98. sp_api/asyncio/api/models/__init__.py +4 -0
  99. sp_api/asyncio/api/notifications/__init__.py +0 -0
  100. sp_api/asyncio/api/notifications/notifications.py +295 -0
  101. sp_api/asyncio/api/orders/__init__.py +0 -0
  102. sp_api/asyncio/api/orders/orders.py +412 -0
  103. sp_api/asyncio/api/orders/orders_2026_01_01.py +40 -0
  104. sp_api/asyncio/api/overrides/__init__.py +1 -0
  105. sp_api/asyncio/api/product_fees/__init__.py +0 -0
  106. sp_api/asyncio/api/product_fees/product_fees.py +194 -0
  107. sp_api/asyncio/api/product_type_definitions/__init__.py +0 -0
  108. sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +75 -0
  109. sp_api/asyncio/api/products/__init__.py +0 -0
  110. sp_api/asyncio/api/products/products.py +405 -0
  111. sp_api/asyncio/api/products/products_definitions.py +11 -0
  112. sp_api/asyncio/api/replenishment/__init__.py +0 -0
  113. sp_api/asyncio/api/replenishment/replenishment.py +121 -0
  114. sp_api/asyncio/api/reports/__init__.py +0 -0
  115. sp_api/asyncio/api/reports/reports.py +439 -0
  116. sp_api/asyncio/api/sales/__init__.py +0 -0
  117. sp_api/asyncio/api/sales/sales.py +93 -0
  118. sp_api/asyncio/api/sellers/__init__.py +0 -0
  119. sp_api/asyncio/api/sellers/sellers.py +70 -0
  120. sp_api/asyncio/api/services/__init__.py +0 -0
  121. sp_api/asyncio/api/services/services.py +218 -0
  122. sp_api/asyncio/api/shipping/__init__.py +0 -0
  123. sp_api/asyncio/api/shipping/shipping.py +459 -0
  124. sp_api/asyncio/api/shipping/shippingV2.py +651 -0
  125. sp_api/asyncio/api/solicitations/__init__.py +0 -0
  126. sp_api/asyncio/api/solicitations/solicitations.py +78 -0
  127. sp_api/asyncio/api/supply_sources/__init__.py +0 -0
  128. sp_api/asyncio/api/supply_sources/supply_sources.py +138 -0
  129. sp_api/asyncio/api/tokens/__init__.py +0 -0
  130. sp_api/asyncio/api/tokens/tokens.py +65 -0
  131. sp_api/asyncio/api/upload/__init__.py +0 -0
  132. sp_api/asyncio/api/upload/upload.py +18 -0
  133. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/__init__.py +0 -0
  134. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +64 -0
  135. sp_api/asyncio/api/vendor_direct_fulfillment_orders/__init__.py +0 -0
  136. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +196 -0
  137. sp_api/asyncio/api/vendor_direct_fulfillment_payments/__init__.py +0 -0
  138. sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +254 -0
  139. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/__init__.py +0 -0
  140. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +627 -0
  141. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/__init__.py +0 -0
  142. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +43 -0
  143. sp_api/asyncio/api/vendor_invoices/__init__.py +0 -0
  144. sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +295 -0
  145. sp_api/asyncio/api/vendor_orders/__init__.py +0 -0
  146. sp_api/asyncio/api/vendor_orders/vendor_orders.py +210 -0
  147. sp_api/asyncio/api/vendor_shipments/__init__.py +0 -0
  148. sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +118 -0
  149. sp_api/asyncio/api/vendor_transaction_status/__init__.py +0 -0
  150. sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +41 -0
  151. sp_api/asyncio/auth/__init__.py +12 -0
  152. sp_api/asyncio/auth/access_token_client.py +145 -0
  153. sp_api/asyncio/auth/exceptions.py +5 -0
  154. sp_api/asyncio/base/__init__.py +53 -0
  155. sp_api/asyncio/base/_transport_httpx.py +50 -0
  156. sp_api/asyncio/base/base_client.py +8 -0
  157. sp_api/asyncio/base/client.py +169 -0
  158. sp_api/asyncio/util/__init__.py +29 -0
  159. sp_api/asyncio/util/key_maker.py +5 -0
  160. sp_api/asyncio/util/load_all_pages.py +55 -0
  161. sp_api/asyncio/util/load_date_bound.py +53 -0
  162. sp_api/asyncio/util/retry.py +88 -0
  163. sp_api/auth/__init__.py +3 -3
  164. sp_api/auth/_core.py +39 -0
  165. sp_api/auth/access_token_client.py +20 -31
  166. sp_api/auth/access_token_response.py +4 -4
  167. sp_api/base/ApiResponse.py +5 -4
  168. sp_api/base/__init__.py +53 -42
  169. sp_api/base/_core.py +110 -0
  170. sp_api/base/_transport_httpx.py +39 -0
  171. sp_api/base/base_client.py +4 -4
  172. sp_api/base/client.py +131 -112
  173. sp_api/base/credential_provider.py +41 -34
  174. sp_api/base/exceptions.py +14 -3
  175. sp_api/base/feedTypes.py +44 -32
  176. sp_api/base/fulfillment_channel.py +2 -2
  177. sp_api/base/helpers.py +17 -16
  178. sp_api/base/identifiersType.py +8 -8
  179. sp_api/base/included_data.py +12 -12
  180. sp_api/base/marketplaces.py +5 -1
  181. sp_api/base/notifications.py +1 -1
  182. sp_api/base/processing_status.py +5 -5
  183. sp_api/base/reportTypes.py +198 -111
  184. sp_api/base/sales_enum.py +11 -13
  185. sp_api/util/__init__.py +42 -6
  186. sp_api/util/key_maker.py +4 -2
  187. sp_api/util/load_all_pages.py +16 -5
  188. sp_api/util/load_date_bound.py +28 -13
  189. sp_api/util/params.py +57 -0
  190. sp_api/util/product_fees.py +40 -0
  191. sp_api/util/products_definitions.py +169 -0
  192. sp_api/util/report_document.py +154 -0
  193. sp_api/util/retry.py +16 -15
  194. python_amazon_sp_api-1.7.5.dist-info/RECORD +0 -144
  195. tests/api/finances/test_finances.py +0 -19
  196. tests/api/notifications/test_notifications.py +0 -26
  197. tests/api/orders/test_orders.py +0 -122
  198. tests/api/product_fees/product_fees.py +0 -49
  199. tests/api/reports/test_reports.py +0 -127
  200. tests/client/test_auth.py +0 -59
  201. tests/client/test_base.py +0 -163
  202. tests/client/test_credential_provider.py +0 -45
  203. tests/client/test_helpers.py +0 -142
  204. {python_amazon_sp_api-1.7.5.dist-info → python_amazon_sp_api-2.0.10.dist-info/licenses}/LICENSE +0 -0
  205. {tests → sp_api/api/application_integrations}/__init__.py +0 -0
  206. {tests/api → sp_api/api/customer_feedback}/__init__.py +0 -0
  207. {tests/api/finances → sp_api/api/easy_ship}/__init__.py +0 -0
  208. {tests/api/notifications → sp_api/api/external_fulfillment}/__init__.py +0 -0
  209. {tests/api/orders → sp_api/asyncio}/__init__.py +0 -0
  210. {tests/api/product_fees → sp_api/asyncio/api/feeds}/__init__.py +0 -0
  211. {tests/api/reports → sp_api/asyncio/api/finances}/__init__.py +0 -0
  212. {tests/api/sellers → sp_api/asyncio/api/fulfillment_inbound}/__init__.py +0 -0
  213. {tests/client → sp_api/asyncio/api/fulfillment_outbound}/__init__.py +0 -0
  214. /tests/api/sellers/test_sellers.py → /sp_api/asyncio/api/inventories/__init__.py +0 -0
@@ -1,144 +0,0 @@
1
- python_amazon_sp_api-1.7.5.data/scripts/make_endpoint,sha256=MqbRD0V9rsbkEEKsPOZbSinYVTArtDAMCIqPJIYL4gI,8551
2
- sp_api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- sp_api/__version__.py,sha256=GiAvmK8gqLgj4zS2PKm4DRS-ZvhCg284OasepHrUYMc,22
4
- sp_api/api/__init__.py,sha256=j0FCJc1Z4DIin7c_tmuW8E5iJVNtwAvqlJYMn73_OJw,4236
5
- sp_api/api/amazon_warehousing_and_distribu/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
- sp_api/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py,sha256=SbgTlt91_90sTy28lp0rWMnc1wIfjVkE7cP98Md_L24,5580
7
- sp_api/api/aplus_content/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
- sp_api/api/aplus_content/aplus_content.py,sha256=RXSchzMZgDy2dNRvy1F4pSuldC4yjusQU8wQqVLr5Ws,18223
9
- sp_api/api/application_management/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
- sp_api/api/application_management/application_management.py,sha256=YRWC1-dEyfAuAZXg13gujBsKcDLdnBoy_4ogJzVEWMQ,1811
11
- sp_api/api/authorization/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- sp_api/api/authorization/authorization.py,sha256=fT8cGWHHINcZcuk8tQXtwhRJjui9RMsCcvuFCst7Ggc,2804
13
- sp_api/api/catalog/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- sp_api/api/catalog/catalog.py,sha256=EvBhrytYPxJ6hQZ6s1K6RCwpsc-qJABj217h8e1n_UU,3956
15
- sp_api/api/catalog_items/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
16
- sp_api/api/catalog_items/catalog_items.py,sha256=byblcSHkGwY1ucXTtoWKzkYTk1GuYgbsMRdTMfpA_-k,4818
17
- sp_api/api/data_kiosk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
18
- sp_api/api/data_kiosk/data_kiosk.py,sha256=yTONpLs3mWTRyBns6PmMpT3wimWSf6-H1Rs9EwfCKF4,12051
19
- sp_api/api/fba_inbound_eligibility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
20
- sp_api/api/fba_inbound_eligibility/fba_inbound_eligibility.py,sha256=M754Jyw0zU6XV9SZMRX8Xasfm56pNrZgQtjS1yL9PWs,4311
21
- sp_api/api/fba_small_and_light/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
22
- sp_api/api/fba_small_and_light/fba_small_and_light.py,sha256=jxkBvSeeXLhotFhGT3ac30qjyIjSAoy2zo3aqeFk9jw,8203
23
- sp_api/api/feeds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- sp_api/api/feeds/feeds.py,sha256=53ccj6JkV8SuZtGC7Zx9Lpq-0GDLajJHXTSOzXEfSbs,9972
25
- sp_api/api/finances/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
26
- sp_api/api/finances/finances.py,sha256=q9Gx98WZdj37ZkSg-k5as0xS2FT4GsNQgm6EYo4sOHQ,1856
27
- sp_api/api/fulfillment_inbound/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
28
- sp_api/api/fulfillment_inbound/fulfillment_inbound.py,sha256=IoXgt0cgaepoqwqta3lui3tC319HiogBdZfQqqvtJAw,76163
29
- sp_api/api/fulfillment_outbound/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
30
- sp_api/api/fulfillment_outbound/fulfillment_outbound.py,sha256=u8dSSnnGeSQXPg5_IL5Tb1V98TnoecLrPMCwgdw31J0,28743
31
- sp_api/api/inventories/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
32
- sp_api/api/inventories/inventories.py,sha256=3BHlsgfuCnULwDSqxrysuBX85B65-973reOXd1duhiA,4097
33
- sp_api/api/listings_items/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
34
- sp_api/api/listings_items/listings_items.py,sha256=3lytO-dUn2WBHaWwe7YpiQBXrpRE-4euyDxbahncdMs,11369
35
- sp_api/api/listings_restrictions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
36
- sp_api/api/listings_restrictions/listings_restrictions.py,sha256=pBI0k46SphC7ge2Sd6yigFY_jT6DPZibyHIc4kdg2p8,1737
37
- sp_api/api/merchant_fulfillment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
38
- sp_api/api/merchant_fulfillment/merchant_fulfillment.py,sha256=aV07WHpSdo8QYnKH2XFnqAUB8B4W6eJEfConYoOrejY,15301
39
- sp_api/api/messaging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
- sp_api/api/messaging/messaging.py,sha256=s2eVNOYwR1szCA020frsxmEhkwCZhgHUUxh7bNx4j3w,16564
41
- sp_api/api/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
- sp_api/api/notifications/notifications.py,sha256=4JLdSEW-z0X3K__AmO6d7yKqsmCRcAZA6qjfcOzGwmw,10798
43
- sp_api/api/orders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
44
- sp_api/api/orders/orders.py,sha256=jX1xCu3ut6k5TJtKBcxcEWj3i3bm8L98GrI_7FqmTM8,12562
45
- sp_api/api/product_fees/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
46
- sp_api/api/product_fees/product_fees.py,sha256=JvD7WdLdkaBWQnAD30oO-Tnik3nJlwwlQpX58nI9kzo,7400
47
- sp_api/api/product_type_definitions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
48
- sp_api/api/product_type_definitions/product_type_definitions.py,sha256=mt5y0w5lSXn2UHCwnZUoBDNPCYzCFA15ARxFt6K6r8E,4471
49
- sp_api/api/products/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
50
- sp_api/api/products/products.py,sha256=ObwkqMg1QMXPcKHBr_tGjCQCFfb0_rNxwBZFqlPxuRI,12563
51
- sp_api/api/products/products_definitions.py,sha256=hsqFAMrtA8aZL4yOL--pNyjn4fdcQaVTmfoiTFB1nGQ,2346
52
- sp_api/api/replenishment/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
53
- sp_api/api/replenishment/replenishment.py,sha256=8jnblEjTg5fAhYILTlhyB23Ca_Zq5JdXgSoqUMIQ2kE,7518
54
- sp_api/api/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- sp_api/api/reports/reports.py,sha256=fnQNUZ9_m--5xK9y30RcdXiEX_KiUtJNB25bSEIGIQQ,18942
56
- sp_api/api/sales/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
57
- sp_api/api/sales/sales.py,sha256=_UqrEklXqpikQg4VSOt7WfwRYMKONOCy3jOhXB61jxs,5647
58
- sp_api/api/sellers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
59
- sp_api/api/sellers/sellers.py,sha256=DCXz-jLy2ddO9OcU56_Q9CNjDFjFPWVJdL2Q3slFugk,2275
60
- sp_api/api/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
61
- sp_api/api/services/services.py,sha256=4RQbek85x3hIV8m7msAW2cpemIfbnQOJEpF3KuOAOdw,9133
62
- sp_api/api/shipping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- sp_api/api/shipping/shipping.py,sha256=6o5Mj-2Lgc4WSPAPtyvFMnyQzEoata63AYEjvvc7r6o,14506
64
- sp_api/api/shipping/shippingV2.py,sha256=Rvy7IdYvwdiq5Cjf8WCgVMg6trHXFCJ08MJEKor9yt8,24867
65
- sp_api/api/solicitations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
- sp_api/api/solicitations/solicitations.py,sha256=1xSmXg1koYtZbO92q6W6josejkCy7baVb183CTJ2r-Y,3854
67
- sp_api/api/supply_sources/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
68
- sp_api/api/supply_sources/supply_sources.py,sha256=ir1kiYOfCcifqSSOH74mfvCQynEn-u_CM8SJyX8NDg8,4514
69
- sp_api/api/tokens/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
70
- sp_api/api/tokens/tokens.py,sha256=RVsJfI19wrG_8TPURiwz51m5kfDKeXQz66fkPsp00dQ,3380
71
- sp_api/api/upload/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
72
- sp_api/api/upload/upload.py,sha256=bKe7EPiEATFJ-AAUfb6Y7R_1M_95iO-9ajIVkqkOxlA,613
73
- sp_api/api/vendor_direct_fulfillment_inventory/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
74
- sp_api/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py,sha256=TOH7VAU7ygg4Rc8iAYVDJbtPfcREVxVQVKK91Kt4ssU,2309
75
- sp_api/api/vendor_direct_fulfillment_orders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
76
- sp_api/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py,sha256=N4r-T6J3UwNI215_THYR_WcdNBPhqGCu9u2UBFx6uRs,9463
77
- sp_api/api/vendor_direct_fulfillment_payments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
78
- sp_api/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py,sha256=VGNqXrDlcB2nn1S235cbq1Uh1RopJL9nW3SbYNVeLEE,10146
79
- sp_api/api/vendor_direct_fulfillment_shipping/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
80
- sp_api/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py,sha256=w9MoBOGvREjhqeL7i2hcGiZGdt0F9wOZYnfzUGwTw3o,28770
81
- sp_api/api/vendor_direct_fulfillment_transactions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
- sp_api/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py,sha256=_7wEaurb0XRoKHJgV6dvGd_la_uS67RpC-Amp8BnYmQ,1701
83
- sp_api/api/vendor_invoices/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
84
- sp_api/api/vendor_invoices/vendor_invoices.py,sha256=4hfu9Sz-Y9QXIxNdv523zuLtH2a1drGB1tQYnrRNGvc,11245
85
- sp_api/api/vendor_orders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
- sp_api/api/vendor_orders/vendor_orders.py,sha256=0naftxHB9ZP1Y4yowe__edkb7stPs3qXtHPrerEGkxs,13391
87
- sp_api/api/vendor_shipments/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
88
- sp_api/api/vendor_shipments/vendor_shipments.py,sha256=rj95cWMe5PGheycMH9YkXB4gk_iEveAvMiT-JwRJGJo,11627
89
- sp_api/api/vendor_transaction_status/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
90
- sp_api/api/vendor_transaction_status/vendor_transaction_status.py,sha256=2B02wcsXG2oqkoJQdupH9cUPTPo2wPblWfqTylkwuqM,1679
91
- sp_api/auth/__init__.py,sha256=B_yKdmsHENQaKfMFAIcSxQqG4aBUmNBm5orKIMUYObk,229
92
- sp_api/auth/access_token_client.py,sha256=DEnoGUrkJN8snpSgEDzU_U47IF7nG7MISiXnQm-6tAw,4586
93
- sp_api/auth/access_token_response.py,sha256=zlkfo3oWjkhAqNJIUOM0S4g_FvpgDa3IwNLxlREM89A,275
94
- sp_api/auth/credentials.py,sha256=OndGKpAOupU6F6CmvOYNlK7uqgXia4DdHhW-u3IRKCk,262
95
- sp_api/auth/exceptions.py,sha256=JCY74CZbxqSQ09huA1r_Z5kuD1k0O_sjD7sHhJI0aIk,424
96
- sp_api/base/ApiResponse.py,sha256=TNnkcNzeh-6jGuTAt64JTyUjQ-ivsMMuQFk6asOu8kM,2216
97
- sp_api/base/InventoryEnums.py,sha256=IQJ9AhcKpXadO4qP5i76kzHfP2EWQ-KTaZdR6MoOFjI,95
98
- sp_api/base/__init__.py,sha256=JAz4ueWN_kFUapDMJto0YJJ0uohxVtpkeYrw_DVCqJ8,2570
99
- sp_api/base/base_client.py,sha256=U8Wlgrkx0zLp4cMAgTwMtKHZhtWjACBf858kiAlbfGc,223
100
- sp_api/base/client.py,sha256=jzWf-VVdkiAS1CWqiktKwxnhp-Rx-Xryvw5FFxnCT78,7249
101
- sp_api/base/credential_provider.py,sha256=XBh42dY2FlCwpMV06gNnwIuBDT6mP04itTipkLDUzFE,5882
102
- sp_api/base/exceptions.py,sha256=RtVYugQaj1CuqPV5QNp6GbMTXqt-Ij8ox5YlFNyKzfY,3989
103
- sp_api/base/feedTypes.py,sha256=GkRhP_GsAyyDgQ2bodG2EDPlqS7wEvrxky8a2H9Wx5k,2383
104
- sp_api/base/fulfillment_channel.py,sha256=rs4g46aDY-MJjepylqI_Bij10Zu3wG8CRpxsDvl4H94,93
105
- sp_api/base/helpers.py,sha256=HuhdzxmYnKfnaVOnCPitCEfUpsEedjQn1p7X1_-os08,2538
106
- sp_api/base/identifiersType.py,sha256=S2mumaDS-hJyhuAxlB2vlDrF21tA06Nh3zWtDqhr1QM,605
107
- sp_api/base/included_data.py,sha256=eNJyVpohXoOaXgHzEAp_y0E3imrPRsEg82E9_nJ9eac,2977
108
- sp_api/base/inegibility_reasons.py,sha256=vyQ8buMNwXUeV2cp7kZxtzbBkflqaMxuND_LlUtY2hA,9349
109
- sp_api/base/marketplaces.py,sha256=zMn8oKufyDL5Xe7V-qzuyt3SFPW8WEeuaFrF-ELT83k,4119
110
- sp_api/base/notifications.py,sha256=BvB5ZrgfYnMdVNfEkOs9hLLY8UwuZZCLelMp3kzHchI,5447
111
- sp_api/base/processing_status.py,sha256=Wqg-qM9X3VRnssAqfMv8_hBA1kNmshJbwsa5lpstAB8,183
112
- sp_api/base/reportTypes.py,sha256=u3TneMDcTz77VMqP2mxfjWpfpzt1VdL6pkToeH3pJ6k,9429
113
- sp_api/base/report_status.py,sha256=mHPPFvK2xpfucCl6Vk87BHFJO8FB1x0Ej-h3fQFOetE,179
114
- sp_api/base/sales_enum.py,sha256=Ncm5Cqd11Kk4YIQ7FN38rF2tb1neWob1Ez5wouywA3s,394
115
- sp_api/base/schedules.py,sha256=WX0tYSAK4kI-ceBqeE_cY2_MaKC2usEgV2FDqujioqI,433
116
- sp_api/util/__init__.py,sha256=gB8xsVNfX0Uv1RpmKSeUOq7VIxN4eihrPYwV-NSSPII,297
117
- sp_api/util/key_maker.py,sha256=uTmt_7xLVjd1qzKiSBU7LrrhRs1IRs1CBbWr6naKhOM,2151
118
- sp_api/util/load_all_pages.py,sha256=GiMdj03YUnDHaPvuyElXXNSNDHTtpLEzBNl7kCd8RtM,1534
119
- sp_api/util/load_date_bound.py,sha256=auRydd2yGEpKQ9-MGd76CToEwk3CM7xIQ6n5neDdW0c,1391
120
- sp_api/util/retry.py,sha256=B5LuDcxhMQ7UmR9nIU1Mt4pjpC4Lzr0UPySD-7i-vkE,2411
121
- tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
122
- tests/api/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
- tests/api/finances/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
124
- tests/api/finances/test_finances.py,sha256=pbbQKZzFWPrylw_JbCekCwingPBvMJ5ON8cp_X7iUyg,584
125
- tests/api/notifications/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
126
- tests/api/notifications/test_notifications.py,sha256=ln4sM3Rfspax_QCARkmrqOKBWfYx_a-4KNje5YJ9Io8,1293
127
- tests/api/orders/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
128
- tests/api/orders/test_orders.py,sha256=j568TSG55x8afPhlFmwTyjVBmMdo6pcAr1esGH3RlUo,3717
129
- tests/api/product_fees/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
130
- tests/api/product_fees/product_fees.py,sha256=3d4alLRlAQzfbmxWu2LWGVg4jsozc6A5BvmkJLtt9cM,2542
131
- tests/api/reports/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
132
- tests/api/reports/test_reports.py,sha256=Ni0QpflVEJlZYk696cKTe5BasoeSWAyXxpxSJnFcGHI,3974
133
- tests/api/sellers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
- tests/api/sellers/test_sellers.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
135
- tests/client/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
136
- tests/client/test_auth.py,sha256=fI4Lo5Z6O0GfqIldPlCe1OAoZRfAvMRjomo-mGfQxfs,1993
137
- tests/client/test_base.py,sha256=SaXsycFpNYWy8zEYGVzb0aYUZuhJ4qz1_8oAvy6XAvg,4905
138
- tests/client/test_credential_provider.py,sha256=qSBVgDEaR7_C2CmJOY7KAmxNMOfVeE4qG0hfXH3Gk2o,1476
139
- tests/client/test_helpers.py,sha256=RzpnytJGSEIFDRqcMm2QpdIqZubDfNNQRNVgvZPX3K0,3731
140
- python_amazon_sp_api-1.7.5.dist-info/LICENSE,sha256=nbzomPIVo1PVl5bpGAntofsYAF7ZQ2UhzOtKgf7IiNw,1071
141
- python_amazon_sp_api-1.7.5.dist-info/METADATA,sha256=2e4TAgfT_K1uHQS5srvbI3kTsnNZO98VBW6gdkPm3vE,5594
142
- python_amazon_sp_api-1.7.5.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
143
- python_amazon_sp_api-1.7.5.dist-info/top_level.txt,sha256=oZPLMXOmLpAhwQ2La20WfRtlOYlnjub0v419-qPfwkw,13
144
- python_amazon_sp_api-1.7.5.dist-info/RECORD,,
@@ -1,19 +0,0 @@
1
- import json
2
- from datetime import datetime, timedelta
3
-
4
- from sp_api.api import Finances
5
- from sp_api.base import SellingApiBadRequestException
6
-
7
-
8
- def test_for_order():
9
- res = Finances().get_financial_events_for_order('485-734-5434857', MaxResultsPerPage=10)
10
- assert res.payload.get('NextToken') == 'Next token value'
11
-
12
-
13
- def test_for_order_expect_400():
14
- try:
15
- Finances().get_financial_events_for_order('BAD-ORDER', MaxResultsPerPage=10)
16
- except SellingApiBadRequestException as br:
17
- assert br.code == 400
18
- assert type(br) == SellingApiBadRequestException
19
-
@@ -1,26 +0,0 @@
1
- from sp_api.api import Notifications, Reports, Finances
2
- from sp_api.base import SellingApiException, NotificationType, ReportType, Marketplaces
3
- from sp_api.util import throttle_retry, load_all_pages
4
-
5
-
6
- def test_create_destination():
7
- res = Notifications().create_destination(name='test', arn='arn:aws:sqs:us-east-2:444455556666:queue1')
8
- assert res.payload.get("destinationId") == "TEST_CASE_200_DESTINATION_ID"
9
- assert res.payload.get("resource").get('sqs').get('arn') == "arn:aws:sqs:us-east-2:444455556666:queue1"
10
-
11
-
12
- def test_create_subscription():
13
- res = Notifications().create_subscription(NotificationType.MFN_ORDER_STATUS_CHANGE, destination_id='dest_id')
14
- assert res.payload.get('destinationId') == 'TEST_CASE_200_DESTINATION_ID'
15
- assert res.payload.get('subscriptionId') == 'TEST_CASE_200_SUBSCRIPTION_ID'
16
-
17
-
18
- def test_delete_subscription():
19
- res = Notifications().delete_notification_subscription(NotificationType.MFN_ORDER_STATUS_CHANGE, 'subscription_id')
20
- assert res.errors is None
21
-
22
-
23
- def test_get_subscriptions():
24
- res = Notifications().get_subscription(NotificationType.REPORT_PROCESSING_FINISHED)
25
- assert res.payload.get('destinationId') == 'TEST_CASE_200_DESTINATION_ID'
26
- assert res.payload.get('subscriptionId') == 'TEST_CASE_200_SUBSCRIPTION_ID'
@@ -1,122 +0,0 @@
1
- from sp_api.api import Orders
2
-
3
-
4
- def test_get_orders():
5
- res = Orders().get_orders(CreatedAfter='TEST_CASE_200', MarketplaceIds=["ATVPDKIKX0DER"])
6
- assert res.errors is None
7
- assert res.payload.get('Orders') is not None
8
-
9
-
10
- def test_get_order_items():
11
- res = Orders().get_order_items('TEST_CASE_200')
12
- assert res.errors is None
13
- assert res.payload.get('AmazonOrderId') is not None
14
-
15
-
16
- def test_get_order_address():
17
- res = Orders().get_order_address('TEST_CASE_200')
18
- assert res.errors is None
19
- assert res.payload.get('AmazonOrderId') is not None
20
-
21
-
22
- def test_get_order_buyer_info():
23
- res = Orders().get_order_buyer_info('TEST_CASE_200')
24
- assert res.errors is None
25
- assert res.payload.get('AmazonOrderId') is not None
26
-
27
-
28
- def test_get_order():
29
- res = Orders().get_order('TEST_CASE_200')
30
- assert res.errors is None
31
- assert res.payload.get('AmazonOrderId') is not None
32
-
33
-
34
- def test_get_order_items_buyer_info():
35
- res = Orders().get_order_items_buyer_info('TEST_CASE_200')
36
- assert res.errors is None
37
- assert res.payload.get('AmazonOrderId') is not None
38
-
39
-
40
- def test_get_orders_400_error():
41
- from sp_api.base import SellingApiBadRequestException
42
- try:
43
- Orders().get_orders(CreatedAfter='TEST_CASE_400')
44
- except SellingApiBadRequestException as sep:
45
- assert sep.code == 400
46
- assert sep.amzn_code == 'InvalidInput'
47
-
48
-
49
- def test_get_order_api_response_call():
50
- res = Orders().get_order('TEST_CASE_200')
51
- print(res('DefaultShipFromLocationAddress'))
52
- assert res('DefaultShipFromLocationAddress') is not None
53
- assert res.errors is None
54
- assert res.payload.get('AmazonOrderId') is not None
55
-
56
-
57
- def test_get_orders_attr():
58
- res = Orders().get_orders(CreatedAfter='TEST_CASE_200', MarketplaceIds=["ATVPDKIKX0DER"])
59
- assert res.Orders is not None
60
- assert res.errors is None
61
- assert res.payload.get('Orders') is not None
62
-
63
-
64
- def test_get_order_api_response_call2():
65
- res = Orders().get_order('TEST_CASE_200')
66
- assert res() is not None
67
- assert isinstance(res(), dict)
68
- assert res.errors is None
69
- assert res.payload.get('AmazonOrderId') is not None
70
-
71
-
72
- def test_update_shipment_status():
73
- res = Orders().update_shipment_status(
74
- order_id='123-1234567-1234567',
75
- marketplaceId='ATVPDKIKX0DER',
76
- shipmentStatus='ReadyForPickup'
77
- )
78
- assert res() is not None
79
- assert isinstance(res(), dict)
80
- assert res.errors is None
81
- assert res.payload.get("status_code") == 204
82
-
83
-
84
- def test_confirm_shipment():
85
- res = Orders().confirm_shipment(
86
- order_id='123-1234567-1234567',
87
- marketplaceId='ATVPDKIKX0DER',
88
- packageDetail={
89
- 'packageReferenceId': '0001',
90
- 'carrierCode': 'DHL',
91
- "shippingMethod": 'Paket',
92
- 'trackingNumber': '1234567890',
93
- 'shipDate': '2023-03-19T12:00:00Z',
94
- 'orderItems': [
95
- {
96
- 'orderItemId': '123456789',
97
- 'quantity': 1
98
- },
99
- {
100
- 'orderItemId': '2345678901',
101
- 'quantity': 2
102
- },
103
- ]
104
- }
105
- )
106
- assert res() is not None
107
- assert isinstance(res(), dict)
108
- assert res.errors is None
109
- assert res.payload.get("status_code") is None
110
-
111
-
112
- def test_update_shipment_status_400_error():
113
- from sp_api.base import SellingApiBadRequestException
114
- try:
115
- Orders().update_shipment_status(
116
- order_id='123-1234567-1234567',
117
- marketplaceId='1',
118
- shipmentStatus='ReadyForPickup'
119
- )
120
- except SellingApiBadRequestException as sep:
121
- assert sep.code == 400
122
- assert sep.amzn_code == 'InvalidInput'
@@ -1,49 +0,0 @@
1
- from sp_api.api import ProductFees
2
- from sp_api.base import Marketplaces
3
-
4
-
5
- def test_get_fees_for_sku():
6
- res = ProductFees().get_product_fees_estimate_for_sku("UmaS1", 10, currency='USD', shipping_price=10, is_fba=False,
7
- points={
8
- "PointsNumber": 0,
9
- "PointsMonetaryValue": {
10
- "CurrencyCode": "USD",
11
- "Amount": 0
12
- }
13
- })
14
- assert res.payload.get('FeesEstimateResult').get('Status') == 'Success'
15
-
16
-
17
- def test_get_fees_for_asin():
18
- res = ProductFees().get_product_fees_estimate_for_asin("UmaS1", 10, currency='USD', shipping_price=10, is_fba=False,
19
- points={
20
- "PointsNumber": 0,
21
- "PointsMonetaryValue": {
22
- "CurrencyCode": "USD",
23
- "Amount": 0
24
- }
25
- })
26
- assert res.payload.get('FeesEstimateResult').get('Status') == 'Success'
27
-
28
-
29
- def test_get_product_fees_estimate():
30
- res = ProductFees().get_product_fees_estimate([
31
- dict(identifier='UmaS1',id_type='ASIN',id_value="asin123", price=10, currency='USD', shipping_price=10, is_fba=False,
32
- points={
33
- "PointsNumber": 0,
34
- "PointsMonetaryValue": {
35
- "CurrencyCode": "USD",
36
- "Amount": 0
37
- }}
38
- ),
39
- dict(identifier='UmaS2', marketplace_id=Marketplaces.MX.marketplace_id, id_type='SellerSKU', id_value="sku123", price=10, currency='MXN', shipping_price=10, is_fba=True,
40
- points={
41
- "PointsNumber": 0,
42
- "PointsMonetaryValue": {
43
- "CurrencyCode": "MXN",
44
- "Amount": 0
45
- }}
46
- ),
47
- ])
48
- for fer in res.payload:
49
- assert fer['Status'] == 'Success'
@@ -1,127 +0,0 @@
1
- from sp_api.api import Reports
2
- from sp_api.base import Marketplaces, Schedules, SellingApiBadRequestException, SellingApiServerException, \
3
- ProcessingStatus
4
- from sp_api.base.reportTypes import ReportType
5
-
6
-
7
- def test_create_report():
8
- res = Reports().create_report(
9
- reportType=ReportType.GET_MERCHANT_LISTINGS_ALL_DATA,
10
- dataStartTime='2019-12-10T20:11:24.000Z',
11
- marketplaceIds=[
12
- "A1PA6795UKMFR9",
13
- "ATVPDKIKX0DER"
14
- ])
15
- assert res.payload.get('reportId') == 'ID323'
16
-
17
-
18
- def test_create_report_expect_400():
19
- try:
20
- Reports().create_report(
21
- reportType="BAD_FEE_DISCOUNTS_REPORT",
22
- dataStartTime="2019-12-10T20:11:24.000Z",
23
- marketplaceIds=[
24
- "A1PA6795UKMFR9",
25
- "ATVPDKIKX0DER"
26
- ])
27
- except SellingApiBadRequestException as br:
28
- assert br.code == 400
29
-
30
-
31
- def test_create_report_expect_500():
32
- try:
33
- Reports().create_report(
34
- reportType="BAD_FEE_DISCasdafsdsfsdfsdOUNTS_REPORT",
35
- dataStartTime="2019-12-10T20:11:24.000Z",
36
- marketplaceIds=[
37
- "A1PA6asfd795UKMFR9",
38
- "ATVPDKIKX0DER"
39
- ])
40
- except SellingApiServerException as br:
41
- assert br.code == 500
42
-
43
-
44
- def test_get_report():
45
- res = Reports().get_report('ID323')
46
- assert res.payload.get('reportId') == 'ReportId1'
47
- assert res.payload.get('reportType') == 'FEE_DISCOUNTS_REPORT'
48
-
49
-
50
- def test_get_report_document_n_decrypt():
51
- res = Reports().get_report_document('0356cf79-b8b0-4226-b4b9-0ee058ea5760', decrypt=False)
52
- assert res.errors is None
53
- assert 'document' not in res.payload
54
-
55
-
56
- def test_create_report_schedule():
57
- res = Reports().create_report_schedule(reportType='FEE_DISCOUNTS_REPORT',
58
- period=Schedules.MINUTES_5.value,
59
- nextReportCreationTime="2019-12-10T20:11:24.000Z",
60
- marketplaceIds=["A1PA6795UKMFR9", "ATVPDKIKX0DER"])
61
- assert res.errors is None
62
- assert 'reportScheduleId' in res.payload
63
-
64
-
65
- def test_delete_schedule_by_id():
66
- res = Reports().delete_report_schedule('ID')
67
- assert res.errors is None
68
-
69
-
70
- def test_get_schedule_by_id():
71
- res = Reports().get_report_schedule('ID323')
72
- assert res.errors is None
73
- assert 'period' in res.payload
74
- assert res.payload.get('reportType') == 'FEE_DISCOUNTS_REPORT'
75
-
76
-
77
- def test_get_reports_1():
78
- report_types = [
79
- "FEE_DISCOUNTS_REPORT",
80
- "GET_AFN_INVENTORY_DATA"
81
- ]
82
- processing_status = [
83
- "IN_QUEUE",
84
- "IN_PROGRESS"
85
- ]
86
- res = Reports().get_reports(reportTypes=report_types, processingStatuses=processing_status)
87
- assert res.errors is None
88
-
89
-
90
- def test_get_reports_2():
91
- report_types = [
92
- "FEE_DISCOUNTS_REPORT",
93
- "GET_AFN_INVENTORY_DATA"
94
- ]
95
- processing_status = [
96
- ProcessingStatus.IN_QUEUE,
97
- ProcessingStatus.IN_PROGRESS
98
- ]
99
- res = Reports().get_reports(reportTypes=report_types, processingStatuses=processing_status)
100
- assert res.errors is None
101
-
102
-
103
- def test_get_reports_3():
104
- report_types = [
105
- ReportType.FEE_DISCOUNTS_REPORT,
106
- ReportType.GET_AFN_INVENTORY_DATA
107
- ]
108
- processing_status = [
109
- ProcessingStatus.IN_QUEUE,
110
- ProcessingStatus.IN_PROGRESS
111
- ]
112
- res = Reports().get_reports(reportTypes=report_types, processingStatuses=processing_status)
113
- assert res.errors is None
114
-
115
-
116
- def test_get_reports_4():
117
- report_types = [
118
- ReportType.FEE_DISCOUNTS_REPORT,
119
- ReportType.GET_AFN_INVENTORY_DATA
120
- ]
121
- processing_status = [
122
- ProcessingStatus.IN_QUEUE,
123
- ProcessingStatus.IN_PROGRESS
124
- ]
125
- res = Reports().get_reports(reportTypes=report_types, processingStatuses=processing_status,
126
- marketplaceIds=[Marketplaces.US, Marketplaces.US.marketplace_id])
127
- assert res.errors is None
tests/client/test_auth.py DELETED
@@ -1,59 +0,0 @@
1
- from sp_api.base import AccessTokenClient
2
- from sp_api.base import Credentials, CredentialProvider
3
- from sp_api.base import AuthorizationError
4
- from sp_api.base.credential_provider import BaseCredentialProvider, FromCodeCredentialProvider
5
-
6
-
7
- refresh_token = '<refresh_token>'
8
- lwa_app_id = '<lwa_app_id>'
9
- lwa_client_secret = '<lwa_client_secret>'
10
-
11
-
12
- def test_auth_exception():
13
- e = AuthorizationError(200, 'Foo', 999)
14
- assert e.status_code == 999
15
- assert e.error_code == 200
16
- assert e.message == 'Foo'
17
-
18
-
19
- def test_credentials():
20
- x = CredentialProvider()
21
- assert x.credentials is not None
22
- assert x.credentials.lwa_app_id is not None
23
- assert x.credentials.lwa_client_secret is not None
24
-
25
-
26
- def test_credentials_with_custom_provider():
27
- class CustomCredentialProvider(BaseCredentialProvider):
28
- def load_credentials(self):
29
- self.credentials = {
30
- "refresh_token": refresh_token,
31
- "lwa_app_id": lwa_app_id,
32
- "lwa_client_secret": lwa_client_secret,
33
- }
34
-
35
- cp = CredentialProvider(credential_providers=(CustomCredentialProvider,))
36
- assert cp.credentials is not None
37
- assert cp.credentials.refresh_token == "<refresh_token>"
38
- assert cp.credentials.lwa_app_id == "<lwa_app_id>"
39
- assert cp.credentials.lwa_client_secret == "<lwa_client_secret>"
40
-
41
-
42
- def test_auth_client():
43
- client = AccessTokenClient(credentials=CredentialProvider(credentials=dict(
44
- refresh_token=refresh_token,
45
- lwa_app_id=lwa_app_id,
46
- lwa_client_secret=lwa_client_secret,
47
- )).credentials)
48
- x = client._auth_code_request_body('foo')
49
- assert x.get('grant_type') == 'authorization_code'
50
-
51
- try:
52
- client.authorize_auth_code('foo')
53
- except AuthorizationError as e:
54
- assert isinstance(e, AuthorizationError)
55
-
56
- try:
57
- client._request('https://jsonplaceholder.typicode.com/posts/1', {}, {})
58
- except AuthorizationError as e:
59
- assert isinstance(e, AuthorizationError)