# coding: utf-8

"""
    Selling Partner API for Messaging

    With the Messaging API you can build applications that send messages to buyers. You can get a list of message types that are available for an order that you specify, then call an operation that sends a message to the buyer for that order. The Messaging API returns responses that are formed according to the <a href=https://tools.ietf.org/html/draft-kelly-json-hal-08>JSON Hypertext Application Language</a> (HAL) standard.

    The version of the OpenAPI document: v1
    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 MessagingApi(object):
    """NOTE: This class is auto generated by the openapi generator.

    Do not edit the class manually.
    """

    api_models_module = "spapi.models.messaging_v1"

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

    def confirm_customization_details(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """confirm_customization_details  # noqa: E501

        Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.confirm_customization_details(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmCustomizationDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmCustomizationDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.confirm_customization_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.confirm_customization_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def confirm_customization_details_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """confirm_customization_details  # noqa: E501

        Sends a message asking a buyer to provide or verify customization details such as name spelling, images, initials, etc.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.confirm_customization_details_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmCustomizationDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmCustomizationDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 confirm_customization_details" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `confirm_customization_details`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `confirm_customization_details`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `confirm_customization_details`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `confirm_customization_details`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/confirmCustomizationDetails', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateConfirmCustomizationDetailsResponse',  # 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 create_amazon_motors(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_amazon_motors  # noqa: E501

        Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_amazon_motors(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateAmazonMotorsRequest body: This contains the message body for a message. (required)
        :return: CreateAmazonMotorsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_amazon_motors_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_amazon_motors_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_amazon_motors_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_amazon_motors  # noqa: E501

        Sends a message to a buyer to provide details about an Amazon Motors order. This message can only be sent by Amazon Motors sellers.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_amazon_motors_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateAmazonMotorsRequest body: This contains the message body for a message. (required)
        :return: CreateAmazonMotorsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_amazon_motors" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_amazon_motors`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_amazon_motors`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_amazon_motors`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_amazon_motors`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/amazonMotors', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateAmazonMotorsResponse',  # 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 create_confirm_delivery_details(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_confirm_delivery_details  # noqa: E501

        Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_confirm_delivery_details(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmDeliveryDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmDeliveryDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_confirm_delivery_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_confirm_delivery_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_confirm_delivery_details_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_confirm_delivery_details  # noqa: E501

        Sends a message to a buyer to arrange a delivery or to confirm contact information for making a delivery.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_confirm_delivery_details_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmDeliveryDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmDeliveryDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_confirm_delivery_details" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_confirm_delivery_details`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_confirm_delivery_details`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_confirm_delivery_details`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_confirm_delivery_details`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/confirmDeliveryDetails', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateConfirmDeliveryDetailsResponse',  # 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 create_confirm_order_details(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_confirm_order_details  # noqa: E501

        Sends a message to ask a buyer an order-related question prior to shipping their order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_confirm_order_details(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmOrderDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmOrderDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_confirm_order_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_confirm_order_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_confirm_order_details_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_confirm_order_details  # noqa: E501

        Sends a message to ask a buyer an order-related question prior to shipping their order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_confirm_order_details_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmOrderDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmOrderDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_confirm_order_details" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_confirm_order_details`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_confirm_order_details`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_confirm_order_details`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_confirm_order_details`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/confirmOrderDetails', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateConfirmOrderDetailsResponse',  # 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 create_confirm_service_details(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_confirm_service_details  # noqa: E501

        Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_confirm_service_details(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmServiceDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmServiceDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_confirm_service_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_confirm_service_details_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_confirm_service_details_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_confirm_service_details  # noqa: E501

        Sends a message to contact a Home Service customer to arrange a service call or to gather information prior to a service call.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_confirm_service_details_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateConfirmServiceDetailsRequest body: This contains the message body for a message. (required)
        :return: CreateConfirmServiceDetailsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_confirm_service_details" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_confirm_service_details`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_confirm_service_details`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_confirm_service_details`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_confirm_service_details`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/confirmServiceDetails', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateConfirmServiceDetailsResponse',  # 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 create_digital_access_key(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_digital_access_key  # noqa: E501

        Sends a buyer a message to share a digital access key that is required to utilize digital content in their order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_digital_access_key(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateDigitalAccessKeyRequest body: This contains the message body for a message. (required)
        :return: CreateDigitalAccessKeyResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_digital_access_key_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_digital_access_key_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_digital_access_key_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_digital_access_key  # noqa: E501

        Sends a buyer a message to share a digital access key that is required to utilize digital content in their order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_digital_access_key_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateDigitalAccessKeyRequest body: This contains the message body for a message. (required)
        :return: CreateDigitalAccessKeyResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_digital_access_key" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_digital_access_key`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_digital_access_key`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_digital_access_key`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_digital_access_key`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/digitalAccessKey', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateDigitalAccessKeyResponse',  # 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 create_legal_disclosure(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_legal_disclosure  # noqa: E501

        Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_legal_disclosure(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateLegalDisclosureRequest body: This contains the message body for a message. (required)
        :return: CreateLegalDisclosureResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_legal_disclosure_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_legal_disclosure_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_legal_disclosure_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_legal_disclosure  # noqa: E501

        Sends a critical message that contains documents that a seller is legally obligated to provide to the buyer. This message should only be used to deliver documents that are required by law.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_legal_disclosure_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateLegalDisclosureRequest body: This contains the message body for a message. (required)
        :return: CreateLegalDisclosureResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_legal_disclosure" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_legal_disclosure`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_legal_disclosure`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_legal_disclosure`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_legal_disclosure`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateLegalDisclosureResponse',  # 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 create_negative_feedback_removal(self, amazon_order_id, marketplace_ids, **kwargs):  # noqa: E501
        """create_negative_feedback_removal  # noqa: E501

        Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer's problem.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_negative_feedback_removal(amazon_order_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :return: CreateNegativeFeedbackRemovalResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_negative_feedback_removal_with_http_info(amazon_order_id, marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.create_negative_feedback_removal_with_http_info(amazon_order_id, marketplace_ids, **kwargs)  # noqa: E501
            return data

    def create_negative_feedback_removal_with_http_info(self, amazon_order_id, marketplace_ids, **kwargs):  # noqa: E501
        """create_negative_feedback_removal  # noqa: E501

        Sends a non-critical message that asks a buyer to remove their negative feedback. This message should only be sent after the seller has resolved the buyer's problem.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_negative_feedback_removal_with_http_info(amazon_order_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :return: CreateNegativeFeedbackRemovalResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids']  # 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 create_negative_feedback_removal" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_negative_feedback_removal`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_negative_feedback_removal`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_negative_feedback_removal`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # 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/hal+json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/negativeFeedbackRemoval', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateNegativeFeedbackRemovalResponse',  # 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 create_unexpected_problem(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_unexpected_problem  # noqa: E501

        Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_unexpected_problem(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateUnexpectedProblemRequest body: This contains the message body for a message. (required)
        :return: CreateUnexpectedProblemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_unexpected_problem_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_unexpected_problem_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_unexpected_problem_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_unexpected_problem  # noqa: E501

        Sends a critical message to a buyer that an unexpected problem was encountered affecting the completion of the order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_unexpected_problem_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateUnexpectedProblemRequest body: This contains the message body for a message. (required)
        :return: CreateUnexpectedProblemResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_unexpected_problem" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_unexpected_problem`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_unexpected_problem`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_unexpected_problem`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_unexpected_problem`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/unexpectedProblem', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateUnexpectedProblemResponse',  # 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 create_warranty(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_warranty  # noqa: E501

        Sends a message to a buyer to provide details about warranty information on a purchase in their order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_warranty(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateWarrantyRequest body: This contains the message body for a message. (required)
        :return: CreateWarrantyResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_warranty_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_warranty_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def create_warranty_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """create_warranty  # noqa: E501

        Sends a message to a buyer to provide details about warranty information on a purchase in their order.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.create_warranty_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param CreateWarrantyRequest body: This contains the message body for a message. (required)
        :return: CreateWarrantyResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 create_warranty" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `create_warranty`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `create_warranty`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `create_warranty`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `create_warranty`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/warranty', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateWarrantyResponse',  # 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_attributes(self, amazon_order_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_attributes  # noqa: E501

        Returns a response containing attributes related to an order. This includes buyer preferences.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  # 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_attributes(amazon_order_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :return: GetAttributesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_attributes_with_http_info(amazon_order_id, marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_attributes_with_http_info(amazon_order_id, marketplace_ids, **kwargs)  # noqa: E501
            return data

    def get_attributes_with_http_info(self, amazon_order_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_attributes  # noqa: E501

        Returns a response containing attributes related to an order. This includes buyer preferences.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  # 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_attributes_with_http_info(amazon_order_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :return: GetAttributesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids']  # 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_attributes" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `get_attributes`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `get_attributes`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_attributes`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # 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/hal+json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/attributes', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetAttributesResponse',  # 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_messaging_actions_for_order(self, amazon_order_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_messaging_actions_for_order  # noqa: E501

        Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # 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_messaging_actions_for_order(amazon_order_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This specifies the order for which you want a list of available message types. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :return: GetMessagingActionsForOrderResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_messaging_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, **kwargs)  # noqa: E501
        else:
            (data) = self.get_messaging_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, **kwargs)  # noqa: E501
            return data

    def get_messaging_actions_for_order_with_http_info(self, amazon_order_id, marketplace_ids, **kwargs):  # noqa: E501
        """get_messaging_actions_for_order  # noqa: E501

        Returns a list of message types that are available for an order that you specify. A message type is represented by an actions object, which contains a path and query parameter(s). You can use the path and parameter(s) to call an operation that sends a message.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 1 | 5 |  The `x-amzn-RateLimit-Limit` response header contains the usage plan rate limits for the operation, when available. The preceding table contains the default rate and burst values for this operation. Selling partners whose business demands require higher throughput might have higher rate and burst values than those shown here. For more information, refer to [Usage Plans and Rate Limits](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).  # 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_messaging_actions_for_order_with_http_info(amazon_order_id, marketplace_ids, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This specifies the order for which you want a list of available message types. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :return: GetMessagingActionsForOrderResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids']  # 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_messaging_actions_for_order" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `get_messaging_actions_for_order`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `get_messaging_actions_for_order`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `get_messaging_actions_for_order`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # 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/hal+json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetMessagingActionsForOrderResponse',  # 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 send_invoice(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """send_invoice  # noqa: E501

        Sends a message providing the buyer an invoice  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.send_invoice(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param InvoiceRequest body: This contains the message body for a message. (required)
        :return: InvoiceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.send_invoice_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
        else:
            (data) = self.send_invoice_with_http_info(amazon_order_id, marketplace_ids, body, **kwargs)  # noqa: E501
            return data

    def send_invoice_with_http_info(self, amazon_order_id, marketplace_ids, body, **kwargs):  # noqa: E501
        """send_invoice  # noqa: E501

        Sends a message providing the buyer an invoice  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.send_invoice_with_http_info(amazon_order_id, marketplace_ids, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str amazon_order_id: An Amazon order identifier. This identifies the order for which a message is sent. (required)
        :param List[str] marketplace_ids: A marketplace identifier. This identifies the marketplace in which the order was placed. You can only specify one marketplace. (required)
        :param InvoiceRequest body: This contains the message body for a message. (required)
        :return: InvoiceResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['amazon_order_id', 'marketplace_ids', 'body']  # 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 send_invoice" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'amazon_order_id' is set
        if self.api_client.client_side_validation and ('amazon_order_id' not in params or
                                                       params['amazon_order_id'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `amazon_order_id` when calling `send_invoice`")  # noqa: E501
        # verify the required parameter 'marketplace_ids' is set
        if self.api_client.client_side_validation and ('marketplace_ids' not in params or
                                                       params['marketplace_ids'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `marketplace_ids` when calling `send_invoice`")  # noqa: E501
        # verify the required parameter 'body' is set
        if self.api_client.client_side_validation and ('body' not in params or
                                                       params['body'] is None):  # noqa: E501
            raise ValueError("Missing the required parameter `body` when calling `send_invoice`")  # noqa: E501

        if self.api_client.client_side_validation and ('marketplace_ids' in params and
                                            len(params['marketplace_ids']) > 1):
            raise ValueError("Invalid value for parameter `marketplace_ids` when calling `send_invoice`, number of items must be less than or equal to `1`")  # noqa: E501
        collection_formats = {}

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

        query_params = []
        if 'marketplace_ids' in params:
            query_params.append(('marketplaceIds', params['marketplace_ids']))  # noqa: E501
            collection_formats['marketplaceIds'] = 'csv'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/messaging/v1/orders/{amazonOrderId}/messages/invoice', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InvoiceResponse',  # 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)
