amazon-creatorsapi-python-sdk 1.0.0__py3-none-any.whl → 1.2.0__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 (109) hide show
  1. {amazon_creatorsapi_python_sdk-1.0.0.dist-info → amazon_creatorsapi_python_sdk-1.2.0.dist-info}/METADATA +11 -5
  2. amazon_creatorsapi_python_sdk-1.2.0.dist-info/RECORD +109 -0
  3. {amazon_creatorsapi_python_sdk-1.0.0.dist-info → amazon_creatorsapi_python_sdk-1.2.0.dist-info}/WHEEL +1 -1
  4. creatorsapi_python_sdk/__init__.py +128 -127
  5. creatorsapi_python_sdk/api/__init__.py +5 -5
  6. creatorsapi_python_sdk/api/default_api.py +2427 -2412
  7. creatorsapi_python_sdk/api_client.py +915 -912
  8. creatorsapi_python_sdk/api_response.py +21 -21
  9. creatorsapi_python_sdk/auth/__init__.py +21 -21
  10. creatorsapi_python_sdk/auth/oauth2_config.py +139 -123
  11. creatorsapi_python_sdk/auth/oauth2_token_manager.py +133 -120
  12. creatorsapi_python_sdk/configuration.py +455 -455
  13. creatorsapi_python_sdk/exceptions.py +204 -204
  14. creatorsapi_python_sdk/models/__init__.py +111 -110
  15. creatorsapi_python_sdk/models/access_denied_exception_response_content.py +97 -97
  16. creatorsapi_python_sdk/models/access_denied_reason.py +45 -45
  17. creatorsapi_python_sdk/models/availability.py +44 -44
  18. creatorsapi_python_sdk/models/browse_node.py +116 -116
  19. creatorsapi_python_sdk/models/browse_node_ancestor.py +103 -103
  20. creatorsapi_python_sdk/models/browse_node_child.py +96 -96
  21. creatorsapi_python_sdk/models/browse_node_info.py +106 -106
  22. creatorsapi_python_sdk/models/browse_nodes_result.py +100 -100
  23. creatorsapi_python_sdk/models/by_line_info.py +111 -111
  24. creatorsapi_python_sdk/models/classifications.py +101 -101
  25. creatorsapi_python_sdk/models/condition.py +44 -44
  26. creatorsapi_python_sdk/models/content_info.py +113 -113
  27. creatorsapi_python_sdk/models/content_rating.py +96 -96
  28. creatorsapi_python_sdk/models/contributor.py +98 -98
  29. creatorsapi_python_sdk/models/customer_reviews.py +98 -98
  30. creatorsapi_python_sdk/models/deal_details.py +102 -102
  31. creatorsapi_python_sdk/models/delivery_flag.py +46 -46
  32. creatorsapi_python_sdk/models/dimension_based_attribute.py +111 -111
  33. creatorsapi_python_sdk/models/error_data.py +94 -94
  34. creatorsapi_python_sdk/models/external_ids.py +106 -106
  35. creatorsapi_python_sdk/models/feed.py +98 -98
  36. creatorsapi_python_sdk/models/get_browse_nodes_request_content.py +107 -107
  37. creatorsapi_python_sdk/models/get_browse_nodes_resource.py +44 -44
  38. creatorsapi_python_sdk/models/get_browse_nodes_response_content.py +106 -106
  39. creatorsapi_python_sdk/models/get_feed_request_content.py +93 -93
  40. creatorsapi_python_sdk/models/get_feed_response_content.py +92 -92
  41. creatorsapi_python_sdk/models/get_items_request_content.py +124 -124
  42. creatorsapi_python_sdk/models/get_items_resource.py +76 -76
  43. creatorsapi_python_sdk/models/get_items_response_content.py +106 -106
  44. creatorsapi_python_sdk/models/get_report_request_content.py +93 -93
  45. creatorsapi_python_sdk/models/get_report_response_content.py +92 -92
  46. creatorsapi_python_sdk/models/get_variations_request_content.py +135 -135
  47. creatorsapi_python_sdk/models/get_variations_resource.py +79 -79
  48. creatorsapi_python_sdk/models/get_variations_response_content.py +106 -106
  49. creatorsapi_python_sdk/models/image_size.py +96 -96
  50. creatorsapi_python_sdk/models/image_type.py +111 -111
  51. creatorsapi_python_sdk/models/images.py +105 -105
  52. creatorsapi_python_sdk/models/internal_server_exception_response_content.py +94 -94
  53. creatorsapi_python_sdk/models/item.py +138 -138
  54. creatorsapi_python_sdk/models/item_info.py +156 -156
  55. creatorsapi_python_sdk/models/items_result.py +100 -100
  56. creatorsapi_python_sdk/models/language_type.py +94 -94
  57. creatorsapi_python_sdk/models/languages.py +104 -104
  58. creatorsapi_python_sdk/models/list_feeds_response_content.py +100 -100
  59. creatorsapi_python_sdk/models/list_reports_response_content.py +100 -100
  60. creatorsapi_python_sdk/models/manufacture_info.py +106 -106
  61. creatorsapi_python_sdk/models/money.py +96 -96
  62. creatorsapi_python_sdk/models/multi_valued_attribute.py +96 -96
  63. creatorsapi_python_sdk/models/offer_availability_v2.py +98 -98
  64. creatorsapi_python_sdk/models/offer_condition_v2.py +96 -96
  65. creatorsapi_python_sdk/models/offer_listing_v2.py +133 -133
  66. creatorsapi_python_sdk/models/offer_loyalty_points_v2.py +92 -92
  67. creatorsapi_python_sdk/models/offer_merchant_info_v2.py +94 -94
  68. creatorsapi_python_sdk/models/offer_price_v2.py +113 -113
  69. creatorsapi_python_sdk/models/offer_saving_basis.py +101 -101
  70. creatorsapi_python_sdk/models/offer_savings.py +98 -98
  71. creatorsapi_python_sdk/models/offer_type.py +45 -45
  72. creatorsapi_python_sdk/models/offers_v2.py +100 -100
  73. creatorsapi_python_sdk/models/product_info.py +124 -124
  74. creatorsapi_python_sdk/models/rating.py +92 -92
  75. creatorsapi_python_sdk/models/refinement.py +104 -104
  76. creatorsapi_python_sdk/models/refinement_bin.py +94 -94
  77. creatorsapi_python_sdk/models/report_metadata.py +98 -98
  78. creatorsapi_python_sdk/models/resource_not_found_exception_response_content.py +98 -98
  79. creatorsapi_python_sdk/models/saving_basis_type.py +46 -46
  80. creatorsapi_python_sdk/models/search_items_request_content.py +242 -242
  81. creatorsapi_python_sdk/models/search_items_resource.py +77 -77
  82. creatorsapi_python_sdk/models/search_items_response_content.py +106 -106
  83. creatorsapi_python_sdk/models/search_refinements.py +110 -110
  84. creatorsapi_python_sdk/models/search_result.py +110 -110
  85. creatorsapi_python_sdk/models/single_boolean_valued_attribute.py +96 -96
  86. creatorsapi_python_sdk/models/single_integer_valued_attribute.py +96 -96
  87. creatorsapi_python_sdk/models/single_string_valued_attribute.py +96 -96
  88. creatorsapi_python_sdk/models/sort_by.py +48 -48
  89. creatorsapi_python_sdk/models/technical_info.py +102 -102
  90. creatorsapi_python_sdk/models/throttle_exception_response_content.py +98 -98
  91. creatorsapi_python_sdk/models/trade_in_info.py +98 -98
  92. creatorsapi_python_sdk/models/trade_in_price.py +96 -96
  93. creatorsapi_python_sdk/models/unauthorized_exception_reason.py +51 -51
  94. creatorsapi_python_sdk/models/unauthorized_exception_response_content.py +97 -97
  95. creatorsapi_python_sdk/models/unit_based_attribute.py +98 -98
  96. creatorsapi_python_sdk/models/validation_exception_field.py +94 -94
  97. creatorsapi_python_sdk/models/validation_exception_reason.py +48 -48
  98. creatorsapi_python_sdk/models/validation_exception_response_content.py +107 -107
  99. creatorsapi_python_sdk/models/variation_attribute.py +94 -94
  100. creatorsapi_python_sdk/models/variation_dimension.py +98 -98
  101. creatorsapi_python_sdk/models/variation_summary.py +110 -104
  102. creatorsapi_python_sdk/models/variation_summary_price.py +101 -0
  103. creatorsapi_python_sdk/models/variations_result.py +106 -106
  104. creatorsapi_python_sdk/models/website_sales_rank.py +98 -98
  105. creatorsapi_python_sdk/rest.py +262 -262
  106. amazon_creatorsapi_python_sdk-1.0.0.dist-info/RECORD +0 -108
  107. {amazon_creatorsapi_python_sdk-1.0.0.dist-info → amazon_creatorsapi_python_sdk-1.2.0.dist-info}/licenses/LICENSE.txt +0 -0
  108. {amazon_creatorsapi_python_sdk-1.0.0.dist-info → amazon_creatorsapi_python_sdk-1.2.0.dist-info}/licenses/NOTICE.txt +0 -0
  109. {amazon_creatorsapi_python_sdk-1.0.0.dist-info → amazon_creatorsapi_python_sdk-1.2.0.dist-info}/top_level.txt +0 -0
