Skip to content

Commit d242ade

Browse files
mafgegithub-actions[bot]
authored andcommitted
Update Python SDK
1 parent 4cec633 commit d242ade

25 files changed

+1523
-49
lines changed

python/sdk/spapi/api/feeds_v2021_06_30/feeds_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -434,6 +434,7 @@ def get_feed_document(self, feed_document_id, **kwargs): # noqa: E501
434434
435435
:param async_req bool
436436
:param str feed_document_id: The identifier of the feed document. (required)
437+
:param bool enable_content_encoding_url_header: When `true`, the Content-Encoding header on the returned URL is set to `gzip` instead of the default `identity` when `compressionAlgorithm` is `GZIP`. This allows automatic decompression by HTTP clients.
437438
:return: FeedDocument
438439
If the method is called asynchronously,
439440
returns the request thread.
@@ -456,12 +457,13 @@ def get_feed_document_with_http_info(self, feed_document_id, **kwargs): # noqa:
456457
457458
:param async_req bool
458459
:param str feed_document_id: The identifier of the feed document. (required)
460+
:param bool enable_content_encoding_url_header: When `true`, the Content-Encoding header on the returned URL is set to `gzip` instead of the default `identity` when `compressionAlgorithm` is `GZIP`. This allows automatic decompression by HTTP clients.
459461
:return: FeedDocument
460462
If the method is called asynchronously,
461463
returns the request thread.
462464
"""
463465

464-
all_params = ['feed_document_id'] # noqa: E501
466+
all_params = ['feed_document_id', 'enable_content_encoding_url_header'] # noqa: E501
465467
all_params.append('async_req')
466468
all_params.append('_return_http_data_only')
467469
all_params.append('_preload_content')
@@ -488,6 +490,8 @@ def get_feed_document_with_http_info(self, feed_document_id, **kwargs): # noqa:
488490
path_params['feedDocumentId'] = params['feed_document_id'] # noqa: E501
489491

490492
query_params = []
493+
if 'enable_content_encoding_url_header' in params:
494+
query_params.append(('enableContentEncodingUrlHeader', params['enable_content_encoding_url_header'])) # noqa: E501
491495

492496
header_params = {}
493497

python/sdk/spapi/api/reports_v2021_06_30/reports_api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,7 @@ def get_report_document(self, report_document_id, **kwargs): # noqa: E501
529529
530530
:param async_req bool
531531
:param str report_document_id: The identifier for the report document. (required)
532+
:param bool enable_content_encoding_url_header: When `true`, the Content-Encoding header on the returned URL is set to `gzip` instead of the default `identity` when `compressionAlgorithm` is `GZIP`. This allows automatic decompression by HTTP clients.
532533
:return: ReportDocument
533534
If the method is called asynchronously,
534535
returns the request thread.
@@ -551,12 +552,13 @@ def get_report_document_with_http_info(self, report_document_id, **kwargs): # n
551552
552553
:param async_req bool
553554
:param str report_document_id: The identifier for the report document. (required)
555+
:param bool enable_content_encoding_url_header: When `true`, the Content-Encoding header on the returned URL is set to `gzip` instead of the default `identity` when `compressionAlgorithm` is `GZIP`. This allows automatic decompression by HTTP clients.
554556
:return: ReportDocument
555557
If the method is called asynchronously,
556558
returns the request thread.
557559
"""
558560

559-
all_params = ['report_document_id'] # noqa: E501
561+
all_params = ['report_document_id', 'enable_content_encoding_url_header'] # noqa: E501
560562
all_params.append('async_req')
561563
all_params.append('_return_http_data_only')
562564
all_params.append('_preload_content')
@@ -583,6 +585,8 @@ def get_report_document_with_http_info(self, report_document_id, **kwargs): # n
583585
path_params['reportDocumentId'] = params['report_document_id'] # noqa: E501
584586

585587
query_params = []
588+
if 'enable_content_encoding_url_header' in params:
589+
query_params.append(('enableContentEncodingUrlHeader', params['enable_content_encoding_url_header'])) # noqa: E501
586590

587591
header_params = {}
588592

