diff --git a/.gitignore b/.gitignore index 388bc29..1b45acd 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ # Custom folders and files to ignore +.idea/ .vscode/ .DS_Store secrets.py diff --git a/README.md b/README.md index b7055e4..dbea1da 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ This module allows interacting with Amazon using the official API in an easier w You can install or upgrade the module with: - pip install python-amazon-paapi --upgrade + pip install git+https://github.com/salvador-hs/python-amazon-paapi.git ## Usage guide diff --git a/amazon_paapi/models/item_result.py b/amazon_paapi/models/item_result.py index 616a1d6..beb9539 100644 --- a/amazon_paapi/models/item_result.py +++ b/amazon_paapi/models/item_result.py @@ -153,6 +153,13 @@ class ApiItemInfo(sdk_models.ItemInfo): trade_in_info: ApiTradeInInfo +class ApiOfferAvailabilityV2(sdk_models.OfferAvailabilityV2): + max_order_quantity: int + message: str + min_order_quantity: int + type: str + + class ApiOfferAvailability(sdk_models.OfferAvailability): max_order_quantity: int message: str @@ -176,6 +183,20 @@ class ApiOfferConditionNote(sdk_models.OfferConditionNote): value: str +class ApiOfferDealDetailsV2(sdk_models.deal_details.DealDetails): + access_type: str + badge: str + early_access_duration_in_milliseconds: int + end_time: str + percent_claimed: float + start_time: str + + +class ApiOfferConditionV2(ApiOfferConditionInfo, sdk_models.OfferConditionV2): + sub_condition: ApiOfferSubCondition + condition_note: ApiOfferConditionNote + + class ApiOfferCondition(ApiOfferConditionInfo, sdk_models.OfferCondition): sub_condition: ApiOfferSubCondition condition_note: ApiOfferConditionNote @@ -187,10 +208,19 @@ class ApiOfferDeliveryInfo(sdk_models.OfferDeliveryInfo): is_prime_eligible: bool +class ApiOfferLoyaltyPointsV2(sdk_models.OfferLoyaltyPointsV2): + points: int + + class ApiOfferLoyaltyPoints(sdk_models.OfferLoyaltyPoints): points: int +class ApiOfferMerchantInfoV2(sdk_models.OfferMerchantInfoV2): + id: str + name: str + + class ApiOfferMerchantInfo(sdk_models.OfferMerchantInfo): default_shipping_country: str feedback_count: int @@ -199,10 +229,28 @@ class ApiOfferMerchantInfo(sdk_models.OfferMerchantInfo): name: str +class ApiOfferMoney(sdk_models.Money): + amount: float + currency: str + display_amount: str + + +class OfferSavingsV2(sdk_models.OfferSavingsV2): + money: ApiOfferMoney + percentage: float + + class ApiOfferSavings(ApiPrice, sdk_models.OfferSavings): percentage: float +class ApiOfferPriceV2(sdk_models.OfferPriceV2): + money: ApiOfferMoney + price_per_unit: ApiOfferMoney + saving_basis: sdk_models.OfferSavingsV2 + savings: sdk_models.OfferSavingsV2 + + class ApiOfferPrice(ApiPrice, sdk_models.OfferPrice): savings: sdk_models.OfferSavings @@ -217,6 +265,18 @@ class ApiPromotion(ApiPrice, sdk_models.OfferPromotion): discount_percent: float +class ApiListingsV2(sdk_models.OfferListingV2): + availability: ApiOfferAvailabilityV2 + condition: ApiOfferConditionV2 + deal_details: ApiOfferDealDetailsV2 + is_buy_box_winner: bool + loyalty_points: ApiOfferLoyaltyPointsV2 + merchant_info: ApiOfferMerchantInfoV2 + price: ApiOfferPriceV2 + type: str + violates_map: bool + + class ApiListings(sdk_models.OfferListing): availability: ApiOfferAvailability condition: ApiOfferCondition @@ -232,6 +292,10 @@ class ApiListings(sdk_models.OfferListing): violates_map: bool +class ApiOffersV2(sdk_models.OffersV2): + listings: List[ApiListingsV2] + + class ApiOffers(sdk_models.Offers): listings: List[ApiListings] @@ -264,6 +328,7 @@ class Item(sdk_models.Item): images: ApiImages item_info: ApiItemInfo offers: ApiOffers + offers_v2: ApiOffersV2 parent_asin: str rental_offers: sdk_models.RentalOffers score: float diff --git a/amazon_paapi/sdk/NOTICE.txt b/amazon_paapi/sdk/NOTICE.txt deleted file mode 100644 index 526e5d9..0000000 --- a/amazon_paapi/sdk/NOTICE.txt +++ /dev/null @@ -1,2 +0,0 @@ -Product Advertising API 5.0 SDK for Python -Copyright 2019-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. \ No newline at end of file diff --git a/amazon_paapi/sdk/__init__.py b/amazon_paapi/sdk/__init__.py index 1b3c58b..e07c330 100644 --- a/amazon_paapi/sdk/__init__.py +++ b/amazon_paapi/sdk/__init__.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -27,101 +27,119 @@ # import auth into sdk package -from .auth.sign_helper import AWSV4Auth +from amazon_paapi.sdk.auth.sign_helper import AWSV4Auth # import apis into sdk package -from .api.default_api import DefaultApi +from amazon_paapi.sdk.api.default_api import DefaultApi # import ApiClient -from .api_client import ApiClient -from .configuration import Configuration +from amazon_paapi.sdk.api_client import ApiClient +from amazon_paapi.sdk.configuration import Configuration # import models into sdk package -from .models.availability import Availability -from .models.browse_node import BrowseNode -from .models.browse_node_ancestor import BrowseNodeAncestor -from .models.browse_node_child import BrowseNodeChild -from .models.browse_node_info import BrowseNodeInfo -from .models.browse_nodes_result import BrowseNodesResult -from .models.by_line_info import ByLineInfo -from .models.classifications import Classifications -from .models.condition import Condition -from .models.content_info import ContentInfo -from .models.content_rating import ContentRating -from .models.contributor import Contributor -from .models.customer_reviews import CustomerReviews -from .models.delivery_flag import DeliveryFlag -from .models.dimension_based_attribute import DimensionBasedAttribute -from .models.duration_price import DurationPrice -from .models.error_data import ErrorData -from .models.external_ids import ExternalIds -from .models.get_browse_nodes_request import GetBrowseNodesRequest -from .models.get_browse_nodes_resource import GetBrowseNodesResource -from .models.get_browse_nodes_response import GetBrowseNodesResponse -from .models.get_items_request import GetItemsRequest -from .models.get_items_resource import GetItemsResource -from .models.get_items_response import GetItemsResponse -from .models.get_variations_request import GetVariationsRequest -from .models.get_variations_resource import GetVariationsResource -from .models.get_variations_response import GetVariationsResponse -from .models.image_size import ImageSize -from .models.image_type import ImageType -from .models.images import Images -from .models.item import Item -from .models.item_id_type import ItemIdType -from .models.item_info import ItemInfo -from .models.items_result import ItemsResult -from .models.language_type import LanguageType -from .models.languages import Languages -from .models.manufacture_info import ManufactureInfo -from .models.max_price import MaxPrice -from .models.merchant import Merchant -from .models.min_price import MinPrice -from .models.min_reviews_rating import MinReviewsRating -from .models.min_saving_percent import MinSavingPercent -from .models.multi_valued_attribute import MultiValuedAttribute -from .models.offer_availability import OfferAvailability -from .models.offer_condition import OfferCondition -from .models.offer_condition_note import OfferConditionNote -from .models.offer_count import OfferCount -from .models.offer_delivery_info import OfferDeliveryInfo -from .models.offer_listing import OfferListing -from .models.offer_loyalty_points import OfferLoyaltyPoints -from .models.offer_merchant_info import OfferMerchantInfo -from .models.offer_price import OfferPrice -from .models.offer_program_eligibility import OfferProgramEligibility -from .models.offer_promotion import OfferPromotion -from .models.offer_savings import OfferSavings -from .models.offer_shipping_charge import OfferShippingCharge -from .models.offer_sub_condition import OfferSubCondition -from .models.offer_summary import OfferSummary -from .models.offers import Offers -from .models.partner_type import PartnerType -from .models.price import Price -from .models.product_advertising_api_client_exception import ProductAdvertisingAPIClientException -from .models.product_advertising_api_service_exception import ProductAdvertisingAPIServiceException -from .models.product_info import ProductInfo -from .models.properties import Properties -from .models.rating import Rating -from .models.refinement import Refinement -from .models.refinement_bin import RefinementBin -from .models.rental_offer_listing import RentalOfferListing -from .models.rental_offers import RentalOffers -from .models.search_items_request import SearchItemsRequest -from .models.search_items_resource import SearchItemsResource -from .models.search_items_response import SearchItemsResponse -from .models.search_refinements import SearchRefinements -from .models.search_result import SearchResult -from .models.single_boolean_valued_attribute import SingleBooleanValuedAttribute -from .models.single_integer_valued_attribute import SingleIntegerValuedAttribute -from .models.single_string_valued_attribute import SingleStringValuedAttribute -from .models.sort_by import SortBy -from .models.technical_info import TechnicalInfo -from .models.trade_in_info import TradeInInfo -from .models.trade_in_price import TradeInPrice -from .models.unit_based_attribute import UnitBasedAttribute -from .models.variation_attribute import VariationAttribute -from .models.variation_dimension import VariationDimension -from .models.variation_summary import VariationSummary -from .models.variations_result import VariationsResult -from .models.website_sales_rank import WebsiteSalesRank +from amazon_paapi.sdk.models.availability import Availability +from amazon_paapi.sdk.models.big_decimal import BigDecimal +from amazon_paapi.sdk.models.browse_node import BrowseNode +from amazon_paapi.sdk.models.browse_node_ancestor import BrowseNodeAncestor +from amazon_paapi.sdk.models.browse_node_child import BrowseNodeChild +from amazon_paapi.sdk.models.browse_node_info import BrowseNodeInfo +from amazon_paapi.sdk.models.browse_nodes_result import BrowseNodesResult +from amazon_paapi.sdk.models.by_line_info import ByLineInfo +from amazon_paapi.sdk.models.classifications import Classifications +from amazon_paapi.sdk.models.condition import Condition +from amazon_paapi.sdk.models.content_info import ContentInfo +from amazon_paapi.sdk.models.content_rating import ContentRating +from amazon_paapi.sdk.models.contributor import Contributor +from amazon_paapi.sdk.models.customer_reviews import CustomerReviews +from amazon_paapi.sdk.models.deal_details import DealDetails +from amazon_paapi.sdk.models.delivery_flag import DeliveryFlag +from amazon_paapi.sdk.models.dimension_based_attribute import DimensionBasedAttribute +from amazon_paapi.sdk.models.duration_price import DurationPrice +from amazon_paapi.sdk.models.error_data import ErrorData +from amazon_paapi.sdk.models.external_ids import ExternalIds +from amazon_paapi.sdk.models.get_browse_nodes_request import GetBrowseNodesRequest +from amazon_paapi.sdk.models.get_browse_nodes_resource import GetBrowseNodesResource +from amazon_paapi.sdk.models.get_browse_nodes_response import GetBrowseNodesResponse +from amazon_paapi.sdk.models.get_items_request import GetItemsRequest +from amazon_paapi.sdk.models.get_items_resource import GetItemsResource +from amazon_paapi.sdk.models.get_items_response import GetItemsResponse +from amazon_paapi.sdk.models.get_variations_request import GetVariationsRequest +from amazon_paapi.sdk.models.get_variations_resource import GetVariationsResource +from amazon_paapi.sdk.models.get_variations_response import GetVariationsResponse +from amazon_paapi.sdk.models.image_size import ImageSize +from amazon_paapi.sdk.models.image_type import ImageType +from amazon_paapi.sdk.models.images import Images +from amazon_paapi.sdk.models.item import Item +from amazon_paapi.sdk.models.item_id_type import ItemIdType +from amazon_paapi.sdk.models.item_info import ItemInfo +from amazon_paapi.sdk.models.items_result import ItemsResult +from amazon_paapi.sdk.models.language_type import LanguageType +from amazon_paapi.sdk.models.languages import Languages +from amazon_paapi.sdk.models.manufacture_info import ManufactureInfo +from amazon_paapi.sdk.models.max_price import MaxPrice +from amazon_paapi.sdk.models.merchant import Merchant +from amazon_paapi.sdk.models.min_price import MinPrice +from amazon_paapi.sdk.models.min_reviews_rating import MinReviewsRating +from amazon_paapi.sdk.models.min_saving_percent import MinSavingPercent +from amazon_paapi.sdk.models.money import Money +from amazon_paapi.sdk.models.multi_valued_attribute import MultiValuedAttribute +from amazon_paapi.sdk.models.offer_availability import OfferAvailability +from amazon_paapi.sdk.models.offer_availability_v2 import OfferAvailabilityV2 +from amazon_paapi.sdk.models.offer_condition import OfferCondition +from amazon_paapi.sdk.models.offer_condition_note import OfferConditionNote +from amazon_paapi.sdk.models.offer_condition_v2 import OfferConditionV2 +from amazon_paapi.sdk.models.offer_count import OfferCount +from amazon_paapi.sdk.models.offer_delivery_info import OfferDeliveryInfo +from amazon_paapi.sdk.models.offer_listing import OfferListing +from amazon_paapi.sdk.models.offer_listing_v2 import OfferListingV2 +from amazon_paapi.sdk.models.offer_listings import OfferListings +from amazon_paapi.sdk.models.offer_listings_v2 import OfferListingsV2 +from amazon_paapi.sdk.models.offer_loyalty_points import OfferLoyaltyPoints +from amazon_paapi.sdk.models.offer_loyalty_points_v2 import OfferLoyaltyPointsV2 +from amazon_paapi.sdk.models.offer_merchant_info import OfferMerchantInfo +from amazon_paapi.sdk.models.offer_merchant_info_v2 import OfferMerchantInfoV2 +from amazon_paapi.sdk.models.offer_price import OfferPrice +from amazon_paapi.sdk.models.offer_price_v2 import OfferPriceV2 +from amazon_paapi.sdk.models.offer_program_eligibility import OfferProgramEligibility +from amazon_paapi.sdk.models.offer_promotion import OfferPromotion +from amazon_paapi.sdk.models.offer_saving_basis import OfferSavingBasis +from amazon_paapi.sdk.models.offer_savings import OfferSavings +from amazon_paapi.sdk.models.offer_savings_v2 import OfferSavingsV2 +from amazon_paapi.sdk.models.offer_shipping_charge import OfferShippingCharge +from amazon_paapi.sdk.models.offer_sub_condition import OfferSubCondition +from amazon_paapi.sdk.models.offer_summary import OfferSummary +from amazon_paapi.sdk.models.offer_type import OfferType +from amazon_paapi.sdk.models.offers import Offers +from amazon_paapi.sdk.models.offers_v2 import OffersV2 +from amazon_paapi.sdk.models.partner_type import PartnerType +from amazon_paapi.sdk.models.price import Price +from amazon_paapi.sdk.models.price_type import PriceType +from amazon_paapi.sdk.models.product_advertising_api_client_exception import ProductAdvertisingAPIClientException +from amazon_paapi.sdk.models.product_advertising_api_service_exception import ProductAdvertisingAPIServiceException +from amazon_paapi.sdk.models.product_info import ProductInfo +from amazon_paapi.sdk.models.properties import Properties +from amazon_paapi.sdk.models.rating import Rating +from amazon_paapi.sdk.models.refinement import Refinement +from amazon_paapi.sdk.models.refinement_bin import RefinementBin +from amazon_paapi.sdk.models.rental_offer_listing import RentalOfferListing +from amazon_paapi.sdk.models.rental_offers import RentalOffers +from amazon_paapi.sdk.models.saving_basis_type import SavingBasisType +from amazon_paapi.sdk.models.search_index import SearchIndex +from amazon_paapi.sdk.models.search_items_request import SearchItemsRequest +from amazon_paapi.sdk.models.search_items_resource import SearchItemsResource +from amazon_paapi.sdk.models.search_items_response import SearchItemsResponse +from amazon_paapi.sdk.models.search_refinements import SearchRefinements +from amazon_paapi.sdk.models.search_result import SearchResult +from amazon_paapi.sdk.models.single_boolean_valued_attribute import SingleBooleanValuedAttribute +from amazon_paapi.sdk.models.single_integer_valued_attribute import SingleIntegerValuedAttribute +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute +from amazon_paapi.sdk.models.sort_by import SortBy +from amazon_paapi.sdk.models.technical_info import TechnicalInfo +from amazon_paapi.sdk.models.trade_in_info import TradeInInfo +from amazon_paapi.sdk.models.trade_in_price import TradeInPrice +from amazon_paapi.sdk.models.unit_based_attribute import UnitBasedAttribute +from amazon_paapi.sdk.models.variation_attribute import VariationAttribute +from amazon_paapi.sdk.models.variation_dimension import VariationDimension +from amazon_paapi.sdk.models.variation_summary import VariationSummary +from amazon_paapi.sdk.models.variations_result import VariationsResult +from amazon_paapi.sdk.models.website_sales_rank import WebsiteSalesRank diff --git a/amazon_paapi/sdk/api/__init__.py b/amazon_paapi/sdk/api/__init__.py index 0597bfa..bf45d3e 100644 --- a/amazon_paapi/sdk/api/__init__.py +++ b/amazon_paapi/sdk/api/__init__.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -25,6 +25,5 @@ https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 """ - # import apis into api package -from .default_api import DefaultApi +from amazon_paapi.sdk.api.default_api import DefaultApi diff --git a/amazon_paapi/sdk/api/default_api.py b/amazon_paapi/sdk/api/default_api.py index ebcd6cb..dd6fc19 100644 --- a/amazon_paapi/sdk/api/default_api.py +++ b/amazon_paapi/sdk/api/default_api.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -25,13 +25,12 @@ https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 """ - import re # noqa: F401 # python 2 and python 3 compatibility library import six -from ..api_client import ApiClient +from amazon_paapi.sdk.api_client import ApiClient class DefaultApi(object): diff --git a/amazon_paapi/sdk/api_client.py b/amazon_paapi/sdk/api_client.py index e14223e..7350d4f 100644 --- a/amazon_paapi/sdk/api_client.py +++ b/amazon_paapi/sdk/api_client.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -37,11 +37,11 @@ import six from six.moves.urllib.parse import quote -from .configuration import Configuration -from . import models -from . import rest +from amazon_paapi.sdk.configuration import Configuration +import amazon_paapi.sdk.models +from amazon_paapi.sdk import rest -from .auth.sign_helper import AWSV4Auth +from amazon_paapi.sdk.auth.sign_helper import AWSV4Auth class ApiClient(object): """Generic API client for Swagger client library builds. @@ -95,7 +95,7 @@ def __init__(self, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'paapi5-python-sdk/1.0.0' + self.user_agent = 'paapi5-python-sdk/1.2.3' self.access_key = access_key self.secret_key = secret_key @@ -288,7 +288,7 @@ def __deserialize(self, data, klass): if klass in self.NATIVE_TYPES_MAPPING: klass = self.NATIVE_TYPES_MAPPING[klass] else: - klass = getattr(models, klass) + klass = getattr(amazon_paapi.sdk.models, klass) if klass in self.PRIMITIVE_TYPES: return self.__deserialize_primitive(data, klass) diff --git a/amazon_paapi/sdk/auth/__init__.py b/amazon_paapi/sdk/auth/__init__.py index cc76d25..7bc1b04 100644 --- a/amazon_paapi/sdk/auth/__init__.py +++ b/amazon_paapi/sdk/auth/__init__.py @@ -30,4 +30,4 @@ """ # import auth into sdk package -from .sign_helper import AWSV4Auth +from amazon_paapi.sdk.auth.sign_helper import AWSV4Auth diff --git a/amazon_paapi/sdk/configuration.py b/amazon_paapi/sdk/configuration.py index 852399e..11c9a69 100644 --- a/amazon_paapi/sdk/configuration.py +++ b/amazon_paapi/sdk/configuration.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 """ - import copy import logging import multiprocessing @@ -64,7 +63,7 @@ def __init__(self, connection_pool_maxsize=None): # Logging Settings self.logger = {} - self.logger["package_logger"] = logging.getLogger("amazon_paapi.sdk") + self.logger["package_logger"] = logging.getLogger("paapi5_python_sdk") self.logger["urllib3_logger"] = logging.getLogger("urllib3") # Log format self.logger_format = '%(asctime)s %(levelname)s %(message)s' @@ -228,6 +227,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.0.0".\ + "Version of the API: 5.0.0\n"\ + "SDK Package Version: 1.2.3".\ format(env=sys.platform, pyversion=sys.version) diff --git a/amazon_paapi/sdk/models/__init__.py b/amazon_paapi/sdk/models/__init__.py index d9fb13b..c2c5d85 100644 --- a/amazon_paapi/sdk/models/__init__.py +++ b/amazon_paapi/sdk/models/__init__.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -25,93 +25,111 @@ https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 """ + # import models into model package -from .availability import Availability -from .browse_node import BrowseNode -from .browse_node_ancestor import BrowseNodeAncestor -from .browse_node_child import BrowseNodeChild -from .browse_node_info import BrowseNodeInfo -from .browse_nodes_result import BrowseNodesResult -from .by_line_info import ByLineInfo -from .classifications import Classifications -from .condition import Condition -from .content_info import ContentInfo -from .content_rating import ContentRating -from .contributor import Contributor -from .customer_reviews import CustomerReviews -from .delivery_flag import DeliveryFlag -from .dimension_based_attribute import DimensionBasedAttribute -from .duration_price import DurationPrice -from .error_data import ErrorData -from .external_ids import ExternalIds -from .get_browse_nodes_request import GetBrowseNodesRequest -from .get_browse_nodes_resource import GetBrowseNodesResource -from .get_browse_nodes_response import GetBrowseNodesResponse -from .get_items_request import GetItemsRequest -from .get_items_resource import GetItemsResource -from .get_items_response import GetItemsResponse -from .get_variations_request import GetVariationsRequest -from .get_variations_resource import GetVariationsResource -from .get_variations_response import GetVariationsResponse -from .image_size import ImageSize -from .image_type import ImageType -from .images import Images -from .item import Item -from .item_id_type import ItemIdType -from .item_info import ItemInfo -from .items_result import ItemsResult -from .language_type import LanguageType -from .languages import Languages -from .manufacture_info import ManufactureInfo -from .max_price import MaxPrice -from .merchant import Merchant -from .min_price import MinPrice -from .min_reviews_rating import MinReviewsRating -from .min_saving_percent import MinSavingPercent -from .multi_valued_attribute import MultiValuedAttribute -from .offer_availability import OfferAvailability -from .offer_condition import OfferCondition -from .offer_condition_note import OfferConditionNote -from .offer_count import OfferCount -from .offer_delivery_info import OfferDeliveryInfo -from .offer_listing import OfferListing -from .offer_loyalty_points import OfferLoyaltyPoints -from .offer_merchant_info import OfferMerchantInfo -from .offer_price import OfferPrice -from .offer_program_eligibility import OfferProgramEligibility -from .offer_promotion import OfferPromotion -from .offer_savings import OfferSavings -from .offer_shipping_charge import OfferShippingCharge -from .offer_sub_condition import OfferSubCondition -from .offer_summary import OfferSummary -from .offers import Offers -from .partner_type import PartnerType -from .price import Price -from .price_type import PriceType -from .product_advertising_api_client_exception import ProductAdvertisingAPIClientException -from .product_advertising_api_service_exception import ProductAdvertisingAPIServiceException -from .product_info import ProductInfo -from .properties import Properties -from .rating import Rating -from .refinement import Refinement -from .refinement_bin import RefinementBin -from .rental_offer_listing import RentalOfferListing -from .rental_offers import RentalOffers -from .search_items_request import SearchItemsRequest -from .search_items_resource import SearchItemsResource -from .search_items_response import SearchItemsResponse -from .search_refinements import SearchRefinements -from .search_result import SearchResult -from .single_boolean_valued_attribute import SingleBooleanValuedAttribute -from .single_integer_valued_attribute import SingleIntegerValuedAttribute -from .single_string_valued_attribute import SingleStringValuedAttribute -from .sort_by import SortBy -from .technical_info import TechnicalInfo -from .trade_in_info import TradeInInfo -from .trade_in_price import TradeInPrice -from .unit_based_attribute import UnitBasedAttribute -from .variation_attribute import VariationAttribute -from .variation_dimension import VariationDimension -from .variation_summary import VariationSummary -from .variations_result import VariationsResult -from .website_sales_rank import WebsiteSalesRank +from amazon_paapi.sdk.models.availability import Availability +from amazon_paapi.sdk.models.big_decimal import BigDecimal +from amazon_paapi.sdk.models.browse_node import BrowseNode +from amazon_paapi.sdk.models.browse_node_ancestor import BrowseNodeAncestor +from amazon_paapi.sdk.models.browse_node_child import BrowseNodeChild +from amazon_paapi.sdk.models.browse_node_info import BrowseNodeInfo +from amazon_paapi.sdk.models.browse_nodes_result import BrowseNodesResult +from amazon_paapi.sdk.models.by_line_info import ByLineInfo +from amazon_paapi.sdk.models.classifications import Classifications +from amazon_paapi.sdk.models.condition import Condition +from amazon_paapi.sdk.models.content_info import ContentInfo +from amazon_paapi.sdk.models.content_rating import ContentRating +from amazon_paapi.sdk.models.contributor import Contributor +from amazon_paapi.sdk.models.customer_reviews import CustomerReviews +from amazon_paapi.sdk.models.deal_details import DealDetails +from amazon_paapi.sdk.models.delivery_flag import DeliveryFlag +from amazon_paapi.sdk.models.dimension_based_attribute import DimensionBasedAttribute +from amazon_paapi.sdk.models.duration_price import DurationPrice +from amazon_paapi.sdk.models.error_data import ErrorData +from amazon_paapi.sdk.models.external_ids import ExternalIds +from amazon_paapi.sdk.models.get_browse_nodes_request import GetBrowseNodesRequest +from amazon_paapi.sdk.models.get_browse_nodes_resource import GetBrowseNodesResource +from amazon_paapi.sdk.models.get_browse_nodes_response import GetBrowseNodesResponse +from amazon_paapi.sdk.models.get_items_request import GetItemsRequest +from amazon_paapi.sdk.models.get_items_resource import GetItemsResource +from amazon_paapi.sdk.models.get_items_response import GetItemsResponse +from amazon_paapi.sdk.models.get_variations_request import GetVariationsRequest +from amazon_paapi.sdk.models.get_variations_resource import GetVariationsResource +from amazon_paapi.sdk.models.get_variations_response import GetVariationsResponse +from amazon_paapi.sdk.models.image_size import ImageSize +from amazon_paapi.sdk.models.image_type import ImageType +from amazon_paapi.sdk.models.images import Images +from amazon_paapi.sdk.models.item import Item +from amazon_paapi.sdk.models.item_id_type import ItemIdType +from amazon_paapi.sdk.models.item_info import ItemInfo +from amazon_paapi.sdk.models.items_result import ItemsResult +from amazon_paapi.sdk.models.language_type import LanguageType +from amazon_paapi.sdk.models.languages import Languages +from amazon_paapi.sdk.models.manufacture_info import ManufactureInfo +from amazon_paapi.sdk.models.max_price import MaxPrice +from amazon_paapi.sdk.models.merchant import Merchant +from amazon_paapi.sdk.models.min_price import MinPrice +from amazon_paapi.sdk.models.min_reviews_rating import MinReviewsRating +from amazon_paapi.sdk.models.min_saving_percent import MinSavingPercent +from amazon_paapi.sdk.models.money import Money +from amazon_paapi.sdk.models.multi_valued_attribute import MultiValuedAttribute +from amazon_paapi.sdk.models.offer_availability import OfferAvailability +from amazon_paapi.sdk.models.offer_availability_v2 import OfferAvailabilityV2 +from amazon_paapi.sdk.models.offer_condition import OfferCondition +from amazon_paapi.sdk.models.offer_condition_note import OfferConditionNote +from amazon_paapi.sdk.models.offer_condition_v2 import OfferConditionV2 +from amazon_paapi.sdk.models.offer_count import OfferCount +from amazon_paapi.sdk.models.offer_delivery_info import OfferDeliveryInfo +from amazon_paapi.sdk.models.offer_listing import OfferListing +from amazon_paapi.sdk.models.offer_listing_v2 import OfferListingV2 +from amazon_paapi.sdk.models.offer_listings import OfferListings +from amazon_paapi.sdk.models.offer_listings_v2 import OfferListingsV2 +from amazon_paapi.sdk.models.offer_loyalty_points import OfferLoyaltyPoints +from amazon_paapi.sdk.models.offer_loyalty_points_v2 import OfferLoyaltyPointsV2 +from amazon_paapi.sdk.models.offer_merchant_info import OfferMerchantInfo +from amazon_paapi.sdk.models.offer_merchant_info_v2 import OfferMerchantInfoV2 +from amazon_paapi.sdk.models.offer_price import OfferPrice +from amazon_paapi.sdk.models.offer_price_v2 import OfferPriceV2 +from amazon_paapi.sdk.models.offer_program_eligibility import OfferProgramEligibility +from amazon_paapi.sdk.models.offer_promotion import OfferPromotion +from amazon_paapi.sdk.models.offer_saving_basis import OfferSavingBasis +from amazon_paapi.sdk.models.offer_savings import OfferSavings +from amazon_paapi.sdk.models.offer_savings_v2 import OfferSavingsV2 +from amazon_paapi.sdk.models.offer_shipping_charge import OfferShippingCharge +from amazon_paapi.sdk.models.offer_sub_condition import OfferSubCondition +from amazon_paapi.sdk.models.offer_summary import OfferSummary +from amazon_paapi.sdk.models.offer_type import OfferType +from amazon_paapi.sdk.models.offers import Offers +from amazon_paapi.sdk.models.offers_v2 import OffersV2 +from amazon_paapi.sdk.models.partner_type import PartnerType +from amazon_paapi.sdk.models.price import Price +from amazon_paapi.sdk.models.price_type import PriceType +from amazon_paapi.sdk.models.product_advertising_api_client_exception import ProductAdvertisingAPIClientException +from amazon_paapi.sdk.models.product_advertising_api_service_exception import ProductAdvertisingAPIServiceException +from amazon_paapi.sdk.models.product_info import ProductInfo +from amazon_paapi.sdk.models.properties import Properties +from amazon_paapi.sdk.models.rating import Rating +from amazon_paapi.sdk.models.refinement import Refinement +from amazon_paapi.sdk.models.refinement_bin import RefinementBin +from amazon_paapi.sdk.models.rental_offer_listing import RentalOfferListing +from amazon_paapi.sdk.models.rental_offers import RentalOffers +from amazon_paapi.sdk.models.saving_basis_type import SavingBasisType +from amazon_paapi.sdk.models.search_index import SearchIndex +from amazon_paapi.sdk.models.search_items_request import SearchItemsRequest +from amazon_paapi.sdk.models.search_items_resource import SearchItemsResource +from amazon_paapi.sdk.models.search_items_response import SearchItemsResponse +from amazon_paapi.sdk.models.search_refinements import SearchRefinements +from amazon_paapi.sdk.models.search_result import SearchResult +from amazon_paapi.sdk.models.single_boolean_valued_attribute import SingleBooleanValuedAttribute +from amazon_paapi.sdk.models.single_integer_valued_attribute import SingleIntegerValuedAttribute +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute +from amazon_paapi.sdk.models.sort_by import SortBy +from amazon_paapi.sdk.models.technical_info import TechnicalInfo +from amazon_paapi.sdk.models.trade_in_info import TradeInInfo +from amazon_paapi.sdk.models.trade_in_price import TradeInPrice +from amazon_paapi.sdk.models.unit_based_attribute import UnitBasedAttribute +from amazon_paapi.sdk.models.variation_attribute import VariationAttribute +from amazon_paapi.sdk.models.variation_dimension import VariationDimension +from amazon_paapi.sdk.models.variation_summary import VariationSummary +from amazon_paapi.sdk.models.variations_result import VariationsResult +from amazon_paapi.sdk.models.website_sales_rank import WebsiteSalesRank diff --git a/amazon_paapi/sdk/models/availability.py b/amazon_paapi/sdk/models/availability.py index c59a770..97666e9 100644 --- a/amazon_paapi/sdk/models/availability.py +++ b/amazon_paapi/sdk/models/availability.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/big_decimal.py b/amazon_paapi/sdk/models/big_decimal.py new file mode 100644 index 0000000..0cabb05 --- /dev/null +++ b/amazon_paapi/sdk/models/big_decimal.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class BigDecimal(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """BigDecimal - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(BigDecimal, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, BigDecimal): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/browse_node.py b/amazon_paapi/sdk/models/browse_node.py index 2368305..e26a003 100644 --- a/amazon_paapi/sdk/models/browse_node.py +++ b/amazon_paapi/sdk/models/browse_node.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .browse_node_ancestor import BrowseNodeAncestor # noqa: F401,E501 -from .browse_node_child import BrowseNodeChild # noqa: F401,E501 +from amazon_paapi.sdk.models.browse_node_ancestor import BrowseNodeAncestor # noqa: F401,E501 +from amazon_paapi.sdk.models.browse_node_child import BrowseNodeChild # noqa: F401,E501 class BrowseNode(object): diff --git a/amazon_paapi/sdk/models/browse_node_ancestor.py b/amazon_paapi/sdk/models/browse_node_ancestor.py index fa8e4bb..f574c88 100644 --- a/amazon_paapi/sdk/models/browse_node_ancestor.py +++ b/amazon_paapi/sdk/models/browse_node_ancestor.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -15,7 +15,6 @@ permissions and limitations under the License. """ - """ ProductAdvertisingAPI diff --git a/amazon_paapi/sdk/models/browse_node_child.py b/amazon_paapi/sdk/models/browse_node_child.py index 2971282..7fdb470 100644 --- a/amazon_paapi/sdk/models/browse_node_child.py +++ b/amazon_paapi/sdk/models/browse_node_child.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/browse_node_info.py b/amazon_paapi/sdk/models/browse_node_info.py index ce57b1f..483b516 100644 --- a/amazon_paapi/sdk/models/browse_node_info.py +++ b/amazon_paapi/sdk/models/browse_node_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .browse_node import BrowseNode # noqa: F401,E501 -from .website_sales_rank import WebsiteSalesRank # noqa: F401,E501 +from amazon_paapi.sdk.models.browse_node import BrowseNode # noqa: F401,E501 +from amazon_paapi.sdk.models.website_sales_rank import WebsiteSalesRank # noqa: F401,E501 class BrowseNodeInfo(object): diff --git a/amazon_paapi/sdk/models/browse_nodes_result.py b/amazon_paapi/sdk/models/browse_nodes_result.py index 0efd996..4e0b1a3 100644 --- a/amazon_paapi/sdk/models/browse_nodes_result.py +++ b/amazon_paapi/sdk/models/browse_nodes_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .browse_node import BrowseNode # noqa: F401,E501 +from amazon_paapi.sdk.models.browse_node import BrowseNode # noqa: F401,E501 class BrowseNodesResult(object): diff --git a/amazon_paapi/sdk/models/by_line_info.py b/amazon_paapi/sdk/models/by_line_info.py index a2a55c8..499c707 100644 --- a/amazon_paapi/sdk/models/by_line_info.py +++ b/amazon_paapi/sdk/models/by_line_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .contributor import Contributor # noqa: F401,E501 -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.contributor import Contributor # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class ByLineInfo(object): diff --git a/amazon_paapi/sdk/models/classifications.py b/amazon_paapi/sdk/models/classifications.py index 3f53dbf..30d597d 100644 --- a/amazon_paapi/sdk/models/classifications.py +++ b/amazon_paapi/sdk/models/classifications.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class Classifications(object): diff --git a/amazon_paapi/sdk/models/condition.py b/amazon_paapi/sdk/models/condition.py index 5a24d22..cd1576d 100644 --- a/amazon_paapi/sdk/models/condition.py +++ b/amazon_paapi/sdk/models/condition.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/content_info.py b/amazon_paapi/sdk/models/content_info.py index 068c02a..8cde446 100644 --- a/amazon_paapi/sdk/models/content_info.py +++ b/amazon_paapi/sdk/models/content_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,9 +28,9 @@ import six -from .languages import Languages # noqa: F401,E501 -from .single_integer_valued_attribute import SingleIntegerValuedAttribute # noqa: F401,E501 -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.languages import Languages # noqa: F401,E501 +from amazon_paapi.sdk.models.single_integer_valued_attribute import SingleIntegerValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class ContentInfo(object): diff --git a/amazon_paapi/sdk/models/content_rating.py b/amazon_paapi/sdk/models/content_rating.py index fd4276f..14b62d0 100644 --- a/amazon_paapi/sdk/models/content_rating.py +++ b/amazon_paapi/sdk/models/content_rating.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class ContentRating(object): diff --git a/amazon_paapi/sdk/models/contributor.py b/amazon_paapi/sdk/models/contributor.py index d00ddcf..c2d5bfa 100644 --- a/amazon_paapi/sdk/models/contributor.py +++ b/amazon_paapi/sdk/models/contributor.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/customer_reviews.py b/amazon_paapi/sdk/models/customer_reviews.py index 1ed184f..79f58c0 100644 --- a/amazon_paapi/sdk/models/customer_reviews.py +++ b/amazon_paapi/sdk/models/customer_reviews.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .rating import Rating # noqa: F401,E501 +from amazon_paapi.sdk.models.rating import Rating # noqa: F401,E501 class CustomerReviews(object): diff --git a/amazon_paapi/sdk/models/deal_details.py b/amazon_paapi/sdk/models/deal_details.py new file mode 100644 index 0000000..f906814 --- /dev/null +++ b/amazon_paapi/sdk/models/deal_details.py @@ -0,0 +1,257 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class DealDetails(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'access_type': 'str', + 'badge': 'str', + 'early_access_duration_in_milliseconds': 'int', + 'end_time': 'str', + 'percent_claimed': 'int', + 'start_time': 'str' + } + + attribute_map = { + 'access_type': 'AccessType', + 'badge': 'Badge', + 'early_access_duration_in_milliseconds': 'EarlyAccessDurationInMilliseconds', + 'end_time': 'EndTime', + 'percent_claimed': 'PercentClaimed', + 'start_time': 'StartTime' + } + + def __init__(self, access_type=None, badge=None, early_access_duration_in_milliseconds=None, end_time=None, percent_claimed=None, start_time=None): # noqa: E501 + """DealDetails - a model defined in Swagger""" # noqa: E501 + + self._access_type = None + self._badge = None + self._early_access_duration_in_milliseconds = None + self._end_time = None + self._percent_claimed = None + self._start_time = None + self.discriminator = None + + if access_type is not None: + self.access_type = access_type + if badge is not None: + self.badge = badge + if early_access_duration_in_milliseconds is not None: + self.early_access_duration_in_milliseconds = early_access_duration_in_milliseconds + if end_time is not None: + self.end_time = end_time + if percent_claimed is not None: + self.percent_claimed = percent_claimed + if start_time is not None: + self.start_time = start_time + + @property + def access_type(self): + """Gets the access_type of this DealDetails. # noqa: E501 + + + :return: The access_type of this DealDetails. # noqa: E501 + :rtype: str + """ + return self._access_type + + @access_type.setter + def access_type(self, access_type): + """Sets the access_type of this DealDetails. + + + :param access_type: The access_type of this DealDetails. # noqa: E501 + :type: str + """ + + self._access_type = access_type + + @property + def badge(self): + """Gets the badge of this DealDetails. # noqa: E501 + + + :return: The badge of this DealDetails. # noqa: E501 + :rtype: str + """ + return self._badge + + @badge.setter + def badge(self, badge): + """Sets the badge of this DealDetails. + + + :param badge: The badge of this DealDetails. # noqa: E501 + :type: str + """ + + self._badge = badge + + @property + def early_access_duration_in_milliseconds(self): + """Gets the early_access_duration_in_milliseconds of this DealDetails. # noqa: E501 + + + :return: The early_access_duration_in_milliseconds of this DealDetails. # noqa: E501 + :rtype: int + """ + return self._early_access_duration_in_milliseconds + + @early_access_duration_in_milliseconds.setter + def early_access_duration_in_milliseconds(self, early_access_duration_in_milliseconds): + """Sets the early_access_duration_in_milliseconds of this DealDetails. + + + :param early_access_duration_in_milliseconds: The early_access_duration_in_milliseconds of this DealDetails. # noqa: E501 + :type: int + """ + + self._early_access_duration_in_milliseconds = early_access_duration_in_milliseconds + + @property + def end_time(self): + """Gets the end_time of this DealDetails. # noqa: E501 + + + :return: The end_time of this DealDetails. # noqa: E501 + :rtype: str + """ + return self._end_time + + @end_time.setter + def end_time(self, end_time): + """Sets the end_time of this DealDetails. + + + :param end_time: The end_time of this DealDetails. # noqa: E501 + :type: str + """ + + self._end_time = end_time + + @property + def percent_claimed(self): + """Gets the percent_claimed of this DealDetails. # noqa: E501 + + + :return: The percent_claimed of this DealDetails. # noqa: E501 + :rtype: int + """ + return self._percent_claimed + + @percent_claimed.setter + def percent_claimed(self, percent_claimed): + """Sets the percent_claimed of this DealDetails. + + + :param percent_claimed: The percent_claimed of this DealDetails. # noqa: E501 + :type: int + """ + + self._percent_claimed = percent_claimed + + @property + def start_time(self): + """Gets the start_time of this DealDetails. # noqa: E501 + + + :return: The start_time of this DealDetails. # noqa: E501 + :rtype: str + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this DealDetails. + + + :param start_time: The start_time of this DealDetails. # noqa: E501 + :type: str + """ + + self._start_time = start_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(DealDetails, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, DealDetails): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/delivery_flag.py b/amazon_paapi/sdk/models/delivery_flag.py index 65b49af..035e354 100644 --- a/amazon_paapi/sdk/models/delivery_flag.py +++ b/amazon_paapi/sdk/models/delivery_flag.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/dimension_based_attribute.py b/amazon_paapi/sdk/models/dimension_based_attribute.py index b8f5e62..868db15 100644 --- a/amazon_paapi/sdk/models/dimension_based_attribute.py +++ b/amazon_paapi/sdk/models/dimension_based_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .unit_based_attribute import UnitBasedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.unit_based_attribute import UnitBasedAttribute # noqa: F401,E501 class DimensionBasedAttribute(object): diff --git a/amazon_paapi/sdk/models/duration_price.py b/amazon_paapi/sdk/models/duration_price.py index d5adfc7..4418575 100644 --- a/amazon_paapi/sdk/models/duration_price.py +++ b/amazon_paapi/sdk/models/duration_price.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .offer_price import OfferPrice # noqa: F401,E501 -from .unit_based_attribute import UnitBasedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_price import OfferPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.unit_based_attribute import UnitBasedAttribute # noqa: F401,E501 class DurationPrice(object): diff --git a/amazon_paapi/sdk/models/error_data.py b/amazon_paapi/sdk/models/error_data.py index 0677aae..48b027d 100644 --- a/amazon_paapi/sdk/models/error_data.py +++ b/amazon_paapi/sdk/models/error_data.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/external_ids.py b/amazon_paapi/sdk/models/external_ids.py index ded47ea..a96123b 100644 --- a/amazon_paapi/sdk/models/external_ids.py +++ b/amazon_paapi/sdk/models/external_ids.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .multi_valued_attribute import MultiValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.multi_valued_attribute import MultiValuedAttribute # noqa: F401,E501 class ExternalIds(object): diff --git a/amazon_paapi/sdk/models/get_browse_nodes_request.py b/amazon_paapi/sdk/models/get_browse_nodes_request.py index f5fe775..60487d5 100644 --- a/amazon_paapi/sdk/models/get_browse_nodes_request.py +++ b/amazon_paapi/sdk/models/get_browse_nodes_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .get_browse_nodes_resource import GetBrowseNodesResource # noqa: F401,E501 -from .partner_type import PartnerType # noqa: F401,E501 +from amazon_paapi.sdk.models.get_browse_nodes_resource import GetBrowseNodesResource # noqa: F401,E501 +from amazon_paapi.sdk.models.partner_type import PartnerType # noqa: F401,E501 class GetBrowseNodesRequest(object): diff --git a/amazon_paapi/sdk/models/get_browse_nodes_resource.py b/amazon_paapi/sdk/models/get_browse_nodes_resource.py index 81d4fc0..abb8fbb 100644 --- a/amazon_paapi/sdk/models/get_browse_nodes_resource.py +++ b/amazon_paapi/sdk/models/get_browse_nodes_resource.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/get_browse_nodes_response.py b/amazon_paapi/sdk/models/get_browse_nodes_response.py index 2640f27..06eef1e 100644 --- a/amazon_paapi/sdk/models/get_browse_nodes_response.py +++ b/amazon_paapi/sdk/models/get_browse_nodes_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .browse_nodes_result import BrowseNodesResult # noqa: F401,E501 -from .error_data import ErrorData # noqa: F401,E501 +from amazon_paapi.sdk.models.browse_nodes_result import BrowseNodesResult # noqa: F401,E501 +from amazon_paapi.sdk.models.error_data import ErrorData # noqa: F401,E501 class GetBrowseNodesResponse(object): diff --git a/amazon_paapi/sdk/models/get_items_request.py b/amazon_paapi/sdk/models/get_items_request.py index 2ea5ae1..2d2f6e7 100644 --- a/amazon_paapi/sdk/models/get_items_request.py +++ b/amazon_paapi/sdk/models/get_items_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,13 +28,13 @@ import six -from .condition import Condition # noqa: F401,E501 -from .get_items_resource import GetItemsResource # noqa: F401,E501 -from .item_id_type import ItemIdType # noqa: F401,E501 -from .merchant import Merchant # noqa: F401,E501 -from .offer_count import OfferCount # noqa: F401,E501 -from .partner_type import PartnerType # noqa: F401,E501 -from .properties import Properties # noqa: F401,E501 +from amazon_paapi.sdk.models.condition import Condition # noqa: F401,E501 +from amazon_paapi.sdk.models.get_items_resource import GetItemsResource # noqa: F401,E501 +from amazon_paapi.sdk.models.item_id_type import ItemIdType # noqa: F401,E501 +from amazon_paapi.sdk.models.merchant import Merchant # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_count import OfferCount # noqa: F401,E501 +from amazon_paapi.sdk.models.partner_type import PartnerType # noqa: F401,E501 +from amazon_paapi.sdk.models.properties import Properties # noqa: F401,E501 class GetItemsRequest(object): diff --git a/amazon_paapi/sdk/models/get_items_resource.py b/amazon_paapi/sdk/models/get_items_resource.py index b0922ad..2cfc750 100644 --- a/amazon_paapi/sdk/models/get_items_resource.py +++ b/amazon_paapi/sdk/models/get_items_resource.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -97,6 +97,14 @@ class GetItemsResource(object): RENTALOFFERS_LISTINGS_DELIVERYINFO_ISPRIMEELIGIBLE = "RentalOffers.Listings.DeliveryInfo.IsPrimeEligible" RENTALOFFERS_LISTINGS_DELIVERYINFO_SHIPPINGCHARGES = "RentalOffers.Listings.DeliveryInfo.ShippingCharges" RENTALOFFERS_LISTINGS_MERCHANTINFO = "RentalOffers.Listings.MerchantInfo" + OFFERSV2_LISTINGS_AVAILABILITY = "OffersV2.Listings.Availability" + OFFERSV2_LISTINGS_CONDITION = "OffersV2.Listings.Condition" + OFFERSV2_LISTINGS_DEALDETAILS = "OffersV2.Listings.DealDetails" + OFFERSV2_LISTINGS_ISBUYBOXWINNER = "OffersV2.Listings.IsBuyBoxWinner" + OFFERSV2_LISTINGS_LOYALTYPOINTS = "OffersV2.Listings.LoyaltyPoints" + OFFERSV2_LISTINGS_MERCHANTINFO = "OffersV2.Listings.MerchantInfo" + OFFERSV2_LISTINGS_PRICE = "OffersV2.Listings.Price" + OFFERSV2_LISTINGS_TYPE = "OffersV2.Listings.Type" """ Attributes: diff --git a/amazon_paapi/sdk/models/get_items_response.py b/amazon_paapi/sdk/models/get_items_response.py index 0c7c958..467cc9b 100644 --- a/amazon_paapi/sdk/models/get_items_response.py +++ b/amazon_paapi/sdk/models/get_items_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .error_data import ErrorData # noqa: F401,E501 -from .items_result import ItemsResult # noqa: F401,E501 +from amazon_paapi.sdk.models.error_data import ErrorData # noqa: F401,E501 +from amazon_paapi.sdk.models.items_result import ItemsResult # noqa: F401,E501 class GetItemsResponse(object): diff --git a/amazon_paapi/sdk/models/get_variations_request.py b/amazon_paapi/sdk/models/get_variations_request.py index 1e539f5..fd8c631 100644 --- a/amazon_paapi/sdk/models/get_variations_request.py +++ b/amazon_paapi/sdk/models/get_variations_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,12 +28,12 @@ import six -from .condition import Condition # noqa: F401,E501 -from .get_variations_resource import GetVariationsResource # noqa: F401,E501 -from .merchant import Merchant # noqa: F401,E501 -from .offer_count import OfferCount # noqa: F401,E501 -from .partner_type import PartnerType # noqa: F401,E501 -from .properties import Properties # noqa: F401,E501 +from amazon_paapi.sdk.models.condition import Condition # noqa: F401,E501 +from amazon_paapi.sdk.models.get_variations_resource import GetVariationsResource # noqa: F401,E501 +from amazon_paapi.sdk.models.merchant import Merchant # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_count import OfferCount # noqa: F401,E501 +from amazon_paapi.sdk.models.partner_type import PartnerType # noqa: F401,E501 +from amazon_paapi.sdk.models.properties import Properties # noqa: F401,E501 class GetVariationsRequest(object): diff --git a/amazon_paapi/sdk/models/get_variations_resource.py b/amazon_paapi/sdk/models/get_variations_resource.py index 773f8d2..f568d9b 100644 --- a/amazon_paapi/sdk/models/get_variations_resource.py +++ b/amazon_paapi/sdk/models/get_variations_resource.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/get_variations_response.py b/amazon_paapi/sdk/models/get_variations_response.py index a6698cd..dc41629 100644 --- a/amazon_paapi/sdk/models/get_variations_response.py +++ b/amazon_paapi/sdk/models/get_variations_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .error_data import ErrorData # noqa: F401,E501 -from .variations_result import VariationsResult # noqa: F401,E501 +from amazon_paapi.sdk.models.error_data import ErrorData # noqa: F401,E501 +from amazon_paapi.sdk.models.variations_result import VariationsResult # noqa: F401,E501 class GetVariationsResponse(object): diff --git a/amazon_paapi/sdk/models/image_size.py b/amazon_paapi/sdk/models/image_size.py index 3466ce6..2e18b39 100644 --- a/amazon_paapi/sdk/models/image_size.py +++ b/amazon_paapi/sdk/models/image_size.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/image_type.py b/amazon_paapi/sdk/models/image_type.py index 003efea..e8c682c 100644 --- a/amazon_paapi/sdk/models/image_type.py +++ b/amazon_paapi/sdk/models/image_type.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .image_size import ImageSize # noqa: F401,E501 +from amazon_paapi.sdk.models.image_size import ImageSize # noqa: F401,E501 class ImageType(object): diff --git a/amazon_paapi/sdk/models/images.py b/amazon_paapi/sdk/models/images.py index caf1370..3989eb1 100644 --- a/amazon_paapi/sdk/models/images.py +++ b/amazon_paapi/sdk/models/images.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .image_type import ImageType # noqa: F401,E501 +from amazon_paapi.sdk.models.image_type import ImageType # noqa: F401,E501 class Images(object): diff --git a/amazon_paapi/sdk/models/item.py b/amazon_paapi/sdk/models/item.py index ab41162..32aa175 100644 --- a/amazon_paapi/sdk/models/item.py +++ b/amazon_paapi/sdk/models/item.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,13 +28,14 @@ import six -from .browse_node_info import BrowseNodeInfo # noqa: F401,E501 -from .customer_reviews import CustomerReviews # noqa: F401,E501 -from .images import Images # noqa: F401,E501 -from .item_info import ItemInfo # noqa: F401,E501 -from .offers import Offers # noqa: F401,E501 -from .rental_offers import RentalOffers # noqa: F401,E501 -from .variation_attribute import VariationAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.browse_node_info import BrowseNodeInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.customer_reviews import CustomerReviews # noqa: F401,E501 +from amazon_paapi.sdk.models.images import Images # noqa: F401,E501 +from amazon_paapi.sdk.models.item_info import ItemInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.offers import Offers # noqa: F401,E501 +from amazon_paapi.sdk.models.offers_v2 import OffersV2 # noqa: F401,E501 +from amazon_paapi.sdk.models.rental_offers import RentalOffers # noqa: F401,E501 +from amazon_paapi.sdk.models.variation_attribute import VariationAttribute # noqa: F401,E501 class Item(object): @@ -58,6 +59,7 @@ class Item(object): 'images': 'Images', 'item_info': 'ItemInfo', 'offers': 'Offers', + 'offers_v2': 'OffersV2', 'parent_asin': 'str', 'rental_offers': 'RentalOffers', 'score': 'float', @@ -72,13 +74,14 @@ class Item(object): 'images': 'Images', 'item_info': 'ItemInfo', 'offers': 'Offers', + 'offers_v2': 'OffersV2', 'parent_asin': 'ParentASIN', 'rental_offers': 'RentalOffers', 'score': 'Score', 'variation_attributes': 'VariationAttributes' } - def __init__(self, asin=None, browse_node_info=None, customer_reviews=None, detail_page_url=None, images=None, item_info=None, offers=None, parent_asin=None, rental_offers=None, score=None, variation_attributes=None): # noqa: E501 + def __init__(self, asin=None, browse_node_info=None, customer_reviews=None, detail_page_url=None, images=None, item_info=None, offers=None, offers_v2=None, parent_asin=None, rental_offers=None, score=None, variation_attributes=None): # noqa: E501 """Item - a model defined in Swagger""" # noqa: E501 self._asin = None @@ -88,6 +91,7 @@ def __init__(self, asin=None, browse_node_info=None, customer_reviews=None, deta self._images = None self._item_info = None self._offers = None + self._offers_v2 = None self._parent_asin = None self._rental_offers = None self._score = None @@ -108,6 +112,8 @@ def __init__(self, asin=None, browse_node_info=None, customer_reviews=None, deta self.item_info = item_info if offers is not None: self.offers = offers + if offers_v2 is not None: + self.offers_v2 = offers_v2 if parent_asin is not None: self.parent_asin = parent_asin if rental_offers is not None: @@ -264,6 +270,27 @@ def offers(self, offers): self._offers = offers + @property + def offers_v2(self): + """Gets the offers_v2 of this Item. # noqa: E501 + + + :return: The offers_v2 of this Item. # noqa: E501 + :rtype: OffersV2 + """ + return self._offers_v2 + + @offers_v2.setter + def offers_v2(self, offers_v2): + """Sets the offers_v2 of this Item. + + + :param offers_v2: The offers_v2 of this Item. # noqa: E501 + :type: OffersV2 + """ + + self._offers_v2 = offers_v2 + @property def parent_asin(self): """Gets the parent_asin of this Item. # noqa: E501 diff --git a/amazon_paapi/sdk/models/item_id_type.py b/amazon_paapi/sdk/models/item_id_type.py index a9d0fdc..8661d91 100644 --- a/amazon_paapi/sdk/models/item_id_type.py +++ b/amazon_paapi/sdk/models/item_id_type.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/item_info.py b/amazon_paapi/sdk/models/item_info.py index c8c6343..c6c6b5e 100644 --- a/amazon_paapi/sdk/models/item_info.py +++ b/amazon_paapi/sdk/models/item_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,17 +28,17 @@ import six -from .by_line_info import ByLineInfo # noqa: F401,E501 -from .classifications import Classifications # noqa: F401,E501 -from .content_info import ContentInfo # noqa: F401,E501 -from .content_rating import ContentRating # noqa: F401,E501 -from .external_ids import ExternalIds # noqa: F401,E501 -from .manufacture_info import ManufactureInfo # noqa: F401,E501 -from .multi_valued_attribute import MultiValuedAttribute # noqa: F401,E501 -from .product_info import ProductInfo # noqa: F401,E501 -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 -from .technical_info import TechnicalInfo # noqa: F401,E501 -from .trade_in_info import TradeInInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.by_line_info import ByLineInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.classifications import Classifications # noqa: F401,E501 +from amazon_paapi.sdk.models.content_info import ContentInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.content_rating import ContentRating # noqa: F401,E501 +from amazon_paapi.sdk.models.external_ids import ExternalIds # noqa: F401,E501 +from amazon_paapi.sdk.models.manufacture_info import ManufactureInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.multi_valued_attribute import MultiValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.product_info import ProductInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.technical_info import TechnicalInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.trade_in_info import TradeInInfo # noqa: F401,E501 class ItemInfo(object): diff --git a/amazon_paapi/sdk/models/items_result.py b/amazon_paapi/sdk/models/items_result.py index 9465dcd..1fbd995 100644 --- a/amazon_paapi/sdk/models/items_result.py +++ b/amazon_paapi/sdk/models/items_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .item import Item # noqa: F401,E501 +from amazon_paapi.sdk.models.item import Item # noqa: F401,E501 class ItemsResult(object): diff --git a/amazon_paapi/sdk/models/language_type.py b/amazon_paapi/sdk/models/language_type.py index e120cb9..55e80de 100644 --- a/amazon_paapi/sdk/models/language_type.py +++ b/amazon_paapi/sdk/models/language_type.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/languages.py b/amazon_paapi/sdk/models/languages.py index 51b99a0..8eca731 100644 --- a/amazon_paapi/sdk/models/languages.py +++ b/amazon_paapi/sdk/models/languages.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .language_type import LanguageType # noqa: F401,E501 +from amazon_paapi.sdk.models.language_type import LanguageType # noqa: F401,E501 class Languages(object): diff --git a/amazon_paapi/sdk/models/manufacture_info.py b/amazon_paapi/sdk/models/manufacture_info.py index ff82b41..ca5898f 100644 --- a/amazon_paapi/sdk/models/manufacture_info.py +++ b/amazon_paapi/sdk/models/manufacture_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class ManufactureInfo(object): diff --git a/amazon_paapi/sdk/models/max_price.py b/amazon_paapi/sdk/models/max_price.py index 03945e9..87cb869 100644 --- a/amazon_paapi/sdk/models/max_price.py +++ b/amazon_paapi/sdk/models/max_price.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/merchant.py b/amazon_paapi/sdk/models/merchant.py index 58f8579..c20a723 100644 --- a/amazon_paapi/sdk/models/merchant.py +++ b/amazon_paapi/sdk/models/merchant.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/min_price.py b/amazon_paapi/sdk/models/min_price.py index ab65367..2d6f6b9 100644 --- a/amazon_paapi/sdk/models/min_price.py +++ b/amazon_paapi/sdk/models/min_price.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/min_reviews_rating.py b/amazon_paapi/sdk/models/min_reviews_rating.py index af6bab1..26b8ae3 100644 --- a/amazon_paapi/sdk/models/min_reviews_rating.py +++ b/amazon_paapi/sdk/models/min_reviews_rating.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/min_saving_percent.py b/amazon_paapi/sdk/models/min_saving_percent.py index d32ca9b..f006e8c 100644 --- a/amazon_paapi/sdk/models/min_saving_percent.py +++ b/amazon_paapi/sdk/models/min_saving_percent.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/money.py b/amazon_paapi/sdk/models/money.py new file mode 100644 index 0000000..8c9fd04 --- /dev/null +++ b/amazon_paapi/sdk/models/money.py @@ -0,0 +1,181 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.big_decimal import BigDecimal # noqa: F401,E501 + + +class Money(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'amount': 'BigDecimal', + 'currency': 'str', + 'display_amount': 'str' + } + + attribute_map = { + 'amount': 'Amount', + 'currency': 'Currency', + 'display_amount': 'DisplayAmount' + } + + def __init__(self, amount=None, currency=None, display_amount=None): # noqa: E501 + """Money - a model defined in Swagger""" # noqa: E501 + + self._amount = None + self._currency = None + self._display_amount = None + self.discriminator = None + + if amount is not None: + self.amount = amount + if currency is not None: + self.currency = currency + if display_amount is not None: + self.display_amount = display_amount + + @property + def amount(self): + """Gets the amount of this Money. # noqa: E501 + + + :return: The amount of this Money. # noqa: E501 + :rtype: BigDecimal + """ + return self._amount + + @amount.setter + def amount(self, amount): + """Sets the amount of this Money. + + + :param amount: The amount of this Money. # noqa: E501 + :type: BigDecimal + """ + + self._amount = amount + + @property + def currency(self): + """Gets the currency of this Money. # noqa: E501 + + + :return: The currency of this Money. # noqa: E501 + :rtype: str + """ + return self._currency + + @currency.setter + def currency(self, currency): + """Sets the currency of this Money. + + + :param currency: The currency of this Money. # noqa: E501 + :type: str + """ + + self._currency = currency + + @property + def display_amount(self): + """Gets the display_amount of this Money. # noqa: E501 + + + :return: The display_amount of this Money. # noqa: E501 + :rtype: str + """ + return self._display_amount + + @display_amount.setter + def display_amount(self, display_amount): + """Sets the display_amount of this Money. + + + :param display_amount: The display_amount of this Money. # noqa: E501 + :type: str + """ + + self._display_amount = display_amount + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(Money, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, Money): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/multi_valued_attribute.py b/amazon_paapi/sdk/models/multi_valued_attribute.py index a35a46f..3ebfcf7 100644 --- a/amazon_paapi/sdk/models/multi_valued_attribute.py +++ b/amazon_paapi/sdk/models/multi_valued_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_availability.py b/amazon_paapi/sdk/models/offer_availability.py index 6de3acf..6a0ee57 100644 --- a/amazon_paapi/sdk/models/offer_availability.py +++ b/amazon_paapi/sdk/models/offer_availability.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_availability_v2.py b/amazon_paapi/sdk/models/offer_availability_v2.py new file mode 100644 index 0000000..13c8f35 --- /dev/null +++ b/amazon_paapi/sdk/models/offer_availability_v2.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OfferAvailabilityV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'message': 'str', + 'max_order_quantity': 'int', + 'min_order_quantity': 'int', + 'type': 'str' + } + + attribute_map = { + 'message': 'Message', + 'max_order_quantity': 'MaxOrderQuantity', + 'min_order_quantity': 'MinOrderQuantity', + 'type': 'Type' + } + + def __init__(self, message=None, max_order_quantity=None, min_order_quantity=None, type=None): # noqa: E501 + """OfferAvailabilityV2 - a model defined in Swagger""" # noqa: E501 + + self._message = None + self._max_order_quantity = None + self._min_order_quantity = None + self._type = None + self.discriminator = None + + if message is not None: + self.message = message + if max_order_quantity is not None: + self.max_order_quantity = max_order_quantity + if min_order_quantity is not None: + self.min_order_quantity = min_order_quantity + if type is not None: + self.type = type + + @property + def message(self): + """Gets the message of this OfferAvailabilityV2. # noqa: E501 + + + :return: The message of this OfferAvailabilityV2. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this OfferAvailabilityV2. + + + :param message: The message of this OfferAvailabilityV2. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def max_order_quantity(self): + """Gets the max_order_quantity of this OfferAvailabilityV2. # noqa: E501 + + + :return: The max_order_quantity of this OfferAvailabilityV2. # noqa: E501 + :rtype: int + """ + return self._max_order_quantity + + @max_order_quantity.setter + def max_order_quantity(self, max_order_quantity): + """Sets the max_order_quantity of this OfferAvailabilityV2. + + + :param max_order_quantity: The max_order_quantity of this OfferAvailabilityV2. # noqa: E501 + :type: int + """ + + self._max_order_quantity = max_order_quantity + + @property + def min_order_quantity(self): + """Gets the min_order_quantity of this OfferAvailabilityV2. # noqa: E501 + + + :return: The min_order_quantity of this OfferAvailabilityV2. # noqa: E501 + :rtype: int + """ + return self._min_order_quantity + + @min_order_quantity.setter + def min_order_quantity(self, min_order_quantity): + """Sets the min_order_quantity of this OfferAvailabilityV2. + + + :param min_order_quantity: The min_order_quantity of this OfferAvailabilityV2. # noqa: E501 + :type: int + """ + + self._min_order_quantity = min_order_quantity + + @property + def type(self): + """Gets the type of this OfferAvailabilityV2. # noqa: E501 + + + :return: The type of this OfferAvailabilityV2. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this OfferAvailabilityV2. + + + :param type: The type of this OfferAvailabilityV2. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferAvailabilityV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferAvailabilityV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_condition.py b/amazon_paapi/sdk/models/offer_condition.py index ca5a7fa..90b1c3c 100644 --- a/amazon_paapi/sdk/models/offer_condition.py +++ b/amazon_paapi/sdk/models/offer_condition.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .offer_condition_note import OfferConditionNote # noqa: F401,E501 -from .offer_sub_condition import OfferSubCondition # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_condition_note import OfferConditionNote # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_sub_condition import OfferSubCondition # noqa: F401,E501 class OfferCondition(object): diff --git a/amazon_paapi/sdk/models/offer_condition_note.py b/amazon_paapi/sdk/models/offer_condition_note.py index 0b4ad19..b312791 100644 --- a/amazon_paapi/sdk/models/offer_condition_note.py +++ b/amazon_paapi/sdk/models/offer_condition_note.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_condition_v2.py b/amazon_paapi/sdk/models/offer_condition_v2.py new file mode 100644 index 0000000..a69a309 --- /dev/null +++ b/amazon_paapi/sdk/models/offer_condition_v2.py @@ -0,0 +1,179 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OfferConditionV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'value': 'str', + 'sub_condition': 'str', + 'condition_note': 'str' + } + + attribute_map = { + 'value': 'Value', + 'sub_condition': 'SubCondition', + 'condition_note': 'ConditionNote' + } + + def __init__(self, value=None, sub_condition=None, condition_note=None): # noqa: E501 + """OfferConditionV2 - a model defined in Swagger""" # noqa: E501 + + self._value = None + self._sub_condition = None + self._condition_note = None + self.discriminator = None + + if value is not None: + self.value = value + if sub_condition is not None: + self.sub_condition = sub_condition + if condition_note is not None: + self.condition_note = condition_note + + @property + def value(self): + """Gets the value of this OfferConditionV2. # noqa: E501 + + + :return: The value of this OfferConditionV2. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this OfferConditionV2. + + + :param value: The value of this OfferConditionV2. # noqa: E501 + :type: str + """ + + self._value = value + + @property + def sub_condition(self): + """Gets the sub_condition of this OfferConditionV2. # noqa: E501 + + + :return: The sub_condition of this OfferConditionV2. # noqa: E501 + :rtype: str + """ + return self._sub_condition + + @sub_condition.setter + def sub_condition(self, sub_condition): + """Sets the sub_condition of this OfferConditionV2. + + + :param sub_condition: The sub_condition of this OfferConditionV2. # noqa: E501 + :type: str + """ + + self._sub_condition = sub_condition + + @property + def condition_note(self): + """Gets the condition_note of this OfferConditionV2. # noqa: E501 + + + :return: The condition_note of this OfferConditionV2. # noqa: E501 + :rtype: str + """ + return self._condition_note + + @condition_note.setter + def condition_note(self, condition_note): + """Sets the condition_note of this OfferConditionV2. + + + :param condition_note: The condition_note of this OfferConditionV2. # noqa: E501 + :type: str + """ + + self._condition_note = condition_note + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferConditionV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferConditionV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_count.py b/amazon_paapi/sdk/models/offer_count.py index 0e93a78..31a570b 100644 --- a/amazon_paapi/sdk/models/offer_count.py +++ b/amazon_paapi/sdk/models/offer_count.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_delivery_info.py b/amazon_paapi/sdk/models/offer_delivery_info.py index 4518af9..da2c9c8 100644 --- a/amazon_paapi/sdk/models/offer_delivery_info.py +++ b/amazon_paapi/sdk/models/offer_delivery_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .offer_shipping_charge import OfferShippingCharge # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_shipping_charge import OfferShippingCharge # noqa: F401,E501 class OfferDeliveryInfo(object): diff --git a/amazon_paapi/sdk/models/offer_listing.py b/amazon_paapi/sdk/models/offer_listing.py index 58f4d61..81e3e60 100644 --- a/amazon_paapi/sdk/models/offer_listing.py +++ b/amazon_paapi/sdk/models/offer_listing.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,14 +28,14 @@ import six -from .offer_availability import OfferAvailability # noqa: F401,E501 -from .offer_condition import OfferCondition # noqa: F401,E501 -from .offer_delivery_info import OfferDeliveryInfo # noqa: F401,E501 -from .offer_loyalty_points import OfferLoyaltyPoints # noqa: F401,E501 -from .offer_merchant_info import OfferMerchantInfo # noqa: F401,E501 -from .offer_price import OfferPrice # noqa: F401,E501 -from .offer_program_eligibility import OfferProgramEligibility # noqa: F401,E501 -from .offer_promotion import OfferPromotion # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_availability import OfferAvailability # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_condition import OfferCondition # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_delivery_info import OfferDeliveryInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_loyalty_points import OfferLoyaltyPoints # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_merchant_info import OfferMerchantInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_price import OfferPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_program_eligibility import OfferProgramEligibility # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_promotion import OfferPromotion # noqa: F401,E501 class OfferListing(object): diff --git a/amazon_paapi/sdk/models/offer_listing_v2.py b/amazon_paapi/sdk/models/offer_listing_v2.py new file mode 100644 index 0000000..d9f7692 --- /dev/null +++ b/amazon_paapi/sdk/models/offer_listing_v2.py @@ -0,0 +1,343 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.deal_details import DealDetails # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_availability_v2 import OfferAvailabilityV2 # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_condition_v2 import OfferConditionV2 # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_loyalty_points_v2 import OfferLoyaltyPointsV2 # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_merchant_info_v2 import OfferMerchantInfoV2 # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_price_v2 import OfferPriceV2 # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_type import OfferType # noqa: F401,E501 + + +class OfferListingV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'availability': 'OfferAvailabilityV2', + 'condition': 'OfferConditionV2', + 'deal_details': 'DealDetails', + 'is_buy_box_winner': 'bool', + 'loyalty_points': 'OfferLoyaltyPointsV2', + 'merchant_info': 'OfferMerchantInfoV2', + 'price': 'OfferPriceV2', + 'type': 'OfferType', + 'violates_map': 'bool' + } + + attribute_map = { + 'availability': 'Availability', + 'condition': 'Condition', + 'deal_details': 'DealDetails', + 'is_buy_box_winner': 'IsBuyBoxWinner', + 'loyalty_points': 'LoyaltyPoints', + 'merchant_info': 'MerchantInfo', + 'price': 'Price', + 'type': 'Type', + 'violates_map': 'ViolatesMAP' + } + + def __init__(self, availability=None, condition=None, deal_details=None, is_buy_box_winner=None, loyalty_points=None, merchant_info=None, price=None, type=None, violates_map=None): # noqa: E501 + """OfferListingV2 - a model defined in Swagger""" # noqa: E501 + + self._availability = None + self._condition = None + self._deal_details = None + self._is_buy_box_winner = None + self._loyalty_points = None + self._merchant_info = None + self._price = None + self._type = None + self._violates_map = None + self.discriminator = None + + if availability is not None: + self.availability = availability + if condition is not None: + self.condition = condition + if deal_details is not None: + self.deal_details = deal_details + if is_buy_box_winner is not None: + self.is_buy_box_winner = is_buy_box_winner + if loyalty_points is not None: + self.loyalty_points = loyalty_points + if merchant_info is not None: + self.merchant_info = merchant_info + if price is not None: + self.price = price + if type is not None: + self.type = type + if violates_map is not None: + self.violates_map = violates_map + + @property + def availability(self): + """Gets the availability of this OfferListingV2. # noqa: E501 + + + :return: The availability of this OfferListingV2. # noqa: E501 + :rtype: OfferAvailabilityV2 + """ + return self._availability + + @availability.setter + def availability(self, availability): + """Sets the availability of this OfferListingV2. + + + :param availability: The availability of this OfferListingV2. # noqa: E501 + :type: OfferAvailabilityV2 + """ + + self._availability = availability + + @property + def condition(self): + """Gets the condition of this OfferListingV2. # noqa: E501 + + + :return: The condition of this OfferListingV2. # noqa: E501 + :rtype: OfferConditionV2 + """ + return self._condition + + @condition.setter + def condition(self, condition): + """Sets the condition of this OfferListingV2. + + + :param condition: The condition of this OfferListingV2. # noqa: E501 + :type: OfferConditionV2 + """ + + self._condition = condition + + @property + def deal_details(self): + """Gets the deal_details of this OfferListingV2. # noqa: E501 + + + :return: The deal_details of this OfferListingV2. # noqa: E501 + :rtype: DealDetails + """ + return self._deal_details + + @deal_details.setter + def deal_details(self, deal_details): + """Sets the deal_details of this OfferListingV2. + + + :param deal_details: The deal_details of this OfferListingV2. # noqa: E501 + :type: DealDetails + """ + + self._deal_details = deal_details + + @property + def is_buy_box_winner(self): + """Gets the is_buy_box_winner of this OfferListingV2. # noqa: E501 + + + :return: The is_buy_box_winner of this OfferListingV2. # noqa: E501 + :rtype: bool + """ + return self._is_buy_box_winner + + @is_buy_box_winner.setter + def is_buy_box_winner(self, is_buy_box_winner): + """Sets the is_buy_box_winner of this OfferListingV2. + + + :param is_buy_box_winner: The is_buy_box_winner of this OfferListingV2. # noqa: E501 + :type: bool + """ + + self._is_buy_box_winner = is_buy_box_winner + + @property + def loyalty_points(self): + """Gets the loyalty_points of this OfferListingV2. # noqa: E501 + + + :return: The loyalty_points of this OfferListingV2. # noqa: E501 + :rtype: OfferLoyaltyPointsV2 + """ + return self._loyalty_points + + @loyalty_points.setter + def loyalty_points(self, loyalty_points): + """Sets the loyalty_points of this OfferListingV2. + + + :param loyalty_points: The loyalty_points of this OfferListingV2. # noqa: E501 + :type: OfferLoyaltyPointsV2 + """ + + self._loyalty_points = loyalty_points + + @property + def merchant_info(self): + """Gets the merchant_info of this OfferListingV2. # noqa: E501 + + + :return: The merchant_info of this OfferListingV2. # noqa: E501 + :rtype: OfferMerchantInfoV2 + """ + return self._merchant_info + + @merchant_info.setter + def merchant_info(self, merchant_info): + """Sets the merchant_info of this OfferListingV2. + + + :param merchant_info: The merchant_info of this OfferListingV2. # noqa: E501 + :type: OfferMerchantInfoV2 + """ + + self._merchant_info = merchant_info + + @property + def price(self): + """Gets the price of this OfferListingV2. # noqa: E501 + + + :return: The price of this OfferListingV2. # noqa: E501 + :rtype: OfferPriceV2 + """ + return self._price + + @price.setter + def price(self, price): + """Sets the price of this OfferListingV2. + + + :param price: The price of this OfferListingV2. # noqa: E501 + :type: OfferPriceV2 + """ + + self._price = price + + @property + def type(self): + """Gets the type of this OfferListingV2. # noqa: E501 + + + :return: The type of this OfferListingV2. # noqa: E501 + :rtype: OfferType + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this OfferListingV2. + + + :param type: The type of this OfferListingV2. # noqa: E501 + :type: OfferType + """ + + self._type = type + + @property + def violates_map(self): + """Gets the violates_map of this OfferListingV2. # noqa: E501 + + + :return: The violates_map of this OfferListingV2. # noqa: E501 + :rtype: bool + """ + return self._violates_map + + @violates_map.setter + def violates_map(self, violates_map): + """Sets the violates_map of this OfferListingV2. + + + :param violates_map: The violates_map of this OfferListingV2. # noqa: E501 + :type: bool + """ + + self._violates_map = violates_map + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferListingV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferListingV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_listings.py b/amazon_paapi/sdk/models/offer_listings.py new file mode 100644 index 0000000..103750d --- /dev/null +++ b/amazon_paapi/sdk/models/offer_listings.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.offer_listing import OfferListing # noqa: F401,E501 + + +class OfferListings(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """OfferListings - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferListings, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferListings): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_listings_v2.py b/amazon_paapi/sdk/models/offer_listings_v2.py new file mode 100644 index 0000000..32bb23e --- /dev/null +++ b/amazon_paapi/sdk/models/offer_listings_v2.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.offer_listing_v2 import OfferListingV2 # noqa: F401,E501 + + +class OfferListingsV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """OfferListingsV2 - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferListingsV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferListingsV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_loyalty_points.py b/amazon_paapi/sdk/models/offer_loyalty_points.py index f94ffbc..64725b9 100644 --- a/amazon_paapi/sdk/models/offer_loyalty_points.py +++ b/amazon_paapi/sdk/models/offer_loyalty_points.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_loyalty_points_v2.py b/amazon_paapi/sdk/models/offer_loyalty_points_v2.py new file mode 100644 index 0000000..f1897f6 --- /dev/null +++ b/amazon_paapi/sdk/models/offer_loyalty_points_v2.py @@ -0,0 +1,127 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OfferLoyaltyPointsV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'points': 'int' + } + + attribute_map = { + 'points': 'Points' + } + + def __init__(self, points=None): # noqa: E501 + """OfferLoyaltyPointsV2 - a model defined in Swagger""" # noqa: E501 + + self._points = None + self.discriminator = None + + if points is not None: + self.points = points + + @property + def points(self): + """Gets the points of this OfferLoyaltyPointsV2. # noqa: E501 + + + :return: The points of this OfferLoyaltyPointsV2. # noqa: E501 + :rtype: int + """ + return self._points + + @points.setter + def points(self, points): + """Sets the points of this OfferLoyaltyPointsV2. + + + :param points: The points of this OfferLoyaltyPointsV2. # noqa: E501 + :type: int + """ + + self._points = points + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferLoyaltyPointsV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferLoyaltyPointsV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_merchant_info.py b/amazon_paapi/sdk/models/offer_merchant_info.py index 3d0a614..4bbd8cb 100644 --- a/amazon_paapi/sdk/models/offer_merchant_info.py +++ b/amazon_paapi/sdk/models/offer_merchant_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_merchant_info_v2.py b/amazon_paapi/sdk/models/offer_merchant_info_v2.py new file mode 100644 index 0000000..ded5dd2 --- /dev/null +++ b/amazon_paapi/sdk/models/offer_merchant_info_v2.py @@ -0,0 +1,153 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OfferMerchantInfoV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'id': 'str' + } + + attribute_map = { + 'name': 'Name', + 'id': 'Id' + } + + def __init__(self, name=None, id=None): # noqa: E501 + """OfferMerchantInfoV2 - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._id = None + self.discriminator = None + + if name is not None: + self.name = name + if id is not None: + self.id = id + + @property + def name(self): + """Gets the name of this OfferMerchantInfoV2. # noqa: E501 + + + :return: The name of this OfferMerchantInfoV2. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this OfferMerchantInfoV2. + + + :param name: The name of this OfferMerchantInfoV2. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def id(self): + """Gets the id of this OfferMerchantInfoV2. # noqa: E501 + + + :return: The id of this OfferMerchantInfoV2. # noqa: E501 + :rtype: str + """ + return self._id + + @id.setter + def id(self, id): + """Sets the id of this OfferMerchantInfoV2. + + + :param id: The id of this OfferMerchantInfoV2. # noqa: E501 + :type: str + """ + + self._id = id + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferMerchantInfoV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferMerchantInfoV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_price.py b/amazon_paapi/sdk/models/offer_price.py index 926aeb0..068e4e1 100644 --- a/amazon_paapi/sdk/models/offer_price.py +++ b/amazon_paapi/sdk/models/offer_price.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .offer_savings import OfferSavings # noqa: F401,E501 -from .price_type import PriceType # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_savings import OfferSavings # noqa: F401,E501 +from amazon_paapi.sdk.models.price_type import PriceType # noqa: F401,E501 class OfferPrice(object): diff --git a/amazon_paapi/sdk/models/offer_price_v2.py b/amazon_paapi/sdk/models/offer_price_v2.py new file mode 100644 index 0000000..821487d --- /dev/null +++ b/amazon_paapi/sdk/models/offer_price_v2.py @@ -0,0 +1,209 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.money import Money # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_saving_basis import OfferSavingBasis # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_savings_v2 import OfferSavingsV2 # noqa: F401,E501 + + +class OfferPriceV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'money': 'Money', + 'price_per_unit': 'Money', + 'savings': 'OfferSavingsV2', + 'saving_basis': 'OfferSavingBasis' + } + + attribute_map = { + 'money': 'Money', + 'price_per_unit': 'PricePerUnit', + 'savings': 'Savings', + 'saving_basis': 'SavingBasis' + } + + def __init__(self, money=None, price_per_unit=None, savings=None, saving_basis=None): # noqa: E501 + """OfferPriceV2 - a model defined in Swagger""" # noqa: E501 + + self._money = None + self._price_per_unit = None + self._savings = None + self._saving_basis = None + self.discriminator = None + + if money is not None: + self.money = money + if price_per_unit is not None: + self.price_per_unit = price_per_unit + if savings is not None: + self.savings = savings + if saving_basis is not None: + self.saving_basis = saving_basis + + @property + def money(self): + """Gets the money of this OfferPriceV2. # noqa: E501 + + + :return: The money of this OfferPriceV2. # noqa: E501 + :rtype: Money + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this OfferPriceV2. + + + :param money: The money of this OfferPriceV2. # noqa: E501 + :type: Money + """ + + self._money = money + + @property + def price_per_unit(self): + """Gets the price_per_unit of this OfferPriceV2. # noqa: E501 + + + :return: The price_per_unit of this OfferPriceV2. # noqa: E501 + :rtype: Money + """ + return self._price_per_unit + + @price_per_unit.setter + def price_per_unit(self, price_per_unit): + """Sets the price_per_unit of this OfferPriceV2. + + + :param price_per_unit: The price_per_unit of this OfferPriceV2. # noqa: E501 + :type: Money + """ + + self._price_per_unit = price_per_unit + + @property + def savings(self): + """Gets the savings of this OfferPriceV2. # noqa: E501 + + + :return: The savings of this OfferPriceV2. # noqa: E501 + :rtype: OfferSavingsV2 + """ + return self._savings + + @savings.setter + def savings(self, savings): + """Sets the savings of this OfferPriceV2. + + + :param savings: The savings of this OfferPriceV2. # noqa: E501 + :type: OfferSavingsV2 + """ + + self._savings = savings + + @property + def saving_basis(self): + """Gets the saving_basis of this OfferPriceV2. # noqa: E501 + + + :return: The saving_basis of this OfferPriceV2. # noqa: E501 + :rtype: OfferSavingBasis + """ + return self._saving_basis + + @saving_basis.setter + def saving_basis(self, saving_basis): + """Sets the saving_basis of this OfferPriceV2. + + + :param saving_basis: The saving_basis of this OfferPriceV2. # noqa: E501 + :type: OfferSavingBasis + """ + + self._saving_basis = saving_basis + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferPriceV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferPriceV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_program_eligibility.py b/amazon_paapi/sdk/models/offer_program_eligibility.py index 2e253ed..4b890ca 100644 --- a/amazon_paapi/sdk/models/offer_program_eligibility.py +++ b/amazon_paapi/sdk/models/offer_program_eligibility.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_promotion.py b/amazon_paapi/sdk/models/offer_promotion.py index e5f522e..6987972 100644 --- a/amazon_paapi/sdk/models/offer_promotion.py +++ b/amazon_paapi/sdk/models/offer_promotion.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_saving_basis.py b/amazon_paapi/sdk/models/offer_saving_basis.py new file mode 100644 index 0000000..790ad1a --- /dev/null +++ b/amazon_paapi/sdk/models/offer_saving_basis.py @@ -0,0 +1,182 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.money import Money # noqa: F401,E501 +from amazon_paapi.sdk.models.saving_basis_type import SavingBasisType # noqa: F401,E501 + + +class OfferSavingBasis(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'money': 'Money', + 'saving_basis_type': 'SavingBasisType', + 'saving_basis_type_label': 'str' + } + + attribute_map = { + 'money': 'Money', + 'saving_basis_type': 'SavingBasisType', + 'saving_basis_type_label': 'SavingBasisTypeLabel' + } + + def __init__(self, money=None, saving_basis_type=None, saving_basis_type_label=None): # noqa: E501 + """OfferSavingBasis - a model defined in Swagger""" # noqa: E501 + + self._money = None + self._saving_basis_type = None + self._saving_basis_type_label = None + self.discriminator = None + + if money is not None: + self.money = money + if saving_basis_type is not None: + self.saving_basis_type = saving_basis_type + if saving_basis_type_label is not None: + self.saving_basis_type_label = saving_basis_type_label + + @property + def money(self): + """Gets the money of this OfferSavingBasis. # noqa: E501 + + + :return: The money of this OfferSavingBasis. # noqa: E501 + :rtype: Money + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this OfferSavingBasis. + + + :param money: The money of this OfferSavingBasis. # noqa: E501 + :type: Money + """ + + self._money = money + + @property + def saving_basis_type(self): + """Gets the saving_basis_type of this OfferSavingBasis. # noqa: E501 + + + :return: The saving_basis_type of this OfferSavingBasis. # noqa: E501 + :rtype: SavingBasisType + """ + return self._saving_basis_type + + @saving_basis_type.setter + def saving_basis_type(self, saving_basis_type): + """Sets the saving_basis_type of this OfferSavingBasis. + + + :param saving_basis_type: The saving_basis_type of this OfferSavingBasis. # noqa: E501 + :type: SavingBasisType + """ + + self._saving_basis_type = saving_basis_type + + @property + def saving_basis_type_label(self): + """Gets the saving_basis_type_label of this OfferSavingBasis. # noqa: E501 + + + :return: The saving_basis_type_label of this OfferSavingBasis. # noqa: E501 + :rtype: str + """ + return self._saving_basis_type_label + + @saving_basis_type_label.setter + def saving_basis_type_label(self, saving_basis_type_label): + """Sets the saving_basis_type_label of this OfferSavingBasis. + + + :param saving_basis_type_label: The saving_basis_type_label of this OfferSavingBasis. # noqa: E501 + :type: str + """ + + self._saving_basis_type_label = saving_basis_type_label + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferSavingBasis, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferSavingBasis): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_savings.py b/amazon_paapi/sdk/models/offer_savings.py index 4200240..e706ef7 100644 --- a/amazon_paapi/sdk/models/offer_savings.py +++ b/amazon_paapi/sdk/models/offer_savings.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_savings_v2.py b/amazon_paapi/sdk/models/offer_savings_v2.py new file mode 100644 index 0000000..876ec3d --- /dev/null +++ b/amazon_paapi/sdk/models/offer_savings_v2.py @@ -0,0 +1,155 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.money import Money # noqa: F401,E501 + + +class OfferSavingsV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'money': 'Money', + 'percentage': 'int' + } + + attribute_map = { + 'money': 'Money', + 'percentage': 'Percentage' + } + + def __init__(self, money=None, percentage=None): # noqa: E501 + """OfferSavingsV2 - a model defined in Swagger""" # noqa: E501 + + self._money = None + self._percentage = None + self.discriminator = None + + if money is not None: + self.money = money + if percentage is not None: + self.percentage = percentage + + @property + def money(self): + """Gets the money of this OfferSavingsV2. # noqa: E501 + + + :return: The money of this OfferSavingsV2. # noqa: E501 + :rtype: Money + """ + return self._money + + @money.setter + def money(self, money): + """Sets the money of this OfferSavingsV2. + + + :param money: The money of this OfferSavingsV2. # noqa: E501 + :type: Money + """ + + self._money = money + + @property + def percentage(self): + """Gets the percentage of this OfferSavingsV2. # noqa: E501 + + + :return: The percentage of this OfferSavingsV2. # noqa: E501 + :rtype: int + """ + return self._percentage + + @percentage.setter + def percentage(self, percentage): + """Sets the percentage of this OfferSavingsV2. + + + :param percentage: The percentage of this OfferSavingsV2. # noqa: E501 + :type: int + """ + + self._percentage = percentage + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferSavingsV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferSavingsV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offer_shipping_charge.py b/amazon_paapi/sdk/models/offer_shipping_charge.py index 1e9e17c..57d3f51 100644 --- a/amazon_paapi/sdk/models/offer_shipping_charge.py +++ b/amazon_paapi/sdk/models/offer_shipping_charge.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_sub_condition.py b/amazon_paapi/sdk/models/offer_sub_condition.py index d3d36e6..a4b0f7f 100644 --- a/amazon_paapi/sdk/models/offer_sub_condition.py +++ b/amazon_paapi/sdk/models/offer_sub_condition.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/offer_summary.py b/amazon_paapi/sdk/models/offer_summary.py index c834583..4eceaf8 100644 --- a/amazon_paapi/sdk/models/offer_summary.py +++ b/amazon_paapi/sdk/models/offer_summary.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .offer_condition import OfferCondition # noqa: F401,E501 -from .offer_price import OfferPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_condition import OfferCondition # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_price import OfferPrice # noqa: F401,E501 class OfferSummary(object): diff --git a/amazon_paapi/sdk/models/offer_type.py b/amazon_paapi/sdk/models/offer_type.py new file mode 100644 index 0000000..ad77e89 --- /dev/null +++ b/amazon_paapi/sdk/models/offer_type.py @@ -0,0 +1,105 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class OfferType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + SUBSCRIBE_AND_SAVE = "SUBSCRIBE_AND_SAVE" + LIGHTNING_DEAL = "LIGHTNING_DEAL" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """OfferType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OfferType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OfferType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/offers.py b/amazon_paapi/sdk/models/offers.py index 5e38c4d..16c4ca8 100644 --- a/amazon_paapi/sdk/models/offers.py +++ b/amazon_paapi/sdk/models/offers.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .offer_listing import OfferListing # noqa: F401,E501 -from .offer_summary import OfferSummary # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_listing import OfferListing # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_summary import OfferSummary # noqa: F401,E501 class Offers(object): diff --git a/amazon_paapi/sdk/models/offers_v2.py b/amazon_paapi/sdk/models/offers_v2.py new file mode 100644 index 0000000..a611a1f --- /dev/null +++ b/amazon_paapi/sdk/models/offers_v2.py @@ -0,0 +1,129 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + +from amazon_paapi.sdk.models.offer_listings_v2 import OfferListingV2 # noqa: F401,E501 + + +class OffersV2(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'listings': 'list[OfferListingV2]' + } + + attribute_map = { + 'listings': 'Listings' + } + + def __init__(self, listings=None): # noqa: E501 + """OffersV2 - a model defined in Swagger""" # noqa: E501 + + self._listings = None + self.discriminator = None + + if listings is not None: + self.listings = listings + + @property + def listings(self): + """Gets the listings of this OffersV2. # noqa: E501 + + + :return: The listings of this OffersV2. # noqa: E501 + :rtype: OfferListingsV2 + """ + return self._listings + + @listings.setter + def listings(self, listings): + """Sets the listings of this OffersV2. + + + :param listings: The listings of this OffersV2. # noqa: E501 + :type: OfferListingsV2 + """ + + self._listings = listings + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(OffersV2, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, OffersV2): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/partner_type.py b/amazon_paapi/sdk/models/partner_type.py index 3e974f2..11c7fb1 100644 --- a/amazon_paapi/sdk/models/partner_type.py +++ b/amazon_paapi/sdk/models/partner_type.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/price.py b/amazon_paapi/sdk/models/price.py index 08db8fe..d982ab9 100644 --- a/amazon_paapi/sdk/models/price.py +++ b/amazon_paapi/sdk/models/price.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .offer_price import OfferPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_price import OfferPrice # noqa: F401,E501 class Price(object): diff --git a/amazon_paapi/sdk/models/price_type.py b/amazon_paapi/sdk/models/price_type.py index edddd1d..563aad3 100644 --- a/amazon_paapi/sdk/models/price_type.py +++ b/amazon_paapi/sdk/models/price_type.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/product_advertising_api_client_exception.py b/amazon_paapi/sdk/models/product_advertising_api_client_exception.py index c58001e..e37af39 100644 --- a/amazon_paapi/sdk/models/product_advertising_api_client_exception.py +++ b/amazon_paapi/sdk/models/product_advertising_api_client_exception.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .error_data import ErrorData # noqa: F401,E501 +from amazon_paapi.sdk.models.error_data import ErrorData # noqa: F401,E501 class ProductAdvertisingAPIClientException(object): diff --git a/amazon_paapi/sdk/models/product_advertising_api_service_exception.py b/amazon_paapi/sdk/models/product_advertising_api_service_exception.py index ab67fe7..efde7f4 100644 --- a/amazon_paapi/sdk/models/product_advertising_api_service_exception.py +++ b/amazon_paapi/sdk/models/product_advertising_api_service_exception.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/product_info.py b/amazon_paapi/sdk/models/product_info.py index fbd056a..7bb893d 100644 --- a/amazon_paapi/sdk/models/product_info.py +++ b/amazon_paapi/sdk/models/product_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,10 +28,10 @@ import six -from .dimension_based_attribute import DimensionBasedAttribute # noqa: F401,E501 -from .single_boolean_valued_attribute import SingleBooleanValuedAttribute # noqa: F401,E501 -from .single_integer_valued_attribute import SingleIntegerValuedAttribute # noqa: F401,E501 -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.dimension_based_attribute import DimensionBasedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_boolean_valued_attribute import SingleBooleanValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_integer_valued_attribute import SingleIntegerValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class ProductInfo(object): diff --git a/amazon_paapi/sdk/models/properties.py b/amazon_paapi/sdk/models/properties.py index 39b34cd..c380967 100644 --- a/amazon_paapi/sdk/models/properties.py +++ b/amazon_paapi/sdk/models/properties.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/rating.py b/amazon_paapi/sdk/models/rating.py index 063c19a..c585c60 100644 --- a/amazon_paapi/sdk/models/rating.py +++ b/amazon_paapi/sdk/models/rating.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/refinement.py b/amazon_paapi/sdk/models/refinement.py index edb536d..92ac4b2 100644 --- a/amazon_paapi/sdk/models/refinement.py +++ b/amazon_paapi/sdk/models/refinement.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .refinement_bin import RefinementBin # noqa: F401,E501 +from amazon_paapi.sdk.models.refinement_bin import RefinementBin # noqa: F401,E501 class Refinement(object): diff --git a/amazon_paapi/sdk/models/refinement_bin.py b/amazon_paapi/sdk/models/refinement_bin.py index 7158e2a..7ba9c8f 100644 --- a/amazon_paapi/sdk/models/refinement_bin.py +++ b/amazon_paapi/sdk/models/refinement_bin.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/rental_offer_listing.py b/amazon_paapi/sdk/models/rental_offer_listing.py index 239775f..6cb9e43 100644 --- a/amazon_paapi/sdk/models/rental_offer_listing.py +++ b/amazon_paapi/sdk/models/rental_offer_listing.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,11 +28,11 @@ import six -from .duration_price import DurationPrice # noqa: F401,E501 -from .offer_availability import OfferAvailability # noqa: F401,E501 -from .offer_condition import OfferCondition # noqa: F401,E501 -from .offer_delivery_info import OfferDeliveryInfo # noqa: F401,E501 -from .offer_merchant_info import OfferMerchantInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.duration_price import DurationPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_availability import OfferAvailability # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_condition import OfferCondition # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_delivery_info import OfferDeliveryInfo # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_merchant_info import OfferMerchantInfo # noqa: F401,E501 class RentalOfferListing(object): diff --git a/amazon_paapi/sdk/models/rental_offers.py b/amazon_paapi/sdk/models/rental_offers.py index 6fefcb2..55b0f39 100644 --- a/amazon_paapi/sdk/models/rental_offers.py +++ b/amazon_paapi/sdk/models/rental_offers.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .rental_offer_listing import RentalOfferListing # noqa: F401,E501 +from amazon_paapi.sdk.models.rental_offer_listing import RentalOfferListing # noqa: F401,E501 class RentalOffers(object): diff --git a/amazon_paapi/sdk/models/saving_basis_type.py b/amazon_paapi/sdk/models/saving_basis_type.py new file mode 100644 index 0000000..eedfd4f --- /dev/null +++ b/amazon_paapi/sdk/models/saving_basis_type.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SavingBasisType(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + allowed enum values + """ + LIST_PRICE = "LIST_PRICE" + LOWEST_PRICE = "LOWEST_PRICE" + LOWEST_PRICE_STRIKETHROUGH = "LOWEST_PRICE_STRIKETHROUGH" + WAS_PRICE = "WAS_PRICE" + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """SavingBasisType - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SavingBasisType, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SavingBasisType): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/search_index.py b/amazon_paapi/sdk/models/search_index.py new file mode 100644 index 0000000..1e6637b --- /dev/null +++ b/amazon_paapi/sdk/models/search_index.py @@ -0,0 +1,99 @@ +# coding: utf-8 + +""" + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. + + Licensed under the Apache License, Version 2.0 (the "License"). + You may not use this file except in compliance with the License. + A copy of the License is located at + + http://www.apache.org/licenses/LICENSE-2.0 + + or in the "license" file accompanying this file. This file is distributed + on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + express or implied. See the License for the specific language governing + permissions and limitations under the License. +""" + + +""" + ProductAdvertisingAPI + + https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 +""" + + +import pprint +import re # noqa: F401 + +import six + + +class SearchIndex(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """SearchIndex - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(SearchIndex, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, SearchIndex): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/amazon_paapi/sdk/models/search_items_request.py b/amazon_paapi/sdk/models/search_items_request.py index a8c74da..34083c7 100644 --- a/amazon_paapi/sdk/models/search_items_request.py +++ b/amazon_paapi/sdk/models/search_items_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,19 +28,19 @@ import six -from .availability import Availability # noqa: F401,E501 -from .condition import Condition # noqa: F401,E501 -from .delivery_flag import DeliveryFlag # noqa: F401,E501 -from .max_price import MaxPrice # noqa: F401,E501 -from .merchant import Merchant # noqa: F401,E501 -from .min_price import MinPrice # noqa: F401,E501 -from .min_reviews_rating import MinReviewsRating # noqa: F401,E501 -from .min_saving_percent import MinSavingPercent # noqa: F401,E501 -from .offer_count import OfferCount # noqa: F401,E501 -from .partner_type import PartnerType # noqa: F401,E501 -from .properties import Properties # noqa: F401,E501 -from .search_items_resource import SearchItemsResource # noqa: F401,E501 -from .sort_by import SortBy # noqa: F401,E501 +from amazon_paapi.sdk.models.availability import Availability # noqa: F401,E501 +from amazon_paapi.sdk.models.condition import Condition # noqa: F401,E501 +from amazon_paapi.sdk.models.delivery_flag import DeliveryFlag # noqa: F401,E501 +from amazon_paapi.sdk.models.max_price import MaxPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.merchant import Merchant # noqa: F401,E501 +from amazon_paapi.sdk.models.min_price import MinPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.min_reviews_rating import MinReviewsRating # noqa: F401,E501 +from amazon_paapi.sdk.models.min_saving_percent import MinSavingPercent # noqa: F401,E501 +from amazon_paapi.sdk.models.offer_count import OfferCount # noqa: F401,E501 +from amazon_paapi.sdk.models.partner_type import PartnerType # noqa: F401,E501 +from amazon_paapi.sdk.models.properties import Properties # noqa: F401,E501 +from amazon_paapi.sdk.models.search_items_resource import SearchItemsResource # noqa: F401,E501 +from amazon_paapi.sdk.models.sort_by import SortBy # noqa: F401,E501 class SearchItemsRequest(object): diff --git a/amazon_paapi/sdk/models/search_items_resource.py b/amazon_paapi/sdk/models/search_items_resource.py index 5746772..36852c0 100644 --- a/amazon_paapi/sdk/models/search_items_resource.py +++ b/amazon_paapi/sdk/models/search_items_resource.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -83,6 +83,14 @@ class SearchItemsResource(object): OFFERS_SUMMARIES_HIGHESTPRICE = "Offers.Summaries.HighestPrice" OFFERS_SUMMARIES_LOWESTPRICE = "Offers.Summaries.LowestPrice" OFFERS_SUMMARIES_OFFERCOUNT = "Offers.Summaries.OfferCount" + OFFERSV2_LISTINGS_AVAILABILITY = "OffersV2.Listings.Availability" + OFFERSV2_LISTINGS_CONDITION = "OffersV2.Listings.Condition" + OFFERSV2_LISTINGS_DEALDETAILS = "OffersV2.Listings.DealDetails" + OFFERSV2_LISTINGS_ISBUYBOXWINNER = "OffersV2.Listings.IsBuyBoxWinner" + OFFERSV2_LISTINGS_LOYALTYPOINTS = "OffersV2.Listings.LoyaltyPoints" + OFFERSV2_LISTINGS_MERCHANTINFO = "OffersV2.Listings.MerchantInfo" + OFFERSV2_LISTINGS_PRICE = "OffersV2.Listings.Price" + OFFERSV2_LISTINGS_TYPE = "OffersV2.Listings.Type" PARENTASIN = "ParentASIN" RENTALOFFERS_LISTINGS_AVAILABILITY_MAXORDERQUANTITY = "RentalOffers.Listings.Availability.MaxOrderQuantity" RENTALOFFERS_LISTINGS_AVAILABILITY_MESSAGE = "RentalOffers.Listings.Availability.Message" diff --git a/amazon_paapi/sdk/models/search_items_response.py b/amazon_paapi/sdk/models/search_items_response.py index 34727b5..6db0a3a 100644 --- a/amazon_paapi/sdk/models/search_items_response.py +++ b/amazon_paapi/sdk/models/search_items_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .error_data import ErrorData # noqa: F401,E501 -from .search_result import SearchResult # noqa: F401,E501 +from amazon_paapi.sdk.models.error_data import ErrorData # noqa: F401,E501 +from amazon_paapi.sdk.models.search_result import SearchResult # noqa: F401,E501 class SearchItemsResponse(object): diff --git a/amazon_paapi/sdk/models/search_refinements.py b/amazon_paapi/sdk/models/search_refinements.py index 7722283..143b929 100644 --- a/amazon_paapi/sdk/models/search_refinements.py +++ b/amazon_paapi/sdk/models/search_refinements.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .refinement import Refinement # noqa: F401,E501 +from amazon_paapi.sdk.models.refinement import Refinement # noqa: F401,E501 class SearchRefinements(object): diff --git a/amazon_paapi/sdk/models/search_result.py b/amazon_paapi/sdk/models/search_result.py index 27a3b99..e11c5c0 100644 --- a/amazon_paapi/sdk/models/search_result.py +++ b/amazon_paapi/sdk/models/search_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .item import Item # noqa: F401,E501 -from .search_refinements import SearchRefinements # noqa: F401,E501 +from amazon_paapi.sdk.models.item import Item # noqa: F401,E501 +from amazon_paapi.sdk.models.search_refinements import SearchRefinements # noqa: F401,E501 class SearchResult(object): diff --git a/amazon_paapi/sdk/models/single_boolean_valued_attribute.py b/amazon_paapi/sdk/models/single_boolean_valued_attribute.py index 99757e5..2c8c9c6 100644 --- a/amazon_paapi/sdk/models/single_boolean_valued_attribute.py +++ b/amazon_paapi/sdk/models/single_boolean_valued_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/single_integer_valued_attribute.py b/amazon_paapi/sdk/models/single_integer_valued_attribute.py index f973d94..6fa1e4a 100644 --- a/amazon_paapi/sdk/models/single_integer_valued_attribute.py +++ b/amazon_paapi/sdk/models/single_integer_valued_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/single_string_valued_attribute.py b/amazon_paapi/sdk/models/single_string_valued_attribute.py index e97ce93..3cdd8bd 100644 --- a/amazon_paapi/sdk/models/single_string_valued_attribute.py +++ b/amazon_paapi/sdk/models/single_string_valued_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/sort_by.py b/amazon_paapi/sdk/models/sort_by.py index 3cc3ac1..8c925d3 100644 --- a/amazon_paapi/sdk/models/sort_by.py +++ b/amazon_paapi/sdk/models/sort_by.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/technical_info.py b/amazon_paapi/sdk/models/technical_info.py index 11e0b18..5e878d2 100644 --- a/amazon_paapi/sdk/models/technical_info.py +++ b/amazon_paapi/sdk/models/technical_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .multi_valued_attribute import MultiValuedAttribute # noqa: F401,E501 -from .single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.multi_valued_attribute import MultiValuedAttribute # noqa: F401,E501 +from amazon_paapi.sdk.models.single_string_valued_attribute import SingleStringValuedAttribute # noqa: F401,E501 class TechnicalInfo(object): diff --git a/amazon_paapi/sdk/models/trade_in_info.py b/amazon_paapi/sdk/models/trade_in_info.py index d7caf2b..9dd7a54 100644 --- a/amazon_paapi/sdk/models/trade_in_info.py +++ b/amazon_paapi/sdk/models/trade_in_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,7 +28,7 @@ import six -from .trade_in_price import TradeInPrice # noqa: F401,E501 +from amazon_paapi.sdk.models.trade_in_price import TradeInPrice # noqa: F401,E501 class TradeInInfo(object): diff --git a/amazon_paapi/sdk/models/trade_in_price.py b/amazon_paapi/sdk/models/trade_in_price.py index c5cc9f2..3c84b4d 100644 --- a/amazon_paapi/sdk/models/trade_in_price.py +++ b/amazon_paapi/sdk/models/trade_in_price.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/unit_based_attribute.py b/amazon_paapi/sdk/models/unit_based_attribute.py index 8d55764..825fb39 100644 --- a/amazon_paapi/sdk/models/unit_based_attribute.py +++ b/amazon_paapi/sdk/models/unit_based_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/variation_attribute.py b/amazon_paapi/sdk/models/variation_attribute.py index 975c10f..404abaf 100644 --- a/amazon_paapi/sdk/models/variation_attribute.py +++ b/amazon_paapi/sdk/models/variation_attribute.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/variation_dimension.py b/amazon_paapi/sdk/models/variation_dimension.py index 5d15497..52aa1d5 100644 --- a/amazon_paapi/sdk/models/variation_dimension.py +++ b/amazon_paapi/sdk/models/variation_dimension.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/models/variation_summary.py b/amazon_paapi/sdk/models/variation_summary.py index 76738d0..adf5355 100644 --- a/amazon_paapi/sdk/models/variation_summary.py +++ b/amazon_paapi/sdk/models/variation_summary.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .price import Price # noqa: F401,E501 -from .variation_dimension import VariationDimension # noqa: F401,E501 +from amazon_paapi.sdk.models.price import Price # noqa: F401,E501 +from amazon_paapi.sdk.models.variation_dimension import VariationDimension # noqa: F401,E501 class VariationSummary(object): diff --git a/amazon_paapi/sdk/models/variations_result.py b/amazon_paapi/sdk/models/variations_result.py index 3e9a849..a086527 100644 --- a/amazon_paapi/sdk/models/variations_result.py +++ b/amazon_paapi/sdk/models/variations_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -28,8 +28,8 @@ import six -from .item import Item # noqa: F401,E501 -from .variation_summary import VariationSummary # noqa: F401,E501 +from amazon_paapi.sdk.models.item import Item # noqa: F401,E501 +from amazon_paapi.sdk.models.variation_summary import VariationSummary # noqa: F401,E501 class VariationsResult(object): diff --git a/amazon_paapi/sdk/models/website_sales_rank.py b/amazon_paapi/sdk/models/website_sales_rank.py index dac1891..c2b0dd7 100644 --- a/amazon_paapi/sdk/models/website_sales_rank.py +++ b/amazon_paapi/sdk/models/website_sales_rank.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. diff --git a/amazon_paapi/sdk/rest.py b/amazon_paapi/sdk/rest.py index ed043e6..99f57bb 100644 --- a/amazon_paapi/sdk/rest.py +++ b/amazon_paapi/sdk/rest.py @@ -5,7 +5,7 @@ from __future__ import absolute_import """ - Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + Copyright 2024 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with the License. @@ -25,7 +25,6 @@ https://webservices.amazon.com/paapi5/documentation/index.html # noqa: E501 """ - import io import json import logging