@@ -1,2412 +1,2427 @@
1
- # coding: utf-8
2
-
3
- """
4
- Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
-
6
- Licensed under the Apache License, Version 2.0 (the "License").
7
- You may not use this file except in compliance with the License.
8
- A copy of the License is located at
9
-
10
- http://www.apache.org/licenses/LICENSE-2.0
11
-
12
- or in the "license" file accompanying this file. This file is distributed
13
- on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
- express or implied. See the License for the specific language governing
15
- permissions and limitations under the License.
16
-
17
- """ # noqa: E501
18
-
19
- import warnings
20
- from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
21
- from typing import Any, Dict, List, Optional, Tuple, Union
22
- from typing_extensions import Annotated
23
-
24
- from pydantic import Field, field_validator
25
- from typing import Optional
26
- from typing_extensions import Annotated
27
- from creatorsapi_python_sdk.models.get_browse_nodes_request_content import GetBrowseNodesRequestContent
28
- from creatorsapi_python_sdk.models.get_browse_nodes_response_content import GetBrowseNodesResponseContent
29
- from creatorsapi_python_sdk.models.get_feed_request_content import GetFeedRequestContent
30
- from creatorsapi_python_sdk.models.get_feed_response_content import GetFeedResponseContent
31
- from creatorsapi_python_sdk.models.get_items_request_content import GetItemsRequestContent
32
- from creatorsapi_python_sdk.models.get_items_response_content import GetItemsResponseContent
33
- from creatorsapi_python_sdk.models.get_report_request_content import GetReportRequestContent
34
- from creatorsapi_python_sdk.models.get_report_response_content import GetReportResponseContent
35
- from creatorsapi_python_sdk.models.get_variations_request_content import GetVariationsRequestContent
36
- from creatorsapi_python_sdk.models.get_variations_response_content import GetVariationsResponseContent
37
- from creatorsapi_python_sdk.models.list_feeds_response_content import ListFeedsResponseContent
38
- from creatorsapi_python_sdk.models.list_reports_response_content import ListReportsResponseContent
39
- from creatorsapi_python_sdk.models.search_items_request_content import SearchItemsRequestContent
40
- from creatorsapi_python_sdk.models.search_items_response_content import SearchItemsResponseContent
41
-
42
- from creatorsapi_python_sdk.api_client import ApiClient, RequestSerialized
43
- from creatorsapi_python_sdk.api_response import ApiResponse
44
- from creatorsapi_python_sdk.rest import RESTResponseType
45
-
46
-
47
- class DefaultApi:
48
- """NOTE: This class is auto generated by OpenAPI Generator
49
- Ref: https://openapi-generator.tech
50
-
51
- Do not edit the class manually.
52
- """
53
-
54
- def __init__(self, api_client=None) -> None:
55
- if api_client is None:
56
- api_client = ApiClient.get_default()
57
- self.api_client = api_client
58
-
59
-
60
- @validate_call
61
- def get_browse_nodes(
62
- self,
63
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com'")],
64
- get_browse_nodes_request_content: GetBrowseNodesRequestContent,
65
- _request_timeout: Union[
66
- None,
67
- Annotated[StrictFloat, Field(gt=0)],
68
- Tuple[
69
- Annotated[StrictFloat, Field(gt=0)],
70
- Annotated[StrictFloat, Field(gt=0)]
71
- ]
72
- ] = None,
73
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
74
- _content_type: Optional[StrictStr] = None,
75
- _headers: Optional[Dict[StrictStr, Any]] = None,
76
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
77
- ) -> GetBrowseNodesResponseContent:
78
- """get_browse_nodes
79
-
80
- Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node's information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources: - BrowseNodes Available in all locales, however, parameter support varies by locale.
81
-
82
- :param x_marketplace: Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com' (required)
83
- :type x_marketplace: str
84
- :param get_browse_nodes_request_content: (required)
85
- :type get_browse_nodes_request_content: GetBrowseNodesRequestContent
86
- :param _request_timeout: timeout setting for this request. If one
87
- number provided, it will be total request
88
- timeout. It can also be a pair (tuple) of
89
- (connection, read) timeouts.
90
- :type _request_timeout: int, tuple(int, int), optional
91
- :param _request_auth: set to override the auth_settings for an a single
92
- request; this effectively ignores the
93
- authentication in the spec for a single request.
94
- :type _request_auth: dict, optional
95
- :param _content_type: force content-type for the request.
96
- :type _content_type: str, Optional
97
- :param _headers: set to override the headers for a single
98
- request; this effectively ignores the headers
99
- in the spec for a single request.
100
- :type _headers: dict, optional
101
- :param _host_index: set to override the host_index for a single
102
- request; this effectively ignores the host_index
103
- in the spec for a single request.
104
- :type _host_index: int, optional
105
- :return: Returns the result object.
106
- """ # noqa: E501
107
-
108
- _param = self._get_browse_nodes_serialize(
109
- x_marketplace=x_marketplace,
110
- get_browse_nodes_request_content=get_browse_nodes_request_content,
111
- _request_auth=_request_auth,
112
- _content_type=_content_type,
113
- _headers=_headers,
114
- _host_index=_host_index
115
- )
116
-
117
- _response_types_map: Dict[str, Optional[str]] = {
118
- '200': "GetBrowseNodesResponseContent",
119
- '400': "ValidationExceptionResponseContent",
120
- '401': "UnauthorizedExceptionResponseContent",
121
- '403': "AccessDeniedExceptionResponseContent",
122
- '404': "ResourceNotFoundExceptionResponseContent",
123
- '429': "ThrottleExceptionResponseContent",
124
- '500': "InternalServerExceptionResponseContent",
125
- }
126
- response_data = self.api_client.call_api(
127
- *_param,
128
- _request_timeout=_request_timeout
129
- )
130
- response_data.read()
131
- return self.api_client.response_deserialize(
132
- response_data=response_data,
133
- response_types_map=_response_types_map,
134
- ).data
135
-
136
-
137
- @validate_call
138
- def get_browse_nodes_with_http_info(
139
- self,
140
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com'")],
141
- get_browse_nodes_request_content: GetBrowseNodesRequestContent,
142
- _request_timeout: Union[
143
- None,
144
- Annotated[StrictFloat, Field(gt=0)],
145
- Tuple[
146
- Annotated[StrictFloat, Field(gt=0)],
147
- Annotated[StrictFloat, Field(gt=0)]
148
- ]
149
- ] = None,
150
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
151
- _content_type: Optional[StrictStr] = None,
152
- _headers: Optional[Dict[StrictStr, Any]] = None,
153
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
154
- ) -> ApiResponse[GetBrowseNodesResponseContent]:
155
- """get_browse_nodes
156
-
157
- Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node's information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources: - BrowseNodes Available in all locales, however, parameter support varies by locale.
158
-
159
- :param x_marketplace: Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com' (required)
160
- :type x_marketplace: str
161
- :param get_browse_nodes_request_content: (required)
162
- :type get_browse_nodes_request_content: GetBrowseNodesRequestContent
163
- :param _request_timeout: timeout setting for this request. If one
164
- number provided, it will be total request
165
- timeout. It can also be a pair (tuple) of
166
- (connection, read) timeouts.
167
- :type _request_timeout: int, tuple(int, int), optional
168
- :param _request_auth: set to override the auth_settings for an a single
169
- request; this effectively ignores the
170
- authentication in the spec for a single request.
171
- :type _request_auth: dict, optional
172
- :param _content_type: force content-type for the request.
173
- :type _content_type: str, Optional
174
- :param _headers: set to override the headers for a single
175
- request; this effectively ignores the headers
176
- in the spec for a single request.
177
- :type _headers: dict, optional
178
- :param _host_index: set to override the host_index for a single
179
- request; this effectively ignores the host_index
180
- in the spec for a single request.
181
- :type _host_index: int, optional
182
- :return: Returns the result object.
183
- """ # noqa: E501
184
-
185
- _param = self._get_browse_nodes_serialize(
186
- x_marketplace=x_marketplace,
187
- get_browse_nodes_request_content=get_browse_nodes_request_content,
188
- _request_auth=_request_auth,
189
- _content_type=_content_type,
190
- _headers=_headers,
191
- _host_index=_host_index
192
- )
193
-
194
- _response_types_map: Dict[str, Optional[str]] = {
195
- '200': "GetBrowseNodesResponseContent",
196
- '400': "ValidationExceptionResponseContent",
197
- '401': "UnauthorizedExceptionResponseContent",
198
- '403': "AccessDeniedExceptionResponseContent",
199
- '404': "ResourceNotFoundExceptionResponseContent",
200
- '429': "ThrottleExceptionResponseContent",
201
- '500': "InternalServerExceptionResponseContent",
202
- }
203
- response_data = self.api_client.call_api(
204
- *_param,
205
- _request_timeout=_request_timeout
206
- )
207
- response_data.read()
208
- return self.api_client.response_deserialize(
209
- response_data=response_data,
210
- response_types_map=_response_types_map,
211
- )
212
-
213
-
214
- @validate_call
215
- def get_browse_nodes_without_preload_content(
216
- self,
217
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com'")],
218
- get_browse_nodes_request_content: GetBrowseNodesRequestContent,
219
- _request_timeout: Union[
220
- None,
221
- Annotated[StrictFloat, Field(gt=0)],
222
- Tuple[
223
- Annotated[StrictFloat, Field(gt=0)],
224
- Annotated[StrictFloat, Field(gt=0)]
225
- ]
226
- ] = None,
227
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
228
- _content_type: Optional[StrictStr] = None,
229
- _headers: Optional[Dict[StrictStr, Any]] = None,
230
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
231
- ) -> RESTResponseType:
232
- """get_browse_nodes
233
-
234
- Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node's information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources: - BrowseNodes Available in all locales, however, parameter support varies by locale.
235
-
236
- :param x_marketplace: Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com' (required)
237
- :type x_marketplace: str
238
- :param get_browse_nodes_request_content: (required)
239
- :type get_browse_nodes_request_content: GetBrowseNodesRequestContent
240
- :param _request_timeout: timeout setting for this request. If one
241
- number provided, it will be total request
242
- timeout. It can also be a pair (tuple) of
243
- (connection, read) timeouts.
244
- :type _request_timeout: int, tuple(int, int), optional
245
- :param _request_auth: set to override the auth_settings for an a single
246
- request; this effectively ignores the
247
- authentication in the spec for a single request.
248
- :type _request_auth: dict, optional
249
- :param _content_type: force content-type for the request.
250
- :type _content_type: str, Optional
251
- :param _headers: set to override the headers for a single
252
- request; this effectively ignores the headers
253
- in the spec for a single request.
254
- :type _headers: dict, optional
255
- :param _host_index: set to override the host_index for a single
256
- request; this effectively ignores the host_index
257
- in the spec for a single request.
258
- :type _host_index: int, optional
259
- :return: Returns the result object.
260
- """ # noqa: E501
261
-
262
- _param = self._get_browse_nodes_serialize(
263
- x_marketplace=x_marketplace,
264
- get_browse_nodes_request_content=get_browse_nodes_request_content,
265
- _request_auth=_request_auth,
266
- _content_type=_content_type,
267
- _headers=_headers,
268
- _host_index=_host_index
269
- )
270
-
271
- _response_types_map: Dict[str, Optional[str]] = {
272
- '200': "GetBrowseNodesResponseContent",
273
- '400': "ValidationExceptionResponseContent",
274
- '401': "UnauthorizedExceptionResponseContent",
275
- '403': "AccessDeniedExceptionResponseContent",
276
- '404': "ResourceNotFoundExceptionResponseContent",
277
- '429': "ThrottleExceptionResponseContent",
278
- '500': "InternalServerExceptionResponseContent",
279
- }
280
- response_data = self.api_client.call_api(
281
- *_param,
282
- _request_timeout=_request_timeout
283
- )
284
- return response_data.response
285
-
286
-
287
- def _get_browse_nodes_serialize(
288
- self,
289
- x_marketplace,
290
- get_browse_nodes_request_content,
291
- _request_auth,
292
- _content_type,
293
- _headers,
294
- _host_index,
295
- ) -> RequestSerialized:
296
-
297
- _host = None
298
-
299
- _collection_formats: Dict[str, str] = {
300
- }
301
-
302
- _path_params: Dict[str, str] = {}
303
- _query_params: List[Tuple[str, str]] = []
304
- _header_params: Dict[str, Optional[str]] = _headers or {}
305
- _form_params: List[Tuple[str, str]] = []
306
- _files: Dict[str, Union[str, bytes]] = {}
307
- _body_params: Optional[bytes] = None
308
-
309
- # process the path parameters
310
- # process the query parameters
311
- # process the header parameters
312
- if x_marketplace is not None:
313
- _header_params['x-marketplace'] = x_marketplace
314
- # process the form parameters
315
- # process the body parameter
316
- if get_browse_nodes_request_content is not None:
317
- _body_params = get_browse_nodes_request_content
318
-
319
-
320
- # set the HTTP header `Accept`
321
- if 'Accept' not in _header_params:
322
- _header_params['Accept'] = self.api_client.select_header_accept(
323
- [
324
- 'application/json'
325
- ]
326
- )
327
-
328
- # set the HTTP header `Content-Type`
329
- if _content_type:
330
- _header_params['Content-Type'] = _content_type
331
- else:
332
- _default_content_type = (
333
- self.api_client.select_header_content_type(
334
- [
335
- 'application/json'
336
- ]
337
- )
338
- )
339
- if _default_content_type is not None:
340
- _header_params['Content-Type'] = _default_content_type
341
-
342
- # authentication setting
343
- _auth_settings: List[str] = [
344
- ]
345
-
346
- return self.api_client.param_serialize(
347
- method='POST',
348
- resource_path='/catalog/v1/getBrowseNodes',
349
- path_params=_path_params,
350
- query_params=_query_params,
351
- header_params=_header_params,
352
- body=_body_params,
353
- post_params=_form_params,
354
- files=_files,
355
- auth_settings=_auth_settings,
356
- collection_formats=_collection_formats,
357
- _host=_host,
358
- _request_auth=_request_auth
359
- )
360
-
361
-
362
-
363
-
364
- @validate_call
365
- def get_feed(
366
- self,
367
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
368
- get_feed_request_content: GetFeedRequestContent,
369
- _request_timeout: Union[
370
- None,
371
- Annotated[StrictFloat, Field(gt=0)],
372
- Tuple[
373
- Annotated[StrictFloat, Field(gt=0)],
374
- Annotated[StrictFloat, Field(gt=0)]
375
- ]
376
- ] = None,
377
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
378
- _content_type: Optional[StrictStr] = None,
379
- _headers: Optional[Dict[StrictStr, Any]] = None,
380
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
381
- ) -> GetFeedResponseContent:
382
- """get_feed
383
-
384
- Get pre-signed S3 Url for a feed
385
-
386
- :param x_marketplace: Target Amazon Locale. (required)
387
- :type x_marketplace: str
388
- :param get_feed_request_content: (required)
389
- :type get_feed_request_content: GetFeedRequestContent
390
- :param _request_timeout: timeout setting for this request. If one
391
- number provided, it will be total request
392
- timeout. It can also be a pair (tuple) of
393
- (connection, read) timeouts.
394
- :type _request_timeout: int, tuple(int, int), optional
395
- :param _request_auth: set to override the auth_settings for an a single
396
- request; this effectively ignores the
397
- authentication in the spec for a single request.
398
- :type _request_auth: dict, optional
399
- :param _content_type: force content-type for the request.
400
- :type _content_type: str, Optional
401
- :param _headers: set to override the headers for a single
402
- request; this effectively ignores the headers
403
- in the spec for a single request.
404
- :type _headers: dict, optional
405
- :param _host_index: set to override the host_index for a single
406
- request; this effectively ignores the host_index
407
- in the spec for a single request.
408
- :type _host_index: int, optional
409
- :return: Returns the result object.
410
- """ # noqa: E501
411
-
412
- _param = self._get_feed_serialize(
413
- x_marketplace=x_marketplace,
414
- get_feed_request_content=get_feed_request_content,
415
- _request_auth=_request_auth,
416
- _content_type=_content_type,
417
- _headers=_headers,
418
- _host_index=_host_index
419
- )
420
-
421
- _response_types_map: Dict[str, Optional[str]] = {
422
- '200': "GetFeedResponseContent",
423
- '400': "ValidationExceptionResponseContent",
424
- '401': "UnauthorizedExceptionResponseContent",
425
- '403': "AccessDeniedExceptionResponseContent",
426
- '404': "ResourceNotFoundExceptionResponseContent",
427
- '500': "InternalServerExceptionResponseContent",
428
- }
429
- response_data = self.api_client.call_api(
430
- *_param,
431
- _request_timeout=_request_timeout
432
- )
433
- response_data.read()
434
- return self.api_client.response_deserialize(
435
- response_data=response_data,
436
- response_types_map=_response_types_map,
437
- ).data
438
-
439
-
440
- @validate_call
441
- def get_feed_with_http_info(
442
- self,
443
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
444
- get_feed_request_content: GetFeedRequestContent,
445
- _request_timeout: Union[
446
- None,
447
- Annotated[StrictFloat, Field(gt=0)],
448
- Tuple[
449
- Annotated[StrictFloat, Field(gt=0)],
450
- Annotated[StrictFloat, Field(gt=0)]
451
- ]
452
- ] = None,
453
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
454
- _content_type: Optional[StrictStr] = None,
455
- _headers: Optional[Dict[StrictStr, Any]] = None,
456
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
457
- ) -> ApiResponse[GetFeedResponseContent]:
458
- """get_feed
459
-
460
- Get pre-signed S3 Url for a feed
461
-
462
- :param x_marketplace: Target Amazon Locale. (required)
463
- :type x_marketplace: str
464
- :param get_feed_request_content: (required)
465
- :type get_feed_request_content: GetFeedRequestContent
466
- :param _request_timeout: timeout setting for this request. If one
467
- number provided, it will be total request
468
- timeout. It can also be a pair (tuple) of
469
- (connection, read) timeouts.
470
- :type _request_timeout: int, tuple(int, int), optional
471
- :param _request_auth: set to override the auth_settings for an a single
472
- request; this effectively ignores the
473
- authentication in the spec for a single request.
474
- :type _request_auth: dict, optional
475
- :param _content_type: force content-type for the request.
476
- :type _content_type: str, Optional
477
- :param _headers: set to override the headers for a single
478
- request; this effectively ignores the headers
479
- in the spec for a single request.
480
- :type _headers: dict, optional
481
- :param _host_index: set to override the host_index for a single
482
- request; this effectively ignores the host_index
483
- in the spec for a single request.
484
- :type _host_index: int, optional
485
- :return: Returns the result object.
486
- """ # noqa: E501
487
-
488
- _param = self._get_feed_serialize(
489
- x_marketplace=x_marketplace,
490
- get_feed_request_content=get_feed_request_content,
491
- _request_auth=_request_auth,
492
- _content_type=_content_type,
493
- _headers=_headers,
494
- _host_index=_host_index
495
- )
496
-
497
- _response_types_map: Dict[str, Optional[str]] = {
498
- '200': "GetFeedResponseContent",
499
- '400': "ValidationExceptionResponseContent",
500
- '401': "UnauthorizedExceptionResponseContent",
501
- '403': "AccessDeniedExceptionResponseContent",
502
- '404': "ResourceNotFoundExceptionResponseContent",
503
- '500': "InternalServerExceptionResponseContent",
504
- }
505
- response_data = self.api_client.call_api(
506
- *_param,
507
- _request_timeout=_request_timeout
508
- )
509
- response_data.read()
510
- return self.api_client.response_deserialize(
511
- response_data=response_data,
512
- response_types_map=_response_types_map,
513
- )
514
-
515
-
516
- @validate_call
517
- def get_feed_without_preload_content(
518
- self,
519
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
520
- get_feed_request_content: GetFeedRequestContent,
521
- _request_timeout: Union[
522
- None,
523
- Annotated[StrictFloat, Field(gt=0)],
524
- Tuple[
525
- Annotated[StrictFloat, Field(gt=0)],
526
- Annotated[StrictFloat, Field(gt=0)]
527
- ]
528
- ] = None,
529
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
530
- _content_type: Optional[StrictStr] = None,
531
- _headers: Optional[Dict[StrictStr, Any]] = None,
532
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
533
- ) -> RESTResponseType:
534
- """get_feed
535
-
536
- Get pre-signed S3 Url for a feed
537
-
538
- :param x_marketplace: Target Amazon Locale. (required)
539
- :type x_marketplace: str
540
- :param get_feed_request_content: (required)
541
- :type get_feed_request_content: GetFeedRequestContent
542
- :param _request_timeout: timeout setting for this request. If one
543
- number provided, it will be total request
544
- timeout. It can also be a pair (tuple) of
545
- (connection, read) timeouts.
546
- :type _request_timeout: int, tuple(int, int), optional
547
- :param _request_auth: set to override the auth_settings for an a single
548
- request; this effectively ignores the
549
- authentication in the spec for a single request.
550
- :type _request_auth: dict, optional
551
- :param _content_type: force content-type for the request.
552
- :type _content_type: str, Optional
553
- :param _headers: set to override the headers for a single
554
- request; this effectively ignores the headers
555
- in the spec for a single request.
556
- :type _headers: dict, optional
557
- :param _host_index: set to override the host_index for a single
558
- request; this effectively ignores the host_index
559
- in the spec for a single request.
560
- :type _host_index: int, optional
561
- :return: Returns the result object.
562
- """ # noqa: E501
563
-
564
- _param = self._get_feed_serialize(
565
- x_marketplace=x_marketplace,
566
- get_feed_request_content=get_feed_request_content,
567
- _request_auth=_request_auth,
568
- _content_type=_content_type,
569
- _headers=_headers,
570
- _host_index=_host_index
571
- )
572
-
573
- _response_types_map: Dict[str, Optional[str]] = {
574
- '200': "GetFeedResponseContent",
575
- '400': "ValidationExceptionResponseContent",
576
- '401': "UnauthorizedExceptionResponseContent",
577
- '403': "AccessDeniedExceptionResponseContent",
578
- '404': "ResourceNotFoundExceptionResponseContent",
579
- '500': "InternalServerExceptionResponseContent",
580
- }
581
- response_data = self.api_client.call_api(
582
- *_param,
583
- _request_timeout=_request_timeout
584
- )
585
- return response_data.response
586
-
587
-
588
- def _get_feed_serialize(
589
- self,
590
- x_marketplace,
591
- get_feed_request_content,
592
- _request_auth,
593
- _content_type,
594
- _headers,
595
- _host_index,
596
- ) -> RequestSerialized:
597
-
598
- _host = None
599
-
600
- _collection_formats: Dict[str, str] = {
601
- }
602
-
603
- _path_params: Dict[str, str] = {}
604
- _query_params: List[Tuple[str, str]] = []
605
- _header_params: Dict[str, Optional[str]] = _headers or {}
606
- _form_params: List[Tuple[str, str]] = []
607
- _files: Dict[str, Union[str, bytes]] = {}
608
- _body_params: Optional[bytes] = None
609
-
610
- # process the path parameters
611
- # process the query parameters
612
- # process the header parameters
613
- if x_marketplace is not None:
614
- _header_params['x-marketplace'] = x_marketplace
615
- # process the form parameters
616
- # process the body parameter
617
- if get_feed_request_content is not None:
618
- _body_params = get_feed_request_content
619
-
620
-
621
- # set the HTTP header `Accept`
622
- if 'Accept' not in _header_params:
623
- _header_params['Accept'] = self.api_client.select_header_accept(
624
- [
625
- 'application/json'
626
- ]
627
- )
628
-
629
- # set the HTTP header `Content-Type`
630
- if _content_type:
631
- _header_params['Content-Type'] = _content_type
632
- else:
633
- _default_content_type = (
634
- self.api_client.select_header_content_type(
635
- [
636
- 'application/json'
637
- ]
638
- )
639
- )
640
- if _default_content_type is not None:
641
- _header_params['Content-Type'] = _default_content_type
642
-
643
- # authentication setting
644
- _auth_settings: List[str] = [
645
- ]
646
-
647
- return self.api_client.param_serialize(
648
- method='POST',
649
- resource_path='/catalog/v1/getFeed',
650
- path_params=_path_params,
651
- query_params=_query_params,
652
- header_params=_header_params,
653
- body=_body_params,
654
- post_params=_form_params,
655
- files=_files,
656
- auth_settings=_auth_settings,
657
- collection_formats=_collection_formats,
658
- _host=_host,
659
- _request_auth=_request_auth
660
- )
661
-
662
-
663
-
664
-
665
- @validate_call
666
- def get_items(
667
- self,
668
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
669
- get_items_request_content: GetItemsRequestContent,
670
- _request_timeout: Union[
671
- None,
672
- Annotated[StrictFloat, Field(gt=0)],
673
- Tuple[
674
- Annotated[StrictFloat, Field(gt=0)],
675
- Annotated[StrictFloat, Field(gt=0)]
676
- ]
677
- ] = None,
678
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
679
- _content_type: Optional[StrictStr] = None,
680
- _headers: Optional[Dict[StrictStr, Any]] = None,
681
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
682
- ) -> GetItemsResponseContent:
683
- """get_items
684
-
685
-
686
- :param x_marketplace: Target Amazon Locale. (required)
687
- :type x_marketplace: str
688
- :param get_items_request_content: (required)
689
- :type get_items_request_content: GetItemsRequestContent
690
- :param _request_timeout: timeout setting for this request. If one
691
- number provided, it will be total request
692
- timeout. It can also be a pair (tuple) of
693
- (connection, read) timeouts.
694
- :type _request_timeout: int, tuple(int, int), optional
695
- :param _request_auth: set to override the auth_settings for an a single
696
- request; this effectively ignores the
697
- authentication in the spec for a single request.
698
- :type _request_auth: dict, optional
699
- :param _content_type: force content-type for the request.
700
- :type _content_type: str, Optional
701
- :param _headers: set to override the headers for a single
702
- request; this effectively ignores the headers
703
- in the spec for a single request.
704
- :type _headers: dict, optional
705
- :param _host_index: set to override the host_index for a single
706
- request; this effectively ignores the host_index
707
- in the spec for a single request.
708
- :type _host_index: int, optional
709
- :return: Returns the result object.
710
- """ # noqa: E501
711
-
712
- _param = self._get_items_serialize(
713
- x_marketplace=x_marketplace,
714
- get_items_request_content=get_items_request_content,
715
- _request_auth=_request_auth,
716
- _content_type=_content_type,
717
- _headers=_headers,
718
- _host_index=_host_index
719
- )
720
-
721
- _response_types_map: Dict[str, Optional[str]] = {
722
- '200': "GetItemsResponseContent",
723
- '400': "ValidationExceptionResponseContent",
724
- '401': "UnauthorizedExceptionResponseContent",
725
- '403': "AccessDeniedExceptionResponseContent",
726
- '404': "ResourceNotFoundExceptionResponseContent",
727
- '429': "ThrottleExceptionResponseContent",
728
- '500': "InternalServerExceptionResponseContent",
729
- }
730
- response_data = self.api_client.call_api(
731
- *_param,
732
- _request_timeout=_request_timeout
733
- )
734
- response_data.read()
735
- return self.api_client.response_deserialize(
736
- response_data=response_data,
737
- response_types_map=_response_types_map,
738
- ).data
739
-
740
-
741
- @validate_call
742
- def get_items_with_http_info(
743
- self,
744
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
745
- get_items_request_content: GetItemsRequestContent,
746
- _request_timeout: Union[
747
- None,
748
- Annotated[StrictFloat, Field(gt=0)],
749
- Tuple[
750
- Annotated[StrictFloat, Field(gt=0)],
751
- Annotated[StrictFloat, Field(gt=0)]
752
- ]
753
- ] = None,
754
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
755
- _content_type: Optional[StrictStr] = None,
756
- _headers: Optional[Dict[StrictStr, Any]] = None,
757
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
758
- ) -> ApiResponse[GetItemsResponseContent]:
759
- """get_items
760
-
761
-
762
- :param x_marketplace: Target Amazon Locale. (required)
763
- :type x_marketplace: str
764
- :param get_items_request_content: (required)
765
- :type get_items_request_content: GetItemsRequestContent
766
- :param _request_timeout: timeout setting for this request. If one
767
- number provided, it will be total request
768
- timeout. It can also be a pair (tuple) of
769
- (connection, read) timeouts.
770
- :type _request_timeout: int, tuple(int, int), optional
771
- :param _request_auth: set to override the auth_settings for an a single
772
- request; this effectively ignores the
773
- authentication in the spec for a single request.
774
- :type _request_auth: dict, optional
775
- :param _content_type: force content-type for the request.
776
- :type _content_type: str, Optional
777
- :param _headers: set to override the headers for a single
778
- request; this effectively ignores the headers
779
- in the spec for a single request.
780
- :type _headers: dict, optional
781
- :param _host_index: set to override the host_index for a single
782
- request; this effectively ignores the host_index
783
- in the spec for a single request.
784
- :type _host_index: int, optional
785
- :return: Returns the result object.
786
- """ # noqa: E501
787
-
788
- _param = self._get_items_serialize(
789
- x_marketplace=x_marketplace,
790
- get_items_request_content=get_items_request_content,
791
- _request_auth=_request_auth,
792
- _content_type=_content_type,
793
- _headers=_headers,
794
- _host_index=_host_index
795
- )
796
-
797
- _response_types_map: Dict[str, Optional[str]] = {
798
- '200': "GetItemsResponseContent",
799
- '400': "ValidationExceptionResponseContent",
800
- '401': "UnauthorizedExceptionResponseContent",
801
- '403': "AccessDeniedExceptionResponseContent",
802
- '404': "ResourceNotFoundExceptionResponseContent",
803
- '429': "ThrottleExceptionResponseContent",
804
- '500': "InternalServerExceptionResponseContent",
805
- }
806
- response_data = self.api_client.call_api(
807
- *_param,
808
- _request_timeout=_request_timeout
809
- )
810
- response_data.read()
811
- return self.api_client.response_deserialize(
812
- response_data=response_data,
813
- response_types_map=_response_types_map,
814
- )
815
-
816
-
817
- @validate_call
818
- def get_items_without_preload_content(
819
- self,
820
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
821
- get_items_request_content: GetItemsRequestContent,
822
- _request_timeout: Union[
823
- None,
824
- Annotated[StrictFloat, Field(gt=0)],
825
- Tuple[
826
- Annotated[StrictFloat, Field(gt=0)],
827
- Annotated[StrictFloat, Field(gt=0)]
828
- ]
829
- ] = None,
830
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
831
- _content_type: Optional[StrictStr] = None,
832
- _headers: Optional[Dict[StrictStr, Any]] = None,
833
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
834
- ) -> RESTResponseType:
835
- """get_items
836
-
837
-
838
- :param x_marketplace: Target Amazon Locale. (required)
839
- :type x_marketplace: str
840
- :param get_items_request_content: (required)
841
- :type get_items_request_content: GetItemsRequestContent
842
- :param _request_timeout: timeout setting for this request. If one
843
- number provided, it will be total request
844
- timeout. It can also be a pair (tuple) of
845
- (connection, read) timeouts.
846
- :type _request_timeout: int, tuple(int, int), optional
847
- :param _request_auth: set to override the auth_settings for an a single
848
- request; this effectively ignores the
849
- authentication in the spec for a single request.
850
- :type _request_auth: dict, optional
851
- :param _content_type: force content-type for the request.
852
- :type _content_type: str, Optional
853
- :param _headers: set to override the headers for a single
854
- request; this effectively ignores the headers
855
- in the spec for a single request.
856
- :type _headers: dict, optional
857
- :param _host_index: set to override the host_index for a single
858
- request; this effectively ignores the host_index
859
- in the spec for a single request.
860
- :type _host_index: int, optional
861
- :return: Returns the result object.
862
- """ # noqa: E501
863
-
864
- _param = self._get_items_serialize(
865
- x_marketplace=x_marketplace,
866
- get_items_request_content=get_items_request_content,
867
- _request_auth=_request_auth,
868
- _content_type=_content_type,
869
- _headers=_headers,
870
- _host_index=_host_index
871
- )
872
-
873
- _response_types_map: Dict[str, Optional[str]] = {
874
- '200': "GetItemsResponseContent",
875
- '400': "ValidationExceptionResponseContent",
876
- '401': "UnauthorizedExceptionResponseContent",
877
- '403': "AccessDeniedExceptionResponseContent",
878
- '404': "ResourceNotFoundExceptionResponseContent",
879
- '429': "ThrottleExceptionResponseContent",
880
- '500': "InternalServerExceptionResponseContent",
881
- }
882
- response_data = self.api_client.call_api(
883
- *_param,
884
- _request_timeout=_request_timeout
885
- )
886
- return response_data.response
887
-
888
-
889
- def _get_items_serialize(
890
- self,
891
- x_marketplace,
892
- get_items_request_content,
893
- _request_auth,
894
- _content_type,
895
- _headers,
896
- _host_index,
897
- ) -> RequestSerialized:
898
-
899
- _host = None
900
-
901
- _collection_formats: Dict[str, str] = {
902
- }
903
-
904
- _path_params: Dict[str, str] = {}
905
- _query_params: List[Tuple[str, str]] = []
906
- _header_params: Dict[str, Optional[str]] = _headers or {}
907
- _form_params: List[Tuple[str, str]] = []
908
- _files: Dict[str, Union[str, bytes]] = {}
909
- _body_params: Optional[bytes] = None
910
-
911
- # process the path parameters
912
- # process the query parameters
913
- # process the header parameters
914
- if x_marketplace is not None:
915
- _header_params['x-marketplace'] = x_marketplace
916
- # process the form parameters
917
- # process the body parameter
918
- if get_items_request_content is not None:
919
- _body_params = get_items_request_content
920
-
921
-
922
- # set the HTTP header `Accept`
923
- if 'Accept' not in _header_params:
924
- _header_params['Accept'] = self.api_client.select_header_accept(
925
- [
926
- 'application/json'
927
- ]
928
- )
929
-
930
- # set the HTTP header `Content-Type`
931
- if _content_type:
932
- _header_params['Content-Type'] = _content_type
933
- else:
934
- _default_content_type = (
935
- self.api_client.select_header_content_type(
936
- [
937
- 'application/json'
938
- ]
939
- )
940
- )
941
- if _default_content_type is not None:
942
- _header_params['Content-Type'] = _default_content_type
943
-
944
- # authentication setting
945
- _auth_settings: List[str] = [
946
- ]
947
-
948
- return self.api_client.param_serialize(
949
- method='POST',
950
- resource_path='/catalog/v1/getItems',
951
- path_params=_path_params,
952
- query_params=_query_params,
953
- header_params=_header_params,
954
- body=_body_params,
955
- post_params=_form_params,
956
- files=_files,
957
- auth_settings=_auth_settings,
958
- collection_formats=_collection_formats,
959
- _host=_host,
960
- _request_auth=_request_auth
961
- )
962
-
963
-
964
-
965
-
966
- @validate_call
967
- def get_report(
968
- self,
969
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
970
- get_report_request_content: GetReportRequestContent,
971
- _request_timeout: Union[
972
- None,
973
- Annotated[StrictFloat, Field(gt=0)],
974
- Tuple[
975
- Annotated[StrictFloat, Field(gt=0)],
976
- Annotated[StrictFloat, Field(gt=0)]
977
- ]
978
- ] = None,
979
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
980
- _content_type: Optional[StrictStr] = None,
981
- _headers: Optional[Dict[StrictStr, Any]] = None,
982
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
983
- ) -> GetReportResponseContent:
984
- """get_report
985
-
986
- Get pre-signed S3 Url for a report
987
-
988
- :param x_marketplace: Target Amazon Locale. (required)
989
- :type x_marketplace: str
990
- :param get_report_request_content: (required)
991
- :type get_report_request_content: GetReportRequestContent
992
- :param _request_timeout: timeout setting for this request. If one
993
- number provided, it will be total request
994
- timeout. It can also be a pair (tuple) of
995
- (connection, read) timeouts.
996
- :type _request_timeout: int, tuple(int, int), optional
997
- :param _request_auth: set to override the auth_settings for an a single
998
- request; this effectively ignores the
999
- authentication in the spec for a single request.
1000
- :type _request_auth: dict, optional
1001
- :param _content_type: force content-type for the request.
1002
- :type _content_type: str, Optional
1003
- :param _headers: set to override the headers for a single
1004
- request; this effectively ignores the headers
1005
- in the spec for a single request.
1006
- :type _headers: dict, optional
1007
- :param _host_index: set to override the host_index for a single
1008
- request; this effectively ignores the host_index
1009
- in the spec for a single request.
1010
- :type _host_index: int, optional
1011
- :return: Returns the result object.
1012
- """ # noqa: E501
1013
-
1014
- _param = self._get_report_serialize(
1015
- x_marketplace=x_marketplace,
1016
- get_report_request_content=get_report_request_content,
1017
- _request_auth=_request_auth,
1018
- _content_type=_content_type,
1019
- _headers=_headers,
1020
- _host_index=_host_index
1021
- )
1022
-
1023
- _response_types_map: Dict[str, Optional[str]] = {
1024
- '200': "GetReportResponseContent",
1025
- '400': "ValidationExceptionResponseContent",
1026
- '401': "UnauthorizedExceptionResponseContent",
1027
- '403': "AccessDeniedExceptionResponseContent",
1028
- '404': "ResourceNotFoundExceptionResponseContent",
1029
- '500': "InternalServerExceptionResponseContent",
1030
- }
1031
- response_data = self.api_client.call_api(
1032
- *_param,
1033
- _request_timeout=_request_timeout
1034
- )
1035
- response_data.read()
1036
- return self.api_client.response_deserialize(
1037
- response_data=response_data,
1038
- response_types_map=_response_types_map,
1039
- ).data
1040
-
1041
-
1042
- @validate_call
1043
- def get_report_with_http_info(
1044
- self,
1045
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1046
- get_report_request_content: GetReportRequestContent,
1047
- _request_timeout: Union[
1048
- None,
1049
- Annotated[StrictFloat, Field(gt=0)],
1050
- Tuple[
1051
- Annotated[StrictFloat, Field(gt=0)],
1052
- Annotated[StrictFloat, Field(gt=0)]
1053
- ]
1054
- ] = None,
1055
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1056
- _content_type: Optional[StrictStr] = None,
1057
- _headers: Optional[Dict[StrictStr, Any]] = None,
1058
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1059
- ) -> ApiResponse[GetReportResponseContent]:
1060
- """get_report
1061
-
1062
- Get pre-signed S3 Url for a report
1063
-
1064
- :param x_marketplace: Target Amazon Locale. (required)
1065
- :type x_marketplace: str
1066
- :param get_report_request_content: (required)
1067
- :type get_report_request_content: GetReportRequestContent
1068
- :param _request_timeout: timeout setting for this request. If one
1069
- number provided, it will be total request
1070
- timeout. It can also be a pair (tuple) of
1071
- (connection, read) timeouts.
1072
- :type _request_timeout: int, tuple(int, int), optional
1073
- :param _request_auth: set to override the auth_settings for an a single
1074
- request; this effectively ignores the
1075
- authentication in the spec for a single request.
1076
- :type _request_auth: dict, optional
1077
- :param _content_type: force content-type for the request.
1078
- :type _content_type: str, Optional
1079
- :param _headers: set to override the headers for a single
1080
- request; this effectively ignores the headers
1081
- in the spec for a single request.
1082
- :type _headers: dict, optional
1083
- :param _host_index: set to override the host_index for a single
1084
- request; this effectively ignores the host_index
1085
- in the spec for a single request.
1086
- :type _host_index: int, optional
1087
- :return: Returns the result object.
1088
- """ # noqa: E501
1089
-
1090
- _param = self._get_report_serialize(
1091
- x_marketplace=x_marketplace,
1092
- get_report_request_content=get_report_request_content,
1093
- _request_auth=_request_auth,
1094
- _content_type=_content_type,
1095
- _headers=_headers,
1096
- _host_index=_host_index
1097
- )
1098
-
1099
- _response_types_map: Dict[str, Optional[str]] = {
1100
- '200': "GetReportResponseContent",
1101
- '400': "ValidationExceptionResponseContent",
1102
- '401': "UnauthorizedExceptionResponseContent",
1103
- '403': "AccessDeniedExceptionResponseContent",
1104
- '404': "ResourceNotFoundExceptionResponseContent",
1105
- '500': "InternalServerExceptionResponseContent",
1106
- }
1107
- response_data = self.api_client.call_api(
1108
- *_param,
1109
- _request_timeout=_request_timeout
1110
- )
1111
- response_data.read()
1112
- return self.api_client.response_deserialize(
1113
- response_data=response_data,
1114
- response_types_map=_response_types_map,
1115
- )
1116
-
1117
-
1118
- @validate_call
1119
- def get_report_without_preload_content(
1120
- self,
1121
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1122
- get_report_request_content: GetReportRequestContent,
1123
- _request_timeout: Union[
1124
- None,
1125
- Annotated[StrictFloat, Field(gt=0)],
1126
- Tuple[
1127
- Annotated[StrictFloat, Field(gt=0)],
1128
- Annotated[StrictFloat, Field(gt=0)]
1129
- ]
1130
- ] = None,
1131
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1132
- _content_type: Optional[StrictStr] = None,
1133
- _headers: Optional[Dict[StrictStr, Any]] = None,
1134
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1135
- ) -> RESTResponseType:
1136
- """get_report
1137
-
1138
- Get pre-signed S3 Url for a report
1139
-
1140
- :param x_marketplace: Target Amazon Locale. (required)
1141
- :type x_marketplace: str
1142
- :param get_report_request_content: (required)
1143
- :type get_report_request_content: GetReportRequestContent
1144
- :param _request_timeout: timeout setting for this request. If one
1145
- number provided, it will be total request
1146
- timeout. It can also be a pair (tuple) of
1147
- (connection, read) timeouts.
1148
- :type _request_timeout: int, tuple(int, int), optional
1149
- :param _request_auth: set to override the auth_settings for an a single
1150
- request; this effectively ignores the
1151
- authentication in the spec for a single request.
1152
- :type _request_auth: dict, optional
1153
- :param _content_type: force content-type for the request.
1154
- :type _content_type: str, Optional
1155
- :param _headers: set to override the headers for a single
1156
- request; this effectively ignores the headers
1157
- in the spec for a single request.
1158
- :type _headers: dict, optional
1159
- :param _host_index: set to override the host_index for a single
1160
- request; this effectively ignores the host_index
1161
- in the spec for a single request.
1162
- :type _host_index: int, optional
1163
- :return: Returns the result object.
1164
- """ # noqa: E501
1165
-
1166
- _param = self._get_report_serialize(
1167
- x_marketplace=x_marketplace,
1168
- get_report_request_content=get_report_request_content,
1169
- _request_auth=_request_auth,
1170
- _content_type=_content_type,
1171
- _headers=_headers,
1172
- _host_index=_host_index
1173
- )
1174
-
1175
- _response_types_map: Dict[str, Optional[str]] = {
1176
- '200': "GetReportResponseContent",
1177
- '400': "ValidationExceptionResponseContent",
1178
- '401': "UnauthorizedExceptionResponseContent",
1179
- '403': "AccessDeniedExceptionResponseContent",
1180
- '404': "ResourceNotFoundExceptionResponseContent",
1181
- '500': "InternalServerExceptionResponseContent",
1182
- }
1183
- response_data = self.api_client.call_api(
1184
- *_param,
1185
- _request_timeout=_request_timeout
1186
- )
1187
- return response_data.response
1188
-
1189
-
1190
- def _get_report_serialize(
1191
- self,
1192
- x_marketplace,
1193
- get_report_request_content,
1194
- _request_auth,
1195
- _content_type,
1196
- _headers,
1197
- _host_index,
1198
- ) -> RequestSerialized:
1199
-
1200
- _host = None
1201
-
1202
- _collection_formats: Dict[str, str] = {
1203
- }
1204
-
1205
- _path_params: Dict[str, str] = {}
1206
- _query_params: List[Tuple[str, str]] = []
1207
- _header_params: Dict[str, Optional[str]] = _headers or {}
1208
- _form_params: List[Tuple[str, str]] = []
1209
- _files: Dict[str, Union[str, bytes]] = {}
1210
- _body_params: Optional[bytes] = None
1211
-
1212
- # process the path parameters
1213
- # process the query parameters
1214
- # process the header parameters
1215
- if x_marketplace is not None:
1216
- _header_params['x-marketplace'] = x_marketplace
1217
- # process the form parameters
1218
- # process the body parameter
1219
- if get_report_request_content is not None:
1220
- _body_params = get_report_request_content
1221
-
1222
-
1223
- # set the HTTP header `Accept`
1224
- if 'Accept' not in _header_params:
1225
- _header_params['Accept'] = self.api_client.select_header_accept(
1226
- [
1227
- 'application/json'
1228
- ]
1229
- )
1230
-
1231
- # set the HTTP header `Content-Type`
1232
- if _content_type:
1233
- _header_params['Content-Type'] = _content_type
1234
- else:
1235
- _default_content_type = (
1236
- self.api_client.select_header_content_type(
1237
- [
1238
- 'application/json'
1239
- ]
1240
- )
1241
- )
1242
- if _default_content_type is not None:
1243
- _header_params['Content-Type'] = _default_content_type
1244
-
1245
- # authentication setting
1246
- _auth_settings: List[str] = [
1247
- ]
1248
-
1249
- return self.api_client.param_serialize(
1250
- method='POST',
1251
- resource_path='/reports/v1/getReport',
1252
- path_params=_path_params,
1253
- query_params=_query_params,
1254
- header_params=_header_params,
1255
- body=_body_params,
1256
- post_params=_form_params,
1257
- files=_files,
1258
- auth_settings=_auth_settings,
1259
- collection_formats=_collection_formats,
1260
- _host=_host,
1261
- _request_auth=_request_auth
1262
- )
1263
-
1264
-
1265
-
1266
-
1267
- @validate_call
1268
- def get_variations(
1269
- self,
1270
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com'")],
1271
- get_variations_request_content: GetVariationsRequestContent,
1272
- _request_timeout: Union[
1273
- None,
1274
- Annotated[StrictFloat, Field(gt=0)],
1275
- Tuple[
1276
- Annotated[StrictFloat, Field(gt=0)],
1277
- Annotated[StrictFloat, Field(gt=0)]
1278
- ]
1279
- ] = None,
1280
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1281
- _content_type: Optional[StrictStr] = None,
1282
- _headers: Optional[Dict[StrictStr, Any]] = None,
1283
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1284
- ) -> GetVariationsResponseContent:
1285
- """get_variations
1286
-
1287
- Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. These items which differ according to a consistent theme are called variations. A variation is a child ASIN. The parent ASIN is an abstraction of the children items. For example, a shirt is a parent ASIN and parent ASINs cannot be sold. A child ASIN would be a blue shirt, size 16, sold by MyApparelStore. This child ASIN is one of potentially many variations. The ways in which variations differ are called dimensions. In the preceding example, size and color are the dimensions. GetVariations supports the following high-level resources: - BrowseNodeInfo: Browse nodes associated with items - Images: Product images in various sizes - ItemInfo: Detailed item information including title, features, and specifications - OffersV2: Offer listings with availability, pricing, and merchant details - VariationSummary: Summary of variation dimensions and price ranges By default, GetVariations returns 10 variations per page. Use VariationPage and VariationCount parameters to control pagination. The operation works with both parent ASINs (to retrieve all variations) and child ASINs (to retrieve sibling variations). Available in all locales, however, parameter support varies by locale.
1288
-
1289
- :param x_marketplace: Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com' (required)
1290
- :type x_marketplace: str
1291
- :param get_variations_request_content: (required)
1292
- :type get_variations_request_content: GetVariationsRequestContent
1293
- :param _request_timeout: timeout setting for this request. If one
1294
- number provided, it will be total request
1295
- timeout. It can also be a pair (tuple) of
1296
- (connection, read) timeouts.
1297
- :type _request_timeout: int, tuple(int, int), optional
1298
- :param _request_auth: set to override the auth_settings for an a single
1299
- request; this effectively ignores the
1300
- authentication in the spec for a single request.
1301
- :type _request_auth: dict, optional
1302
- :param _content_type: force content-type for the request.
1303
- :type _content_type: str, Optional
1304
- :param _headers: set to override the headers for a single
1305
- request; this effectively ignores the headers
1306
- in the spec for a single request.
1307
- :type _headers: dict, optional
1308
- :param _host_index: set to override the host_index for a single
1309
- request; this effectively ignores the host_index
1310
- in the spec for a single request.
1311
- :type _host_index: int, optional
1312
- :return: Returns the result object.
1313
- """ # noqa: E501
1314
-
1315
- _param = self._get_variations_serialize(
1316
- x_marketplace=x_marketplace,
1317
- get_variations_request_content=get_variations_request_content,
1318
- _request_auth=_request_auth,
1319
- _content_type=_content_type,
1320
- _headers=_headers,
1321
- _host_index=_host_index
1322
- )
1323
-
1324
- _response_types_map: Dict[str, Optional[str]] = {
1325
- '200': "GetVariationsResponseContent",
1326
- '400': "ValidationExceptionResponseContent",
1327
- '401': "UnauthorizedExceptionResponseContent",
1328
- '403': "AccessDeniedExceptionResponseContent",
1329
- '404': "ResourceNotFoundExceptionResponseContent",
1330
- '429': "ThrottleExceptionResponseContent",
1331
- '500': "InternalServerExceptionResponseContent",
1332
- }
1333
- response_data = self.api_client.call_api(
1334
- *_param,
1335
- _request_timeout=_request_timeout
1336
- )
1337
- response_data.read()
1338
- return self.api_client.response_deserialize(
1339
- response_data=response_data,
1340
- response_types_map=_response_types_map,
1341
- ).data
1342
-
1343
-
1344
- @validate_call
1345
- def get_variations_with_http_info(
1346
- self,
1347
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com'")],
1348
- get_variations_request_content: GetVariationsRequestContent,
1349
- _request_timeout: Union[
1350
- None,
1351
- Annotated[StrictFloat, Field(gt=0)],
1352
- Tuple[
1353
- Annotated[StrictFloat, Field(gt=0)],
1354
- Annotated[StrictFloat, Field(gt=0)]
1355
- ]
1356
- ] = None,
1357
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1358
- _content_type: Optional[StrictStr] = None,
1359
- _headers: Optional[Dict[StrictStr, Any]] = None,
1360
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1361
- ) -> ApiResponse[GetVariationsResponseContent]:
1362
- """get_variations
1363
-
1364
- Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. These items which differ according to a consistent theme are called variations. A variation is a child ASIN. The parent ASIN is an abstraction of the children items. For example, a shirt is a parent ASIN and parent ASINs cannot be sold. A child ASIN would be a blue shirt, size 16, sold by MyApparelStore. This child ASIN is one of potentially many variations. The ways in which variations differ are called dimensions. In the preceding example, size and color are the dimensions. GetVariations supports the following high-level resources: - BrowseNodeInfo: Browse nodes associated with items - Images: Product images in various sizes - ItemInfo: Detailed item information including title, features, and specifications - OffersV2: Offer listings with availability, pricing, and merchant details - VariationSummary: Summary of variation dimensions and price ranges By default, GetVariations returns 10 variations per page. Use VariationPage and VariationCount parameters to control pagination. The operation works with both parent ASINs (to retrieve all variations) and child ASINs (to retrieve sibling variations). Available in all locales, however, parameter support varies by locale.
1365
-
1366
- :param x_marketplace: Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com' (required)
1367
- :type x_marketplace: str
1368
- :param get_variations_request_content: (required)
1369
- :type get_variations_request_content: GetVariationsRequestContent
1370
- :param _request_timeout: timeout setting for this request. If one
1371
- number provided, it will be total request
1372
- timeout. It can also be a pair (tuple) of
1373
- (connection, read) timeouts.
1374
- :type _request_timeout: int, tuple(int, int), optional
1375
- :param _request_auth: set to override the auth_settings for an a single
1376
- request; this effectively ignores the
1377
- authentication in the spec for a single request.
1378
- :type _request_auth: dict, optional
1379
- :param _content_type: force content-type for the request.
1380
- :type _content_type: str, Optional
1381
- :param _headers: set to override the headers for a single
1382
- request; this effectively ignores the headers
1383
- in the spec for a single request.
1384
- :type _headers: dict, optional
1385
- :param _host_index: set to override the host_index for a single
1386
- request; this effectively ignores the host_index
1387
- in the spec for a single request.
1388
- :type _host_index: int, optional
1389
- :return: Returns the result object.
1390
- """ # noqa: E501
1391
-
1392
- _param = self._get_variations_serialize(
1393
- x_marketplace=x_marketplace,
1394
- get_variations_request_content=get_variations_request_content,
1395
- _request_auth=_request_auth,
1396
- _content_type=_content_type,
1397
- _headers=_headers,
1398
- _host_index=_host_index
1399
- )
1400
-
1401
- _response_types_map: Dict[str, Optional[str]] = {
1402
- '200': "GetVariationsResponseContent",
1403
- '400': "ValidationExceptionResponseContent",
1404
- '401': "UnauthorizedExceptionResponseContent",
1405
- '403': "AccessDeniedExceptionResponseContent",
1406
- '404': "ResourceNotFoundExceptionResponseContent",
1407
- '429': "ThrottleExceptionResponseContent",
1408
- '500': "InternalServerExceptionResponseContent",
1409
- }
1410
- response_data = self.api_client.call_api(
1411
- *_param,
1412
- _request_timeout=_request_timeout
1413
- )
1414
- response_data.read()
1415
- return self.api_client.response_deserialize(
1416
- response_data=response_data,
1417
- response_types_map=_response_types_map,
1418
- )
1419
-
1420
-
1421
- @validate_call
1422
- def get_variations_without_preload_content(
1423
- self,
1424
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com'")],
1425
- get_variations_request_content: GetVariationsRequestContent,
1426
- _request_timeout: Union[
1427
- None,
1428
- Annotated[StrictFloat, Field(gt=0)],
1429
- Tuple[
1430
- Annotated[StrictFloat, Field(gt=0)],
1431
- Annotated[StrictFloat, Field(gt=0)]
1432
- ]
1433
- ] = None,
1434
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1435
- _content_type: Optional[StrictStr] = None,
1436
- _headers: Optional[Dict[StrictStr, Any]] = None,
1437
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1438
- ) -> RESTResponseType:
1439
- """get_variations
1440
-
1441
- Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. These items which differ according to a consistent theme are called variations. A variation is a child ASIN. The parent ASIN is an abstraction of the children items. For example, a shirt is a parent ASIN and parent ASINs cannot be sold. A child ASIN would be a blue shirt, size 16, sold by MyApparelStore. This child ASIN is one of potentially many variations. The ways in which variations differ are called dimensions. In the preceding example, size and color are the dimensions. GetVariations supports the following high-level resources: - BrowseNodeInfo: Browse nodes associated with items - Images: Product images in various sizes - ItemInfo: Detailed item information including title, features, and specifications - OffersV2: Offer listings with availability, pricing, and merchant details - VariationSummary: Summary of variation dimensions and price ranges By default, GetVariations returns 10 variations per page. Use VariationPage and VariationCount parameters to control pagination. The operation works with both parent ASINs (to retrieve all variations) and child ASINs (to retrieve sibling variations). Available in all locales, however, parameter support varies by locale.
1442
-
1443
- :param x_marketplace: Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com' (required)
1444
- :type x_marketplace: str
1445
- :param get_variations_request_content: (required)
1446
- :type get_variations_request_content: GetVariationsRequestContent
1447
- :param _request_timeout: timeout setting for this request. If one
1448
- number provided, it will be total request
1449
- timeout. It can also be a pair (tuple) of
1450
- (connection, read) timeouts.
1451
- :type _request_timeout: int, tuple(int, int), optional
1452
- :param _request_auth: set to override the auth_settings for an a single
1453
- request; this effectively ignores the
1454
- authentication in the spec for a single request.
1455
- :type _request_auth: dict, optional
1456
- :param _content_type: force content-type for the request.
1457
- :type _content_type: str, Optional
1458
- :param _headers: set to override the headers for a single
1459
- request; this effectively ignores the headers
1460
- in the spec for a single request.
1461
- :type _headers: dict, optional
1462
- :param _host_index: set to override the host_index for a single
1463
- request; this effectively ignores the host_index
1464
- in the spec for a single request.
1465
- :type _host_index: int, optional
1466
- :return: Returns the result object.
1467
- """ # noqa: E501
1468
-
1469
- _param = self._get_variations_serialize(
1470
- x_marketplace=x_marketplace,
1471
- get_variations_request_content=get_variations_request_content,
1472
- _request_auth=_request_auth,
1473
- _content_type=_content_type,
1474
- _headers=_headers,
1475
- _host_index=_host_index
1476
- )
1477
-
1478
- _response_types_map: Dict[str, Optional[str]] = {
1479
- '200': "GetVariationsResponseContent",
1480
- '400': "ValidationExceptionResponseContent",
1481
- '401': "UnauthorizedExceptionResponseContent",
1482
- '403': "AccessDeniedExceptionResponseContent",
1483
- '404': "ResourceNotFoundExceptionResponseContent",
1484
- '429': "ThrottleExceptionResponseContent",
1485
- '500': "InternalServerExceptionResponseContent",
1486
- }
1487
- response_data = self.api_client.call_api(
1488
- *_param,
1489
- _request_timeout=_request_timeout
1490
- )
1491
- return response_data.response
1492
-
1493
-
1494
- def _get_variations_serialize(
1495
- self,
1496
- x_marketplace,
1497
- get_variations_request_content,
1498
- _request_auth,
1499
- _content_type,
1500
- _headers,
1501
- _host_index,
1502
- ) -> RequestSerialized:
1503
-
1504
- _host = None
1505
-
1506
- _collection_formats: Dict[str, str] = {
1507
- }
1508
-
1509
- _path_params: Dict[str, str] = {}
1510
- _query_params: List[Tuple[str, str]] = []
1511
- _header_params: Dict[str, Optional[str]] = _headers or {}
1512
- _form_params: List[Tuple[str, str]] = []
1513
- _files: Dict[str, Union[str, bytes]] = {}
1514
- _body_params: Optional[bytes] = None
1515
-
1516
- # process the path parameters
1517
- # process the query parameters
1518
- # process the header parameters
1519
- if x_marketplace is not None:
1520
- _header_params['x-marketplace'] = x_marketplace
1521
- # process the form parameters
1522
- # process the body parameter
1523
- if get_variations_request_content is not None:
1524
- _body_params = get_variations_request_content
1525
-
1526
-
1527
- # set the HTTP header `Accept`
1528
- if 'Accept' not in _header_params:
1529
- _header_params['Accept'] = self.api_client.select_header_accept(
1530
- [
1531
- 'application/json'
1532
- ]
1533
- )
1534
-
1535
- # set the HTTP header `Content-Type`
1536
- if _content_type:
1537
- _header_params['Content-Type'] = _content_type
1538
- else:
1539
- _default_content_type = (
1540
- self.api_client.select_header_content_type(
1541
- [
1542
- 'application/json'
1543
- ]
1544
- )
1545
- )
1546
- if _default_content_type is not None:
1547
- _header_params['Content-Type'] = _default_content_type
1548
-
1549
- # authentication setting
1550
- _auth_settings: List[str] = [
1551
- ]
1552
-
1553
- return self.api_client.param_serialize(
1554
- method='POST',
1555
- resource_path='/catalog/v1/getVariations',
1556
- path_params=_path_params,
1557
- query_params=_query_params,
1558
- header_params=_header_params,
1559
- body=_body_params,
1560
- post_params=_form_params,
1561
- files=_files,
1562
- auth_settings=_auth_settings,
1563
- collection_formats=_collection_formats,
1564
- _host=_host,
1565
- _request_auth=_request_auth
1566
- )
1567
-
1568
-
1569
-
1570
-
1571
- @validate_call
1572
- def list_feeds(
1573
- self,
1574
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1575
- _request_timeout: Union[
1576
- None,
1577
- Annotated[StrictFloat, Field(gt=0)],
1578
- Tuple[
1579
- Annotated[StrictFloat, Field(gt=0)],
1580
- Annotated[StrictFloat, Field(gt=0)]
1581
- ]
1582
- ] = None,
1583
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1584
- _content_type: Optional[StrictStr] = None,
1585
- _headers: Optional[Dict[StrictStr, Any]] = None,
1586
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1587
- ) -> ListFeedsResponseContent:
1588
- """list_feeds
1589
-
1590
- Lists all Feeds
1591
-
1592
- :param x_marketplace: Target Amazon Locale. (required)
1593
- :type x_marketplace: str
1594
- :param _request_timeout: timeout setting for this request. If one
1595
- number provided, it will be total request
1596
- timeout. It can also be a pair (tuple) of
1597
- (connection, read) timeouts.
1598
- :type _request_timeout: int, tuple(int, int), optional
1599
- :param _request_auth: set to override the auth_settings for an a single
1600
- request; this effectively ignores the
1601
- authentication in the spec for a single request.
1602
- :type _request_auth: dict, optional
1603
- :param _content_type: force content-type for the request.
1604
- :type _content_type: str, Optional
1605
- :param _headers: set to override the headers for a single
1606
- request; this effectively ignores the headers
1607
- in the spec for a single request.
1608
- :type _headers: dict, optional
1609
- :param _host_index: set to override the host_index for a single
1610
- request; this effectively ignores the host_index
1611
- in the spec for a single request.
1612
- :type _host_index: int, optional
1613
- :return: Returns the result object.
1614
- """ # noqa: E501
1615
-
1616
- _param = self._list_feeds_serialize(
1617
- x_marketplace=x_marketplace,
1618
- _request_auth=_request_auth,
1619
- _content_type=_content_type,
1620
- _headers=_headers,
1621
- _host_index=_host_index
1622
- )
1623
-
1624
- _response_types_map: Dict[str, Optional[str]] = {
1625
- '200': "ListFeedsResponseContent",
1626
- '400': "ValidationExceptionResponseContent",
1627
- '401': "UnauthorizedExceptionResponseContent",
1628
- '403': "AccessDeniedExceptionResponseContent",
1629
- '404': "ResourceNotFoundExceptionResponseContent",
1630
- '500': "InternalServerExceptionResponseContent",
1631
- }
1632
- response_data = self.api_client.call_api(
1633
- *_param,
1634
- _request_timeout=_request_timeout
1635
- )
1636
- response_data.read()
1637
- return self.api_client.response_deserialize(
1638
- response_data=response_data,
1639
- response_types_map=_response_types_map,
1640
- ).data
1641
-
1642
-
1643
- @validate_call
1644
- def list_feeds_with_http_info(
1645
- self,
1646
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1647
- _request_timeout: Union[
1648
- None,
1649
- Annotated[StrictFloat, Field(gt=0)],
1650
- Tuple[
1651
- Annotated[StrictFloat, Field(gt=0)],
1652
- Annotated[StrictFloat, Field(gt=0)]
1653
- ]
1654
- ] = None,
1655
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1656
- _content_type: Optional[StrictStr] = None,
1657
- _headers: Optional[Dict[StrictStr, Any]] = None,
1658
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1659
- ) -> ApiResponse[ListFeedsResponseContent]:
1660
- """list_feeds
1661
-
1662
- Lists all Feeds
1663
-
1664
- :param x_marketplace: Target Amazon Locale. (required)
1665
- :type x_marketplace: str
1666
- :param _request_timeout: timeout setting for this request. If one
1667
- number provided, it will be total request
1668
- timeout. It can also be a pair (tuple) of
1669
- (connection, read) timeouts.
1670
- :type _request_timeout: int, tuple(int, int), optional
1671
- :param _request_auth: set to override the auth_settings for an a single
1672
- request; this effectively ignores the
1673
- authentication in the spec for a single request.
1674
- :type _request_auth: dict, optional
1675
- :param _content_type: force content-type for the request.
1676
- :type _content_type: str, Optional
1677
- :param _headers: set to override the headers for a single
1678
- request; this effectively ignores the headers
1679
- in the spec for a single request.
1680
- :type _headers: dict, optional
1681
- :param _host_index: set to override the host_index for a single
1682
- request; this effectively ignores the host_index
1683
- in the spec for a single request.
1684
- :type _host_index: int, optional
1685
- :return: Returns the result object.
1686
- """ # noqa: E501
1687
-
1688
- _param = self._list_feeds_serialize(
1689
- x_marketplace=x_marketplace,
1690
- _request_auth=_request_auth,
1691
- _content_type=_content_type,
1692
- _headers=_headers,
1693
- _host_index=_host_index
1694
- )
1695
-
1696
- _response_types_map: Dict[str, Optional[str]] = {
1697
- '200': "ListFeedsResponseContent",
1698
- '400': "ValidationExceptionResponseContent",
1699
- '401': "UnauthorizedExceptionResponseContent",
1700
- '403': "AccessDeniedExceptionResponseContent",
1701
- '404': "ResourceNotFoundExceptionResponseContent",
1702
- '500': "InternalServerExceptionResponseContent",
1703
- }
1704
- response_data = self.api_client.call_api(
1705
- *_param,
1706
- _request_timeout=_request_timeout
1707
- )
1708
- response_data.read()
1709
- return self.api_client.response_deserialize(
1710
- response_data=response_data,
1711
- response_types_map=_response_types_map,
1712
- )
1713
-
1714
-
1715
- @validate_call
1716
- def list_feeds_without_preload_content(
1717
- self,
1718
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1719
- _request_timeout: Union[
1720
- None,
1721
- Annotated[StrictFloat, Field(gt=0)],
1722
- Tuple[
1723
- Annotated[StrictFloat, Field(gt=0)],
1724
- Annotated[StrictFloat, Field(gt=0)]
1725
- ]
1726
- ] = None,
1727
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1728
- _content_type: Optional[StrictStr] = None,
1729
- _headers: Optional[Dict[StrictStr, Any]] = None,
1730
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1731
- ) -> RESTResponseType:
1732
- """list_feeds
1733
-
1734
- Lists all Feeds
1735
-
1736
- :param x_marketplace: Target Amazon Locale. (required)
1737
- :type x_marketplace: str
1738
- :param _request_timeout: timeout setting for this request. If one
1739
- number provided, it will be total request
1740
- timeout. It can also be a pair (tuple) of
1741
- (connection, read) timeouts.
1742
- :type _request_timeout: int, tuple(int, int), optional
1743
- :param _request_auth: set to override the auth_settings for an a single
1744
- request; this effectively ignores the
1745
- authentication in the spec for a single request.
1746
- :type _request_auth: dict, optional
1747
- :param _content_type: force content-type for the request.
1748
- :type _content_type: str, Optional
1749
- :param _headers: set to override the headers for a single
1750
- request; this effectively ignores the headers
1751
- in the spec for a single request.
1752
- :type _headers: dict, optional
1753
- :param _host_index: set to override the host_index for a single
1754
- request; this effectively ignores the host_index
1755
- in the spec for a single request.
1756
- :type _host_index: int, optional
1757
- :return: Returns the result object.
1758
- """ # noqa: E501
1759
-
1760
- _param = self._list_feeds_serialize(
1761
- x_marketplace=x_marketplace,
1762
- _request_auth=_request_auth,
1763
- _content_type=_content_type,
1764
- _headers=_headers,
1765
- _host_index=_host_index
1766
- )
1767
-
1768
- _response_types_map: Dict[str, Optional[str]] = {
1769
- '200': "ListFeedsResponseContent",
1770
- '400': "ValidationExceptionResponseContent",
1771
- '401': "UnauthorizedExceptionResponseContent",
1772
- '403': "AccessDeniedExceptionResponseContent",
1773
- '404': "ResourceNotFoundExceptionResponseContent",
1774
- '500': "InternalServerExceptionResponseContent",
1775
- }
1776
- response_data = self.api_client.call_api(
1777
- *_param,
1778
- _request_timeout=_request_timeout
1779
- )
1780
- return response_data.response
1781
-
1782
-
1783
- def _list_feeds_serialize(
1784
- self,
1785
- x_marketplace,
1786
- _request_auth,
1787
- _content_type,
1788
- _headers,
1789
- _host_index,
1790
- ) -> RequestSerialized:
1791
-
1792
- _host = None
1793
-
1794
- _collection_formats: Dict[str, str] = {
1795
- }
1796
-
1797
- _path_params: Dict[str, str] = {}
1798
- _query_params: List[Tuple[str, str]] = []
1799
- _header_params: Dict[str, Optional[str]] = _headers or {}
1800
- _form_params: List[Tuple[str, str]] = []
1801
- _files: Dict[str, Union[str, bytes]] = {}
1802
- _body_params: Optional[bytes] = None
1803
-
1804
- # process the path parameters
1805
- # process the query parameters
1806
- # process the header parameters
1807
- if x_marketplace is not None:
1808
- _header_params['x-marketplace'] = x_marketplace
1809
- # process the form parameters
1810
- # process the body parameter
1811
-
1812
-
1813
- # set the HTTP header `Accept`
1814
- if 'Accept' not in _header_params:
1815
- _header_params['Accept'] = self.api_client.select_header_accept(
1816
- [
1817
- 'application/json'
1818
- ]
1819
- )
1820
-
1821
-
1822
- # authentication setting
1823
- _auth_settings: List[str] = [
1824
- ]
1825
-
1826
- return self.api_client.param_serialize(
1827
- method='POST',
1828
- resource_path='/catalog/v1/listFeeds',
1829
- path_params=_path_params,
1830
- query_params=_query_params,
1831
- header_params=_header_params,
1832
- body=_body_params,
1833
- post_params=_form_params,
1834
- files=_files,
1835
- auth_settings=_auth_settings,
1836
- collection_formats=_collection_formats,
1837
- _host=_host,
1838
- _request_auth=_request_auth
1839
- )
1840
-
1841
-
1842
-
1843
-
1844
- @validate_call
1845
- def list_reports(
1846
- self,
1847
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1848
- _request_timeout: Union[
1849
- None,
1850
- Annotated[StrictFloat, Field(gt=0)],
1851
- Tuple[
1852
- Annotated[StrictFloat, Field(gt=0)],
1853
- Annotated[StrictFloat, Field(gt=0)]
1854
- ]
1855
- ] = None,
1856
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1857
- _content_type: Optional[StrictStr] = None,
1858
- _headers: Optional[Dict[StrictStr, Any]] = None,
1859
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1860
- ) -> ListReportsResponseContent:
1861
- """list_reports
1862
-
1863
- Lists all available reports.
1864
-
1865
- :param x_marketplace: Target Amazon Locale. (required)
1866
- :type x_marketplace: str
1867
- :param _request_timeout: timeout setting for this request. If one
1868
- number provided, it will be total request
1869
- timeout. It can also be a pair (tuple) of
1870
- (connection, read) timeouts.
1871
- :type _request_timeout: int, tuple(int, int), optional
1872
- :param _request_auth: set to override the auth_settings for an a single
1873
- request; this effectively ignores the
1874
- authentication in the spec for a single request.
1875
- :type _request_auth: dict, optional
1876
- :param _content_type: force content-type for the request.
1877
- :type _content_type: str, Optional
1878
- :param _headers: set to override the headers for a single
1879
- request; this effectively ignores the headers
1880
- in the spec for a single request.
1881
- :type _headers: dict, optional
1882
- :param _host_index: set to override the host_index for a single
1883
- request; this effectively ignores the host_index
1884
- in the spec for a single request.
1885
- :type _host_index: int, optional
1886
- :return: Returns the result object.
1887
- """ # noqa: E501
1888
-
1889
- _param = self._list_reports_serialize(
1890
- x_marketplace=x_marketplace,
1891
- _request_auth=_request_auth,
1892
- _content_type=_content_type,
1893
- _headers=_headers,
1894
- _host_index=_host_index
1895
- )
1896
-
1897
- _response_types_map: Dict[str, Optional[str]] = {
1898
- '200': "ListReportsResponseContent",
1899
- '400': "ValidationExceptionResponseContent",
1900
- '401': "UnauthorizedExceptionResponseContent",
1901
- '403': "AccessDeniedExceptionResponseContent",
1902
- '500': "InternalServerExceptionResponseContent",
1903
- }
1904
- response_data = self.api_client.call_api(
1905
- *_param,
1906
- _request_timeout=_request_timeout
1907
- )
1908
- response_data.read()
1909
- return self.api_client.response_deserialize(
1910
- response_data=response_data,
1911
- response_types_map=_response_types_map,
1912
- ).data
1913
-
1914
-
1915
- @validate_call
1916
- def list_reports_with_http_info(
1917
- self,
1918
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1919
- _request_timeout: Union[
1920
- None,
1921
- Annotated[StrictFloat, Field(gt=0)],
1922
- Tuple[
1923
- Annotated[StrictFloat, Field(gt=0)],
1924
- Annotated[StrictFloat, Field(gt=0)]
1925
- ]
1926
- ] = None,
1927
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1928
- _content_type: Optional[StrictStr] = None,
1929
- _headers: Optional[Dict[StrictStr, Any]] = None,
1930
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1931
- ) -> ApiResponse[ListReportsResponseContent]:
1932
- """list_reports
1933
-
1934
- Lists all available reports.
1935
-
1936
- :param x_marketplace: Target Amazon Locale. (required)
1937
- :type x_marketplace: str
1938
- :param _request_timeout: timeout setting for this request. If one
1939
- number provided, it will be total request
1940
- timeout. It can also be a pair (tuple) of
1941
- (connection, read) timeouts.
1942
- :type _request_timeout: int, tuple(int, int), optional
1943
- :param _request_auth: set to override the auth_settings for an a single
1944
- request; this effectively ignores the
1945
- authentication in the spec for a single request.
1946
- :type _request_auth: dict, optional
1947
- :param _content_type: force content-type for the request.
1948
- :type _content_type: str, Optional
1949
- :param _headers: set to override the headers for a single
1950
- request; this effectively ignores the headers
1951
- in the spec for a single request.
1952
- :type _headers: dict, optional
1953
- :param _host_index: set to override the host_index for a single
1954
- request; this effectively ignores the host_index
1955
- in the spec for a single request.
1956
- :type _host_index: int, optional
1957
- :return: Returns the result object.
1958
- """ # noqa: E501
1959
-
1960
- _param = self._list_reports_serialize(
1961
- x_marketplace=x_marketplace,
1962
- _request_auth=_request_auth,
1963
- _content_type=_content_type,
1964
- _headers=_headers,
1965
- _host_index=_host_index
1966
- )
1967
-
1968
- _response_types_map: Dict[str, Optional[str]] = {
1969
- '200': "ListReportsResponseContent",
1970
- '400': "ValidationExceptionResponseContent",
1971
- '401': "UnauthorizedExceptionResponseContent",
1972
- '403': "AccessDeniedExceptionResponseContent",
1973
- '500': "InternalServerExceptionResponseContent",
1974
- }
1975
- response_data = self.api_client.call_api(
1976
- *_param,
1977
- _request_timeout=_request_timeout
1978
- )
1979
- response_data.read()
1980
- return self.api_client.response_deserialize(
1981
- response_data=response_data,
1982
- response_types_map=_response_types_map,
1983
- )
1984
-
1985
-
1986
- @validate_call
1987
- def list_reports_without_preload_content(
1988
- self,
1989
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1990
- _request_timeout: Union[
1991
- None,
1992
- Annotated[StrictFloat, Field(gt=0)],
1993
- Tuple[
1994
- Annotated[StrictFloat, Field(gt=0)],
1995
- Annotated[StrictFloat, Field(gt=0)]
1996
- ]
1997
- ] = None,
1998
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
1999
- _content_type: Optional[StrictStr] = None,
2000
- _headers: Optional[Dict[StrictStr, Any]] = None,
2001
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2002
- ) -> RESTResponseType:
2003
- """list_reports
2004
-
2005
- Lists all available reports.
2006
-
2007
- :param x_marketplace: Target Amazon Locale. (required)
2008
- :type x_marketplace: str
2009
- :param _request_timeout: timeout setting for this request. If one
2010
- number provided, it will be total request
2011
- timeout. It can also be a pair (tuple) of
2012
- (connection, read) timeouts.
2013
- :type _request_timeout: int, tuple(int, int), optional
2014
- :param _request_auth: set to override the auth_settings for an a single
2015
- request; this effectively ignores the
2016
- authentication in the spec for a single request.
2017
- :type _request_auth: dict, optional
2018
- :param _content_type: force content-type for the request.
2019
- :type _content_type: str, Optional
2020
- :param _headers: set to override the headers for a single
2021
- request; this effectively ignores the headers
2022
- in the spec for a single request.
2023
- :type _headers: dict, optional
2024
- :param _host_index: set to override the host_index for a single
2025
- request; this effectively ignores the host_index
2026
- in the spec for a single request.
2027
- :type _host_index: int, optional
2028
- :return: Returns the result object.
2029
- """ # noqa: E501
2030
-
2031
- _param = self._list_reports_serialize(
2032
- x_marketplace=x_marketplace,
2033
- _request_auth=_request_auth,
2034
- _content_type=_content_type,
2035
- _headers=_headers,
2036
- _host_index=_host_index
2037
- )
2038
-
2039
- _response_types_map: Dict[str, Optional[str]] = {
2040
- '200': "ListReportsResponseContent",
2041
- '400': "ValidationExceptionResponseContent",
2042
- '401': "UnauthorizedExceptionResponseContent",
2043
- '403': "AccessDeniedExceptionResponseContent",
2044
- '500': "InternalServerExceptionResponseContent",
2045
- }
2046
- response_data = self.api_client.call_api(
2047
- *_param,
2048
- _request_timeout=_request_timeout
2049
- )
2050
- return response_data.response
2051
-
2052
-
2053
- def _list_reports_serialize(
2054
- self,
2055
- x_marketplace,
2056
- _request_auth,
2057
- _content_type,
2058
- _headers,
2059
- _host_index,
2060
- ) -> RequestSerialized:
2061
-
2062
- _host = None
2063
-
2064
- _collection_formats: Dict[str, str] = {
2065
- }
2066
-
2067
- _path_params: Dict[str, str] = {}
2068
- _query_params: List[Tuple[str, str]] = []
2069
- _header_params: Dict[str, Optional[str]] = _headers or {}
2070
- _form_params: List[Tuple[str, str]] = []
2071
- _files: Dict[str, Union[str, bytes]] = {}
2072
- _body_params: Optional[bytes] = None
2073
-
2074
- # process the path parameters
2075
- # process the query parameters
2076
- # process the header parameters
2077
- if x_marketplace is not None:
2078
- _header_params['x-marketplace'] = x_marketplace
2079
- # process the form parameters
2080
- # process the body parameter
2081
-
2082
-
2083
- # set the HTTP header `Accept`
2084
- if 'Accept' not in _header_params:
2085
- _header_params['Accept'] = self.api_client.select_header_accept(
2086
- [
2087
- 'application/json'
2088
- ]
2089
- )
2090
-
2091
-
2092
- # authentication setting
2093
- _auth_settings: List[str] = [
2094
- ]
2095
-
2096
- return self.api_client.param_serialize(
2097
- method='POST',
2098
- resource_path='/reports/v1/listReports',
2099
- path_params=_path_params,
2100
- query_params=_query_params,
2101
- header_params=_header_params,
2102
- body=_body_params,
2103
- post_params=_form_params,
2104
- files=_files,
2105
- auth_settings=_auth_settings,
2106
- collection_formats=_collection_formats,
2107
- _host=_host,
2108
- _request_auth=_request_auth
2109
- )
2110
-
2111
-
2112
-
2113
-
2114
- @validate_call
2115
- def search_items(
2116
- self,
2117
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2118
- search_items_request_content: Optional[SearchItemsRequestContent] = None,
2119
- _request_timeout: Union[
2120
- None,
2121
- Annotated[StrictFloat, Field(gt=0)],
2122
- Tuple[
2123
- Annotated[StrictFloat, Field(gt=0)],
2124
- Annotated[StrictFloat, Field(gt=0)]
2125
- ]
2126
- ] = None,
2127
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2128
- _content_type: Optional[StrictStr] = None,
2129
- _headers: Optional[Dict[StrictStr, Any]] = None,
2130
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2131
- ) -> SearchItemsResponseContent:
2132
- """search_items
2133
-
2134
-
2135
- :param x_marketplace: Target Amazon Locale. (required)
2136
- :type x_marketplace: str
2137
- :param search_items_request_content:
2138
- :type search_items_request_content: SearchItemsRequestContent
2139
- :param _request_timeout: timeout setting for this request. If one
2140
- number provided, it will be total request
2141
- timeout. It can also be a pair (tuple) of
2142
- (connection, read) timeouts.
2143
- :type _request_timeout: int, tuple(int, int), optional
2144
- :param _request_auth: set to override the auth_settings for an a single
2145
- request; this effectively ignores the
2146
- authentication in the spec for a single request.
2147
- :type _request_auth: dict, optional
2148
- :param _content_type: force content-type for the request.
2149
- :type _content_type: str, Optional
2150
- :param _headers: set to override the headers for a single
2151
- request; this effectively ignores the headers
2152
- in the spec for a single request.
2153
- :type _headers: dict, optional
2154
- :param _host_index: set to override the host_index for a single
2155
- request; this effectively ignores the host_index
2156
- in the spec for a single request.
2157
- :type _host_index: int, optional
2158
- :return: Returns the result object.
2159
- """ # noqa: E501
2160
-
2161
- _param = self._search_items_serialize(
2162
- x_marketplace=x_marketplace,
2163
- search_items_request_content=search_items_request_content,
2164
- _request_auth=_request_auth,
2165
- _content_type=_content_type,
2166
- _headers=_headers,
2167
- _host_index=_host_index
2168
- )
2169
-
2170
- _response_types_map: Dict[str, Optional[str]] = {
2171
- '200': "SearchItemsResponseContent",
2172
- '400': "ValidationExceptionResponseContent",
2173
- '401': "UnauthorizedExceptionResponseContent",
2174
- '403': "AccessDeniedExceptionResponseContent",
2175
- '404': "ResourceNotFoundExceptionResponseContent",
2176
- '429': "ThrottleExceptionResponseContent",
2177
- '500': "InternalServerExceptionResponseContent",
2178
- }
2179
- response_data = self.api_client.call_api(
2180
- *_param,
2181
- _request_timeout=_request_timeout
2182
- )
2183
- response_data.read()
2184
- return self.api_client.response_deserialize(
2185
- response_data=response_data,
2186
- response_types_map=_response_types_map,
2187
- ).data
2188
-
2189
-
2190
- @validate_call
2191
- def search_items_with_http_info(
2192
- self,
2193
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2194
- search_items_request_content: Optional[SearchItemsRequestContent] = None,
2195
- _request_timeout: Union[
2196
- None,
2197
- Annotated[StrictFloat, Field(gt=0)],
2198
- Tuple[
2199
- Annotated[StrictFloat, Field(gt=0)],
2200
- Annotated[StrictFloat, Field(gt=0)]
2201
- ]
2202
- ] = None,
2203
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2204
- _content_type: Optional[StrictStr] = None,
2205
- _headers: Optional[Dict[StrictStr, Any]] = None,
2206
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2207
- ) -> ApiResponse[SearchItemsResponseContent]:
2208
- """search_items
2209
-
2210
-
2211
- :param x_marketplace: Target Amazon Locale. (required)
2212
- :type x_marketplace: str
2213
- :param search_items_request_content:
2214
- :type search_items_request_content: SearchItemsRequestContent
2215
- :param _request_timeout: timeout setting for this request. If one
2216
- number provided, it will be total request
2217
- timeout. It can also be a pair (tuple) of
2218
- (connection, read) timeouts.
2219
- :type _request_timeout: int, tuple(int, int), optional
2220
- :param _request_auth: set to override the auth_settings for an a single
2221
- request; this effectively ignores the
2222
- authentication in the spec for a single request.
2223
- :type _request_auth: dict, optional
2224
- :param _content_type: force content-type for the request.
2225
- :type _content_type: str, Optional
2226
- :param _headers: set to override the headers for a single
2227
- request; this effectively ignores the headers
2228
- in the spec for a single request.
2229
- :type _headers: dict, optional
2230
- :param _host_index: set to override the host_index for a single
2231
- request; this effectively ignores the host_index
2232
- in the spec for a single request.
2233
- :type _host_index: int, optional
2234
- :return: Returns the result object.
2235
- """ # noqa: E501
2236
-
2237
- _param = self._search_items_serialize(
2238
- x_marketplace=x_marketplace,
2239
- search_items_request_content=search_items_request_content,
2240
- _request_auth=_request_auth,
2241
- _content_type=_content_type,
2242
- _headers=_headers,
2243
- _host_index=_host_index
2244
- )
2245
-
2246
- _response_types_map: Dict[str, Optional[str]] = {
2247
- '200': "SearchItemsResponseContent",
2248
- '400': "ValidationExceptionResponseContent",
2249
- '401': "UnauthorizedExceptionResponseContent",
2250
- '403': "AccessDeniedExceptionResponseContent",
2251
- '404': "ResourceNotFoundExceptionResponseContent",
2252
- '429': "ThrottleExceptionResponseContent",
2253
- '500': "InternalServerExceptionResponseContent",
2254
- }
2255
- response_data = self.api_client.call_api(
2256
- *_param,
2257
- _request_timeout=_request_timeout
2258
- )
2259
- response_data.read()
2260
- return self.api_client.response_deserialize(
2261
- response_data=response_data,
2262
- response_types_map=_response_types_map,
2263
- )
2264
-
2265
-
2266
- @validate_call
2267
- def search_items_without_preload_content(
2268
- self,
2269
- x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2270
- search_items_request_content: Optional[SearchItemsRequestContent] = None,
2271
- _request_timeout: Union[
2272
- None,
2273
- Annotated[StrictFloat, Field(gt=0)],
2274
- Tuple[
2275
- Annotated[StrictFloat, Field(gt=0)],
2276
- Annotated[StrictFloat, Field(gt=0)]
2277
- ]
2278
- ] = None,
2279
- _request_auth: Optional[Dict[StrictStr, Any]] = None,
2280
- _content_type: Optional[StrictStr] = None,
2281
- _headers: Optional[Dict[StrictStr, Any]] = None,
2282
- _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2283
- ) -> RESTResponseType:
2284
- """search_items
2285
-
2286
-
2287
- :param x_marketplace: Target Amazon Locale. (required)
2288
- :type x_marketplace: str
2289
- :param search_items_request_content:
2290
- :type search_items_request_content: SearchItemsRequestContent
2291
- :param _request_timeout: timeout setting for this request. If one
2292
- number provided, it will be total request
2293
- timeout. It can also be a pair (tuple) of
2294
- (connection, read) timeouts.
2295
- :type _request_timeout: int, tuple(int, int), optional
2296
- :param _request_auth: set to override the auth_settings for an a single
2297
- request; this effectively ignores the
2298
- authentication in the spec for a single request.
2299
- :type _request_auth: dict, optional
2300
- :param _content_type: force content-type for the request.
2301
- :type _content_type: str, Optional
2302
- :param _headers: set to override the headers for a single
2303
- request; this effectively ignores the headers
2304
- in the spec for a single request.
2305
- :type _headers: dict, optional
2306
- :param _host_index: set to override the host_index for a single
2307
- request; this effectively ignores the host_index
2308
- in the spec for a single request.
2309
- :type _host_index: int, optional
2310
- :return: Returns the result object.
2311
- """ # noqa: E501
2312
-
2313
- _param = self._search_items_serialize(
2314
- x_marketplace=x_marketplace,
2315
- search_items_request_content=search_items_request_content,
2316
- _request_auth=_request_auth,
2317
- _content_type=_content_type,
2318
- _headers=_headers,
2319
- _host_index=_host_index
2320
- )
2321
-
2322
- _response_types_map: Dict[str, Optional[str]] = {
2323
- '200': "SearchItemsResponseContent",
2324
- '400': "ValidationExceptionResponseContent",
2325
- '401': "UnauthorizedExceptionResponseContent",
2326
- '403': "AccessDeniedExceptionResponseContent",
2327
- '404': "ResourceNotFoundExceptionResponseContent",
2328
- '429': "ThrottleExceptionResponseContent",
2329
- '500': "InternalServerExceptionResponseContent",
2330
- }
2331
- response_data = self.api_client.call_api(
2332
- *_param,
2333
- _request_timeout=_request_timeout
2334
- )
2335
- return response_data.response
2336
-
2337
-
2338
- def _search_items_serialize(
2339
- self,
2340
- x_marketplace,
2341
- search_items_request_content,
2342
- _request_auth,
2343
- _content_type,
2344
- _headers,
2345
- _host_index,
2346
- ) -> RequestSerialized:
2347
-
2348
- _host = None
2349
-
2350
- _collection_formats: Dict[str, str] = {
2351
- }
2352
-
2353
- _path_params: Dict[str, str] = {}
2354
- _query_params: List[Tuple[str, str]] = []
2355
- _header_params: Dict[str, Optional[str]] = _headers or {}
2356
- _form_params: List[Tuple[str, str]] = []
2357
- _files: Dict[str, Union[str, bytes]] = {}
2358
- _body_params: Optional[bytes] = None
2359
-
2360
- # process the path parameters
2361
- # process the query parameters
2362
- # process the header parameters
2363
- if x_marketplace is not None:
2364
- _header_params['x-marketplace'] = x_marketplace
2365
- # process the form parameters
2366
- # process the body parameter
2367
- if search_items_request_content is not None:
2368
- _body_params = search_items_request_content
2369
-
2370
-
2371
- # set the HTTP header `Accept`
2372
- if 'Accept' not in _header_params:
2373
- _header_params['Accept'] = self.api_client.select_header_accept(
2374
- [
2375
- 'application/json'
2376
- ]
2377
- )
2378
-
2379
- # set the HTTP header `Content-Type`
2380
- if _content_type:
2381
- _header_params['Content-Type'] = _content_type
2382
- else:
2383
- _default_content_type = (
2384
- self.api_client.select_header_content_type(
2385
- [
2386
- 'application/json'
2387
- ]
2388
- )
2389
- )
2390
- if _default_content_type is not None:
2391
- _header_params['Content-Type'] = _default_content_type
2392
-
2393
- # authentication setting
2394
- _auth_settings: List[str] = [
2395
- ]
2396
-
2397
- return self.api_client.param_serialize(
2398
- method='POST',
2399
- resource_path='/catalog/v1/searchItems',
2400
- path_params=_path_params,
2401
- query_params=_query_params,
2402
- header_params=_header_params,
2403
- body=_body_params,
2404
- post_params=_form_params,
2405
- files=_files,
2406
- auth_settings=_auth_settings,
2407
- collection_formats=_collection_formats,
2408
- _host=_host,
2409
- _request_auth=_request_auth
2410
- )
2411
-
2412
-
1
+ # coding: utf-8
2
+
3
+ """
4
+ Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
5
+
6
+ Licensed under the Apache License, Version 2.0 (the "License").
7
+ You may not use this file except in compliance with the License.
8
+ A copy of the License is located at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ or in the "license" file accompanying this file. This file is distributed
13
+ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
14
+ express or implied. See the License for the specific language governing
15
+ permissions and limitations under the License.
16
+
17
+ """ # noqa: E501
18
+
19
+ import warnings
20
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
21
+ from typing import Any, Dict, List, Optional, Tuple, Union
22
+ from typing_extensions import Annotated
23
+
24
+ from pydantic import Field, field_validator
25
+ from typing import Optional
26
+ from typing_extensions import Annotated
27
+ from creatorsapi_python_sdk.models.get_browse_nodes_request_content import GetBrowseNodesRequestContent
28
+ from creatorsapi_python_sdk.models.get_browse_nodes_response_content import GetBrowseNodesResponseContent
29
+ from creatorsapi_python_sdk.models.get_feed_request_content import GetFeedRequestContent
30
+ from creatorsapi_python_sdk.models.get_feed_response_content import GetFeedResponseContent
31
+ from creatorsapi_python_sdk.models.get_items_request_content import GetItemsRequestContent
32
+ from creatorsapi_python_sdk.models.get_items_response_content import GetItemsResponseContent
33
+ from creatorsapi_python_sdk.models.get_report_request_content import GetReportRequestContent
34
+ from creatorsapi_python_sdk.models.get_report_response_content import GetReportResponseContent
35
+ from creatorsapi_python_sdk.models.get_variations_request_content import GetVariationsRequestContent
36
+ from creatorsapi_python_sdk.models.get_variations_response_content import GetVariationsResponseContent
37
+ from creatorsapi_python_sdk.models.list_feeds_response_content import ListFeedsResponseContent
38
+ from creatorsapi_python_sdk.models.list_reports_response_content import ListReportsResponseContent
39
+ from creatorsapi_python_sdk.models.search_items_request_content import SearchItemsRequestContent
40
+ from creatorsapi_python_sdk.models.search_items_response_content import SearchItemsResponseContent
41
+
42
+ from creatorsapi_python_sdk.api_client import ApiClient, RequestSerialized
43
+ from creatorsapi_python_sdk.api_response import ApiResponse
44
+ from creatorsapi_python_sdk.rest import RESTResponseType
45
+
46
+
47
+ class DefaultApi:
48
+ """NOTE: This class is auto generated by OpenAPI Generator
49
+ Ref: https://openapi-generator.tech
50
+
51
+ Do not edit the class manually.
52
+ """
53
+
54
+ def __init__(self, api_client=None) -> None:
55
+ if api_client is None:
56
+ api_client = ApiClient.get_default()
57
+ self.api_client = api_client
58
+
59
+
60
+ @validate_call
61
+ def get_browse_nodes(
62
+ self,
63
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com'")],
64
+ get_browse_nodes_request_content: GetBrowseNodesRequestContent,
65
+ _request_timeout: Union[
66
+ None,
67
+ Annotated[StrictFloat, Field(gt=0)],
68
+ Tuple[
69
+ Annotated[StrictFloat, Field(gt=0)],
70
+ Annotated[StrictFloat, Field(gt=0)]
71
+ ]
72
+ ] = None,
73
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
74
+ _content_type: Optional[StrictStr] = None,
75
+ _headers: Optional[Dict[StrictStr, Any]] = None,
76
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
77
+ ) -> GetBrowseNodesResponseContent:
78
+ """get_browse_nodes
79
+
80
+ Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node's information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources: - BrowseNodes Available in all locales, however, parameter support varies by locale.
81
+
82
+ :param x_marketplace: Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com' (required)
83
+ :type x_marketplace: str
84
+ :param get_browse_nodes_request_content: (required)
85
+ :type get_browse_nodes_request_content: GetBrowseNodesRequestContent
86
+ :param _request_timeout: timeout setting for this request. If one
87
+ number provided, it will be total request
88
+ timeout. It can also be a pair (tuple) of
89
+ (connection, read) timeouts.
90
+ :type _request_timeout: int, tuple(int, int), optional
91
+ :param _request_auth: set to override the auth_settings for an a single
92
+ request; this effectively ignores the
93
+ authentication in the spec for a single request.
94
+ :type _request_auth: dict, optional
95
+ :param _content_type: force content-type for the request.
96
+ :type _content_type: str, Optional
97
+ :param _headers: set to override the headers for a single
98
+ request; this effectively ignores the headers
99
+ in the spec for a single request.
100
+ :type _headers: dict, optional
101
+ :param _host_index: set to override the host_index for a single
102
+ request; this effectively ignores the host_index
103
+ in the spec for a single request.
104
+ :type _host_index: int, optional
105
+ :return: Returns the result object.
106
+ """ # noqa: E501
107
+
108
+ _param = self._get_browse_nodes_serialize(
109
+ x_marketplace=x_marketplace,
110
+ get_browse_nodes_request_content=get_browse_nodes_request_content,
111
+ _request_auth=_request_auth,
112
+ _content_type=_content_type,
113
+ _headers=_headers,
114
+ _host_index=_host_index
115
+ )
116
+
117
+ _response_types_map: Dict[str, Optional[str]] = {
118
+ '200': "GetBrowseNodesResponseContent",
119
+ '400': "ValidationExceptionResponseContent",
120
+ '401': "UnauthorizedExceptionResponseContent",
121
+ '403': "AccessDeniedExceptionResponseContent",
122
+ '404': "ResourceNotFoundExceptionResponseContent",
123
+ '429': "ThrottleExceptionResponseContent",
124
+ '500': "InternalServerExceptionResponseContent",
125
+ }
126
+ response_data = self.api_client.call_api(
127
+ *_param,
128
+ _request_timeout=_request_timeout
129
+ )
130
+ response_data.read()
131
+ return self.api_client.response_deserialize(
132
+ response_data=response_data,
133
+ response_types_map=_response_types_map,
134
+ ).data
135
+
136
+
137
+ @validate_call
138
+ def get_browse_nodes_with_http_info(
139
+ self,
140
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com'")],
141
+ get_browse_nodes_request_content: GetBrowseNodesRequestContent,
142
+ _request_timeout: Union[
143
+ None,
144
+ Annotated[StrictFloat, Field(gt=0)],
145
+ Tuple[
146
+ Annotated[StrictFloat, Field(gt=0)],
147
+ Annotated[StrictFloat, Field(gt=0)]
148
+ ]
149
+ ] = None,
150
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
151
+ _content_type: Optional[StrictStr] = None,
152
+ _headers: Optional[Dict[StrictStr, Any]] = None,
153
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
154
+ ) -> ApiResponse[GetBrowseNodesResponseContent]:
155
+ """get_browse_nodes
156
+
157
+ Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node's information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources: - BrowseNodes Available in all locales, however, parameter support varies by locale.
158
+
159
+ :param x_marketplace: Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com' (required)
160
+ :type x_marketplace: str
161
+ :param get_browse_nodes_request_content: (required)
162
+ :type get_browse_nodes_request_content: GetBrowseNodesRequestContent
163
+ :param _request_timeout: timeout setting for this request. If one
164
+ number provided, it will be total request
165
+ timeout. It can also be a pair (tuple) of
166
+ (connection, read) timeouts.
167
+ :type _request_timeout: int, tuple(int, int), optional
168
+ :param _request_auth: set to override the auth_settings for an a single
169
+ request; this effectively ignores the
170
+ authentication in the spec for a single request.
171
+ :type _request_auth: dict, optional
172
+ :param _content_type: force content-type for the request.
173
+ :type _content_type: str, Optional
174
+ :param _headers: set to override the headers for a single
175
+ request; this effectively ignores the headers
176
+ in the spec for a single request.
177
+ :type _headers: dict, optional
178
+ :param _host_index: set to override the host_index for a single
179
+ request; this effectively ignores the host_index
180
+ in the spec for a single request.
181
+ :type _host_index: int, optional
182
+ :return: Returns the result object.
183
+ """ # noqa: E501
184
+
185
+ _param = self._get_browse_nodes_serialize(
186
+ x_marketplace=x_marketplace,
187
+ get_browse_nodes_request_content=get_browse_nodes_request_content,
188
+ _request_auth=_request_auth,
189
+ _content_type=_content_type,
190
+ _headers=_headers,
191
+ _host_index=_host_index
192
+ )
193
+
194
+ _response_types_map: Dict[str, Optional[str]] = {
195
+ '200': "GetBrowseNodesResponseContent",
196
+ '400': "ValidationExceptionResponseContent",
197
+ '401': "UnauthorizedExceptionResponseContent",
198
+ '403': "AccessDeniedExceptionResponseContent",
199
+ '404': "ResourceNotFoundExceptionResponseContent",
200
+ '429': "ThrottleExceptionResponseContent",
201
+ '500': "InternalServerExceptionResponseContent",
202
+ }
203
+ response_data = self.api_client.call_api(
204
+ *_param,
205
+ _request_timeout=_request_timeout
206
+ )
207
+ response_data.read()
208
+ return self.api_client.response_deserialize(
209
+ response_data=response_data,
210
+ response_types_map=_response_types_map,
211
+ )
212
+
213
+
214
+ @validate_call
215
+ def get_browse_nodes_without_preload_content(
216
+ self,
217
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com'")],
218
+ get_browse_nodes_request_content: GetBrowseNodesRequestContent,
219
+ _request_timeout: Union[
220
+ None,
221
+ Annotated[StrictFloat, Field(gt=0)],
222
+ Tuple[
223
+ Annotated[StrictFloat, Field(gt=0)],
224
+ Annotated[StrictFloat, Field(gt=0)]
225
+ ]
226
+ ] = None,
227
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
228
+ _content_type: Optional[StrictStr] = None,
229
+ _headers: Optional[Dict[StrictStr, Any]] = None,
230
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
231
+ ) -> RESTResponseType:
232
+ """get_browse_nodes
233
+
234
+ Given a BrowseNodeId, GetBrowseNodes operation returns the specified browse node's information like name, children and ancestors depending on the resources specified in the request. The names and browse node IDs of the children and ancestor browse nodes are also returned. GetBrowseNodes enables you to traverse the browse node hierarchy to find a browse node. GetBrowseNodes Operation returns Id, DisplayName, ContextFreeName and SalesRank response elements by default. For other response elements associated, with GetBrowseNodes supports the following high-level resources: - BrowseNodes Available in all locales, however, parameter support varies by locale.
235
+
236
+ :param x_marketplace: Target Amazon Locale. Type: String Default Value: None Example: 'www.amazon.com' (required)
237
+ :type x_marketplace: str
238
+ :param get_browse_nodes_request_content: (required)
239
+ :type get_browse_nodes_request_content: GetBrowseNodesRequestContent
240
+ :param _request_timeout: timeout setting for this request. If one
241
+ number provided, it will be total request
242
+ timeout. It can also be a pair (tuple) of
243
+ (connection, read) timeouts.
244
+ :type _request_timeout: int, tuple(int, int), optional
245
+ :param _request_auth: set to override the auth_settings for an a single
246
+ request; this effectively ignores the
247
+ authentication in the spec for a single request.
248
+ :type _request_auth: dict, optional
249
+ :param _content_type: force content-type for the request.
250
+ :type _content_type: str, Optional
251
+ :param _headers: set to override the headers for a single
252
+ request; this effectively ignores the headers
253
+ in the spec for a single request.
254
+ :type _headers: dict, optional
255
+ :param _host_index: set to override the host_index for a single
256
+ request; this effectively ignores the host_index
257
+ in the spec for a single request.
258
+ :type _host_index: int, optional
259
+ :return: Returns the result object.
260
+ """ # noqa: E501
261
+
262
+ _param = self._get_browse_nodes_serialize(
263
+ x_marketplace=x_marketplace,
264
+ get_browse_nodes_request_content=get_browse_nodes_request_content,
265
+ _request_auth=_request_auth,
266
+ _content_type=_content_type,
267
+ _headers=_headers,
268
+ _host_index=_host_index
269
+ )
270
+
271
+ _response_types_map: Dict[str, Optional[str]] = {
272
+ '200': "GetBrowseNodesResponseContent",
273
+ '400': "ValidationExceptionResponseContent",
274
+ '401': "UnauthorizedExceptionResponseContent",
275
+ '403': "AccessDeniedExceptionResponseContent",
276
+ '404': "ResourceNotFoundExceptionResponseContent",
277
+ '429': "ThrottleExceptionResponseContent",
278
+ '500': "InternalServerExceptionResponseContent",
279
+ }
280
+ response_data = self.api_client.call_api(
281
+ *_param,
282
+ _request_timeout=_request_timeout
283
+ )
284
+ return response_data.response
285
+
286
+
287
+ def _get_browse_nodes_serialize(
288
+ self,
289
+ x_marketplace,
290
+ get_browse_nodes_request_content,
291
+ _request_auth,
292
+ _content_type,
293
+ _headers,
294
+ _host_index,
295
+ ) -> RequestSerialized:
296
+
297
+ _host = None
298
+
299
+ _collection_formats: Dict[str, str] = {
300
+ }
301
+
302
+ _path_params: Dict[str, str] = {}
303
+ _query_params: List[Tuple[str, str]] = []
304
+ _header_params: Dict[str, Optional[str]] = _headers or {}
305
+ _form_params: List[Tuple[str, str]] = []
306
+ _files: Dict[str, Union[str, bytes]] = {}
307
+ _body_params: Optional[bytes] = None
308
+
309
+ # process the path parameters
310
+ # process the query parameters
311
+ # process the header parameters
312
+ if x_marketplace is not None:
313
+ _header_params['x-marketplace'] = x_marketplace
314
+ # process the form parameters
315
+ # process the body parameter
316
+ if get_browse_nodes_request_content is not None:
317
+ _body_params = get_browse_nodes_request_content
318
+
319
+
320
+ # set the HTTP header `Accept`
321
+ if 'Accept' not in _header_params:
322
+ _header_params['Accept'] = self.api_client.select_header_accept(
323
+ [
324
+ 'application/json'
325
+ ]
326
+ )
327
+
328
+ # set the HTTP header `Content-Type`
329
+ if _content_type:
330
+ _header_params['Content-Type'] = _content_type
331
+ else:
332
+ _default_content_type = (
333
+ self.api_client.select_header_content_type(
334
+ [
335
+ 'application/json'
336
+ ]
337
+ )
338
+ )
339
+ if _default_content_type is not None:
340
+ _header_params['Content-Type'] = _default_content_type
341
+
342
+ # authentication setting
343
+ _auth_settings: List[str] = [
344
+ ]
345
+
346
+ return self.api_client.param_serialize(
347
+ method='POST',
348
+ resource_path='/catalog/v1/getBrowseNodes',
349
+ path_params=_path_params,
350
+ query_params=_query_params,
351
+ header_params=_header_params,
352
+ body=_body_params,
353
+ post_params=_form_params,
354
+ files=_files,
355
+ auth_settings=_auth_settings,
356
+ collection_formats=_collection_formats,
357
+ _host=_host,
358
+ _request_auth=_request_auth
359
+ )
360
+
361
+
362
+
363
+
364
+ @validate_call
365
+ def get_feed(
366
+ self,
367
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
368
+ get_feed_request_content: GetFeedRequestContent,
369
+ _request_timeout: Union[
370
+ None,
371
+ Annotated[StrictFloat, Field(gt=0)],
372
+ Tuple[
373
+ Annotated[StrictFloat, Field(gt=0)],
374
+ Annotated[StrictFloat, Field(gt=0)]
375
+ ]
376
+ ] = None,
377
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
378
+ _content_type: Optional[StrictStr] = None,
379
+ _headers: Optional[Dict[StrictStr, Any]] = None,
380
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
381
+ ) -> GetFeedResponseContent:
382
+ """get_feed
383
+
384
+ Get pre-signed S3 Url for a feed
385
+
386
+ :param x_marketplace: Target Amazon Locale. (required)
387
+ :type x_marketplace: str
388
+ :param get_feed_request_content: (required)
389
+ :type get_feed_request_content: GetFeedRequestContent
390
+ :param _request_timeout: timeout setting for this request. If one
391
+ number provided, it will be total request
392
+ timeout. It can also be a pair (tuple) of
393
+ (connection, read) timeouts.
394
+ :type _request_timeout: int, tuple(int, int), optional
395
+ :param _request_auth: set to override the auth_settings for an a single
396
+ request; this effectively ignores the
397
+ authentication in the spec for a single request.
398
+ :type _request_auth: dict, optional
399
+ :param _content_type: force content-type for the request.
400
+ :type _content_type: str, Optional
401
+ :param _headers: set to override the headers for a single
402
+ request; this effectively ignores the headers
403
+ in the spec for a single request.
404
+ :type _headers: dict, optional
405
+ :param _host_index: set to override the host_index for a single
406
+ request; this effectively ignores the host_index
407
+ in the spec for a single request.
408
+ :type _host_index: int, optional
409
+ :return: Returns the result object.
410
+ """ # noqa: E501
411
+
412
+ _param = self._get_feed_serialize(
413
+ x_marketplace=x_marketplace,
414
+ get_feed_request_content=get_feed_request_content,
415
+ _request_auth=_request_auth,
416
+ _content_type=_content_type,
417
+ _headers=_headers,
418
+ _host_index=_host_index
419
+ )
420
+
421
+ _response_types_map: Dict[str, Optional[str]] = {
422
+ '200': "GetFeedResponseContent",
423
+ '400': "ValidationExceptionResponseContent",
424
+ '401': "UnauthorizedExceptionResponseContent",
425
+ '403': "AccessDeniedExceptionResponseContent",
426
+ '404': "ResourceNotFoundExceptionResponseContent",
427
+ '429': "ThrottleExceptionResponseContent",
428
+ '500': "InternalServerExceptionResponseContent",
429
+ }
430
+ response_data = self.api_client.call_api(
431
+ *_param,
432
+ _request_timeout=_request_timeout
433
+ )
434
+ response_data.read()
435
+ return self.api_client.response_deserialize(
436
+ response_data=response_data,
437
+ response_types_map=_response_types_map,
438
+ ).data
439
+
440
+
441
+ @validate_call
442
+ def get_feed_with_http_info(
443
+ self,
444
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
445
+ get_feed_request_content: GetFeedRequestContent,
446
+ _request_timeout: Union[
447
+ None,
448
+ Annotated[StrictFloat, Field(gt=0)],
449
+ Tuple[
450
+ Annotated[StrictFloat, Field(gt=0)],
451
+ Annotated[StrictFloat, Field(gt=0)]
452
+ ]
453
+ ] = None,
454
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
455
+ _content_type: Optional[StrictStr] = None,
456
+ _headers: Optional[Dict[StrictStr, Any]] = None,
457
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
458
+ ) -> ApiResponse[GetFeedResponseContent]:
459
+ """get_feed
460
+
461
+ Get pre-signed S3 Url for a feed
462
+
463
+ :param x_marketplace: Target Amazon Locale. (required)
464
+ :type x_marketplace: str
465
+ :param get_feed_request_content: (required)
466
+ :type get_feed_request_content: GetFeedRequestContent
467
+ :param _request_timeout: timeout setting for this request. If one
468
+ number provided, it will be total request
469
+ timeout. It can also be a pair (tuple) of
470
+ (connection, read) timeouts.
471
+ :type _request_timeout: int, tuple(int, int), optional
472
+ :param _request_auth: set to override the auth_settings for an a single
473
+ request; this effectively ignores the
474
+ authentication in the spec for a single request.
475
+ :type _request_auth: dict, optional
476
+ :param _content_type: force content-type for the request.
477
+ :type _content_type: str, Optional
478
+ :param _headers: set to override the headers for a single
479
+ request; this effectively ignores the headers
480
+ in the spec for a single request.
481
+ :type _headers: dict, optional
482
+ :param _host_index: set to override the host_index for a single
483
+ request; this effectively ignores the host_index
484
+ in the spec for a single request.
485
+ :type _host_index: int, optional
486
+ :return: Returns the result object.
487
+ """ # noqa: E501
488
+
489
+ _param = self._get_feed_serialize(
490
+ x_marketplace=x_marketplace,
491
+ get_feed_request_content=get_feed_request_content,
492
+ _request_auth=_request_auth,
493
+ _content_type=_content_type,
494
+ _headers=_headers,
495
+ _host_index=_host_index
496
+ )
497
+
498
+ _response_types_map: Dict[str, Optional[str]] = {
499
+ '200': "GetFeedResponseContent",
500
+ '400': "ValidationExceptionResponseContent",
501
+ '401': "UnauthorizedExceptionResponseContent",
502
+ '403': "AccessDeniedExceptionResponseContent",
503
+ '404': "ResourceNotFoundExceptionResponseContent",
504
+ '429': "ThrottleExceptionResponseContent",
505
+ '500': "InternalServerExceptionResponseContent",
506
+ }
507
+ response_data = self.api_client.call_api(
508
+ *_param,
509
+ _request_timeout=_request_timeout
510
+ )
511
+ response_data.read()
512
+ return self.api_client.response_deserialize(
513
+ response_data=response_data,
514
+ response_types_map=_response_types_map,
515
+ )
516
+
517
+
518
+ @validate_call
519
+ def get_feed_without_preload_content(
520
+ self,
521
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
522
+ get_feed_request_content: GetFeedRequestContent,
523
+ _request_timeout: Union[
524
+ None,
525
+ Annotated[StrictFloat, Field(gt=0)],
526
+ Tuple[
527
+ Annotated[StrictFloat, Field(gt=0)],
528
+ Annotated[StrictFloat, Field(gt=0)]
529
+ ]
530
+ ] = None,
531
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
532
+ _content_type: Optional[StrictStr] = None,
533
+ _headers: Optional[Dict[StrictStr, Any]] = None,
534
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
535
+ ) -> RESTResponseType:
536
+ """get_feed
537
+
538
+ Get pre-signed S3 Url for a feed
539
+
540
+ :param x_marketplace: Target Amazon Locale. (required)
541
+ :type x_marketplace: str
542
+ :param get_feed_request_content: (required)
543
+ :type get_feed_request_content: GetFeedRequestContent
544
+ :param _request_timeout: timeout setting for this request. If one
545
+ number provided, it will be total request
546
+ timeout. It can also be a pair (tuple) of
547
+ (connection, read) timeouts.
548
+ :type _request_timeout: int, tuple(int, int), optional
549
+ :param _request_auth: set to override the auth_settings for an a single
550
+ request; this effectively ignores the
551
+ authentication in the spec for a single request.
552
+ :type _request_auth: dict, optional
553
+ :param _content_type: force content-type for the request.
554
+ :type _content_type: str, Optional
555
+ :param _headers: set to override the headers for a single
556
+ request; this effectively ignores the headers
557
+ in the spec for a single request.
558
+ :type _headers: dict, optional
559
+ :param _host_index: set to override the host_index for a single
560
+ request; this effectively ignores the host_index
561
+ in the spec for a single request.
562
+ :type _host_index: int, optional
563
+ :return: Returns the result object.
564
+ """ # noqa: E501
565
+
566
+ _param = self._get_feed_serialize(
567
+ x_marketplace=x_marketplace,
568
+ get_feed_request_content=get_feed_request_content,
569
+ _request_auth=_request_auth,
570
+ _content_type=_content_type,
571
+ _headers=_headers,
572
+ _host_index=_host_index
573
+ )
574
+
575
+ _response_types_map: Dict[str, Optional[str]] = {
576
+ '200': "GetFeedResponseContent",
577
+ '400': "ValidationExceptionResponseContent",
578
+ '401': "UnauthorizedExceptionResponseContent",
579
+ '403': "AccessDeniedExceptionResponseContent",
580
+ '404': "ResourceNotFoundExceptionResponseContent",
581
+ '429': "ThrottleExceptionResponseContent",
582
+ '500': "InternalServerExceptionResponseContent",
583
+ }
584
+ response_data = self.api_client.call_api(
585
+ *_param,
586
+ _request_timeout=_request_timeout
587
+ )
588
+ return response_data.response
589
+
590
+
591
+ def _get_feed_serialize(
592
+ self,
593
+ x_marketplace,
594
+ get_feed_request_content,
595
+ _request_auth,
596
+ _content_type,
597
+ _headers,
598
+ _host_index,
599
+ ) -> RequestSerialized:
600
+
601
+ _host = None
602
+
603
+ _collection_formats: Dict[str, str] = {
604
+ }
605
+
606
+ _path_params: Dict[str, str] = {}
607
+ _query_params: List[Tuple[str, str]] = []
608
+ _header_params: Dict[str, Optional[str]] = _headers or {}
609
+ _form_params: List[Tuple[str, str]] = []
610
+ _files: Dict[str, Union[str, bytes]] = {}
611
+ _body_params: Optional[bytes] = None
612
+
613
+ # process the path parameters
614
+ # process the query parameters
615
+ # process the header parameters
616
+ if x_marketplace is not None:
617
+ _header_params['x-marketplace'] = x_marketplace
618
+ # process the form parameters
619
+ # process the body parameter
620
+ if get_feed_request_content is not None:
621
+ _body_params = get_feed_request_content
622
+
623
+
624
+ # set the HTTP header `Accept`
625
+ if 'Accept' not in _header_params:
626
+ _header_params['Accept'] = self.api_client.select_header_accept(
627
+ [
628
+ 'application/json'
629
+ ]
630
+ )
631
+
632
+ # set the HTTP header `Content-Type`
633
+ if _content_type:
634
+ _header_params['Content-Type'] = _content_type
635
+ else:
636
+ _default_content_type = (
637
+ self.api_client.select_header_content_type(
638
+ [
639
+ 'application/json'
640
+ ]
641
+ )
642
+ )
643
+ if _default_content_type is not None:
644
+ _header_params['Content-Type'] = _default_content_type
645
+
646
+ # authentication setting
647
+ _auth_settings: List[str] = [
648
+ ]
649
+
650
+ return self.api_client.param_serialize(
651
+ method='POST',
652
+ resource_path='/catalog/v1/getFeed',
653
+ path_params=_path_params,
654
+ query_params=_query_params,
655
+ header_params=_header_params,
656
+ body=_body_params,
657
+ post_params=_form_params,
658
+ files=_files,
659
+ auth_settings=_auth_settings,
660
+ collection_formats=_collection_formats,
661
+ _host=_host,
662
+ _request_auth=_request_auth
663
+ )
664
+
665
+
666
+
667
+
668
+ @validate_call
669
+ def get_items(
670
+ self,
671
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
672
+ get_items_request_content: GetItemsRequestContent,
673
+ _request_timeout: Union[
674
+ None,
675
+ Annotated[StrictFloat, Field(gt=0)],
676
+ Tuple[
677
+ Annotated[StrictFloat, Field(gt=0)],
678
+ Annotated[StrictFloat, Field(gt=0)]
679
+ ]
680
+ ] = None,
681
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
682
+ _content_type: Optional[StrictStr] = None,
683
+ _headers: Optional[Dict[StrictStr, Any]] = None,
684
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
685
+ ) -> GetItemsResponseContent:
686
+ """get_items
687
+
688
+
689
+ :param x_marketplace: Target Amazon Locale. (required)
690
+ :type x_marketplace: str
691
+ :param get_items_request_content: (required)
692
+ :type get_items_request_content: GetItemsRequestContent
693
+ :param _request_timeout: timeout setting for this request. If one
694
+ number provided, it will be total request
695
+ timeout. It can also be a pair (tuple) of
696
+ (connection, read) timeouts.
697
+ :type _request_timeout: int, tuple(int, int), optional
698
+ :param _request_auth: set to override the auth_settings for an a single
699
+ request; this effectively ignores the
700
+ authentication in the spec for a single request.
701
+ :type _request_auth: dict, optional
702
+ :param _content_type: force content-type for the request.
703
+ :type _content_type: str, Optional
704
+ :param _headers: set to override the headers for a single
705
+ request; this effectively ignores the headers
706
+ in the spec for a single request.
707
+ :type _headers: dict, optional
708
+ :param _host_index: set to override the host_index for a single
709
+ request; this effectively ignores the host_index
710
+ in the spec for a single request.
711
+ :type _host_index: int, optional
712
+ :return: Returns the result object.
713
+ """ # noqa: E501
714
+
715
+ _param = self._get_items_serialize(
716
+ x_marketplace=x_marketplace,
717
+ get_items_request_content=get_items_request_content,
718
+ _request_auth=_request_auth,
719
+ _content_type=_content_type,
720
+ _headers=_headers,
721
+ _host_index=_host_index
722
+ )
723
+
724
+ _response_types_map: Dict[str, Optional[str]] = {
725
+ '200': "GetItemsResponseContent",
726
+ '400': "ValidationExceptionResponseContent",
727
+ '401': "UnauthorizedExceptionResponseContent",
728
+ '403': "AccessDeniedExceptionResponseContent",
729
+ '404': "ResourceNotFoundExceptionResponseContent",
730
+ '429': "ThrottleExceptionResponseContent",
731
+ '500': "InternalServerExceptionResponseContent",
732
+ }
733
+ response_data = self.api_client.call_api(
734
+ *_param,
735
+ _request_timeout=_request_timeout
736
+ )
737
+ response_data.read()
738
+ return self.api_client.response_deserialize(
739
+ response_data=response_data,
740
+ response_types_map=_response_types_map,
741
+ ).data
742
+
743
+
744
+ @validate_call
745
+ def get_items_with_http_info(
746
+ self,
747
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
748
+ get_items_request_content: GetItemsRequestContent,
749
+ _request_timeout: Union[
750
+ None,
751
+ Annotated[StrictFloat, Field(gt=0)],
752
+ Tuple[
753
+ Annotated[StrictFloat, Field(gt=0)],
754
+ Annotated[StrictFloat, Field(gt=0)]
755
+ ]
756
+ ] = None,
757
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
758
+ _content_type: Optional[StrictStr] = None,
759
+ _headers: Optional[Dict[StrictStr, Any]] = None,
760
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
761
+ ) -> ApiResponse[GetItemsResponseContent]:
762
+ """get_items
763
+
764
+
765
+ :param x_marketplace: Target Amazon Locale. (required)
766
+ :type x_marketplace: str
767
+ :param get_items_request_content: (required)
768
+ :type get_items_request_content: GetItemsRequestContent
769
+ :param _request_timeout: timeout setting for this request. If one
770
+ number provided, it will be total request
771
+ timeout. It can also be a pair (tuple) of
772
+ (connection, read) timeouts.
773
+ :type _request_timeout: int, tuple(int, int), optional
774
+ :param _request_auth: set to override the auth_settings for an a single
775
+ request; this effectively ignores the
776
+ authentication in the spec for a single request.
777
+ :type _request_auth: dict, optional
778
+ :param _content_type: force content-type for the request.
779
+ :type _content_type: str, Optional
780
+ :param _headers: set to override the headers for a single
781
+ request; this effectively ignores the headers
782
+ in the spec for a single request.
783
+ :type _headers: dict, optional
784
+ :param _host_index: set to override the host_index for a single
785
+ request; this effectively ignores the host_index
786
+ in the spec for a single request.
787
+ :type _host_index: int, optional
788
+ :return: Returns the result object.
789
+ """ # noqa: E501
790
+
791
+ _param = self._get_items_serialize(
792
+ x_marketplace=x_marketplace,
793
+ get_items_request_content=get_items_request_content,
794
+ _request_auth=_request_auth,
795
+ _content_type=_content_type,
796
+ _headers=_headers,
797
+ _host_index=_host_index
798
+ )
799
+
800
+ _response_types_map: Dict[str, Optional[str]] = {
801
+ '200': "GetItemsResponseContent",
802
+ '400': "ValidationExceptionResponseContent",
803
+ '401': "UnauthorizedExceptionResponseContent",
804
+ '403': "AccessDeniedExceptionResponseContent",
805
+ '404': "ResourceNotFoundExceptionResponseContent",
806
+ '429': "ThrottleExceptionResponseContent",
807
+ '500': "InternalServerExceptionResponseContent",
808
+ }
809
+ response_data = self.api_client.call_api(
810
+ *_param,
811
+ _request_timeout=_request_timeout
812
+ )
813
+ response_data.read()
814
+ return self.api_client.response_deserialize(
815
+ response_data=response_data,
816
+ response_types_map=_response_types_map,
817
+ )
818
+
819
+
820
+ @validate_call
821
+ def get_items_without_preload_content(
822
+ self,
823
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
824
+ get_items_request_content: GetItemsRequestContent,
825
+ _request_timeout: Union[
826
+ None,
827
+ Annotated[StrictFloat, Field(gt=0)],
828
+ Tuple[
829
+ Annotated[StrictFloat, Field(gt=0)],
830
+ Annotated[StrictFloat, Field(gt=0)]
831
+ ]
832
+ ] = None,
833
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
834
+ _content_type: Optional[StrictStr] = None,
835
+ _headers: Optional[Dict[StrictStr, Any]] = None,
836
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
837
+ ) -> RESTResponseType:
838
+ """get_items
839
+
840
+
841
+ :param x_marketplace: Target Amazon Locale. (required)
842
+ :type x_marketplace: str
843
+ :param get_items_request_content: (required)
844
+ :type get_items_request_content: GetItemsRequestContent
845
+ :param _request_timeout: timeout setting for this request. If one
846
+ number provided, it will be total request
847
+ timeout. It can also be a pair (tuple) of
848
+ (connection, read) timeouts.
849
+ :type _request_timeout: int, tuple(int, int), optional
850
+ :param _request_auth: set to override the auth_settings for an a single
851
+ request; this effectively ignores the
852
+ authentication in the spec for a single request.
853
+ :type _request_auth: dict, optional
854
+ :param _content_type: force content-type for the request.
855
+ :type _content_type: str, Optional
856
+ :param _headers: set to override the headers for a single
857
+ request; this effectively ignores the headers
858
+ in the spec for a single request.
859
+ :type _headers: dict, optional
860
+ :param _host_index: set to override the host_index for a single
861
+ request; this effectively ignores the host_index
862
+ in the spec for a single request.
863
+ :type _host_index: int, optional
864
+ :return: Returns the result object.
865
+ """ # noqa: E501
866
+
867
+ _param = self._get_items_serialize(
868
+ x_marketplace=x_marketplace,
869
+ get_items_request_content=get_items_request_content,
870
+ _request_auth=_request_auth,
871
+ _content_type=_content_type,
872
+ _headers=_headers,
873
+ _host_index=_host_index
874
+ )
875
+
876
+ _response_types_map: Dict[str, Optional[str]] = {
877
+ '200': "GetItemsResponseContent",
878
+ '400': "ValidationExceptionResponseContent",
879
+ '401': "UnauthorizedExceptionResponseContent",
880
+ '403': "AccessDeniedExceptionResponseContent",
881
+ '404': "ResourceNotFoundExceptionResponseContent",
882
+ '429': "ThrottleExceptionResponseContent",
883
+ '500': "InternalServerExceptionResponseContent",
884
+ }
885
+ response_data = self.api_client.call_api(
886
+ *_param,
887
+ _request_timeout=_request_timeout
888
+ )
889
+ return response_data.response
890
+
891
+
892
+ def _get_items_serialize(
893
+ self,
894
+ x_marketplace,
895
+ get_items_request_content,
896
+ _request_auth,
897
+ _content_type,
898
+ _headers,
899
+ _host_index,
900
+ ) -> RequestSerialized:
901
+
902
+ _host = None
903
+
904
+ _collection_formats: Dict[str, str] = {
905
+ }
906
+
907
+ _path_params: Dict[str, str] = {}
908
+ _query_params: List[Tuple[str, str]] = []
909
+ _header_params: Dict[str, Optional[str]] = _headers or {}
910
+ _form_params: List[Tuple[str, str]] = []
911
+ _files: Dict[str, Union[str, bytes]] = {}
912
+ _body_params: Optional[bytes] = None
913
+
914
+ # process the path parameters
915
+ # process the query parameters
916
+ # process the header parameters
917
+ if x_marketplace is not None:
918
+ _header_params['x-marketplace'] = x_marketplace
919
+ # process the form parameters
920
+ # process the body parameter
921
+ if get_items_request_content is not None:
922
+ _body_params = get_items_request_content
923
+
924
+
925
+ # set the HTTP header `Accept`
926
+ if 'Accept' not in _header_params:
927
+ _header_params['Accept'] = self.api_client.select_header_accept(
928
+ [
929
+ 'application/json'
930
+ ]
931
+ )
932
+
933
+ # set the HTTP header `Content-Type`
934
+ if _content_type:
935
+ _header_params['Content-Type'] = _content_type
936
+ else:
937
+ _default_content_type = (
938
+ self.api_client.select_header_content_type(
939
+ [
940
+ 'application/json'
941
+ ]
942
+ )
943
+ )
944
+ if _default_content_type is not None:
945
+ _header_params['Content-Type'] = _default_content_type
946
+
947
+ # authentication setting
948
+ _auth_settings: List[str] = [
949
+ ]
950
+
951
+ return self.api_client.param_serialize(
952
+ method='POST',
953
+ resource_path='/catalog/v1/getItems',
954
+ path_params=_path_params,
955
+ query_params=_query_params,
956
+ header_params=_header_params,
957
+ body=_body_params,
958
+ post_params=_form_params,
959
+ files=_files,
960
+ auth_settings=_auth_settings,
961
+ collection_formats=_collection_formats,
962
+ _host=_host,
963
+ _request_auth=_request_auth
964
+ )
965
+
966
+
967
+
968
+
969
+ @validate_call
970
+ def get_report(
971
+ self,
972
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
973
+ get_report_request_content: GetReportRequestContent,
974
+ _request_timeout: Union[
975
+ None,
976
+ Annotated[StrictFloat, Field(gt=0)],
977
+ Tuple[
978
+ Annotated[StrictFloat, Field(gt=0)],
979
+ Annotated[StrictFloat, Field(gt=0)]
980
+ ]
981
+ ] = None,
982
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
983
+ _content_type: Optional[StrictStr] = None,
984
+ _headers: Optional[Dict[StrictStr, Any]] = None,
985
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
986
+ ) -> GetReportResponseContent:
987
+ """get_report
988
+
989
+ Get pre-signed S3 Url for a report
990
+
991
+ :param x_marketplace: Target Amazon Locale. (required)
992
+ :type x_marketplace: str
993
+ :param get_report_request_content: (required)
994
+ :type get_report_request_content: GetReportRequestContent
995
+ :param _request_timeout: timeout setting for this request. If one
996
+ number provided, it will be total request
997
+ timeout. It can also be a pair (tuple) of
998
+ (connection, read) timeouts.
999
+ :type _request_timeout: int, tuple(int, int), optional
1000
+ :param _request_auth: set to override the auth_settings for an a single
1001
+ request; this effectively ignores the
1002
+ authentication in the spec for a single request.
1003
+ :type _request_auth: dict, optional
1004
+ :param _content_type: force content-type for the request.
1005
+ :type _content_type: str, Optional
1006
+ :param _headers: set to override the headers for a single
1007
+ request; this effectively ignores the headers
1008
+ in the spec for a single request.
1009
+ :type _headers: dict, optional
1010
+ :param _host_index: set to override the host_index for a single
1011
+ request; this effectively ignores the host_index
1012
+ in the spec for a single request.
1013
+ :type _host_index: int, optional
1014
+ :return: Returns the result object.
1015
+ """ # noqa: E501
1016
+
1017
+ _param = self._get_report_serialize(
1018
+ x_marketplace=x_marketplace,
1019
+ get_report_request_content=get_report_request_content,
1020
+ _request_auth=_request_auth,
1021
+ _content_type=_content_type,
1022
+ _headers=_headers,
1023
+ _host_index=_host_index
1024
+ )
1025
+
1026
+ _response_types_map: Dict[str, Optional[str]] = {
1027
+ '200': "GetReportResponseContent",
1028
+ '400': "ValidationExceptionResponseContent",
1029
+ '401': "UnauthorizedExceptionResponseContent",
1030
+ '403': "AccessDeniedExceptionResponseContent",
1031
+ '404': "ResourceNotFoundExceptionResponseContent",
1032
+ '429': "ThrottleExceptionResponseContent",
1033
+ '500': "InternalServerExceptionResponseContent",
1034
+ }
1035
+ response_data = self.api_client.call_api(
1036
+ *_param,
1037
+ _request_timeout=_request_timeout
1038
+ )
1039
+ response_data.read()
1040
+ return self.api_client.response_deserialize(
1041
+ response_data=response_data,
1042
+ response_types_map=_response_types_map,
1043
+ ).data
1044
+
1045
+
1046
+ @validate_call
1047
+ def get_report_with_http_info(
1048
+ self,
1049
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1050
+ get_report_request_content: GetReportRequestContent,
1051
+ _request_timeout: Union[
1052
+ None,
1053
+ Annotated[StrictFloat, Field(gt=0)],
1054
+ Tuple[
1055
+ Annotated[StrictFloat, Field(gt=0)],
1056
+ Annotated[StrictFloat, Field(gt=0)]
1057
+ ]
1058
+ ] = None,
1059
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1060
+ _content_type: Optional[StrictStr] = None,
1061
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1062
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1063
+ ) -> ApiResponse[GetReportResponseContent]:
1064
+ """get_report
1065
+
1066
+ Get pre-signed S3 Url for a report
1067
+
1068
+ :param x_marketplace: Target Amazon Locale. (required)
1069
+ :type x_marketplace: str
1070
+ :param get_report_request_content: (required)
1071
+ :type get_report_request_content: GetReportRequestContent
1072
+ :param _request_timeout: timeout setting for this request. If one
1073
+ number provided, it will be total request
1074
+ timeout. It can also be a pair (tuple) of
1075
+ (connection, read) timeouts.
1076
+ :type _request_timeout: int, tuple(int, int), optional
1077
+ :param _request_auth: set to override the auth_settings for an a single
1078
+ request; this effectively ignores the
1079
+ authentication in the spec for a single request.
1080
+ :type _request_auth: dict, optional
1081
+ :param _content_type: force content-type for the request.
1082
+ :type _content_type: str, Optional
1083
+ :param _headers: set to override the headers for a single
1084
+ request; this effectively ignores the headers
1085
+ in the spec for a single request.
1086
+ :type _headers: dict, optional
1087
+ :param _host_index: set to override the host_index for a single
1088
+ request; this effectively ignores the host_index
1089
+ in the spec for a single request.
1090
+ :type _host_index: int, optional
1091
+ :return: Returns the result object.
1092
+ """ # noqa: E501
1093
+
1094
+ _param = self._get_report_serialize(
1095
+ x_marketplace=x_marketplace,
1096
+ get_report_request_content=get_report_request_content,
1097
+ _request_auth=_request_auth,
1098
+ _content_type=_content_type,
1099
+ _headers=_headers,
1100
+ _host_index=_host_index
1101
+ )
1102
+
1103
+ _response_types_map: Dict[str, Optional[str]] = {
1104
+ '200': "GetReportResponseContent",
1105
+ '400': "ValidationExceptionResponseContent",
1106
+ '401': "UnauthorizedExceptionResponseContent",
1107
+ '403': "AccessDeniedExceptionResponseContent",
1108
+ '404': "ResourceNotFoundExceptionResponseContent",
1109
+ '429': "ThrottleExceptionResponseContent",
1110
+ '500': "InternalServerExceptionResponseContent",
1111
+ }
1112
+ response_data = self.api_client.call_api(
1113
+ *_param,
1114
+ _request_timeout=_request_timeout
1115
+ )
1116
+ response_data.read()
1117
+ return self.api_client.response_deserialize(
1118
+ response_data=response_data,
1119
+ response_types_map=_response_types_map,
1120
+ )
1121
+
1122
+
1123
+ @validate_call
1124
+ def get_report_without_preload_content(
1125
+ self,
1126
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1127
+ get_report_request_content: GetReportRequestContent,
1128
+ _request_timeout: Union[
1129
+ None,
1130
+ Annotated[StrictFloat, Field(gt=0)],
1131
+ Tuple[
1132
+ Annotated[StrictFloat, Field(gt=0)],
1133
+ Annotated[StrictFloat, Field(gt=0)]
1134
+ ]
1135
+ ] = None,
1136
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1137
+ _content_type: Optional[StrictStr] = None,
1138
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1139
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1140
+ ) -> RESTResponseType:
1141
+ """get_report
1142
+
1143
+ Get pre-signed S3 Url for a report
1144
+
1145
+ :param x_marketplace: Target Amazon Locale. (required)
1146
+ :type x_marketplace: str
1147
+ :param get_report_request_content: (required)
1148
+ :type get_report_request_content: GetReportRequestContent
1149
+ :param _request_timeout: timeout setting for this request. If one
1150
+ number provided, it will be total request
1151
+ timeout. It can also be a pair (tuple) of
1152
+ (connection, read) timeouts.
1153
+ :type _request_timeout: int, tuple(int, int), optional
1154
+ :param _request_auth: set to override the auth_settings for an a single
1155
+ request; this effectively ignores the
1156
+ authentication in the spec for a single request.
1157
+ :type _request_auth: dict, optional
1158
+ :param _content_type: force content-type for the request.
1159
+ :type _content_type: str, Optional
1160
+ :param _headers: set to override the headers for a single
1161
+ request; this effectively ignores the headers
1162
+ in the spec for a single request.
1163
+ :type _headers: dict, optional
1164
+ :param _host_index: set to override the host_index for a single
1165
+ request; this effectively ignores the host_index
1166
+ in the spec for a single request.
1167
+ :type _host_index: int, optional
1168
+ :return: Returns the result object.
1169
+ """ # noqa: E501
1170
+
1171
+ _param = self._get_report_serialize(
1172
+ x_marketplace=x_marketplace,
1173
+ get_report_request_content=get_report_request_content,
1174
+ _request_auth=_request_auth,
1175
+ _content_type=_content_type,
1176
+ _headers=_headers,
1177
+ _host_index=_host_index
1178
+ )
1179
+
1180
+ _response_types_map: Dict[str, Optional[str]] = {
1181
+ '200': "GetReportResponseContent",
1182
+ '400': "ValidationExceptionResponseContent",
1183
+ '401': "UnauthorizedExceptionResponseContent",
1184
+ '403': "AccessDeniedExceptionResponseContent",
1185
+ '404': "ResourceNotFoundExceptionResponseContent",
1186
+ '429': "ThrottleExceptionResponseContent",
1187
+ '500': "InternalServerExceptionResponseContent",
1188
+ }
1189
+ response_data = self.api_client.call_api(
1190
+ *_param,
1191
+ _request_timeout=_request_timeout
1192
+ )
1193
+ return response_data.response
1194
+
1195
+
1196
+ def _get_report_serialize(
1197
+ self,
1198
+ x_marketplace,
1199
+ get_report_request_content,
1200
+ _request_auth,
1201
+ _content_type,
1202
+ _headers,
1203
+ _host_index,
1204
+ ) -> RequestSerialized:
1205
+
1206
+ _host = None
1207
+
1208
+ _collection_formats: Dict[str, str] = {
1209
+ }
1210
+
1211
+ _path_params: Dict[str, str] = {}
1212
+ _query_params: List[Tuple[str, str]] = []
1213
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1214
+ _form_params: List[Tuple[str, str]] = []
1215
+ _files: Dict[str, Union[str, bytes]] = {}
1216
+ _body_params: Optional[bytes] = None
1217
+
1218
+ # process the path parameters
1219
+ # process the query parameters
1220
+ # process the header parameters
1221
+ if x_marketplace is not None:
1222
+ _header_params['x-marketplace'] = x_marketplace
1223
+ # process the form parameters
1224
+ # process the body parameter
1225
+ if get_report_request_content is not None:
1226
+ _body_params = get_report_request_content
1227
+
1228
+
1229
+ # set the HTTP header `Accept`
1230
+ if 'Accept' not in _header_params:
1231
+ _header_params['Accept'] = self.api_client.select_header_accept(
1232
+ [
1233
+ 'application/json'
1234
+ ]
1235
+ )
1236
+
1237
+ # set the HTTP header `Content-Type`
1238
+ if _content_type:
1239
+ _header_params['Content-Type'] = _content_type
1240
+ else:
1241
+ _default_content_type = (
1242
+ self.api_client.select_header_content_type(
1243
+ [
1244
+ 'application/json'
1245
+ ]
1246
+ )
1247
+ )
1248
+ if _default_content_type is not None:
1249
+ _header_params['Content-Type'] = _default_content_type
1250
+
1251
+ # authentication setting
1252
+ _auth_settings: List[str] = [
1253
+ ]
1254
+
1255
+ return self.api_client.param_serialize(
1256
+ method='POST',
1257
+ resource_path='/reports/v1/getReport',
1258
+ path_params=_path_params,
1259
+ query_params=_query_params,
1260
+ header_params=_header_params,
1261
+ body=_body_params,
1262
+ post_params=_form_params,
1263
+ files=_files,
1264
+ auth_settings=_auth_settings,
1265
+ collection_formats=_collection_formats,
1266
+ _host=_host,
1267
+ _request_auth=_request_auth
1268
+ )
1269
+
1270
+
1271
+
1272
+
1273
+ @validate_call
1274
+ def get_variations(
1275
+ self,
1276
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com'")],
1277
+ get_variations_request_content: GetVariationsRequestContent,
1278
+ _request_timeout: Union[
1279
+ None,
1280
+ Annotated[StrictFloat, Field(gt=0)],
1281
+ Tuple[
1282
+ Annotated[StrictFloat, Field(gt=0)],
1283
+ Annotated[StrictFloat, Field(gt=0)]
1284
+ ]
1285
+ ] = None,
1286
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1287
+ _content_type: Optional[StrictStr] = None,
1288
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1289
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1290
+ ) -> GetVariationsResponseContent:
1291
+ """get_variations
1292
+
1293
+ Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. These items which differ according to a consistent theme are called variations. A variation is a child ASIN. The parent ASIN is an abstraction of the children items. For example, a shirt is a parent ASIN and parent ASINs cannot be sold. A child ASIN would be a blue shirt, size 16, sold by MyApparelStore. This child ASIN is one of potentially many variations. The ways in which variations differ are called dimensions. In the preceding example, size and color are the dimensions. GetVariations supports the following high-level resources: - BrowseNodeInfo: Browse nodes associated with items - Images: Product images in various sizes - ItemInfo: Detailed item information including title, features, and specifications - OffersV2: Offer listings with availability, pricing, and merchant details - VariationSummary: Summary of variation dimensions and price ranges By default, GetVariations returns 10 variations per page. Use VariationPage and VariationCount parameters to control pagination. The operation works with both parent ASINs (to retrieve all variations) and child ASINs (to retrieve sibling variations). Available in all locales, however, parameter support varies by locale.
1294
+
1295
+ :param x_marketplace: Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com' (required)
1296
+ :type x_marketplace: str
1297
+ :param get_variations_request_content: (required)
1298
+ :type get_variations_request_content: GetVariationsRequestContent
1299
+ :param _request_timeout: timeout setting for this request. If one
1300
+ number provided, it will be total request
1301
+ timeout. It can also be a pair (tuple) of
1302
+ (connection, read) timeouts.
1303
+ :type _request_timeout: int, tuple(int, int), optional
1304
+ :param _request_auth: set to override the auth_settings for an a single
1305
+ request; this effectively ignores the
1306
+ authentication in the spec for a single request.
1307
+ :type _request_auth: dict, optional
1308
+ :param _content_type: force content-type for the request.
1309
+ :type _content_type: str, Optional
1310
+ :param _headers: set to override the headers for a single
1311
+ request; this effectively ignores the headers
1312
+ in the spec for a single request.
1313
+ :type _headers: dict, optional
1314
+ :param _host_index: set to override the host_index for a single
1315
+ request; this effectively ignores the host_index
1316
+ in the spec for a single request.
1317
+ :type _host_index: int, optional
1318
+ :return: Returns the result object.
1319
+ """ # noqa: E501
1320
+
1321
+ _param = self._get_variations_serialize(
1322
+ x_marketplace=x_marketplace,
1323
+ get_variations_request_content=get_variations_request_content,
1324
+ _request_auth=_request_auth,
1325
+ _content_type=_content_type,
1326
+ _headers=_headers,
1327
+ _host_index=_host_index
1328
+ )
1329
+
1330
+ _response_types_map: Dict[str, Optional[str]] = {
1331
+ '200': "GetVariationsResponseContent",
1332
+ '400': "ValidationExceptionResponseContent",
1333
+ '401': "UnauthorizedExceptionResponseContent",
1334
+ '403': "AccessDeniedExceptionResponseContent",
1335
+ '404': "ResourceNotFoundExceptionResponseContent",
1336
+ '429': "ThrottleExceptionResponseContent",
1337
+ '500': "InternalServerExceptionResponseContent",
1338
+ }
1339
+ response_data = self.api_client.call_api(
1340
+ *_param,
1341
+ _request_timeout=_request_timeout
1342
+ )
1343
+ response_data.read()
1344
+ return self.api_client.response_deserialize(
1345
+ response_data=response_data,
1346
+ response_types_map=_response_types_map,
1347
+ ).data
1348
+
1349
+
1350
+ @validate_call
1351
+ def get_variations_with_http_info(
1352
+ self,
1353
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com'")],
1354
+ get_variations_request_content: GetVariationsRequestContent,
1355
+ _request_timeout: Union[
1356
+ None,
1357
+ Annotated[StrictFloat, Field(gt=0)],
1358
+ Tuple[
1359
+ Annotated[StrictFloat, Field(gt=0)],
1360
+ Annotated[StrictFloat, Field(gt=0)]
1361
+ ]
1362
+ ] = None,
1363
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1364
+ _content_type: Optional[StrictStr] = None,
1365
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1366
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1367
+ ) -> ApiResponse[GetVariationsResponseContent]:
1368
+ """get_variations
1369
+
1370
+ Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. These items which differ according to a consistent theme are called variations. A variation is a child ASIN. The parent ASIN is an abstraction of the children items. For example, a shirt is a parent ASIN and parent ASINs cannot be sold. A child ASIN would be a blue shirt, size 16, sold by MyApparelStore. This child ASIN is one of potentially many variations. The ways in which variations differ are called dimensions. In the preceding example, size and color are the dimensions. GetVariations supports the following high-level resources: - BrowseNodeInfo: Browse nodes associated with items - Images: Product images in various sizes - ItemInfo: Detailed item information including title, features, and specifications - OffersV2: Offer listings with availability, pricing, and merchant details - VariationSummary: Summary of variation dimensions and price ranges By default, GetVariations returns 10 variations per page. Use VariationPage and VariationCount parameters to control pagination. The operation works with both parent ASINs (to retrieve all variations) and child ASINs (to retrieve sibling variations). Available in all locales, however, parameter support varies by locale.
1371
+
1372
+ :param x_marketplace: Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com' (required)
1373
+ :type x_marketplace: str
1374
+ :param get_variations_request_content: (required)
1375
+ :type get_variations_request_content: GetVariationsRequestContent
1376
+ :param _request_timeout: timeout setting for this request. If one
1377
+ number provided, it will be total request
1378
+ timeout. It can also be a pair (tuple) of
1379
+ (connection, read) timeouts.
1380
+ :type _request_timeout: int, tuple(int, int), optional
1381
+ :param _request_auth: set to override the auth_settings for an a single
1382
+ request; this effectively ignores the
1383
+ authentication in the spec for a single request.
1384
+ :type _request_auth: dict, optional
1385
+ :param _content_type: force content-type for the request.
1386
+ :type _content_type: str, Optional
1387
+ :param _headers: set to override the headers for a single
1388
+ request; this effectively ignores the headers
1389
+ in the spec for a single request.
1390
+ :type _headers: dict, optional
1391
+ :param _host_index: set to override the host_index for a single
1392
+ request; this effectively ignores the host_index
1393
+ in the spec for a single request.
1394
+ :type _host_index: int, optional
1395
+ :return: Returns the result object.
1396
+ """ # noqa: E501
1397
+
1398
+ _param = self._get_variations_serialize(
1399
+ x_marketplace=x_marketplace,
1400
+ get_variations_request_content=get_variations_request_content,
1401
+ _request_auth=_request_auth,
1402
+ _content_type=_content_type,
1403
+ _headers=_headers,
1404
+ _host_index=_host_index
1405
+ )
1406
+
1407
+ _response_types_map: Dict[str, Optional[str]] = {
1408
+ '200': "GetVariationsResponseContent",
1409
+ '400': "ValidationExceptionResponseContent",
1410
+ '401': "UnauthorizedExceptionResponseContent",
1411
+ '403': "AccessDeniedExceptionResponseContent",
1412
+ '404': "ResourceNotFoundExceptionResponseContent",
1413
+ '429': "ThrottleExceptionResponseContent",
1414
+ '500': "InternalServerExceptionResponseContent",
1415
+ }
1416
+ response_data = self.api_client.call_api(
1417
+ *_param,
1418
+ _request_timeout=_request_timeout
1419
+ )
1420
+ response_data.read()
1421
+ return self.api_client.response_deserialize(
1422
+ response_data=response_data,
1423
+ response_types_map=_response_types_map,
1424
+ )
1425
+
1426
+
1427
+ @validate_call
1428
+ def get_variations_without_preload_content(
1429
+ self,
1430
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com'")],
1431
+ get_variations_request_content: GetVariationsRequestContent,
1432
+ _request_timeout: Union[
1433
+ None,
1434
+ Annotated[StrictFloat, Field(gt=0)],
1435
+ Tuple[
1436
+ Annotated[StrictFloat, Field(gt=0)],
1437
+ Annotated[StrictFloat, Field(gt=0)]
1438
+ ]
1439
+ ] = None,
1440
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1441
+ _content_type: Optional[StrictStr] = None,
1442
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1443
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1444
+ ) -> RESTResponseType:
1445
+ """get_variations
1446
+
1447
+ Given an ASIN, the GetVariations operation returns a set of items that are the same product, but differ according to a consistent theme, for example size and color. These items which differ according to a consistent theme are called variations. A variation is a child ASIN. The parent ASIN is an abstraction of the children items. For example, a shirt is a parent ASIN and parent ASINs cannot be sold. A child ASIN would be a blue shirt, size 16, sold by MyApparelStore. This child ASIN is one of potentially many variations. The ways in which variations differ are called dimensions. In the preceding example, size and color are the dimensions. GetVariations supports the following high-level resources: - BrowseNodeInfo: Browse nodes associated with items - Images: Product images in various sizes - ItemInfo: Detailed item information including title, features, and specifications - OffersV2: Offer listings with availability, pricing, and merchant details - VariationSummary: Summary of variation dimensions and price ranges By default, GetVariations returns 10 variations per page. Use VariationPage and VariationCount parameters to control pagination. The operation works with both parent ASINs (to retrieve all variations) and child ASINs (to retrieve sibling variations). Available in all locales, however, parameter support varies by locale.
1448
+
1449
+ :param x_marketplace: Target Amazon Locale. This specifies the marketplace where the items should be searched. Example: 'www.amazon.com' (required)
1450
+ :type x_marketplace: str
1451
+ :param get_variations_request_content: (required)
1452
+ :type get_variations_request_content: GetVariationsRequestContent
1453
+ :param _request_timeout: timeout setting for this request. If one
1454
+ number provided, it will be total request
1455
+ timeout. It can also be a pair (tuple) of
1456
+ (connection, read) timeouts.
1457
+ :type _request_timeout: int, tuple(int, int), optional
1458
+ :param _request_auth: set to override the auth_settings for an a single
1459
+ request; this effectively ignores the
1460
+ authentication in the spec for a single request.
1461
+ :type _request_auth: dict, optional
1462
+ :param _content_type: force content-type for the request.
1463
+ :type _content_type: str, Optional
1464
+ :param _headers: set to override the headers for a single
1465
+ request; this effectively ignores the headers
1466
+ in the spec for a single request.
1467
+ :type _headers: dict, optional
1468
+ :param _host_index: set to override the host_index for a single
1469
+ request; this effectively ignores the host_index
1470
+ in the spec for a single request.
1471
+ :type _host_index: int, optional
1472
+ :return: Returns the result object.
1473
+ """ # noqa: E501
1474
+
1475
+ _param = self._get_variations_serialize(
1476
+ x_marketplace=x_marketplace,
1477
+ get_variations_request_content=get_variations_request_content,
1478
+ _request_auth=_request_auth,
1479
+ _content_type=_content_type,
1480
+ _headers=_headers,
1481
+ _host_index=_host_index
1482
+ )
1483
+
1484
+ _response_types_map: Dict[str, Optional[str]] = {
1485
+ '200': "GetVariationsResponseContent",
1486
+ '400': "ValidationExceptionResponseContent",
1487
+ '401': "UnauthorizedExceptionResponseContent",
1488
+ '403': "AccessDeniedExceptionResponseContent",
1489
+ '404': "ResourceNotFoundExceptionResponseContent",
1490
+ '429': "ThrottleExceptionResponseContent",
1491
+ '500': "InternalServerExceptionResponseContent",
1492
+ }
1493
+ response_data = self.api_client.call_api(
1494
+ *_param,
1495
+ _request_timeout=_request_timeout
1496
+ )
1497
+ return response_data.response
1498
+
1499
+
1500
+ def _get_variations_serialize(
1501
+ self,
1502
+ x_marketplace,
1503
+ get_variations_request_content,
1504
+ _request_auth,
1505
+ _content_type,
1506
+ _headers,
1507
+ _host_index,
1508
+ ) -> RequestSerialized:
1509
+
1510
+ _host = None
1511
+
1512
+ _collection_formats: Dict[str, str] = {
1513
+ }
1514
+
1515
+ _path_params: Dict[str, str] = {}
1516
+ _query_params: List[Tuple[str, str]] = []
1517
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1518
+ _form_params: List[Tuple[str, str]] = []
1519
+ _files: Dict[str, Union[str, bytes]] = {}
1520
+ _body_params: Optional[bytes] = None
1521
+
1522
+ # process the path parameters
1523
+ # process the query parameters
1524
+ # process the header parameters
1525
+ if x_marketplace is not None:
1526
+ _header_params['x-marketplace'] = x_marketplace
1527
+ # process the form parameters
1528
+ # process the body parameter
1529
+ if get_variations_request_content is not None:
1530
+ _body_params = get_variations_request_content
1531
+
1532
+
1533
+ # set the HTTP header `Accept`
1534
+ if 'Accept' not in _header_params:
1535
+ _header_params['Accept'] = self.api_client.select_header_accept(
1536
+ [
1537
+ 'application/json'
1538
+ ]
1539
+ )
1540
+
1541
+ # set the HTTP header `Content-Type`
1542
+ if _content_type:
1543
+ _header_params['Content-Type'] = _content_type
1544
+ else:
1545
+ _default_content_type = (
1546
+ self.api_client.select_header_content_type(
1547
+ [
1548
+ 'application/json'
1549
+ ]
1550
+ )
1551
+ )
1552
+ if _default_content_type is not None:
1553
+ _header_params['Content-Type'] = _default_content_type
1554
+
1555
+ # authentication setting
1556
+ _auth_settings: List[str] = [
1557
+ ]
1558
+
1559
+ return self.api_client.param_serialize(
1560
+ method='POST',
1561
+ resource_path='/catalog/v1/getVariations',
1562
+ path_params=_path_params,
1563
+ query_params=_query_params,
1564
+ header_params=_header_params,
1565
+ body=_body_params,
1566
+ post_params=_form_params,
1567
+ files=_files,
1568
+ auth_settings=_auth_settings,
1569
+ collection_formats=_collection_formats,
1570
+ _host=_host,
1571
+ _request_auth=_request_auth
1572
+ )
1573
+
1574
+
1575
+
1576
+
1577
+ @validate_call
1578
+ def list_feeds(
1579
+ self,
1580
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1581
+ _request_timeout: Union[
1582
+ None,
1583
+ Annotated[StrictFloat, Field(gt=0)],
1584
+ Tuple[
1585
+ Annotated[StrictFloat, Field(gt=0)],
1586
+ Annotated[StrictFloat, Field(gt=0)]
1587
+ ]
1588
+ ] = None,
1589
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1590
+ _content_type: Optional[StrictStr] = None,
1591
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1592
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1593
+ ) -> ListFeedsResponseContent:
1594
+ """list_feeds
1595
+
1596
+ Lists all Feeds
1597
+
1598
+ :param x_marketplace: Target Amazon Locale. (required)
1599
+ :type x_marketplace: str
1600
+ :param _request_timeout: timeout setting for this request. If one
1601
+ number provided, it will be total request
1602
+ timeout. It can also be a pair (tuple) of
1603
+ (connection, read) timeouts.
1604
+ :type _request_timeout: int, tuple(int, int), optional
1605
+ :param _request_auth: set to override the auth_settings for an a single
1606
+ request; this effectively ignores the
1607
+ authentication in the spec for a single request.
1608
+ :type _request_auth: dict, optional
1609
+ :param _content_type: force content-type for the request.
1610
+ :type _content_type: str, Optional
1611
+ :param _headers: set to override the headers for a single
1612
+ request; this effectively ignores the headers
1613
+ in the spec for a single request.
1614
+ :type _headers: dict, optional
1615
+ :param _host_index: set to override the host_index for a single
1616
+ request; this effectively ignores the host_index
1617
+ in the spec for a single request.
1618
+ :type _host_index: int, optional
1619
+ :return: Returns the result object.
1620
+ """ # noqa: E501
1621
+
1622
+ _param = self._list_feeds_serialize(
1623
+ x_marketplace=x_marketplace,
1624
+ _request_auth=_request_auth,
1625
+ _content_type=_content_type,
1626
+ _headers=_headers,
1627
+ _host_index=_host_index
1628
+ )
1629
+
1630
+ _response_types_map: Dict[str, Optional[str]] = {
1631
+ '200': "ListFeedsResponseContent",
1632
+ '400': "ValidationExceptionResponseContent",
1633
+ '401': "UnauthorizedExceptionResponseContent",
1634
+ '403': "AccessDeniedExceptionResponseContent",
1635
+ '404': "ResourceNotFoundExceptionResponseContent",
1636
+ '429': "ThrottleExceptionResponseContent",
1637
+ '500': "InternalServerExceptionResponseContent",
1638
+ }
1639
+ response_data = self.api_client.call_api(
1640
+ *_param,
1641
+ _request_timeout=_request_timeout
1642
+ )
1643
+ response_data.read()
1644
+ return self.api_client.response_deserialize(
1645
+ response_data=response_data,
1646
+ response_types_map=_response_types_map,
1647
+ ).data
1648
+
1649
+
1650
+ @validate_call
1651
+ def list_feeds_with_http_info(
1652
+ self,
1653
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1654
+ _request_timeout: Union[
1655
+ None,
1656
+ Annotated[StrictFloat, Field(gt=0)],
1657
+ Tuple[
1658
+ Annotated[StrictFloat, Field(gt=0)],
1659
+ Annotated[StrictFloat, Field(gt=0)]
1660
+ ]
1661
+ ] = None,
1662
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1663
+ _content_type: Optional[StrictStr] = None,
1664
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1665
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1666
+ ) -> ApiResponse[ListFeedsResponseContent]:
1667
+ """list_feeds
1668
+
1669
+ Lists all Feeds
1670
+
1671
+ :param x_marketplace: Target Amazon Locale. (required)
1672
+ :type x_marketplace: str
1673
+ :param _request_timeout: timeout setting for this request. If one
1674
+ number provided, it will be total request
1675
+ timeout. It can also be a pair (tuple) of
1676
+ (connection, read) timeouts.
1677
+ :type _request_timeout: int, tuple(int, int), optional
1678
+ :param _request_auth: set to override the auth_settings for an a single
1679
+ request; this effectively ignores the
1680
+ authentication in the spec for a single request.
1681
+ :type _request_auth: dict, optional
1682
+ :param _content_type: force content-type for the request.
1683
+ :type _content_type: str, Optional
1684
+ :param _headers: set to override the headers for a single
1685
+ request; this effectively ignores the headers
1686
+ in the spec for a single request.
1687
+ :type _headers: dict, optional
1688
+ :param _host_index: set to override the host_index for a single
1689
+ request; this effectively ignores the host_index
1690
+ in the spec for a single request.
1691
+ :type _host_index: int, optional
1692
+ :return: Returns the result object.
1693
+ """ # noqa: E501
1694
+
1695
+ _param = self._list_feeds_serialize(
1696
+ x_marketplace=x_marketplace,
1697
+ _request_auth=_request_auth,
1698
+ _content_type=_content_type,
1699
+ _headers=_headers,
1700
+ _host_index=_host_index
1701
+ )
1702
+
1703
+ _response_types_map: Dict[str, Optional[str]] = {
1704
+ '200': "ListFeedsResponseContent",
1705
+ '400': "ValidationExceptionResponseContent",
1706
+ '401': "UnauthorizedExceptionResponseContent",
1707
+ '403': "AccessDeniedExceptionResponseContent",
1708
+ '404': "ResourceNotFoundExceptionResponseContent",
1709
+ '429': "ThrottleExceptionResponseContent",
1710
+ '500': "InternalServerExceptionResponseContent",
1711
+ }
1712
+ response_data = self.api_client.call_api(
1713
+ *_param,
1714
+ _request_timeout=_request_timeout
1715
+ )
1716
+ response_data.read()
1717
+ return self.api_client.response_deserialize(
1718
+ response_data=response_data,
1719
+ response_types_map=_response_types_map,
1720
+ )
1721
+
1722
+
1723
+ @validate_call
1724
+ def list_feeds_without_preload_content(
1725
+ self,
1726
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1727
+ _request_timeout: Union[
1728
+ None,
1729
+ Annotated[StrictFloat, Field(gt=0)],
1730
+ Tuple[
1731
+ Annotated[StrictFloat, Field(gt=0)],
1732
+ Annotated[StrictFloat, Field(gt=0)]
1733
+ ]
1734
+ ] = None,
1735
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1736
+ _content_type: Optional[StrictStr] = None,
1737
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1738
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1739
+ ) -> RESTResponseType:
1740
+ """list_feeds
1741
+
1742
+ Lists all Feeds
1743
+
1744
+ :param x_marketplace: Target Amazon Locale. (required)
1745
+ :type x_marketplace: str
1746
+ :param _request_timeout: timeout setting for this request. If one
1747
+ number provided, it will be total request
1748
+ timeout. It can also be a pair (tuple) of
1749
+ (connection, read) timeouts.
1750
+ :type _request_timeout: int, tuple(int, int), optional
1751
+ :param _request_auth: set to override the auth_settings for an a single
1752
+ request; this effectively ignores the
1753
+ authentication in the spec for a single request.
1754
+ :type _request_auth: dict, optional
1755
+ :param _content_type: force content-type for the request.
1756
+ :type _content_type: str, Optional
1757
+ :param _headers: set to override the headers for a single
1758
+ request; this effectively ignores the headers
1759
+ in the spec for a single request.
1760
+ :type _headers: dict, optional
1761
+ :param _host_index: set to override the host_index for a single
1762
+ request; this effectively ignores the host_index
1763
+ in the spec for a single request.
1764
+ :type _host_index: int, optional
1765
+ :return: Returns the result object.
1766
+ """ # noqa: E501
1767
+
1768
+ _param = self._list_feeds_serialize(
1769
+ x_marketplace=x_marketplace,
1770
+ _request_auth=_request_auth,
1771
+ _content_type=_content_type,
1772
+ _headers=_headers,
1773
+ _host_index=_host_index
1774
+ )
1775
+
1776
+ _response_types_map: Dict[str, Optional[str]] = {
1777
+ '200': "ListFeedsResponseContent",
1778
+ '400': "ValidationExceptionResponseContent",
1779
+ '401': "UnauthorizedExceptionResponseContent",
1780
+ '403': "AccessDeniedExceptionResponseContent",
1781
+ '404': "ResourceNotFoundExceptionResponseContent",
1782
+ '429': "ThrottleExceptionResponseContent",
1783
+ '500': "InternalServerExceptionResponseContent",
1784
+ }
1785
+ response_data = self.api_client.call_api(
1786
+ *_param,
1787
+ _request_timeout=_request_timeout
1788
+ )
1789
+ return response_data.response
1790
+
1791
+
1792
+ def _list_feeds_serialize(
1793
+ self,
1794
+ x_marketplace,
1795
+ _request_auth,
1796
+ _content_type,
1797
+ _headers,
1798
+ _host_index,
1799
+ ) -> RequestSerialized:
1800
+
1801
+ _host = None
1802
+
1803
+ _collection_formats: Dict[str, str] = {
1804
+ }
1805
+
1806
+ _path_params: Dict[str, str] = {}
1807
+ _query_params: List[Tuple[str, str]] = []
1808
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1809
+ _form_params: List[Tuple[str, str]] = []
1810
+ _files: Dict[str, Union[str, bytes]] = {}
1811
+ _body_params: Optional[bytes] = None
1812
+
1813
+ # process the path parameters
1814
+ # process the query parameters
1815
+ # process the header parameters
1816
+ if x_marketplace is not None:
1817
+ _header_params['x-marketplace'] = x_marketplace
1818
+ # process the form parameters
1819
+ # process the body parameter
1820
+
1821
+
1822
+ # set the HTTP header `Accept`
1823
+ if 'Accept' not in _header_params:
1824
+ _header_params['Accept'] = self.api_client.select_header_accept(
1825
+ [
1826
+ 'application/json'
1827
+ ]
1828
+ )
1829
+
1830
+
1831
+ # authentication setting
1832
+ _auth_settings: List[str] = [
1833
+ ]
1834
+
1835
+ return self.api_client.param_serialize(
1836
+ method='POST',
1837
+ resource_path='/catalog/v1/listFeeds',
1838
+ path_params=_path_params,
1839
+ query_params=_query_params,
1840
+ header_params=_header_params,
1841
+ body=_body_params,
1842
+ post_params=_form_params,
1843
+ files=_files,
1844
+ auth_settings=_auth_settings,
1845
+ collection_formats=_collection_formats,
1846
+ _host=_host,
1847
+ _request_auth=_request_auth
1848
+ )
1849
+
1850
+
1851
+
1852
+
1853
+ @validate_call
1854
+ def list_reports(
1855
+ self,
1856
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1857
+ _request_timeout: Union[
1858
+ None,
1859
+ Annotated[StrictFloat, Field(gt=0)],
1860
+ Tuple[
1861
+ Annotated[StrictFloat, Field(gt=0)],
1862
+ Annotated[StrictFloat, Field(gt=0)]
1863
+ ]
1864
+ ] = None,
1865
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1866
+ _content_type: Optional[StrictStr] = None,
1867
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1868
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1869
+ ) -> ListReportsResponseContent:
1870
+ """list_reports
1871
+
1872
+ Lists all available reports.
1873
+
1874
+ :param x_marketplace: Target Amazon Locale. (required)
1875
+ :type x_marketplace: str
1876
+ :param _request_timeout: timeout setting for this request. If one
1877
+ number provided, it will be total request
1878
+ timeout. It can also be a pair (tuple) of
1879
+ (connection, read) timeouts.
1880
+ :type _request_timeout: int, tuple(int, int), optional
1881
+ :param _request_auth: set to override the auth_settings for an a single
1882
+ request; this effectively ignores the
1883
+ authentication in the spec for a single request.
1884
+ :type _request_auth: dict, optional
1885
+ :param _content_type: force content-type for the request.
1886
+ :type _content_type: str, Optional
1887
+ :param _headers: set to override the headers for a single
1888
+ request; this effectively ignores the headers
1889
+ in the spec for a single request.
1890
+ :type _headers: dict, optional
1891
+ :param _host_index: set to override the host_index for a single
1892
+ request; this effectively ignores the host_index
1893
+ in the spec for a single request.
1894
+ :type _host_index: int, optional
1895
+ :return: Returns the result object.
1896
+ """ # noqa: E501
1897
+
1898
+ _param = self._list_reports_serialize(
1899
+ x_marketplace=x_marketplace,
1900
+ _request_auth=_request_auth,
1901
+ _content_type=_content_type,
1902
+ _headers=_headers,
1903
+ _host_index=_host_index
1904
+ )
1905
+
1906
+ _response_types_map: Dict[str, Optional[str]] = {
1907
+ '200': "ListReportsResponseContent",
1908
+ '400': "ValidationExceptionResponseContent",
1909
+ '401': "UnauthorizedExceptionResponseContent",
1910
+ '403': "AccessDeniedExceptionResponseContent",
1911
+ '404': "ResourceNotFoundExceptionResponseContent",
1912
+ '429': "ThrottleExceptionResponseContent",
1913
+ '500': "InternalServerExceptionResponseContent",
1914
+ }
1915
+ response_data = self.api_client.call_api(
1916
+ *_param,
1917
+ _request_timeout=_request_timeout
1918
+ )
1919
+ response_data.read()
1920
+ return self.api_client.response_deserialize(
1921
+ response_data=response_data,
1922
+ response_types_map=_response_types_map,
1923
+ ).data
1924
+
1925
+
1926
+ @validate_call
1927
+ def list_reports_with_http_info(
1928
+ self,
1929
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
1930
+ _request_timeout: Union[
1931
+ None,
1932
+ Annotated[StrictFloat, Field(gt=0)],
1933
+ Tuple[
1934
+ Annotated[StrictFloat, Field(gt=0)],
1935
+ Annotated[StrictFloat, Field(gt=0)]
1936
+ ]
1937
+ ] = None,
1938
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1939
+ _content_type: Optional[StrictStr] = None,
1940
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1941
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1942
+ ) -> ApiResponse[ListReportsResponseContent]:
1943
+ """list_reports
1944
+
1945
+ Lists all available reports.
1946
+
1947
+ :param x_marketplace: Target Amazon Locale. (required)
1948
+ :type x_marketplace: str
1949
+ :param _request_timeout: timeout setting for this request. If one
1950
+ number provided, it will be total request
1951
+ timeout. It can also be a pair (tuple) of
1952
+ (connection, read) timeouts.
1953
+ :type _request_timeout: int, tuple(int, int), optional
1954
+ :param _request_auth: set to override the auth_settings for an a single
1955
+ request; this effectively ignores the
1956
+ authentication in the spec for a single request.
1957
+ :type _request_auth: dict, optional
1958
+ :param _content_type: force content-type for the request.
1959
+ :type _content_type: str, Optional
1960
+ :param _headers: set to override the headers for a single
1961
+ request; this effectively ignores the headers
1962
+ in the spec for a single request.
1963
+ :type _headers: dict, optional
1964
+ :param _host_index: set to override the host_index for a single
1965
+ request; this effectively ignores the host_index
1966
+ in the spec for a single request.
1967
+ :type _host_index: int, optional
1968
+ :return: Returns the result object.
1969
+ """ # noqa: E501
1970
+
1971
+ _param = self._list_reports_serialize(
1972
+ x_marketplace=x_marketplace,
1973
+ _request_auth=_request_auth,
1974
+ _content_type=_content_type,
1975
+ _headers=_headers,
1976
+ _host_index=_host_index
1977
+ )
1978
+
1979
+ _response_types_map: Dict[str, Optional[str]] = {
1980
+ '200': "ListReportsResponseContent",
1981
+ '400': "ValidationExceptionResponseContent",
1982
+ '401': "UnauthorizedExceptionResponseContent",
1983
+ '403': "AccessDeniedExceptionResponseContent",
1984
+ '404': "ResourceNotFoundExceptionResponseContent",
1985
+ '429': "ThrottleExceptionResponseContent",
1986
+ '500': "InternalServerExceptionResponseContent",
1987
+ }
1988
+ response_data = self.api_client.call_api(
1989
+ *_param,
1990
+ _request_timeout=_request_timeout
1991
+ )
1992
+ response_data.read()
1993
+ return self.api_client.response_deserialize(
1994
+ response_data=response_data,
1995
+ response_types_map=_response_types_map,
1996
+ )
1997
+
1998
+
1999
+ @validate_call
2000
+ def list_reports_without_preload_content(
2001
+ self,
2002
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2003
+ _request_timeout: Union[
2004
+ None,
2005
+ Annotated[StrictFloat, Field(gt=0)],
2006
+ Tuple[
2007
+ Annotated[StrictFloat, Field(gt=0)],
2008
+ Annotated[StrictFloat, Field(gt=0)]
2009
+ ]
2010
+ ] = None,
2011
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2012
+ _content_type: Optional[StrictStr] = None,
2013
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2014
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2015
+ ) -> RESTResponseType:
2016
+ """list_reports
2017
+
2018
+ Lists all available reports.
2019
+
2020
+ :param x_marketplace: Target Amazon Locale. (required)
2021
+ :type x_marketplace: str
2022
+ :param _request_timeout: timeout setting for this request. If one
2023
+ number provided, it will be total request
2024
+ timeout. It can also be a pair (tuple) of
2025
+ (connection, read) timeouts.
2026
+ :type _request_timeout: int, tuple(int, int), optional
2027
+ :param _request_auth: set to override the auth_settings for an a single
2028
+ request; this effectively ignores the
2029
+ authentication in the spec for a single request.
2030
+ :type _request_auth: dict, optional
2031
+ :param _content_type: force content-type for the request.
2032
+ :type _content_type: str, Optional
2033
+ :param _headers: set to override the headers for a single
2034
+ request; this effectively ignores the headers
2035
+ in the spec for a single request.
2036
+ :type _headers: dict, optional
2037
+ :param _host_index: set to override the host_index for a single
2038
+ request; this effectively ignores the host_index
2039
+ in the spec for a single request.
2040
+ :type _host_index: int, optional
2041
+ :return: Returns the result object.
2042
+ """ # noqa: E501
2043
+
2044
+ _param = self._list_reports_serialize(
2045
+ x_marketplace=x_marketplace,
2046
+ _request_auth=_request_auth,
2047
+ _content_type=_content_type,
2048
+ _headers=_headers,
2049
+ _host_index=_host_index
2050
+ )
2051
+
2052
+ _response_types_map: Dict[str, Optional[str]] = {
2053
+ '200': "ListReportsResponseContent",
2054
+ '400': "ValidationExceptionResponseContent",
2055
+ '401': "UnauthorizedExceptionResponseContent",
2056
+ '403': "AccessDeniedExceptionResponseContent",
2057
+ '404': "ResourceNotFoundExceptionResponseContent",
2058
+ '429': "ThrottleExceptionResponseContent",
2059
+ '500': "InternalServerExceptionResponseContent",
2060
+ }
2061
+ response_data = self.api_client.call_api(
2062
+ *_param,
2063
+ _request_timeout=_request_timeout
2064
+ )
2065
+ return response_data.response
2066
+
2067
+
2068
+ def _list_reports_serialize(
2069
+ self,
2070
+ x_marketplace,
2071
+ _request_auth,
2072
+ _content_type,
2073
+ _headers,
2074
+ _host_index,
2075
+ ) -> RequestSerialized:
2076
+
2077
+ _host = None
2078
+
2079
+ _collection_formats: Dict[str, str] = {
2080
+ }
2081
+
2082
+ _path_params: Dict[str, str] = {}
2083
+ _query_params: List[Tuple[str, str]] = []
2084
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2085
+ _form_params: List[Tuple[str, str]] = []
2086
+ _files: Dict[str, Union[str, bytes]] = {}
2087
+ _body_params: Optional[bytes] = None
2088
+
2089
+ # process the path parameters
2090
+ # process the query parameters
2091
+ # process the header parameters
2092
+ if x_marketplace is not None:
2093
+ _header_params['x-marketplace'] = x_marketplace
2094
+ # process the form parameters
2095
+ # process the body parameter
2096
+
2097
+
2098
+ # set the HTTP header `Accept`
2099
+ if 'Accept' not in _header_params:
2100
+ _header_params['Accept'] = self.api_client.select_header_accept(
2101
+ [
2102
+ 'application/json'
2103
+ ]
2104
+ )
2105
+
2106
+
2107
+ # authentication setting
2108
+ _auth_settings: List[str] = [
2109
+ ]
2110
+
2111
+ return self.api_client.param_serialize(
2112
+ method='POST',
2113
+ resource_path='/reports/v1/listReports',
2114
+ path_params=_path_params,
2115
+ query_params=_query_params,
2116
+ header_params=_header_params,
2117
+ body=_body_params,
2118
+ post_params=_form_params,
2119
+ files=_files,
2120
+ auth_settings=_auth_settings,
2121
+ collection_formats=_collection_formats,
2122
+ _host=_host,
2123
+ _request_auth=_request_auth
2124
+ )
2125
+
2126
+
2127
+
2128
+
2129
+ @validate_call
2130
+ def search_items(
2131
+ self,
2132
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2133
+ search_items_request_content: Optional[SearchItemsRequestContent] = None,
2134
+ _request_timeout: Union[
2135
+ None,
2136
+ Annotated[StrictFloat, Field(gt=0)],
2137
+ Tuple[
2138
+ Annotated[StrictFloat, Field(gt=0)],
2139
+ Annotated[StrictFloat, Field(gt=0)]
2140
+ ]
2141
+ ] = None,
2142
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2143
+ _content_type: Optional[StrictStr] = None,
2144
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2145
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2146
+ ) -> SearchItemsResponseContent:
2147
+ """search_items
2148
+
2149
+
2150
+ :param x_marketplace: Target Amazon Locale. (required)
2151
+ :type x_marketplace: str
2152
+ :param search_items_request_content:
2153
+ :type search_items_request_content: SearchItemsRequestContent
2154
+ :param _request_timeout: timeout setting for this request. If one
2155
+ number provided, it will be total request
2156
+ timeout. It can also be a pair (tuple) of
2157
+ (connection, read) timeouts.
2158
+ :type _request_timeout: int, tuple(int, int), optional
2159
+ :param _request_auth: set to override the auth_settings for an a single
2160
+ request; this effectively ignores the
2161
+ authentication in the spec for a single request.
2162
+ :type _request_auth: dict, optional
2163
+ :param _content_type: force content-type for the request.
2164
+ :type _content_type: str, Optional
2165
+ :param _headers: set to override the headers for a single
2166
+ request; this effectively ignores the headers
2167
+ in the spec for a single request.
2168
+ :type _headers: dict, optional
2169
+ :param _host_index: set to override the host_index for a single
2170
+ request; this effectively ignores the host_index
2171
+ in the spec for a single request.
2172
+ :type _host_index: int, optional
2173
+ :return: Returns the result object.
2174
+ """ # noqa: E501
2175
+
2176
+ _param = self._search_items_serialize(
2177
+ x_marketplace=x_marketplace,
2178
+ search_items_request_content=search_items_request_content,
2179
+ _request_auth=_request_auth,
2180
+ _content_type=_content_type,
2181
+ _headers=_headers,
2182
+ _host_index=_host_index
2183
+ )
2184
+
2185
+ _response_types_map: Dict[str, Optional[str]] = {
2186
+ '200': "SearchItemsResponseContent",
2187
+ '400': "ValidationExceptionResponseContent",
2188
+ '401': "UnauthorizedExceptionResponseContent",
2189
+ '403': "AccessDeniedExceptionResponseContent",
2190
+ '404': "ResourceNotFoundExceptionResponseContent",
2191
+ '429': "ThrottleExceptionResponseContent",
2192
+ '500': "InternalServerExceptionResponseContent",
2193
+ }
2194
+ response_data = self.api_client.call_api(
2195
+ *_param,
2196
+ _request_timeout=_request_timeout
2197
+ )
2198
+ response_data.read()
2199
+ return self.api_client.response_deserialize(
2200
+ response_data=response_data,
2201
+ response_types_map=_response_types_map,
2202
+ ).data
2203
+
2204
+
2205
+ @validate_call
2206
+ def search_items_with_http_info(
2207
+ self,
2208
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2209
+ search_items_request_content: Optional[SearchItemsRequestContent] = None,
2210
+ _request_timeout: Union[
2211
+ None,
2212
+ Annotated[StrictFloat, Field(gt=0)],
2213
+ Tuple[
2214
+ Annotated[StrictFloat, Field(gt=0)],
2215
+ Annotated[StrictFloat, Field(gt=0)]
2216
+ ]
2217
+ ] = None,
2218
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2219
+ _content_type: Optional[StrictStr] = None,
2220
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2221
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2222
+ ) -> ApiResponse[SearchItemsResponseContent]:
2223
+ """search_items
2224
+
2225
+
2226
+ :param x_marketplace: Target Amazon Locale. (required)
2227
+ :type x_marketplace: str
2228
+ :param search_items_request_content:
2229
+ :type search_items_request_content: SearchItemsRequestContent
2230
+ :param _request_timeout: timeout setting for this request. If one
2231
+ number provided, it will be total request
2232
+ timeout. It can also be a pair (tuple) of
2233
+ (connection, read) timeouts.
2234
+ :type _request_timeout: int, tuple(int, int), optional
2235
+ :param _request_auth: set to override the auth_settings for an a single
2236
+ request; this effectively ignores the
2237
+ authentication in the spec for a single request.
2238
+ :type _request_auth: dict, optional
2239
+ :param _content_type: force content-type for the request.
2240
+ :type _content_type: str, Optional
2241
+ :param _headers: set to override the headers for a single
2242
+ request; this effectively ignores the headers
2243
+ in the spec for a single request.
2244
+ :type _headers: dict, optional
2245
+ :param _host_index: set to override the host_index for a single
2246
+ request; this effectively ignores the host_index
2247
+ in the spec for a single request.
2248
+ :type _host_index: int, optional
2249
+ :return: Returns the result object.
2250
+ """ # noqa: E501
2251
+
2252
+ _param = self._search_items_serialize(
2253
+ x_marketplace=x_marketplace,
2254
+ search_items_request_content=search_items_request_content,
2255
+ _request_auth=_request_auth,
2256
+ _content_type=_content_type,
2257
+ _headers=_headers,
2258
+ _host_index=_host_index
2259
+ )
2260
+
2261
+ _response_types_map: Dict[str, Optional[str]] = {
2262
+ '200': "SearchItemsResponseContent",
2263
+ '400': "ValidationExceptionResponseContent",
2264
+ '401': "UnauthorizedExceptionResponseContent",
2265
+ '403': "AccessDeniedExceptionResponseContent",
2266
+ '404': "ResourceNotFoundExceptionResponseContent",
2267
+ '429': "ThrottleExceptionResponseContent",
2268
+ '500': "InternalServerExceptionResponseContent",
2269
+ }
2270
+ response_data = self.api_client.call_api(
2271
+ *_param,
2272
+ _request_timeout=_request_timeout
2273
+ )
2274
+ response_data.read()
2275
+ return self.api_client.response_deserialize(
2276
+ response_data=response_data,
2277
+ response_types_map=_response_types_map,
2278
+ )
2279
+
2280
+
2281
+ @validate_call
2282
+ def search_items_without_preload_content(
2283
+ self,
2284
+ x_marketplace: Annotated[str, Field(strict=True, max_length=1000, description="Target Amazon Locale.")],
2285
+ search_items_request_content: Optional[SearchItemsRequestContent] = None,
2286
+ _request_timeout: Union[
2287
+ None,
2288
+ Annotated[StrictFloat, Field(gt=0)],
2289
+ Tuple[
2290
+ Annotated[StrictFloat, Field(gt=0)],
2291
+ Annotated[StrictFloat, Field(gt=0)]
2292
+ ]
2293
+ ] = None,
2294
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
2295
+ _content_type: Optional[StrictStr] = None,
2296
+ _headers: Optional[Dict[StrictStr, Any]] = None,
2297
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
2298
+ ) -> RESTResponseType:
2299
+ """search_items
2300
+
2301
+
2302
+ :param x_marketplace: Target Amazon Locale. (required)
2303
+ :type x_marketplace: str
2304
+ :param search_items_request_content:
2305
+ :type search_items_request_content: SearchItemsRequestContent
2306
+ :param _request_timeout: timeout setting for this request. If one
2307
+ number provided, it will be total request
2308
+ timeout. It can also be a pair (tuple) of
2309
+ (connection, read) timeouts.
2310
+ :type _request_timeout: int, tuple(int, int), optional
2311
+ :param _request_auth: set to override the auth_settings for an a single
2312
+ request; this effectively ignores the
2313
+ authentication in the spec for a single request.
2314
+ :type _request_auth: dict, optional
2315
+ :param _content_type: force content-type for the request.
2316
+ :type _content_type: str, Optional
2317
+ :param _headers: set to override the headers for a single
2318
+ request; this effectively ignores the headers
2319
+ in the spec for a single request.
2320
+ :type _headers: dict, optional
2321
+ :param _host_index: set to override the host_index for a single
2322
+ request; this effectively ignores the host_index
2323
+ in the spec for a single request.
2324
+ :type _host_index: int, optional
2325
+ :return: Returns the result object.
2326
+ """ # noqa: E501
2327
+
2328
+ _param = self._search_items_serialize(
2329
+ x_marketplace=x_marketplace,
2330
+ search_items_request_content=search_items_request_content,
2331
+ _request_auth=_request_auth,
2332
+ _content_type=_content_type,
2333
+ _headers=_headers,
2334
+ _host_index=_host_index
2335
+ )
2336
+
2337
+ _response_types_map: Dict[str, Optional[str]] = {
2338
+ '200': "SearchItemsResponseContent",
2339
+ '400': "ValidationExceptionResponseContent",
2340
+ '401': "UnauthorizedExceptionResponseContent",
2341
+ '403': "AccessDeniedExceptionResponseContent",
2342
+ '404': "ResourceNotFoundExceptionResponseContent",
2343
+ '429': "ThrottleExceptionResponseContent",
2344
+ '500': "InternalServerExceptionResponseContent",
2345
+ }
2346
+ response_data = self.api_client.call_api(
2347
+ *_param,
2348
+ _request_timeout=_request_timeout
2349
+ )
2350
+ return response_data.response
2351
+
2352
+
2353
+ def _search_items_serialize(
2354
+ self,
2355
+ x_marketplace,
2356
+ search_items_request_content,
2357
+ _request_auth,
2358
+ _content_type,
2359
+ _headers,
2360
+ _host_index,
2361
+ ) -> RequestSerialized:
2362
+
2363
+ _host = None
2364
+
2365
+ _collection_formats: Dict[str, str] = {
2366
+ }
2367
+
2368
+ _path_params: Dict[str, str] = {}
2369
+ _query_params: List[Tuple[str, str]] = []
2370
+ _header_params: Dict[str, Optional[str]] = _headers or {}
2371
+ _form_params: List[Tuple[str, str]] = []
2372
+ _files: Dict[str, Union[str, bytes]] = {}
2373
+ _body_params: Optional[bytes] = None
2374
+
2375
+ # process the path parameters
2376
+ # process the query parameters
2377
+ # process the header parameters
2378
+ if x_marketplace is not None:
2379
+ _header_params['x-marketplace'] = x_marketplace
2380
+ # process the form parameters
2381
+ # process the body parameter
2382
+ if search_items_request_content is not None:
2383
+ _body_params = search_items_request_content
2384
+
2385
+
2386
+ # set the HTTP header `Accept`
2387
+ if 'Accept' not in _header_params:
2388
+ _header_params['Accept'] = self.api_client.select_header_accept(
2389
+ [
2390
+ 'application/json'
2391
+ ]
2392
+ )
2393
+
2394
+ # set the HTTP header `Content-Type`
2395
+ if _content_type:
2396
+ _header_params['Content-Type'] = _content_type
2397
+ else:
2398
+ _default_content_type = (
2399
+ self.api_client.select_header_content_type(
2400
+ [
2401
+ 'application/json'
2402
+ ]
2403
+ )
2404
+ )
2405
+ if _default_content_type is not None:
2406
+ _header_params['Content-Type'] = _default_content_type
2407
+
2408
+ # authentication setting
2409
+ _auth_settings: List[str] = [
2410
+ ]
2411
+
2412
+ return self.api_client.param_serialize(
2413
+ method='POST',
2414
+ resource_path='/catalog/v1/searchItems',
2415
+ path_params=_path_params,
2416
+ query_params=_query_params,
2417
+ header_params=_header_params,
2418
+ body=_body_params,
2419
+ post_params=_form_params,
2420
+ files=_files,
2421
+ auth_settings=_auth_settings,
2422
+ collection_formats=_collection_formats,
2423
+ _host=_host,
2424
+ _request_auth=_request_auth
2425
+ )
2426
+
2427
+