python-amazon-sp-api 1.9.18__py3-none-any.whl → 2.0.7__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 (167) hide show
  1. {python_amazon_sp_api-1.9.18.data → python_amazon_sp_api-2.0.7.data}/scripts/make_endpoint +2 -2
  2. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/METADATA +46 -23
  3. python_amazon_sp_api-2.0.7.dist-info/RECORD +251 -0
  4. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/WHEEL +1 -1
  5. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info}/top_level.txt +0 -1
  6. sp_api/__version__.py +1 -1
  7. sp_api/api/__init__.py +18 -1
  8. sp_api/api/application_integrations/application_integrations.py +118 -0
  9. sp_api/api/application_management/application_management.py +2 -1
  10. sp_api/api/catalog/catalog.py +3 -4
  11. sp_api/api/catalog_items/catalog_items.py +3 -6
  12. sp_api/api/customer_feedback/customer_feedback.py +110 -0
  13. sp_api/api/data_kiosk/data_kiosk.py +5 -6
  14. sp_api/api/easy_ship/easy_ship.py +190 -0
  15. sp_api/api/external_fulfillment/external_fulfillment.py +706 -0
  16. sp_api/api/feeds/feeds.py +11 -8
  17. sp_api/api/finances/finances.py +30 -4
  18. sp_api/api/fulfillment_inbound/fulfillment_inbound.py +35 -2
  19. sp_api/api/inventories/inventories.py +2 -7
  20. sp_api/api/listings_items/listings_items.py +3 -24
  21. sp_api/api/messaging/messaging.py +42 -0
  22. sp_api/api/orders/orders.py +7 -0
  23. sp_api/api/product_fees/product_fees.py +31 -74
  24. sp_api/api/products/products.py +80 -2
  25. sp_api/api/products/products_definitions.py +11 -85
  26. sp_api/api/reports/reports.py +65 -97
  27. sp_api/api/sales/sales.py +2 -2
  28. sp_api/asyncio/api/__init__.py +164 -0
  29. sp_api/asyncio/api/amazon_warehousing_and_distribu/__init__.py +9 -0
  30. sp_api/asyncio/api/amazon_warehousing_and_distribu/amazon_warehousing_and_distribu.py +130 -0
  31. sp_api/asyncio/api/aplus_content/__init__.py +5 -0
  32. sp_api/asyncio/api/aplus_content/aplus_content.py +330 -0
  33. sp_api/asyncio/api/application_integrations/__init__.py +5 -0
  34. sp_api/asyncio/api/application_integrations/application_integrations.py +119 -0
  35. sp_api/asyncio/api/application_management/__init__.py +5 -0
  36. sp_api/asyncio/api/application_management/application_management.py +36 -0
  37. sp_api/asyncio/api/authorization/__init__.py +5 -0
  38. sp_api/asyncio/api/authorization/authorization.py +54 -0
  39. sp_api/asyncio/api/catalog/__init__.py +5 -0
  40. sp_api/asyncio/api/catalog/catalog.py +111 -0
  41. sp_api/asyncio/api/catalog_items/__init__.py +6 -0
  42. sp_api/asyncio/api/catalog_items/catalog_items.py +93 -0
  43. sp_api/asyncio/api/clients/__init__.py +1 -0
  44. sp_api/asyncio/api/customer_feedback/__init__.py +5 -0
  45. sp_api/asyncio/api/customer_feedback/customer_feedback.py +111 -0
  46. sp_api/asyncio/api/data_kiosk/__init__.py +5 -0
  47. sp_api/asyncio/api/data_kiosk/data_kiosk.py +236 -0
  48. sp_api/asyncio/api/easy_ship/__init__.py +5 -0
  49. sp_api/asyncio/api/easy_ship/easy_ship.py +191 -0
  50. sp_api/asyncio/api/external_fulfillment/__init__.py +5 -0
  51. sp_api/asyncio/api/external_fulfillment/external_fulfillment.py +706 -0
  52. sp_api/asyncio/api/fba_inbound_eligibility/__init__.py +5 -0
  53. sp_api/asyncio/api/fba_inbound_eligibility/fba_inbound_eligibility.py +96 -0
  54. sp_api/asyncio/api/fba_small_and_light/__init__.py +5 -0
  55. sp_api/asyncio/api/fba_small_and_light/fba_small_and_light.py +213 -0
  56. sp_api/asyncio/api/feeds/feeds.py +260 -0
  57. sp_api/asyncio/api/finances/finances.py +100 -0
  58. sp_api/asyncio/api/fulfillment_inbound/fulfillment_inbound.py +1798 -0
  59. sp_api/asyncio/api/fulfillment_outbound/fulfillment_outbound.py +736 -0
  60. sp_api/asyncio/api/inventories/inventories.py +74 -0
  61. sp_api/asyncio/api/listings_items/__init__.py +0 -0
  62. sp_api/asyncio/api/listings_items/listings_items.py +170 -0
  63. sp_api/asyncio/api/listings_restrictions/__init__.py +0 -0
  64. sp_api/asyncio/api/listings_restrictions/listings_restrictions.py +36 -0
  65. sp_api/asyncio/api/merchant_fulfillment/__init__.py +0 -0
  66. sp_api/asyncio/api/merchant_fulfillment/merchant_fulfillment.py +384 -0
  67. sp_api/asyncio/api/messaging/__init__.py +0 -0
  68. sp_api/asyncio/api/messaging/messaging.py +511 -0
  69. sp_api/asyncio/api/models/__init__.py +4 -0
  70. sp_api/asyncio/api/notifications/__init__.py +0 -0
  71. sp_api/asyncio/api/notifications/notifications.py +295 -0
  72. sp_api/asyncio/api/orders/__init__.py +0 -0
  73. sp_api/asyncio/api/orders/orders.py +362 -0
  74. sp_api/asyncio/api/overrides/__init__.py +1 -0
  75. sp_api/asyncio/api/product_fees/__init__.py +0 -0
  76. sp_api/asyncio/api/product_fees/product_fees.py +194 -0
  77. sp_api/asyncio/api/product_type_definitions/__init__.py +0 -0
  78. sp_api/asyncio/api/product_type_definitions/product_type_definitions.py +75 -0
  79. sp_api/asyncio/api/products/__init__.py +0 -0
  80. sp_api/asyncio/api/products/products.py +405 -0
  81. sp_api/asyncio/api/products/products_definitions.py +11 -0
  82. sp_api/asyncio/api/replenishment/__init__.py +0 -0
  83. sp_api/asyncio/api/replenishment/replenishment.py +121 -0
  84. sp_api/asyncio/api/reports/__init__.py +0 -0
  85. sp_api/asyncio/api/reports/reports.py +439 -0
  86. sp_api/asyncio/api/sales/__init__.py +0 -0
  87. sp_api/asyncio/api/sales/sales.py +93 -0
  88. sp_api/asyncio/api/sellers/__init__.py +0 -0
  89. sp_api/asyncio/api/sellers/sellers.py +70 -0
  90. sp_api/asyncio/api/services/__init__.py +0 -0
  91. sp_api/asyncio/api/services/services.py +218 -0
  92. sp_api/asyncio/api/shipping/__init__.py +0 -0
  93. sp_api/asyncio/api/shipping/shipping.py +459 -0
  94. sp_api/asyncio/api/shipping/shippingV2.py +651 -0
  95. sp_api/asyncio/api/solicitations/__init__.py +0 -0
  96. sp_api/asyncio/api/solicitations/solicitations.py +78 -0
  97. sp_api/asyncio/api/supply_sources/__init__.py +0 -0
  98. sp_api/asyncio/api/supply_sources/supply_sources.py +138 -0
  99. sp_api/asyncio/api/tokens/__init__.py +0 -0
  100. sp_api/asyncio/api/tokens/tokens.py +65 -0
  101. sp_api/asyncio/api/upload/__init__.py +0 -0
  102. sp_api/asyncio/api/upload/upload.py +18 -0
  103. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/__init__.py +0 -0
  104. sp_api/asyncio/api/vendor_direct_fulfillment_inventory/vendor_direct_fulfillment_inventory.py +64 -0
  105. sp_api/asyncio/api/vendor_direct_fulfillment_orders/__init__.py +0 -0
  106. sp_api/asyncio/api/vendor_direct_fulfillment_orders/vendor_direct_fulfillment_orders.py +196 -0
  107. sp_api/asyncio/api/vendor_direct_fulfillment_payments/__init__.py +0 -0
  108. sp_api/asyncio/api/vendor_direct_fulfillment_payments/vendor_direct_fulfillment_payments.py +254 -0
  109. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/__init__.py +0 -0
  110. sp_api/asyncio/api/vendor_direct_fulfillment_shipping/vendor_direct_fulfillment_shipping.py +627 -0
  111. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/__init__.py +0 -0
  112. sp_api/asyncio/api/vendor_direct_fulfillment_transactions/vendor_direct_fulfillment_transactions.py +43 -0
  113. sp_api/asyncio/api/vendor_invoices/__init__.py +0 -0
  114. sp_api/asyncio/api/vendor_invoices/vendor_invoices.py +295 -0
  115. sp_api/asyncio/api/vendor_orders/__init__.py +0 -0
  116. sp_api/asyncio/api/vendor_orders/vendor_orders.py +210 -0
  117. sp_api/asyncio/api/vendor_shipments/__init__.py +0 -0
  118. sp_api/asyncio/api/vendor_shipments/vendor_shipments.py +118 -0
  119. sp_api/asyncio/api/vendor_transaction_status/__init__.py +0 -0
  120. sp_api/asyncio/api/vendor_transaction_status/vendor_transaction_status.py +41 -0
  121. sp_api/asyncio/auth/__init__.py +12 -0
  122. sp_api/asyncio/auth/access_token_client.py +145 -0
  123. sp_api/asyncio/auth/exceptions.py +5 -0
  124. sp_api/asyncio/base/__init__.py +53 -0
  125. sp_api/asyncio/base/_transport_httpx.py +50 -0
  126. sp_api/asyncio/base/base_client.py +8 -0
  127. sp_api/asyncio/base/client.py +169 -0
  128. sp_api/asyncio/util/__init__.py +29 -0
  129. sp_api/asyncio/util/key_maker.py +5 -0
  130. sp_api/asyncio/util/load_all_pages.py +55 -0
  131. sp_api/asyncio/util/load_date_bound.py +53 -0
  132. sp_api/asyncio/util/retry.py +88 -0
  133. sp_api/auth/_core.py +39 -0
  134. sp_api/auth/access_token_client.py +18 -29
  135. sp_api/base/ApiResponse.py +3 -2
  136. sp_api/base/_core.py +110 -0
  137. sp_api/base/_transport_httpx.py +39 -0
  138. sp_api/base/client.py +40 -63
  139. sp_api/base/helpers.py +1 -1
  140. sp_api/base/reportTypes.py +3 -2
  141. sp_api/util/__init__.py +36 -0
  142. sp_api/util/load_all_pages.py +2 -1
  143. sp_api/util/params.py +57 -0
  144. sp_api/util/product_fees.py +40 -0
  145. sp_api/util/products_definitions.py +169 -0
  146. sp_api/util/report_document.py +154 -0
  147. python_amazon_sp_api-1.9.18.dist-info/RECORD +0 -144
  148. tests/api/finances/test_finances.py +0 -19
  149. tests/api/notifications/test_notifications.py +0 -26
  150. tests/api/orders/test_orders.py +0 -122
  151. tests/api/product_fees/product_fees.py +0 -49
  152. tests/api/reports/test_reports.py +0 -127
  153. tests/client/test_auth.py +0 -59
  154. tests/client/test_base.py +0 -163
  155. tests/client/test_credential_provider.py +0 -45
  156. tests/client/test_helpers.py +0 -142
  157. {python_amazon_sp_api-1.9.18.dist-info → python_amazon_sp_api-2.0.7.dist-info/licenses}/LICENSE +0 -0
  158. {tests → sp_api/api/application_integrations}/__init__.py +0 -0
  159. {tests/api → sp_api/api/customer_feedback}/__init__.py +0 -0
  160. {tests/api/finances → sp_api/api/easy_ship}/__init__.py +0 -0
  161. {tests/api/notifications → sp_api/api/external_fulfillment}/__init__.py +0 -0
  162. {tests/api/orders → sp_api/asyncio}/__init__.py +0 -0
  163. {tests/api/product_fees → sp_api/asyncio/api/feeds}/__init__.py +0 -0
  164. {tests/api/reports → sp_api/asyncio/api/finances}/__init__.py +0 -0
  165. {tests/api/sellers → sp_api/asyncio/api/fulfillment_inbound}/__init__.py +0 -0
  166. {tests/client → sp_api/asyncio/api/fulfillment_outbound}/__init__.py +0 -0
  167. /tests/api/sellers/test_sellers.py → /sp_api/asyncio/api/inventories/__init__.py +0 -0