python/sdk/spapi/api/services_v1/service_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def assign_appointment_resources(self, service_job_id, appointment_id, body, **k
160160
:param async_req bool
161161
:param str service_job_id: An Amazon-defined service job identifier. Get this value by calling the `getServiceJobs` operation of the Services API. (required)
162162
:param str appointment_id: An Amazon-defined identifier of active service job appointment. (required)
163-
:param AssignAppointmentResourcesRequest body: (required)
163+
:param AssignAppointmentResourcesRequest body: Input containing the resource details to be assigned to the appointment. (required)
164164
:return: AssignAppointmentResourcesResponse
165165
If the method is called asynchronously,
166166
returns the request thread.
@@ -184,7 +184,7 @@ def assign_appointment_resources_with_http_info(self, service_job_id, appointmen
184184
:param async_req bool
185185
:param str service_job_id: An Amazon-defined service job identifier. Get this value by calling the `getServiceJobs` operation of the Services API. (required)
186186
:param str appointment_id: An Amazon-defined identifier of active service job appointment. (required)
187-
:param AssignAppointmentResourcesRequest body: (required)
187+
:param AssignAppointmentResourcesRequest body: Input containing the resource details to be assigned to the appointment. (required)
188188
:return: AssignAppointmentResourcesResponse
189189
If the method is called asynchronously,
190190
returns the request thread.

python/sdk/spapi/models/fba_eligibility_v1/item_eligibility_preview.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def ineligibility_reason_list(self, ineligibility_reason_list):
194194
:param ineligibility_reason_list: The ineligibility_reason_list of this ItemEligibilityPreview. # noqa: E501
195195
:type: List[str]
196196
"""
197-
allowed_values = ["FBA_INB_0004", "FBA_INB_0006", "FBA_INB_0007", "FBA_INB_0008", "FBA_INB_0009", "FBA_INB_0010", "FBA_INB_0011", "FBA_INB_0012", "FBA_INB_0013", "FBA_INB_0014", "FBA_INB_0015", "FBA_INB_0016", "FBA_INB_0017", "FBA_INB_0018", "FBA_INB_0019", "FBA_INB_0034", "FBA_INB_0035", "FBA_INB_0036", "FBA_INB_0037", "FBA_INB_0038", "FBA_INB_0050", "FBA_INB_0051", "FBA_INB_0053", "FBA_INB_0055", "FBA_INB_0056", "FBA_INB_0059", "FBA_INB_0065", "FBA_INB_0066", "FBA_INB_0067", "FBA_INB_0068", "FBA_INB_0095", "FBA_INB_0097", "FBA_INB_0098", "FBA_INB_0099", "FBA_INB_0100", "FBA_INB_0103", "FBA_INB_0104", "FBA_INB_0197", "FBA_INB_0342", "UNKNOWN_INB_ERROR_CODE"] # noqa: E501
197+
allowed_values = ["FBA_INB_0004", "FBA_INB_0006", "FBA_INB_0007", "FBA_INB_0008", "FBA_INB_0009", "FBA_INB_0010", "FBA_INB_0011", "FBA_INB_0012", "FBA_INB_0013", "FBA_INB_0014", "FBA_INB_0015", "FBA_INB_0016", "FBA_INB_0017", "FBA_INB_0018", "FBA_INB_0019", "FBA_INB_0034", "FBA_INB_0035", "FBA_INB_0036", "FBA_INB_0037", "FBA_INB_0038", "FBA_INB_0050", "FBA_INB_0051", "FBA_INB_0053", "FBA_INB_0055", "FBA_INB_0056", "FBA_INB_0059", "FBA_INB_0065", "FBA_INB_0066", "FBA_INB_0067", "FBA_INB_0068", "FBA_INB_0095", "FBA_INB_0097", "FBA_INB_0098", "FBA_INB_0099", "FBA_INB_0100", "FBA_INB_0103", "FBA_INB_0104", "FBA_INB_0197", "FBA_INB_0342", "FBA_INB_0465", "UNKNOWN_INB_ERROR_CODE"] # noqa: E501
198198
if (self._configuration.client_side_validation and
199199
not set(ineligibility_reason_list).issubset(set(allowed_values))): # noqa: E501
200200
raise ValueError(

python/sdk/spapi/models/product_pricing_v2022_05_01/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
from spapi.models.product_pricing_v2022_05_01.get_featured_offer_expected_price_batch_response import GetFeaturedOfferExpectedPriceBatchResponse
3939
from spapi.models.product_pricing_v2022_05_01.http_method import HttpMethod
4040
from spapi.models.product_pricing_v2022_05_01.http_status_line import HttpStatusLine
41+
from spapi.models.product_pricing_v2022_05_01.item import Item
4142
from spapi.models.product_pricing_v2022_05_01.lowest_priced_offer import LowestPricedOffer
4243
from spapi.models.product_pricing_v2022_05_01.lowest_priced_offers_input import LowestPricedOffersInput
4344
from spapi.models.product_pricing_v2022_05_01.money_type import MoneyType
@@ -53,3 +54,4 @@
5354
from spapi.models.product_pricing_v2022_05_01.segment_details import SegmentDetails
5455
from spapi.models.product_pricing_v2022_05_01.segmented_featured_offer import SegmentedFeaturedOffer
5556
from spapi.models.product_pricing_v2022_05_01.shipping_option import ShippingOption
57+
from spapi.models.product_pricing_v2022_05_01.similar_items import SimilarItems

python/sdk/spapi/models/product_pricing_v2022_05_01/competitive_summary_included_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ class CompetitiveSummaryIncludedData(object):
3131
FEATUREDBUYINGOPTIONS = 'featuredBuyingOptions'
3232
REFERENCEPRICES = 'referencePrices'
3333
LOWESTPRICEDOFFERS = 'lowestPricedOffers'
34+
SIMILARITEMS = 'similarItems'
3435

3536
"""
3637
Attributes:

python/sdk/spapi/models/product_pricing_v2022_05_01/competitive_summary_response_body.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class CompetitiveSummaryResponseBody(object):
3838
'featured_buying_options': 'List[FeaturedBuyingOption]',
3939
'lowest_priced_offers': 'List[LowestPricedOffer]',
4040
'reference_prices': 'List[ReferencePrice]',
41+
'similar_items': 'List[SimilarItems]',
4142
'errors': 'List[Error]',
4243
}
4344

@@ -47,10 +48,11 @@ class CompetitiveSummaryResponseBody(object):
4748
'featured_buying_options': 'featuredBuyingOptions',
4849
'lowest_priced_offers': 'lowestPricedOffers',
4950
'reference_prices': 'referencePrices',
51+
'similar_items': 'similarItems',
5052
'errors': 'errors',
5153
}
5254

