# coding: utf-8

"""
    Amazon Shipping API

    The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.

    The version of the OpenAPI document: v2
    Contact: swa-api-core@amazon.com
    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 ShippingApi(object):
    """NOTE: This class is auto generated by the openapi generator.

    Do not edit the class manually.
    """

    api_models_module = "spapi.models.shipping_v2"

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

    def cancel_shipment(self, shipment_id, **kwargs):  # noqa: E501
        """cancel_shipment  # noqa: E501

        Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.cancel_shipment(shipment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str shipment_id: The shipment identifier originally returned by the purchaseShipment operation. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: CancelShipmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cancel_shipment_with_http_info(shipment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.cancel_shipment_with_http_info(shipment_id, **kwargs)  # noqa: E501
            return data

    def cancel_shipment_with_http_info(self, shipment_id, **kwargs):  # noqa: E501
        """cancel_shipment  # noqa: E501

        Cancels a purchased shipment. Returns an empty object if the shipment is successfully cancelled.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.cancel_shipment_with_http_info(shipment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str shipment_id: The shipment identifier originally returned by the purchaseShipment operation. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: CancelShipmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/shipments/{shipmentId}/cancel', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CancelShipmentResponse',  # 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_claim(self, body, **kwargs):  # noqa: E501
        """create_claim  # noqa: E501

        This API will be used to create claim for single eligible shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc: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_claim(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateClaimRequest body: Request body for the createClaim operation (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: CreateClaimResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_claim_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_claim_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_claim_with_http_info(self, body, **kwargs):  # noqa: E501
        """create_claim  # noqa: E501

        This API will be used to create claim for single eligible shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc: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_claim_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateClaimRequest body: Request body for the createClaim operation (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: CreateClaimResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method create_claim" % key
                )
            params[key] = val
        del params['kwargs']
        # 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_claim`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/claims', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CreateClaimResponse',  # 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 direct_purchase_shipment(self, body, **kwargs):  # noqa: E501
        """direct_purchase_shipment  # noqa: E501

        Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related details and documents.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.direct_purchase_shipment(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DirectPurchaseRequest body: DirectPurchaseRequest body (required)
        :param str x_amzn_idempotency_key: A unique value which the server uses to recognize subsequent retries of the same request.
        :param str locale: The IETF Language Tag. Note that this only supports the primary language subtag with one secondary language subtag (i.e. en-US, fr-CA). The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary language subtags. 
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: DirectPurchaseResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.direct_purchase_shipment_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.direct_purchase_shipment_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def direct_purchase_shipment_with_http_info(self, body, **kwargs):  # noqa: E501
        """direct_purchase_shipment  # noqa: E501

        Purchases the shipping service for a shipment using the best fit service offering. Returns purchase related details and documents.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.direct_purchase_shipment_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DirectPurchaseRequest body: DirectPurchaseRequest body (required)
        :param str x_amzn_idempotency_key: A unique value which the server uses to recognize subsequent retries of the same request.
        :param str locale: The IETF Language Tag. Note that this only supports the primary language subtag with one secondary language subtag (i.e. en-US, fr-CA). The secondary language subtag is almost always a regional designation. This does not support additional subtags beyond the primary and secondary language subtags. 
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: DirectPurchaseResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'x_amzn_idempotency_key', 'locale', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method direct_purchase_shipment" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `direct_purchase_shipment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_idempotency_key' in params:
            header_params['x-amzn-IdempotencyKey'] = params['x_amzn_idempotency_key']  # noqa: E501
        if 'locale' in params:
            header_params['locale'] = params['locale']  # noqa: E501
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/shipments/directPurchase', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DirectPurchaseResponse',  # 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 generate_collection_form(self, body, **kwargs):  # noqa: E501
        """generate_collection_form  # noqa: E501

        This API  Call to generate the collection form.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.generate_collection_form(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GenerateCollectionFormRequest body: GenerateCollectionFormRequest body (required)
        :param str x_amzn_idempotency_key: A unique value which the server uses to recognize subsequent retries of the same request.
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GenerateCollectionFormResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.generate_collection_form_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.generate_collection_form_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def generate_collection_form_with_http_info(self, body, **kwargs):  # noqa: E501
        """generate_collection_form  # noqa: E501

        This API  Call to generate the collection form.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.generate_collection_form_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GenerateCollectionFormRequest body: GenerateCollectionFormRequest body (required)
        :param str x_amzn_idempotency_key: A unique value which the server uses to recognize subsequent retries of the same request.
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GenerateCollectionFormResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'x_amzn_idempotency_key', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method generate_collection_form" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `generate_collection_form`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_idempotency_key' in params:
            header_params['x-amzn-IdempotencyKey'] = params['x_amzn_idempotency_key']  # noqa: E501
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/collectionForms', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GenerateCollectionFormResponse',  # 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_access_points(self, access_point_types, country_code, postal_code, **kwargs):  # noqa: E501
        """get_access_points  # noqa: E501

        Returns a list of access points in proximity of input postal code.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_access_points(access_point_types, country_code, postal_code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param List[str] access_point_types: Access point types (required)
        :param str country_code: Country code for access point (required)
        :param str postal_code: postal code for access point (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetAccessPointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_access_points_with_http_info(access_point_types, country_code, postal_code, **kwargs)  # noqa: E501
        else:
            (data) = self.get_access_points_with_http_info(access_point_types, country_code, postal_code, **kwargs)  # noqa: E501
            return data

    def get_access_points_with_http_info(self, access_point_types, country_code, postal_code, **kwargs):  # noqa: E501
        """get_access_points  # noqa: E501

        Returns a list of access points in proximity of input postal code.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_access_points_with_http_info(access_point_types, country_code, postal_code, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param List[str] access_point_types: Access point types (required)
        :param str country_code: Country code for access point (required)
        :param str postal_code: postal code for access point (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetAccessPointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['access_point_types', 'country_code', 'postal_code', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'access_point_types' in params:
            query_params.append(('accessPointTypes', params['access_point_types']))  # noqa: E501
            collection_formats['accessPointTypes'] = 'csv'  # noqa: E501
        if 'country_code' in params:
            query_params.append(('countryCode', params['country_code']))  # noqa: E501
        if 'postal_code' in params:
            query_params.append(('postalCode', params['postal_code']))  # noqa: E501

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/accessPoints', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetAccessPointsResponse',  # 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_additional_inputs(self, request_token, rate_id, **kwargs):  # noqa: E501
        """get_additional_inputs  # noqa: E501

        Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that additional inputs are required for the rate (shipping offering) that you want to purchase.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_additional_inputs(request_token, rate_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str request_token: The request token returned in the response to the getRates operation. (required)
        :param str rate_id: The rate identifier for the shipping offering (rate) returned in the response to the getRates operation. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetAdditionalInputsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_additional_inputs_with_http_info(request_token, rate_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_additional_inputs_with_http_info(request_token, rate_id, **kwargs)  # noqa: E501
            return data

    def get_additional_inputs_with_http_info(self, request_token, rate_id, **kwargs):  # noqa: E501
        """get_additional_inputs  # noqa: E501

        Returns the JSON schema to use for providing additional inputs when needed to purchase a shipping offering. Call the getAdditionalInputs operation when the response to a previous call to the getRates operation indicates that additional inputs are required for the rate (shipping offering) that you want to purchase.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_additional_inputs_with_http_info(request_token, rate_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str request_token: The request token returned in the response to the getRates operation. (required)
        :param str rate_id: The rate identifier for the shipping offering (rate) returned in the response to the getRates operation. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetAdditionalInputsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['request_token', 'rate_id', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'request_token' in params:
            query_params.append(('requestToken', params['request_token']))  # noqa: E501
        if 'rate_id' in params:
            query_params.append(('rateId', params['rate_id']))  # noqa: E501

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/shipments/additionalInputs/schema', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetAdditionalInputsResponse',  # 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_carrier_account_form_inputs(self, **kwargs):  # noqa: E501
        """get_carrier_account_form_inputs  # noqa: E501

        This API will return a list of input schema required to register a shipper account with the carrier.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_carrier_account_form_inputs(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCarrierAccountFormInputsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_carrier_account_form_inputs_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.get_carrier_account_form_inputs_with_http_info(**kwargs)  # noqa: E501
            return data

    def get_carrier_account_form_inputs_with_http_info(self, **kwargs):  # noqa: E501
        """get_carrier_account_form_inputs  # noqa: E501

        This API will return a list of input schema required to register a shipper account with the carrier.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_carrier_account_form_inputs_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCarrierAccountFormInputsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_carrier_account_form_inputs" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/carrierAccountFormInputs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetCarrierAccountFormInputsResponse',  # 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_carrier_accounts(self, body, **kwargs):  # noqa: E501
        """get_carrier_accounts  # noqa: E501

        This API will return Get all carrier accounts for a merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_carrier_accounts(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetCarrierAccountsRequest body: GetCarrierAccountsRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCarrierAccountsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_carrier_accounts_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.get_carrier_accounts_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def get_carrier_accounts_with_http_info(self, body, **kwargs):  # noqa: E501
        """get_carrier_accounts  # noqa: E501

        This API will return Get all carrier accounts for a merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_carrier_accounts_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetCarrierAccountsRequest body: GetCarrierAccountsRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCarrierAccountsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_carrier_accounts" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `get_carrier_accounts`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/carrierAccounts', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetCarrierAccountsResponse',  # 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_collection_form(self, collection_form_id, **kwargs):  # noqa: E501
        """get_collection_form  # noqa: E501

        This API reprint a collection form.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_collection_form(collection_form_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str collection_form_id: collection form Id to reprint a collection. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCollectionFormResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_collection_form_with_http_info(collection_form_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_collection_form_with_http_info(collection_form_id, **kwargs)  # noqa: E501
            return data

    def get_collection_form_with_http_info(self, collection_form_id, **kwargs):  # noqa: E501
        """get_collection_form  # noqa: E501

        This API reprint a collection form.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_collection_form_with_http_info(collection_form_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str collection_form_id: collection form Id to reprint a collection. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCollectionFormResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/collectionForms/{collectionFormId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetCollectionFormResponse',  # 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_collection_form_history(self, body, **kwargs):  # noqa: E501
        """get_collection_form_history  # noqa: E501

        This API Call to get the history of the previously generated collection forms.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_collection_form_history(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetCollectionFormHistoryRequest body: GetCollectionFormHistoryRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCollectionFormHistoryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_collection_form_history_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.get_collection_form_history_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def get_collection_form_history_with_http_info(self, body, **kwargs):  # noqa: E501
        """get_collection_form_history  # noqa: E501

        This API Call to get the history of the previously generated collection forms.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_collection_form_history_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetCollectionFormHistoryRequest body: GetCollectionFormHistoryRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetCollectionFormHistoryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_collection_form_history" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `get_collection_form_history`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/collectionForms/history', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetCollectionFormHistoryResponse',  # 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_rates(self, body, **kwargs):  # noqa: E501
        """get_rates  # noqa: E501

        Returns the available shipping service offerings.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_rates(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetRatesRequest body: GetRatesRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetRatesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_rates_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.get_rates_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def get_rates_with_http_info(self, body, **kwargs):  # noqa: E501
        """get_rates  # noqa: E501

        Returns the available shipping service offerings.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_rates_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetRatesRequest body: GetRatesRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetRatesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_rates" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `get_rates`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/shipments/rates', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetRatesResponse',  # 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_shipment_documents(self, shipment_id, package_client_reference_id, **kwargs):  # noqa: E501
        """get_shipment_documents  # noqa: E501

        Returns the shipping documents associated with a package in a shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_shipment_documents(shipment_id, package_client_reference_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str shipment_id: The shipment identifier originally returned by the purchaseShipment operation. (required)
        :param str package_client_reference_id: The package client reference identifier originally provided in the request body parameter for the getRates operation. (required)
        :param str format: The file format of the document. Must be one of the supported formats returned by the getRates operation.
        :param float dpi: The resolution of the document (for example, 300 means 300 dots per inch). Must be one of the supported resolutions returned in the response to the getRates operation.
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetShipmentDocumentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_shipment_documents_with_http_info(shipment_id, package_client_reference_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_shipment_documents_with_http_info(shipment_id, package_client_reference_id, **kwargs)  # noqa: E501
            return data

    def get_shipment_documents_with_http_info(self, shipment_id, package_client_reference_id, **kwargs):  # noqa: E501
        """get_shipment_documents  # noqa: E501

        Returns the shipping documents associated with a package in a shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_shipment_documents_with_http_info(shipment_id, package_client_reference_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str shipment_id: The shipment identifier originally returned by the purchaseShipment operation. (required)
        :param str package_client_reference_id: The package client reference identifier originally provided in the request body parameter for the getRates operation. (required)
        :param str format: The file format of the document. Must be one of the supported formats returned by the getRates operation.
        :param float dpi: The resolution of the document (for example, 300 means 300 dots per inch). Must be one of the supported resolutions returned in the response to the getRates operation.
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetShipmentDocumentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['shipment_id', 'package_client_reference_id', 'format', 'dpi', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []
        if 'package_client_reference_id' in params:
            query_params.append(('packageClientReferenceId', params['package_client_reference_id']))  # noqa: E501
        if 'format' in params:
            query_params.append(('format', params['format']))  # noqa: E501
        if 'dpi' in params:
            query_params.append(('dpi', params['dpi']))  # noqa: E501

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/shipments/{shipmentId}/documents', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetShipmentDocumentsResponse',  # 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_tracking(self, tracking_id, carrier_id, **kwargs):  # noqa: E501
        """get_tracking  # noqa: E501

        Returns tracking information for a purchased shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_tracking(tracking_id, carrier_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str tracking_id: A carrier-generated tracking identifier originally returned by the purchaseShipment operation. (required)
        :param str carrier_id: A carrier identifier originally returned by the getRates operation for the selected rate. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetTrackingResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_tracking_with_http_info(tracking_id, carrier_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_tracking_with_http_info(tracking_id, carrier_id, **kwargs)  # noqa: E501
            return data

    def get_tracking_with_http_info(self, tracking_id, carrier_id, **kwargs):  # noqa: E501
        """get_tracking  # noqa: E501

        Returns tracking information for a purchased shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_tracking_with_http_info(tracking_id, carrier_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str tracking_id: A carrier-generated tracking identifier originally returned by the purchaseShipment operation. (required)
        :param str carrier_id: A carrier identifier originally returned by the getRates operation for the selected rate. (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetTrackingResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['tracking_id', 'carrier_id', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'tracking_id' in params:
            query_params.append(('trackingId', params['tracking_id']))  # noqa: E501
        if 'carrier_id' in params:
            query_params.append(('carrierId', params['carrier_id']))  # noqa: E501

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/shipping/v2/tracking', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetTrackingResponse',  # 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_unmanifested_shipments(self, body, **kwargs):  # noqa: E501
        """get_unmanifested_shipments  # noqa: E501

        This API Get all unmanifested carriers with shipment locations. Any locations which has unmanifested shipments         with an eligible carrier for manifesting shall be returned.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_unmanifested_shipments(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetUnmanifestedShipmentsRequest body: GetUmanifestedShipmentsRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetUnmanifestedShipmentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_unmanifested_shipments_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.get_unmanifested_shipments_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def get_unmanifested_shipments_with_http_info(self, body, **kwargs):  # noqa: E501
        """get_unmanifested_shipments  # noqa: E501

        This API Get all unmanifested carriers with shipment locations. Any locations which has unmanifested shipments         with an eligible carrier for manifesting shall be returned.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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_unmanifested_shipments_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param GetUnmanifestedShipmentsRequest body: GetUmanifestedShipmentsRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: GetUnmanifestedShipmentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method get_unmanifested_shipments" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `get_unmanifested_shipments`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/unmanifestedShipments', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetUnmanifestedShipmentsResponse',  # 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 link_carrier_account(self, carrier_id, body, **kwargs):  # noqa: E501
        """link_carrier_account  # noqa: E501

        This API associates/links the specified carrier account with the merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.link_carrier_account(carrier_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str carrier_id: An identifier for the carrier with which the seller's account is being linked. (required)
        :param LinkCarrierAccountRequest body: LinkCarrierAccountRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: LinkCarrierAccountResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.link_carrier_account_with_http_info(carrier_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.link_carrier_account_with_http_info(carrier_id, body, **kwargs)  # noqa: E501
            return data

    def link_carrier_account_with_http_info(self, carrier_id, body, **kwargs):  # noqa: E501
        """link_carrier_account  # noqa: E501

        This API associates/links the specified carrier account with the merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.link_carrier_account_with_http_info(carrier_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str carrier_id: An identifier for the carrier with which the seller's account is being linked. (required)
        :param LinkCarrierAccountRequest body: LinkCarrierAccountRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: LinkCarrierAccountResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['carrier_id', 'body', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/carrierAccounts/{carrierId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LinkCarrierAccountResponse',  # 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 link_carrier_account_0(self, carrier_id, body, **kwargs):  # noqa: E501
        """link_carrier_account_0  # noqa: E501

        This API associates/links the specified carrier account with the merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc: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.link_carrier_account_0(carrier_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str carrier_id: An identifier for the carrier with which the seller's account is being linked. (required)
        :param LinkCarrierAccountRequest body: LinkCarrierAccountRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: LinkCarrierAccountResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.link_carrier_account_0_with_http_info(carrier_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.link_carrier_account_0_with_http_info(carrier_id, body, **kwargs)  # noqa: E501
            return data

    def link_carrier_account_0_with_http_info(self, carrier_id, body, **kwargs):  # noqa: E501
        """link_carrier_account_0  # noqa: E501

        This API associates/links the specified carrier account with the merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 5 | 10 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc: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.link_carrier_account_0_with_http_info(carrier_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str carrier_id: An identifier for the carrier with which the seller's account is being linked. (required)
        :param LinkCarrierAccountRequest body: LinkCarrierAccountRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: LinkCarrierAccountResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['carrier_id', 'body', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/carrierAccounts/{carrierId}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='LinkCarrierAccountResponse',  # 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 one_click_shipment(self, body, **kwargs):  # noqa: E501
        """one_click_shipment  # noqa: E501

        Purchases a shipping service identifier and returns purchase-related details and documents.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.one_click_shipment(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OneClickShipmentRequest body: OneClickShipmentRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: OneClickShipmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.one_click_shipment_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.one_click_shipment_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def one_click_shipment_with_http_info(self, body, **kwargs):  # noqa: E501
        """one_click_shipment  # noqa: E501

        Purchases a shipping service identifier and returns purchase-related details and documents.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.one_click_shipment_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param OneClickShipmentRequest body: OneClickShipmentRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: OneClickShipmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method one_click_shipment" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `one_click_shipment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/oneClickShipment', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='OneClickShipmentResponse',  # 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 purchase_shipment(self, body, **kwargs):  # noqa: E501
        """purchase_shipment  # noqa: E501

        Purchases a shipping service and returns purchase related details and documents.  Note: You must complete the purchase within 10 minutes of rate creation by the shipping service provider. If you make the request after the 10 minutes have expired, you will receive an error response with the error code equal to \"TOKEN_EXPIRED\". If you receive this error response, you must get the rates for the shipment again.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.purchase_shipment(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PurchaseShipmentRequest body: PurchaseShipmentRequest body (required)
        :param str x_amzn_idempotency_key: A unique value which the server uses to recognize subsequent retries of the same request.
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: PurchaseShipmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.purchase_shipment_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.purchase_shipment_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def purchase_shipment_with_http_info(self, body, **kwargs):  # noqa: E501
        """purchase_shipment  # noqa: E501

        Purchases a shipping service and returns purchase related details and documents.  Note: You must complete the purchase within 10 minutes of rate creation by the shipping service provider. If you make the request after the 10 minutes have expired, you will receive an error response with the error code equal to \"TOKEN_EXPIRED\". If you receive this error response, you must get the rates for the shipment again.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.purchase_shipment_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PurchaseShipmentRequest body: PurchaseShipmentRequest body (required)
        :param str x_amzn_idempotency_key: A unique value which the server uses to recognize subsequent retries of the same request.
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: PurchaseShipmentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'x_amzn_idempotency_key', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method purchase_shipment" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `purchase_shipment`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_idempotency_key' in params:
            header_params['x-amzn-IdempotencyKey'] = params['x_amzn_idempotency_key']  # noqa: E501
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/shipments', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PurchaseShipmentResponse',  # 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 submit_ndr_feedback(self, body, **kwargs):  # noqa: E501
        """submit_ndr_feedback  # noqa: E501

        This API submits the NDR (Non-delivery Report) Feedback for any eligible shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc: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.submit_ndr_feedback(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param SubmitNdrFeedbackRequest body: Request body for ndrFeedback operation (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.submit_ndr_feedback_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.submit_ndr_feedback_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def submit_ndr_feedback_with_http_info(self, body, **kwargs):  # noqa: E501
        """submit_ndr_feedback  # noqa: E501

        This API submits the NDR (Non-delivery Report) Feedback for any eligible shipment.  **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](doc: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.submit_ndr_feedback_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param SubmitNdrFeedbackRequest body: Request body for ndrFeedback operation (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method submit_ndr_feedback" % key
                )
            params[key] = val
        del params['kwargs']
        # 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 `submit_ndr_feedback`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/ndrFeedback', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type=None,  # 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 unlink_carrier_account(self, carrier_id, body, **kwargs):  # noqa: E501
        """unlink_carrier_account  # noqa: E501

        This API Unlink the specified carrier account with the merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.unlink_carrier_account(carrier_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str carrier_id: carrier Id to unlink with merchant. (required)
        :param UnlinkCarrierAccountRequest body: UnlinkCarrierAccountRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: UnlinkCarrierAccountResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.unlink_carrier_account_with_http_info(carrier_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.unlink_carrier_account_with_http_info(carrier_id, body, **kwargs)  # noqa: E501
            return data

    def unlink_carrier_account_with_http_info(self, carrier_id, body, **kwargs):  # noqa: E501
        """unlink_carrier_account  # noqa: E501

        This API Unlink the specified carrier account with the merchant.   **Usage Plan:**  | Rate (requests per second) | Burst | | ---- | ---- | | 80 | 100 |  The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values then those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](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.unlink_carrier_account_with_http_info(carrier_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str carrier_id: carrier Id to unlink with merchant. (required)
        :param UnlinkCarrierAccountRequest body: UnlinkCarrierAccountRequest body (required)
        :param str x_amzn_shipping_business_id: Amazon shipping business to assume for this request. The default is AmazonShipping_UK.
        :return: UnlinkCarrierAccountResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['carrier_id', 'body', 'x_amzn_shipping_business_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'x_amzn_shipping_business_id' in params:
            header_params['x-amzn-shipping-business-id'] = params['x_amzn_shipping_business_id']  # noqa: E501

        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/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(
            '/shipping/v2/carrierAccounts/{carrierId}/unlink', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UnlinkCarrierAccountResponse',  # 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)