File without changes
@@ -0,0 +1,511 @@
1
+ import urllib.parse
2
+
3
+ from sp_api.base import Client, sp_endpoint, fill_query_params, ApiResponse
4
+ from sp_api.asyncio.base import AsyncBaseClient
5
+
6
+
7
+ class Messaging(AsyncBaseClient):
8
+ """
9
+ Messaging SP-API Client
10
+ :link:
11
+
12
+ With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.
13
+ """
14
+
15
+ @sp_endpoint("/messaging/v1/orders/{}", method="GET")
16
+ async def get_messaging_actions_for_order(self, order_id, **kwargs) -> ApiResponse:
17
+ """
18
+ get_messaging_actions_for_order(self, order_id, **kwargs) -> ApiResponse
19
+
20
+ Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message.
21
+
22
+ **Usage Plan:**
23
+
24
+ ====================================== ==============
25
+ Rate (requests per second) Burst
26
+ ====================================== ==============
27
+ 1 5
28
+ ====================================== ==============
29
+
30
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
31
+
32
+ Args:
33
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which you want a list of available message types.
34
+ key marketplaceIds:array | * REQUIRED A marketplace identifier. This specifies the marketplace in which the order was placed. Only one marketplace can be specified.
35
+
36
+ Returns:
37
+ ApiResponse:
38
+ """
39
+
40
+ return await self._request(
41
+ fill_query_params(kwargs.pop("path"), order_id), params=kwargs
42
+ )
43
+
44
+ @sp_endpoint(
45
+ "/messaging/v1/orders/{}/messages/confirmCustomizationDetails", method="POST"
46
+ )
47
+ async def confirm_customization_details(self, order_id, **kwargs) -> ApiResponse:
48
+ """
49
+ confirm_customization_details(self, order_id, **kwargs) -> ApiResponse
50
+
51
+ Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc.
52
+
53
+ **Usage Plan:**
54
+
55
+ ====================================== ==============
56
+ Rate (requests per second) Burst
57
+ ====================================== ==============
58
+ 1 5
59
+ ====================================== ==============
60
+
61
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
62
+
63
+ Args:
64
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
65
+ body: {
66
+ "text": "string",
67
+ "attachments": [
68
+ {
69
+ "uploadDestinationId": "string",
70
+ "fileName": "string"
71
+ }
72
+ ]
73
+ }
74
+
75
+ Returns:
76
+ ApiResponse:
77
+ """
78
+
79
+ return await self._request(
80
+ fill_query_params(kwargs.pop("path"), order_id),
81
+ data=kwargs.pop("body"),
82
+ params={
83
+ "marketplaceIds": self.marketplace_id,
84
+ "method": kwargs.pop("method"),
85
+ },
86
+ )
87
+
88
+ @sp_endpoint(
89
+ "/messaging/v1/orders/{}/messages/confirmDeliveryDetails", method="POST"
90
+ )
91
+ async def create_confirm_delivery_details(self, order_id, **kwargs) -> ApiResponse:
92
+ """
93
+ create_confirm_delivery_details(self, order_id, **kwargs) -> ApiResponse
94
+
95
+ Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery.
96
+
97
+ **Usage Plan:**
98
+
99
+ ====================================== ==============
100
+ Rate (requests per second) Burst
101
+ ====================================== ==============
102
+ 1 5
103
+ ====================================== ==============
104
+
105
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
106
+
107
+ Args:
108
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
109
+ body: {
110
+ "text": "string"
111
+ }
112
+
113
+
114
+ Returns:
115
+ ApiResponse:
116
+ """
117
+
118
+ return await self._request(
119
+ fill_query_params(kwargs.pop("path"), order_id),
120
+ data=kwargs.pop("body"),
121
+ params={
122
+ "marketplaceIds": self.marketplace_id,
123
+ "method": kwargs.pop("method"),
124
+ },
125
+ )
126
+
127
+ @sp_endpoint("/messaging/v1/orders/{}/messages/legalDisclosure", method="POST")
128
+ async def create_legal_disclosure(self, order_id, **kwargs) -> ApiResponse:
129
+ """
130
+ create_legal_disclosure(self, order_id, **kwargs) -> ApiResponse
131
+
132
+ Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law.
133
+
134
+ **Usage Plan:**
135
+
136
+ ====================================== ==============
137
+ Rate (requests per second) Burst
138
+ ====================================== ==============
139
+ 1 5
140
+ ====================================== ==============
141
+
142
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
143
+
144
+ Args:
145
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
146
+ body: {
147
+ "attachments": [
148
+ {
149
+ "uploadDestinationId": "string",
150
+ "fileName": "string"
151
+ }
152
+ ]
153
+ }
154
+
155
+
156
+ Returns:
157
+ ApiResponse:
158
+ """
159
+
160
+ return await self._request(
161
+ fill_query_params(kwargs.pop("path"), order_id),
162
+ data=kwargs.pop("body"),
163
+ params={
164
+ "marketplaceIds": self.marketplace_id,
165
+ "method": kwargs.pop("method"),
166
+ },
167
+ )
168
+
169
+ @sp_endpoint(
170
+ "/messaging/v1/orders/{}/messages/negativeFeedbackRemoval", method="POST"
171
+ )
172
+ async def create_negative_feedback_removal(self, order_id, **kwargs) -> ApiResponse:
173
+ """
174
+ create_negative_feedback_removal(self, order_id, **kwargs) -> ApiResponse
175
+
176
+ Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer's problem.
177
+
178
+ **Usage Plan:**
179
+
180
+ ====================================== ==============
181
+ Rate (requests per second) Burst
182
+ ====================================== ==============
183
+ 1 5
184
+ ====================================== ==============
185
+
186
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
187
+
188
+ Args:
189
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
190
+
191
+ Returns:
192
+ ApiResponse:
193
+ """
194
+
195
+ return await self._request(
196
+ fill_query_params(kwargs.pop("path"), order_id),
197
+ data=kwargs.pop("body"),
198
+ params={
199
+ "marketplaceIds": self.marketplace_id,
200
+ "method": kwargs.pop("method"),
201
+ },
202
+ )
203
+
204
+ @sp_endpoint("/messaging/v1/orders/{}/messages/confirmOrderDetails", method="POST")
205
+ async def create_confirm_order_details(self, order_id, **kwargs) -> ApiResponse:
206
+ """
207
+ create_confirm_order_details(self, order_id, **kwargs) -> ApiResponse
208
+
209
+ Sends a message to ask a buyer an order-related question prior to shipping their order.
210
+
211
+ **Usage Plan:**
212
+
213
+ ====================================== ==============
214
+ Rate (requests per second) Burst
215
+ ====================================== ==============
216
+ 1 5
217
+ ====================================== ==============
218
+
219
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
220
+
221
+ Args:
222
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
223
+ body:{
224
+ "text": "string"
225
+ }
226
+
227
+ Returns:
228
+ ApiResponse:
229
+ """
230
+
231
+ return await self._request(
232
+ fill_query_params(kwargs.pop("path"), order_id),
233
+ data=kwargs.pop("body"),
234
+ params={
235
+ "marketplaceIds": self.marketplace_id,
236
+ "method": kwargs.pop("method"),
237
+ },
238
+ )
239
+
240
+ @sp_endpoint(
241
+ "/messaging/v1/orders/{}/messages/confirmServiceDetails", method="POST"
242
+ )
243
+ async def create_confirm_service_details(self, order_id, **kwargs) -> ApiResponse:
244
+ """
245
+ create_confirm_service_details(self, order_id, **kwargs) -> ApiResponse
246
+
247
+ Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call.
248
+
249
+ **Usage Plan:**
250
+
251
+ ====================================== ==============
252
+ Rate (requests per second) Burst
253
+ ====================================== ==============
254
+ 1 5
255
+ ====================================== ==============
256
+
257
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
258
+
259
+ Args:
260
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
261
+ body: {
262
+ "text": "string"
263
+ }
264
+
265
+
266
+ Returns:
267
+ ApiResponse:
268
+ """
269
+
270
+ return await self._request(
271
+ fill_query_params(kwargs.pop("path"), order_id),
272
+ data=kwargs.pop("body"),
273
+ params={
274
+ "marketplaceIds": self.marketplace_id,
275
+ "method": kwargs.pop("method"),
276
+ },
277
+ )
278
+
279
+ @sp_endpoint("/messaging/v1/orders/{}/messages/amazonMotors", method="POST")
280
+ async def create_amazon_motors(self, order_id, **kwargs) -> ApiResponse:
281
+ """
282
+ create_amazon_motors(self, order_id, **kwargs) -> ApiResponse
283
+
284
+ Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers.
285
+
286
+ **Usage Plan:**
287
+
288
+ ====================================== ==============
289
+ Rate (requests per second) Burst
290
+ ====================================== ==============
291
+ 1 5
292
+ ====================================== ==============
293
+
294
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
295
+
296
+ Args:
297
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
298
+ body: {
299
+ "attachments": [
300
+ {
301
+ "uploadDestinationId": "string",
302
+ "fileName": "string"
303
+ }
304
+ ]
305
+ }
306
+
307
+
308
+ Returns:
309
+ ApiResponse:
310
+ """
311
+
312
+ return await self._request(
313
+ fill_query_params(kwargs.pop("path"), order_id),
314
+ data=kwargs.pop("body"),
315
+ params={
316
+ "marketplaceIds": self.marketplace_id,
317
+ "method": kwargs.pop("method"),
318
+ },
319
+ )
320
+
321
+ @sp_endpoint("/messaging/v1/orders/{}/messages/warranty", method="POST")
322
+ async def create_warranty(self, order_id, **kwargs) -> ApiResponse:
323
+ """
324
+ create_warranty(self, order_id, **kwargs) -> ApiResponse
325
+
326
+ Sends a message to a buyer to provide details about warranty information on a purchase in their order.
327
+
328
+ **Usage Plan:**
329
+
330
+
331
+ ====================================== ==============
332
+ Rate (requests per second) Burst
333
+ ====================================== ==============
334
+ 1 5
335
+ ====================================== ==============
336
+
337
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
338
+
339
+ Args:
340
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
341
+ body: {
342
+ "attachments": [
343
+ {
344
+ "uploadDestinationId": "string",
345
+ "fileName": "string"
346
+ }
347
+ ],
348
+ "coverageStartDate": "2019-08-24T14:15:22Z",
349
+ "coverageEndDate": "2019-08-24T14:15:22Z"
350
+ }
351
+
352
+
353
+ Returns:
354
+ ApiResponse:
355
+ """
356
+
357
+ return await self._request(
358
+ fill_query_params(kwargs.pop("path"), order_id),
359
+ data=kwargs.pop("body"),
360
+ params={
361
+ "marketplaceIds": self.marketplace_id,
362
+ "method": kwargs.pop("method"),
363
+ },
364
+ )
365
+
366
+ @sp_endpoint("/messaging/v1/orders/{}/attributes", method="GET")
367
+ async def get_attributes(self, order_id, **kwargs) -> ApiResponse:
368
+ """
369
+ get_attributes(self, order_id, **kwargs) -> ApiResponse
370
+
371
+ Returns a response containing attributes related to an order. This includes buyer preferences.
372
+
373
+ **Usage Plan:**
374
+
375
+ ====================================== ==============
376
+ Rate (requests per second) Burst
377
+ ====================================== ==============
378
+ 1 5
379
+ ====================================== ==============
380
+
381
+ Args:
382
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
383
+
384
+ Returns:
385
+ ApiResponse:
386
+ """
387
+
388
+ return await self._request(
389
+ fill_query_params(kwargs.pop("path"), order_id), params=kwargs
390
+ )
391
+
392
+ @sp_endpoint("/messaging/v1/orders/{}/messages/digitalAccessKey", method="POST")
393
+ async def create_digital_access_key(self, order_id, **kwargs) -> ApiResponse:
394
+ """
395
+ create_digital_access_key(self, order_id, **kwargs) -> ApiResponse
396
+
397
+ Sends a message to a buyer to share a digital access key needed to utilize digital content in their order.
398
+
399
+ **Usage Plan:**
400
+
401
+
402
+ ====================================== ==============
403
+ Rate (requests per second) Burst
404
+ ====================================== ==============
405
+ 1 5
406
+ ====================================== ==============
407
+
408
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
409
+
410
+ Args:
411
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
412
+ body: {
413
+ "text": "string",
414
+ "attachments": [
415
+ {
416
+ "uploadDestinationId": "string",
417
+ "fileName": "string"
418
+ }
419
+ ]
420
+ }
421
+
422
+ Returns:
423
+ ApiResponse:
424
+ """
425
+
426
+ return await self._request(
427
+ fill_query_params(kwargs.pop("path"), order_id),
428
+ data=kwargs.pop("body"),
429
+ params={
430
+ "marketplaceIds": self.marketplace_id,
431
+ "method": kwargs.pop("method"),
432
+ },
433
+ )
434
+
435
+ @sp_endpoint("/messaging/v1/orders/{}/messages/unexpectedProblem", method="POST")
436
+ async def create_unexpected_problem(self, order_id, **kwargs) -> ApiResponse:
437
+ """
438
+ create_unexpected_problem(self, order_id, **kwargs) -> ApiResponse
439
+
440
+ Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order.
441
+
442
+ **Usage Plan:**
443
+
444
+ ====================================== ==============
445
+ Rate (requests per second) Burst
446
+ ====================================== ==============
447
+ 1 5
448
+ ====================================== ==============
449
+
450
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
451
+
452
+ Args:
453
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
454
+ body: {
455
+ "text": "string"
456
+ }
457
+
458
+ Returns:
459
+ ApiResponse:
460
+ """
461
+
462
+ return await self._request(
463
+ fill_query_params(kwargs.pop("path"), order_id),
464
+ data=kwargs.pop("body"),
465
+ params={
466
+ "marketplaceIds": self.marketplace_id,
467
+ "method": kwargs.pop("method"),
468
+ },
469
+ )
470
+
471
+ @sp_endpoint("/messaging/v1/orders/{}/messages/invoice", method="POST")
472
+ async def send_invoice(self, order_id, **kwargs) -> ApiResponse:
473
+ """
474
+ send_invoice(self, order_id, **kwargs) -> ApiResponse
475
+
476
+ Sends a message providing the buyer an invoice
477
+
478
+ **Usage Plan:**
479
+
480
+ ====================================== ==============
481
+ Rate (requests per second) Burst
482
+ ====================================== ==============
483
+ 1 5
484
+ ====================================== ==============
485
+
486
+ For more information, see "Usage Plans and Rate Limits" in the Selling Partner API documentation.
487
+
488
+ Args:
489
+ order_id:string | * REQUIRED An Amazon order identifier. This specifies the order for which a message is sent.
490
+ body: {
491
+ "attachments": [
492
+ {
493
+ "uploadDestinationId": "string",
494
+ "fileName": "string"
495
+ }
496
+ ]
497
+ }
498
+
499
+
500
+ Returns:
501
+ ApiResponse:
502
+ """
503
+
504
+ return await self._request(
505
+ fill_query_params(kwargs.pop("path"), order_id),
506
+ data=kwargs.pop("body"),
507
+ params={
508
+ "marketplaceIds": self.marketplace_id,
509
+ "method": kwargs.pop("method"),
510
+ },
511
+ )
@@ -0,0 +1,4 @@
1
+ from sp_api.api.models import * # noqa: F403
2
+ from sp_api.api import models as _models
3
+
4
+ __all__ = getattr(_models, "__all__", [])
File without changes