53-
def __init__(self, asin=None, marketplace_id=None, featured_buying_options=None, lowest_priced_offers=None, reference_prices=None, errors=None, _configuration=None): # noqa: E501
55+
def __init__(self, asin=None, marketplace_id=None, featured_buying_options=None, lowest_priced_offers=None, reference_prices=None, similar_items=None, errors=None, _configuration=None): # noqa: E501
5456
"""CompetitiveSummaryResponseBody - a model defined in Swagger""" # noqa: E501
5557
if _configuration is None:
5658
_configuration = Configuration()
@@ -61,6 +63,7 @@ def __init__(self, asin=None, marketplace_id=None, featured_buying_options=None,
6163
self._featured_buying_options = None
6264
self._lowest_priced_offers = None
6365
self._reference_prices = None
66+
self._similar_items = None
6467
self._errors = None
6568
self.discriminator = None
6669

@@ -72,6 +75,8 @@ def __init__(self, asin=None, marketplace_id=None, featured_buying_options=None,
7275
self.lowest_priced_offers = lowest_priced_offers
7376
if reference_prices is not None:
7477
self.reference_prices = reference_prices
78+
if similar_items is not None:
79+
self.similar_items = similar_items
7580
if errors is not None:
7681
self.errors = errors
7782

@@ -194,6 +199,29 @@ def reference_prices(self, reference_prices):
194199

195200
self._reference_prices = reference_prices
196201

202+
@property
203+
def similar_items(self):
204+
"""Gets the similar_items of this CompetitiveSummaryResponseBody. # noqa: E501
205+
206+
A list of similar items for the specified ASIN `marketplaceId` combination. # noqa: E501
207+
208+
:return: The similar_items of this CompetitiveSummaryResponseBody. # noqa: E501
209+
:rtype: List[SimilarItems]
210+
"""
211+
return self._similar_items
212+
213+
@similar_items.setter
214+
def similar_items(self, similar_items):
215+
"""Sets the similar_items of this CompetitiveSummaryResponseBody.
216+
217+
A list of similar items for the specified ASIN `marketplaceId` combination. # noqa: E501
218+
219+
:param similar_items: The similar_items of this CompetitiveSummaryResponseBody. # noqa: E501
220+
:type: List[SimilarItems]
221+
"""
222+
223+
self._similar_items = similar_items
224+
197225
@property
198226
def errors(self):
199227
"""Gets the errors of this CompetitiveSummaryResponseBody. # noqa: E501
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
# coding: utf-8
2+
3+
"""
4+
Selling Partner API for Pricing
5+
6+
The Selling Partner API for Pricing helps you programmatically retrieve product pricing and offer pricing information for Amazon Marketplace products. For more information, refer to the [Product Pricing v2022-05-01 Use Case Guide](https://developer-docs.amazon.com/sp-api/docs/product-pricing-api-v2022-05-01-use-case-guide).
7+
8+
The version of the OpenAPI document: 2022-05-01
9+
Generated by OpenAPI Generator (https://openapi-generator.tech)
10+
11+
Do not edit the class manually.
12+
""" # noqa: E501
13+
14+
import pprint
15+
import re # noqa: F401
16+
17+
import six
18+
19+
from spapi.configuration import Configuration
20+
21+
22+
class Item(object):
23+
"""NOTE: This class is auto generated by the swagger code generator program.
24+
25+
Do not edit the class manually.
26+
"""
27+
28+
"""
29+
Attributes:
30+
swagger_types (dict): The key is attribute name
31+
and the value is attribute type.
32+
attribute_map (dict): The key is attribute name
33+
and the value is json key in definition.
34+
"""
35+
swagger_types = {
36+
'asin': 'str',
37+
}
38+
39+
attribute_map = {
40+
'asin': 'asin',
41+
}
42+
43+
def __init__(self, asin=None, _configuration=None): # noqa: E501
44+
"""Item - a model defined in Swagger""" # noqa: E501
45+
if _configuration is None:
46+
_configuration = Configuration()
47+
self._configuration = _configuration
48+
49+
self._asin = None
50+
self.discriminator = None
51+
52+
self.asin = asin
53+
54+
@property
55+
def asin(self):
56+
"""Gets the asin of this Item. # noqa: E501
57+
58+
The ASIN of the item. # noqa: E501
59+
60+
:return: The asin of this Item. # noqa: E501
61+
:rtype: str
62+
"""
63+
return self._asin
64+
65+
@asin.setter
66+
def asin(self, asin):
67+
"""Sets the asin of this Item.
68+
69+
The ASIN of the item. # noqa: E501
70+
71+
:param asin: The asin of this Item. # noqa: E501
72+
:type: str
73+
"""
74+
if self._configuration.client_side_validation and asin is None:
75+
raise ValueError("Invalid value for `asin`, must not be `None`") # noqa: E501
76+
77+
self._asin = asin
78+
79+
def to_dict(self):
80+
"""Returns the model properties as a dict"""
81+
result = {}
82+
83+
for attr, _ in six.iteritems(self.swagger_types):
84+
value = getattr(self, attr)
85+
if isinstance(value, list):
86+
result[attr] = list(map(
87+
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
88+
value
89+
))
90+
elif hasattr(value, "to_dict"):
91+
result[attr] = value.to_dict()
92+
elif isinstance(value, dict):
93+
result[attr] = dict(map(
94+
lambda item: (item[0], item[1].to_dict())
95+
if hasattr(item[1], "to_dict") else item,
96+
value.items()
97+
))
98+
else:
99+
result[attr] = value
100+
if issubclass(Item, dict):
101+
for key, value in self.items():
102+
result[key] = value
103+
104+
return result
105+
106+
def to_str(self):
107+
"""Returns the string representation of the model"""
108+
return pprint.pformat(self.to_dict())
109+
110+
def __repr__(self):
111+
"""For `print` and `pprint`"""
112+
return self.to_str()
113+
114+
def __eq__(self, other):
115+
"""Returns true if both objects are equal"""
116+
if not isinstance(other, Item):
117+
return False
118+
119+
return self.to_dict() == other.to_dict()
120+
121+
def __ne__(self, other):
122+
"""Returns true if both objects are not equal"""
123+
if not isinstance(other, Item):
124+
return True
125+
126+
return self.to_dict() != other.to_dict()

0 commit comments

Comments
 (0)