# coding: utf-8

"""
    The Selling Partner API for CustomerFeedback

    The Selling Partner API for Customer Feedback (Customer Feedback API) provides information about customer reviews and returns at both the item and browse node level.

    The version of the OpenAPI document: 2024-06-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from spapi.api_client import ApiClient


class CustomerFeedbackApi(object):
    """NOTE: This class is auto generated by the openapi generator.

    Do not edit the class manually.
    """

    api_models_module = "spapi.models.customer_feedback_2024_06_01"

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client
        self.classFileName = 'customer_feedback_api'

    def get_browse_node_return_topics(self, browse_node_id, marketplace_id, **kwargs):  # noqa: E501
        """get_browse_node_return_topics  # noqa: E501

        Retrieve the topics that customers mention when they return items in a browse node.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_return_topics(browse_node_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: BrowseNodeReturnTopicsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_browse_node_return_topics_with_http_info(browse_node_id, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_browse_node_return_topics_with_http_info(browse_node_id, marketplace_id, **kwargs)  # noqa: E501
            return data

    def get_browse_node_return_topics_with_http_info(self, browse_node_id, marketplace_id, **kwargs):  # noqa: E501
        """get_browse_node_return_topics  # noqa: E501

        Retrieve the topics that customers mention when they return items in a browse node.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_return_topics_with_http_info(browse_node_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: A browse node ID is a unique identifier for a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: BrowseNodeReturnTopicsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['browse_node_id', 'marketplace_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_browse_node_return_topics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'browse_node_id' is set
        if self.api_client.client_side_validation and ('browse_node_id' not in params or
                                                       params['browse_node_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `browse_node_id` when calling `get_browse_node_return_topics`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_browse_node_return_topics`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'browse_node_id' in params:
            path_params['browseNodeId'] = params['browse_node_id']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/returns/topics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BrowseNodeReturnTopicsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_browse_node_return_trends(self, browse_node_id, marketplace_id, **kwargs):  # noqa: E501
        """get_browse_node_return_trends  # noqa: E501

        Retrieve the trends of topics that customers mention when they return items in a browse node.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_return_trends(browse_node_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: BrowseNodeReturnTrendsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_browse_node_return_trends_with_http_info(browse_node_id, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_browse_node_return_trends_with_http_info(browse_node_id, marketplace_id, **kwargs)  # noqa: E501
            return data

    def get_browse_node_return_trends_with_http_info(self, browse_node_id, marketplace_id, **kwargs):  # noqa: E501
        """get_browse_node_return_trends  # noqa: E501

        Retrieve the trends of topics that customers mention when they return items in a browse node.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_return_trends_with_http_info(browse_node_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: BrowseNodeReturnTrendsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['browse_node_id', 'marketplace_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_browse_node_return_trends" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'browse_node_id' is set
        if self.api_client.client_side_validation and ('browse_node_id' not in params or
                                                       params['browse_node_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `browse_node_id` when calling `get_browse_node_return_trends`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_browse_node_return_trends`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'browse_node_id' in params:
            path_params['browseNodeId'] = params['browse_node_id']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/returns/trends', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BrowseNodeReturnTrendsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_browse_node_review_topics(self, browse_node_id, marketplace_id, sort_by, **kwargs):  # noqa: E501
        """get_browse_node_review_topics  # noqa: E501

        Retrieve a browse node's ten most positive and ten most negative review topics.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_review_topics(browse_node_id, marketplace_id, sort_by, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :param str sort_by: The metric by which to sort the data in the response. (required)
        :return: BrowseNodeReviewTopicsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_browse_node_review_topics_with_http_info(browse_node_id, marketplace_id, sort_by, **kwargs)  # noqa: E501
        else:
            (data) = self.get_browse_node_review_topics_with_http_info(browse_node_id, marketplace_id, sort_by, **kwargs)  # noqa: E501
            return data

    def get_browse_node_review_topics_with_http_info(self, browse_node_id, marketplace_id, sort_by, **kwargs):  # noqa: E501
        """get_browse_node_review_topics  # noqa: E501

        Retrieve a browse node's ten most positive and ten most negative review topics.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_review_topics_with_http_info(browse_node_id, marketplace_id, sort_by, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: The ID of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :param str sort_by: The metric by which to sort the data in the response. (required)
        :return: BrowseNodeReviewTopicsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['browse_node_id', 'marketplace_id', 'sort_by']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_browse_node_review_topics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'browse_node_id' is set
        if self.api_client.client_side_validation and ('browse_node_id' not in params or
                                                       params['browse_node_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `browse_node_id` when calling `get_browse_node_review_topics`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_browse_node_review_topics`")  # noqa: E501
        # verify the required parameter 'sort_by' is set
        if self.api_client.client_side_validation and ('sort_by' not in params or
                                                       params['sort_by'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `sort_by` when calling `get_browse_node_review_topics`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'browse_node_id' in params:
            path_params['browseNodeId'] = params['browse_node_id']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/reviews/topics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BrowseNodeReviewTopicsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_browse_node_review_trends(self, browse_node_id, marketplace_id, **kwargs):  # noqa: E501
        """get_browse_node_review_trends  # noqa: E501

        Retrieve the positive and negative review trends of items in a browse node for the past six months.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_review_trends(browse_node_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: BrowseNodeReviewTrendsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_browse_node_review_trends_with_http_info(browse_node_id, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_browse_node_review_trends_with_http_info(browse_node_id, marketplace_id, **kwargs)  # noqa: E501
            return data

    def get_browse_node_review_trends_with_http_info(self, browse_node_id, marketplace_id, **kwargs):  # noqa: E501
        """get_browse_node_review_trends  # noqa: E501

        Retrieve the positive and negative review trends of items in a browse node for the past six months.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_browse_node_review_trends_with_http_info(browse_node_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str browse_node_id: A browse node ID is a unique identifier of a browse node. A browse node is a named location in a browse tree that is used for navigation, product classification, and website content. (required)
        :param str marketplace_id: The marketplace ID is the globally unique identifier of a marketplace. For more information, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: BrowseNodeReviewTrendsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['browse_node_id', 'marketplace_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_browse_node_review_trends" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'browse_node_id' is set
        if self.api_client.client_side_validation and ('browse_node_id' not in params or
                                                       params['browse_node_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `browse_node_id` when calling `get_browse_node_review_trends`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_browse_node_review_trends`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'browse_node_id' in params:
            path_params['browseNodeId'] = params['browse_node_id']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/browseNodes/{browseNodeId}/reviews/trends', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BrowseNodeReviewTrendsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_item_browse_node(self, asin, marketplace_id, **kwargs):  # noqa: E501
        """get_item_browse_node  # noqa: E501

        This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_item_browse_node(asin, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: BrowseNodeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_item_browse_node_with_http_info(asin, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_item_browse_node_with_http_info(asin, marketplace_id, **kwargs)  # noqa: E501
            return data

    def get_item_browse_node_with_http_info(self, asin, marketplace_id, **kwargs):  # noqa: E501
        """get_item_browse_node  # noqa: E501

        This API returns the associated browse node of the requested ASIN. A browse node is a location in a browse tree that is used for navigation, product classification, and website content on the Amazon retail website.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_item_browse_node_with_http_info(asin, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: BrowseNodeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asin', 'marketplace_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_item_browse_node" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asin' is set
        if self.api_client.client_side_validation and ('asin' not in params or
                                                       params['asin'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `asin` when calling `get_item_browse_node`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_item_browse_node`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asin' in params:
            path_params['asin'] = params['asin']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/items/{asin}/browseNode', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='BrowseNodeResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_item_review_topics(self, asin, marketplace_id, sort_by, **kwargs):  # noqa: E501
        """get_item_review_topics  # noqa: E501

        Retrieve an item's ten most positive and ten most negative review topics.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_item_review_topics(asin, marketplace_id, sort_by, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :param str sort_by: The metric by which to sort data in the response. (required)
        :return: ItemReviewTopicsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_item_review_topics_with_http_info(asin, marketplace_id, sort_by, **kwargs)  # noqa: E501
        else:
            (data) = self.get_item_review_topics_with_http_info(asin, marketplace_id, sort_by, **kwargs)  # noqa: E501
            return data

    def get_item_review_topics_with_http_info(self, asin, marketplace_id, sort_by, **kwargs):  # noqa: E501
        """get_item_review_topics  # noqa: E501

        Retrieve an item's ten most positive and ten most negative review topics.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_item_review_topics_with_http_info(asin, marketplace_id, sort_by, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. The value must be a child ASIN. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :param str sort_by: The metric by which to sort data in the response. (required)
        :return: ItemReviewTopicsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asin', 'marketplace_id', 'sort_by']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_item_review_topics" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asin' is set
        if self.api_client.client_side_validation and ('asin' not in params or
                                                       params['asin'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `asin` when calling `get_item_review_topics`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_item_review_topics`")  # noqa: E501
        # verify the required parameter 'sort_by' is set
        if self.api_client.client_side_validation and ('sort_by' not in params or
                                                       params['sort_by'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `sort_by` when calling `get_item_review_topics`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asin' in params:
            path_params['asin'] = params['asin']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/items/{asin}/reviews/topics', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ItemReviewTopicsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_item_review_trends(self, asin, marketplace_id, **kwargs):  # noqa: E501
        """get_item_review_trends  # noqa: E501

        Retrieve an item's positive and negative review trends for the past six months.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_item_review_trends(asin, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: ItemReviewTrendsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_item_review_trends_with_http_info(asin, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_item_review_trends_with_http_info(asin, marketplace_id, **kwargs)  # noqa: E501
            return data

    def get_item_review_trends_with_http_info(self, asin, marketplace_id, **kwargs):  # noqa: E501
        """get_item_review_trends  # noqa: E501

        Retrieve an item's positive and negative review trends for the past six months.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.get_item_review_trends_with_http_info(asin, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str asin: The Amazon Standard Identification Number (ASIN) is the unique identifier of a product within a marketplace. This API takes child ASIN as an input. (required)
        :param str marketplace_id: The MarketplaceId is the globally unique identifier of a marketplace, you can refer to the marketplaceId here : https://developer-docs.amazon.com/sp-api/docs/marketplace-ids. (required)
        :return: ItemReviewTrendsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['asin', 'marketplace_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_item_review_trends" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'asin' is set
        if self.api_client.client_side_validation and ('asin' not in params or
                                                       params['asin'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `asin` when calling `get_item_review_trends`")  # noqa: E501
        # verify the required parameter 'marketplace_id' is set
        if self.api_client.client_side_validation and ('marketplace_id' not in params or
                                                       params['marketplace_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_id` when calling `get_item_review_trends`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'asin' in params:
            path_params['asin'] = params['asin']  # noqa: E501

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/customerFeedback/2024-06-01/items/{asin}/reviews/trends', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ItemReviewTrendsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)
