amazon-creatorsapi-python-sdk 1.0.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.
- amazon_creatorsapi_python_sdk-1.0.0.dist-info/METADATA +99 -0
- amazon_creatorsapi_python_sdk-1.0.0.dist-info/RECORD +108 -0
- amazon_creatorsapi_python_sdk-1.0.0.dist-info/WHEEL +5 -0
- amazon_creatorsapi_python_sdk-1.0.0.dist-info/licenses/LICENSE.txt +202 -0
- amazon_creatorsapi_python_sdk-1.0.0.dist-info/licenses/NOTICE.txt +2 -0
- amazon_creatorsapi_python_sdk-1.0.0.dist-info/top_level.txt +1 -0
- creatorsapi_python_sdk/__init__.py +127 -0
- creatorsapi_python_sdk/api/__init__.py +5 -0
- creatorsapi_python_sdk/api/default_api.py +2412 -0
- creatorsapi_python_sdk/api_client.py +912 -0
- creatorsapi_python_sdk/api_response.py +21 -0
- creatorsapi_python_sdk/auth/__init__.py +21 -0
- creatorsapi_python_sdk/auth/oauth2_config.py +123 -0
- creatorsapi_python_sdk/auth/oauth2_token_manager.py +120 -0
- creatorsapi_python_sdk/configuration.py +455 -0
- creatorsapi_python_sdk/exceptions.py +204 -0
- creatorsapi_python_sdk/models/__init__.py +110 -0
- creatorsapi_python_sdk/models/access_denied_exception_response_content.py +97 -0
- creatorsapi_python_sdk/models/access_denied_reason.py +45 -0
- creatorsapi_python_sdk/models/availability.py +44 -0
- creatorsapi_python_sdk/models/browse_node.py +116 -0
- creatorsapi_python_sdk/models/browse_node_ancestor.py +103 -0
- creatorsapi_python_sdk/models/browse_node_child.py +96 -0
- creatorsapi_python_sdk/models/browse_node_info.py +106 -0
- creatorsapi_python_sdk/models/browse_nodes_result.py +100 -0
- creatorsapi_python_sdk/models/by_line_info.py +111 -0
- creatorsapi_python_sdk/models/classifications.py +101 -0
- creatorsapi_python_sdk/models/condition.py +44 -0
- creatorsapi_python_sdk/models/content_info.py +113 -0
- creatorsapi_python_sdk/models/content_rating.py +96 -0
- creatorsapi_python_sdk/models/contributor.py +98 -0
- creatorsapi_python_sdk/models/customer_reviews.py +98 -0
- creatorsapi_python_sdk/models/deal_details.py +102 -0
- creatorsapi_python_sdk/models/delivery_flag.py +46 -0
- creatorsapi_python_sdk/models/dimension_based_attribute.py +111 -0
- creatorsapi_python_sdk/models/error_data.py +94 -0
- creatorsapi_python_sdk/models/external_ids.py +106 -0
- creatorsapi_python_sdk/models/feed.py +98 -0
- creatorsapi_python_sdk/models/get_browse_nodes_request_content.py +107 -0
- creatorsapi_python_sdk/models/get_browse_nodes_resource.py +44 -0
- creatorsapi_python_sdk/models/get_browse_nodes_response_content.py +106 -0
- creatorsapi_python_sdk/models/get_feed_request_content.py +93 -0
- creatorsapi_python_sdk/models/get_feed_response_content.py +92 -0
- creatorsapi_python_sdk/models/get_items_request_content.py +124 -0
- creatorsapi_python_sdk/models/get_items_resource.py +76 -0
- creatorsapi_python_sdk/models/get_items_response_content.py +106 -0
- creatorsapi_python_sdk/models/get_report_request_content.py +93 -0
- creatorsapi_python_sdk/models/get_report_response_content.py +92 -0
- creatorsapi_python_sdk/models/get_variations_request_content.py +135 -0
- creatorsapi_python_sdk/models/get_variations_resource.py +79 -0
- creatorsapi_python_sdk/models/get_variations_response_content.py +106 -0
- creatorsapi_python_sdk/models/image_size.py +96 -0
- creatorsapi_python_sdk/models/image_type.py +111 -0
- creatorsapi_python_sdk/models/images.py +105 -0
- creatorsapi_python_sdk/models/internal_server_exception_response_content.py +94 -0
- creatorsapi_python_sdk/models/item.py +138 -0
- creatorsapi_python_sdk/models/item_info.py +156 -0
- creatorsapi_python_sdk/models/items_result.py +100 -0
- creatorsapi_python_sdk/models/language_type.py +94 -0
- creatorsapi_python_sdk/models/languages.py +104 -0
- creatorsapi_python_sdk/models/list_feeds_response_content.py +100 -0
- creatorsapi_python_sdk/models/list_reports_response_content.py +100 -0
- creatorsapi_python_sdk/models/manufacture_info.py +106 -0
- creatorsapi_python_sdk/models/money.py +96 -0
- creatorsapi_python_sdk/models/multi_valued_attribute.py +96 -0
- creatorsapi_python_sdk/models/offer_availability_v2.py +98 -0
- creatorsapi_python_sdk/models/offer_condition_v2.py +96 -0
- creatorsapi_python_sdk/models/offer_listing_v2.py +133 -0
- creatorsapi_python_sdk/models/offer_loyalty_points_v2.py +92 -0
- creatorsapi_python_sdk/models/offer_merchant_info_v2.py +94 -0
- creatorsapi_python_sdk/models/offer_price_v2.py +113 -0
- creatorsapi_python_sdk/models/offer_saving_basis.py +101 -0
- creatorsapi_python_sdk/models/offer_savings.py +98 -0
- creatorsapi_python_sdk/models/offer_type.py +45 -0
- creatorsapi_python_sdk/models/offers_v2.py +100 -0
- creatorsapi_python_sdk/models/product_info.py +124 -0
- creatorsapi_python_sdk/models/rating.py +92 -0
- creatorsapi_python_sdk/models/refinement.py +104 -0
- creatorsapi_python_sdk/models/refinement_bin.py +94 -0
- creatorsapi_python_sdk/models/report_metadata.py +98 -0
- creatorsapi_python_sdk/models/resource_not_found_exception_response_content.py +98 -0
- creatorsapi_python_sdk/models/saving_basis_type.py +46 -0
- creatorsapi_python_sdk/models/search_items_request_content.py +242 -0
- creatorsapi_python_sdk/models/search_items_resource.py +77 -0
- creatorsapi_python_sdk/models/search_items_response_content.py +106 -0
- creatorsapi_python_sdk/models/search_refinements.py +110 -0
- creatorsapi_python_sdk/models/search_result.py +110 -0
- creatorsapi_python_sdk/models/single_boolean_valued_attribute.py +96 -0
- creatorsapi_python_sdk/models/single_integer_valued_attribute.py +96 -0
- creatorsapi_python_sdk/models/single_string_valued_attribute.py +96 -0
- creatorsapi_python_sdk/models/sort_by.py +48 -0
- creatorsapi_python_sdk/models/technical_info.py +102 -0
- creatorsapi_python_sdk/models/throttle_exception_response_content.py +98 -0
- creatorsapi_python_sdk/models/trade_in_info.py +98 -0
- creatorsapi_python_sdk/models/trade_in_price.py +96 -0
- creatorsapi_python_sdk/models/unauthorized_exception_reason.py +51 -0
- creatorsapi_python_sdk/models/unauthorized_exception_response_content.py +97 -0
- creatorsapi_python_sdk/models/unit_based_attribute.py +98 -0
- creatorsapi_python_sdk/models/validation_exception_field.py +94 -0
- creatorsapi_python_sdk/models/validation_exception_reason.py +48 -0
- creatorsapi_python_sdk/models/validation_exception_response_content.py +107 -0
- creatorsapi_python_sdk/models/variation_attribute.py +94 -0
- creatorsapi_python_sdk/models/variation_dimension.py +98 -0
- creatorsapi_python_sdk/models/variation_summary.py +104 -0
- creatorsapi_python_sdk/models/variations_result.py +106 -0
- creatorsapi_python_sdk/models/website_sales_rank.py +98 -0
- creatorsapi_python_sdk/py.typed +0 -0
- creatorsapi_python_sdk/rest.py +262 -0
|
@@ -0,0 +1,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
|
+
'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
|
+
|