# coding: utf-8

"""
    EDIS public shipping API

    <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This API allows 3rd party developers in the Greater-China area to process package shipping details.  # noqa: E501

    OpenAPI spec version: 1.1.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from ...sell_edelivery_international_shipping.api_client import ApiClient


class PackageApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

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

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

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to cancel multiple packages and their associated tracking numbers.<br><br>The package ID values for the packages to be canceled must be input in the <b>packageIds</b> array of the request.<br><br><span class=\"tablenote\"><b>Note:</b> Packages cannot be cancelled if they are currently being processed.</span>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bulk_cancel_packages(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CancelPackagesRequest body:
        :return: CancelPackagesResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.bulk_cancel_packages_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.bulk_cancel_packages_with_http_info(**kwargs)  # noqa: E501
            return data

    def bulk_cancel_packages_with_http_info(self, **kwargs):  # noqa: E501
        """bulk_cancel_packages  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to cancel multiple packages and their associated tracking numbers.<br><br>The package ID values for the packages to be canceled must be input in the <b>packageIds</b> array of the request.<br><br><span class=\"tablenote\"><b>Note:</b> Packages cannot be cancelled if they are currently being processed.</span>   # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bulk_cancel_packages_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CancelPackagesRequest body:
        :return: CancelPackagesResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/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 = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/bulk_cancel_packages', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CancelPackagesResponses',  # 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)

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

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to confirm the shipping order for multiple packages.<br><br>The package ID values for the packages to be confirmed must be input in the <b>packageIds</b> array of the request.<br><br>After a package is confirmed, the estimated cost will be frozen in your wallet and the pickup request will be submitted.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bulk_confirm_packages(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ConfirmPackagesRequest body:
        :return: ConfirmPackagesResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.bulk_confirm_packages_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.bulk_confirm_packages_with_http_info(**kwargs)  # noqa: E501
            return data

    def bulk_confirm_packages_with_http_info(self, **kwargs):  # noqa: E501
        """bulk_confirm_packages  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to confirm the shipping order for multiple packages.<br><br>The package ID values for the packages to be confirmed must be input in the <b>packageIds</b> array of the request.<br><br>After a package is confirmed, the estimated cost will be frozen in your wallet and the pickup request will be submitted.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bulk_confirm_packages_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param ConfirmPackagesRequest body:
        :return: ConfirmPackagesResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/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 = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/bulk_confirm_packages', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ConfirmPackagesResponses',  # 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)

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

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to delete multiple packages.<br><br>The package ID values for the packages to be deleted must be input in the <b>packageIds</b> array of the request.<br><br><span class=\"tablenote\"><b>Note:</b> Packages can only be deleted once they have been cancelled through the <b>cancelPackage</b> or <b>bulkCancelPackages</b> methods and no longer have a tracking number associated with them.</span>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bulk_delete_packages(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DeletePackagesRequest body:
        :return: DeletePackagesResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.bulk_delete_packages_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.bulk_delete_packages_with_http_info(**kwargs)  # noqa: E501
            return data

    def bulk_delete_packages_with_http_info(self, **kwargs):  # noqa: E501
        """bulk_delete_packages  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to delete multiple packages.<br><br>The package ID values for the packages to be deleted must be input in the <b>packageIds</b> array of the request.<br><br><span class=\"tablenote\"><b>Note:</b> Packages can only be deleted once they have been cancelled through the <b>cancelPackage</b> or <b>bulkCancelPackages</b> methods and no longer have a tracking number associated with them.</span>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.bulk_delete_packages_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param DeletePackagesRequest body:
        :return: DeletePackagesResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/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 = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/bulk_delete_packages', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeletePackagesResponses',  # 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)

    def cancel_package(self, package_id, **kwargs):  # noqa: E501
        """cancel_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to cancel a package and its associated tracking number.<br><br>The <b>packageId</b> value of the package to be canceled must be input as a path parameter in the request.<br><br><span class=\"tablenote\"><b>Note:</b> Packages cannot be canceled if they are currently being processed.</span>  # 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_package(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package being canceled.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.cancel_package_with_http_info(package_id, **kwargs)  # noqa: E501
        else:
            (data) = self.cancel_package_with_http_info(package_id, **kwargs)  # noqa: E501
            return data

    def cancel_package_with_http_info(self, package_id, **kwargs):  # noqa: E501
        """cancel_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to cancel a package and its associated tracking number.<br><br>The <b>packageId</b> value of the package to be canceled must be input as a path parameter in the request.<br><br><span class=\"tablenote\"><b>Note:</b> Packages cannot be canceled if they are currently being processed.</span>  # 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_package_with_http_info(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package being canceled.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['package_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_package" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'package_id' is set
        if ('package_id' not in params or
                params['package_id'] is None):
            raise ValueError("Missing the required parameter `package_id` when calling `cancel_package`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/{package_id}/cancel', '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)

    def clone_package(self, package_id, **kwargs):  # noqa: E501
        """clone_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to clone a package for redelivery, resending the package with the same information input during the <b>createPackage</b> call.<br><br>The <b>packageId</b> value of the package to be cloned must be input as a path parameter in the request.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.clone_package(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the <b>packageId</b> value of the package to be cloned.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: ClonePackageResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.clone_package_with_http_info(package_id, **kwargs)  # noqa: E501
        else:
            (data) = self.clone_package_with_http_info(package_id, **kwargs)  # noqa: E501
            return data

    def clone_package_with_http_info(self, package_id, **kwargs):  # noqa: E501
        """clone_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to clone a package for redelivery, resending the package with the same information input during the <b>createPackage</b> call.<br><br>The <b>packageId</b> value of the package to be cloned must be input as a path parameter in the request.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.clone_package_with_http_info(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the <b>packageId</b> value of the package to be cloned.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: ClonePackageResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['package_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 clone_package" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'package_id' is set
        if ('package_id' not in params or
                params['package_id'] is None):
            raise ValueError("Missing the required parameter `package_id` when calling `clone_package`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/{package_id}/clone', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='ClonePackageResponses',  # 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)

    def confirm_package(self, package_id, **kwargs):  # noqa: E501
        """confirm_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to confirm the shipping order for a package.<br><br>The <b>packageId</b> value of the package to be confirmed must be input as a path parameter in the request.<br><br>After confirmation the estimated cost will be frozen in your wallet and the pickup request will be submitted.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.confirm_package(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package you wish to be confirmed.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.confirm_package_with_http_info(package_id, **kwargs)  # noqa: E501
        else:
            (data) = self.confirm_package_with_http_info(package_id, **kwargs)  # noqa: E501
            return data

    def confirm_package_with_http_info(self, package_id, **kwargs):  # noqa: E501
        """confirm_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to confirm the shipping order for a package.<br><br>The <b>packageId</b> value of the package to be confirmed must be input as a path parameter in the request.<br><br>After confirmation the estimated cost will be frozen in your wallet and the pickup request will be submitted.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.confirm_package_with_http_info(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package you wish to be confirmed.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['package_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 confirm_package" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'package_id' is set
        if ('package_id' not in params or
                params['package_id'] is None):
            raise ValueError("Missing the required parameter `package_id` when calling `confirm_package`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/{package_id}/confirm', '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)

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

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to create a package for an order.<br><br>To create a package, the package's shipping information, such as the dimensions, weight, ship from, and ship to address, as well as information about the item(s) it contains must be specified in the request.<br><br>If the call is successful, the <b>packageId</b> and tracking number for the newly created package will be returned.<br><br><span class=\"tablenote\"><b>Note:</b> Sellers should keep track of the returned <b>packageId</b>, as there is no programmatic way to retrieve this value at this time.</span>  # 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_package(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AddPackageRequest body:
        :return: AddPackageResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_package_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.create_package_with_http_info(**kwargs)  # noqa: E501
            return data

    def create_package_with_http_info(self, **kwargs):  # noqa: E501
        """create_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to create a package for an order.<br><br>To create a package, the package's shipping information, such as the dimensions, weight, ship from, and ship to address, as well as information about the item(s) it contains must be specified in the request.<br><br>If the call is successful, the <b>packageId</b> and tracking number for the newly created package will be returned.<br><br><span class=\"tablenote\"><b>Note:</b> Sellers should keep track of the returned <b>packageId</b>, as there is no programmatic way to retrieve this value at this time.</span>  # 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_package_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param AddPackageRequest body:
        :return: AddPackageResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/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 = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='AddPackageResponses',  # 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)

    def delete_package(self, package_id, **kwargs):  # noqa: E501
        """delete_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to delete a package.<br><br>The <b>packageId</b> value of the package to be deleted must be input as a path parameter in the request. If the call is successful, HTTP status code <b>204 No Content</b> will be returned, and the package will be deleted.<br><br><span class=\"tablenote\"><b>Note:</b> Packages can only be deleted once they have been cancelled through the <b>cancelPackage</b> or <b>bulkCancelPackages</b> methods and no longer have a tracking number associated with them.</span>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_package(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package being deleted. This package must already be cancelled and have no tracking number associated with it.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_package_with_http_info(package_id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_package_with_http_info(package_id, **kwargs)  # noqa: E501
            return data

    def delete_package_with_http_info(self, package_id, **kwargs):  # noqa: E501
        """delete_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to delete a package.<br><br>The <b>packageId</b> value of the package to be deleted must be input as a path parameter in the request. If the call is successful, HTTP status code <b>204 No Content</b> will be returned, and the package will be deleted.<br><br><span class=\"tablenote\"><b>Note:</b> Packages can only be deleted once they have been cancelled through the <b>cancelPackage</b> or <b>bulkCancelPackages</b> methods and no longer have a tracking number associated with them.</span>  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.delete_package_with_http_info(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package being deleted. This package must already be cancelled and have no tracking number associated with it.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['package_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 delete_package" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'package_id' is set
        if ('package_id' not in params or
                params['package_id'] is None):
            raise ValueError("Missing the required parameter `package_id` when calling `delete_package`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/{package_id}', 'DELETE',
            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)

    def get_package(self, package_id, **kwargs):  # noqa: E501
        """get_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to retrieve a package based on the provided package ID value.<br><br>The <b>packageId</b> value of the package to be retrieved must be input as a path parameter in the request. If the call is successful, information about the package is returned, such as the package's shipping information (its dimensions, weight, ship from, and ship to address) and information about the item(s) it contains.  # 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_package(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package being retrieved.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: GetPackageDetailResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_package_with_http_info(package_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_package_with_http_info(package_id, **kwargs)  # noqa: E501
            return data

    def get_package_with_http_info(self, package_id, **kwargs):  # noqa: E501
        """get_package  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to retrieve a package based on the provided package ID value.<br><br>The <b>packageId</b> value of the package to be retrieved must be input as a path parameter in the request. If the call is successful, information about the package is returned, such as the package's shipping information (its dimensions, weight, ship from, and ship to address) and information about the item(s) it contains.  # 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_package_with_http_info(package_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str package_id: This path parameter specifies the unique identifier of the package being retrieved.<br><br>This ID value is returned when creating a package through the <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/createPackage\" target=\"_blank\">createPackage</a> method. (required)
        :return: GetPackageDetailResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['package_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_package" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'package_id' is set
        if ('package_id' not in params or
                params['package_id'] is None):
            raise ValueError("Missing the required parameter `package_id` when calling `get_package`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/{package_id}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetPackageDetailResponses',  # 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)

    def get_packages_by_line_item_id(self, order_line_item_id, **kwargs):  # noqa: E501
        """get_packages_by_line_item_id  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to retrieve one or more packages based on the provided order line item ID.<br><br>This method can be followed up with <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/getPackage\" target=\"_blank\">getPackage</a> call to retrieve more detailed information about a specific package.  # 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_packages_by_line_item_id(order_line_item_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str order_line_item_id: This path parameter can be used to specify the unique identifier of the line item that is part of the package being retrieved.<br><br>This value is returned in the <b>lineItemId</b> field of the <a href=\"/api-docs/sell/fulfillment/resources/order/methods/getOrders\" target=\"_blank\">getOrders</a> method of the <b>Fulfillment API</b> or the <a href=\"/devzone/xml/docs/reference/ebay/GetOrders.html\" target=\"_blank\">GetOrders</a> method of the <b>Trading API</b>. (required)
        :return: GetItemPackageIdResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """
        if '_return_http_data_only' not in kwargs:  # ebay_rest patch
            kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_packages_by_line_item_id_with_http_info(order_line_item_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_packages_by_line_item_id_with_http_info(order_line_item_id, **kwargs)  # noqa: E501
            return data

    def get_packages_by_line_item_id_with_http_info(self, order_line_item_id, **kwargs):  # noqa: E501
        """get_packages_by_line_item_id  # noqa: E501

        <div class=\"msgbox_important\"><p class=\"msgbox_importantInDiv\" data-mc-autonum=\"&lt;b&gt;&lt;span style=&quot;color: #dd1e31;&quot; class=&quot;mcFormatColor&quot;&gt;Important! &lt;/span&gt;&lt;/b&gt;\"><span class=\"autonumber\"><span><b><span style=\"color: #dd1e31;\" class=\"mcFormatColor\">Important!</span></b></span></span> This method is only available for Greater-China based sellers with an active eDIS account.</p></div><br>This method can be used to retrieve one or more packages based on the provided order line item ID.<br><br>This method can be followed up with <a href=\"/api-docs/sell/edelivery_international_shipping/resources/package/methods/getPackage\" target=\"_blank\">getPackage</a> call to retrieve more detailed information about a specific package.  # 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_packages_by_line_item_id_with_http_info(order_line_item_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str order_line_item_id: This path parameter can be used to specify the unique identifier of the line item that is part of the package being retrieved.<br><br>This value is returned in the <b>lineItemId</b> field of the <a href=\"/api-docs/sell/fulfillment/resources/order/methods/getOrders\" target=\"_blank\">getOrders</a> method of the <b>Fulfillment API</b> or the <a href=\"/devzone/xml/docs/reference/ebay/GetOrders.html\" target=\"_blank\">GetOrders</a> method of the <b>Trading API</b>. (required)
        :return: GetItemPackageIdResponses
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['order_line_item_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_packages_by_line_item_id" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'order_line_item_id' is set
        if ('order_line_item_id' not in params or
                params['order_line_item_id'] is None):
            raise ValueError("Missing the required parameter `order_line_item_id` when calling `get_packages_by_line_item_id`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        # Authentication setting
        auth_settings = ['api_auth']  # noqa: E501

        return self.api_client.call_api(
            '/package/{order_line_item_id}/item', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetItemPackageIdResponses',  # 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)
