# coding: utf-8

"""
    Mauve Admin API

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 1.0.12
    
    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 mauve_client.api_client import ApiClient


class DocumentsApi(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 create_document_line_request_document_numberdocument_lines_post(self, sku, name, quantity, vat_rate, gross_price, discount_percentage, comment, e_prescription_task_id, e_prescription_access_code, is_shipping_item, accept, document_number, **kwargs):  # noqa: E501
        """Create a document line for a specific document  # noqa: E501

        Create a document line for a specific document  # 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_document_line_request_document_numberdocument_lines_post(sku, name, quantity, vat_rate, gross_price, discount_percentage, comment, e_prescription_task_id, e_prescription_access_code, is_shipping_item, accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str sku: (required)
        :param str name: (required)
        :param float quantity: (required)
        :param float vat_rate: (required)
        :param float gross_price: (required)
        :param float discount_percentage: (required)
        :param str comment: (required)
        :param str e_prescription_task_id: (required)
        :param str e_prescription_access_code: (required)
        :param bool is_shipping_item: (required)
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :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.create_document_line_request_document_numberdocument_lines_post_with_http_info(sku, name, quantity, vat_rate, gross_price, discount_percentage, comment, e_prescription_task_id, e_prescription_access_code, is_shipping_item, accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.create_document_line_request_document_numberdocument_lines_post_with_http_info(sku, name, quantity, vat_rate, gross_price, discount_percentage, comment, e_prescription_task_id, e_prescription_access_code, is_shipping_item, accept, document_number, **kwargs)  # noqa: E501
            return data

    def create_document_line_request_document_numberdocument_lines_post_with_http_info(self, sku, name, quantity, vat_rate, gross_price, discount_percentage, comment, e_prescription_task_id, e_prescription_access_code, is_shipping_item, accept, document_number, **kwargs):  # noqa: E501
        """Create a document line for a specific document  # noqa: E501

        Create a document line for a specific document  # 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_document_line_request_document_numberdocument_lines_post_with_http_info(sku, name, quantity, vat_rate, gross_price, discount_percentage, comment, e_prescription_task_id, e_prescription_access_code, is_shipping_item, accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str sku: (required)
        :param str name: (required)
        :param float quantity: (required)
        :param float vat_rate: (required)
        :param float gross_price: (required)
        :param float discount_percentage: (required)
        :param str comment: (required)
        :param str e_prescription_task_id: (required)
        :param str e_prescription_access_code: (required)
        :param bool is_shipping_item: (required)
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['sku', 'name', 'quantity', 'vat_rate', 'gross_price', 'discount_percentage', 'comment', 'e_prescription_task_id', 'e_prescription_access_code', 'is_shipping_item', 'accept', 'document_number']  # 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_document_line_request_document_numberdocument_lines_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'sku' is set
        if ('sku' not in params or
                params['sku'] is None):
            raise ValueError("Missing the required parameter `sku` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'name' is set
        if ('name' not in params or
                params['name'] is None):
            raise ValueError("Missing the required parameter `name` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'quantity' is set
        if ('quantity' not in params or
                params['quantity'] is None):
            raise ValueError("Missing the required parameter `quantity` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'vat_rate' is set
        if ('vat_rate' not in params or
                params['vat_rate'] is None):
            raise ValueError("Missing the required parameter `vat_rate` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'gross_price' is set
        if ('gross_price' not in params or
                params['gross_price'] is None):
            raise ValueError("Missing the required parameter `gross_price` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'discount_percentage' is set
        if ('discount_percentage' not in params or
                params['discount_percentage'] is None):
            raise ValueError("Missing the required parameter `discount_percentage` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'comment' is set
        if ('comment' not in params or
                params['comment'] is None):
            raise ValueError("Missing the required parameter `comment` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'e_prescription_task_id' is set
        if ('e_prescription_task_id' not in params or
                params['e_prescription_task_id'] is None):
            raise ValueError("Missing the required parameter `e_prescription_task_id` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'e_prescription_access_code' is set
        if ('e_prescription_access_code' not in params or
                params['e_prescription_access_code'] is None):
            raise ValueError("Missing the required parameter `e_prescription_access_code` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'is_shipping_item' is set
        if ('is_shipping_item' not in params or
                params['is_shipping_item'] is None):
            raise ValueError("Missing the required parameter `is_shipping_item` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501
        # verify the required parameter 'document_number' is set
        if ('document_number' not in params or
                params['document_number'] is None):
            raise ValueError("Missing the required parameter `document_number` when calling `create_document_line_request_document_numberdocument_lines_post`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}
        if 'sku' in params:
            form_params.append(('Sku', params['sku']))  # noqa: E501
        if 'name' in params:
            form_params.append(('Name', params['name']))  # noqa: E501
        if 'quantity' in params:
            form_params.append(('Quantity', params['quantity']))  # noqa: E501
        if 'vat_rate' in params:
            form_params.append(('VatRate', params['vat_rate']))  # noqa: E501
        if 'gross_price' in params:
            form_params.append(('GrossPrice', params['gross_price']))  # noqa: E501
        if 'discount_percentage' in params:
            form_params.append(('DiscountPercentage', params['discount_percentage']))  # noqa: E501
        if 'comment' in params:
            form_params.append(('Comment', params['comment']))  # noqa: E501
        if 'e_prescription_task_id' in params:
            form_params.append(('EPrescriptionTaskId', params['e_prescription_task_id']))  # noqa: E501
        if 'e_prescription_access_code' in params:
            form_params.append(('EPrescriptionAccessCode', params['e_prescription_access_code']))  # noqa: E501
        if 'is_shipping_item' in params:
            form_params.append(('IsShippingItem', params['is_shipping_item']))  # noqa: E501

        body_params = None
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/x-www-form-urlencoded'])  # noqa: E501

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

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/document_lines', '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_document_parcel_label_request_document_numberparcel_labels_post(self, parcel_number, _date, weight, accept, document_number, **kwargs):  # noqa: E501
        """Create a parcel label for a specific document.  # noqa: E501

        Create a parcel label for a specific document.  # 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_document_parcel_label_request_document_numberparcel_labels_post(parcel_number, _date, weight, accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str parcel_number: (required)
        :param datetime _date: (required)
        :param float weight: (required)
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :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.create_document_parcel_label_request_document_numberparcel_labels_post_with_http_info(parcel_number, _date, weight, accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.create_document_parcel_label_request_document_numberparcel_labels_post_with_http_info(parcel_number, _date, weight, accept, document_number, **kwargs)  # noqa: E501
            return data

    def create_document_parcel_label_request_document_numberparcel_labels_post_with_http_info(self, parcel_number, _date, weight, accept, document_number, **kwargs):  # noqa: E501
        """Create a parcel label for a specific document.  # noqa: E501

        Create a parcel label for a specific document.  # 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_document_parcel_label_request_document_numberparcel_labels_post_with_http_info(parcel_number, _date, weight, accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str parcel_number: (required)
        :param datetime _date: (required)
        :param float weight: (required)
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['parcel_number', '_date', 'weight', 'accept', 'document_number']  # 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_document_parcel_label_request_document_numberparcel_labels_post" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'parcel_number' is set
        if ('parcel_number' not in params or
                params['parcel_number'] is None):
            raise ValueError("Missing the required parameter `parcel_number` when calling `create_document_parcel_label_request_document_numberparcel_labels_post`")  # noqa: E501
        # verify the required parameter '_date' is set
        if ('_date' not in params or
                params['_date'] is None):
            raise ValueError("Missing the required parameter `_date` when calling `create_document_parcel_label_request_document_numberparcel_labels_post`")  # noqa: E501
        # verify the required parameter 'weight' is set
        if ('weight' not in params or
                params['weight'] is None):
            raise ValueError("Missing the required parameter `weight` when calling `create_document_parcel_label_request_document_numberparcel_labels_post`")  # noqa: E501
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `create_document_parcel_label_request_document_numberparcel_labels_post`")  # noqa: E501
        # verify the required parameter 'document_number' is set
        if ('document_number' not in params or
                params['document_number'] is None):
            raise ValueError("Missing the required parameter `document_number` when calling `create_document_parcel_label_request_document_numberparcel_labels_post`")  # noqa: E501

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}
        if 'parcel_number' in params:
            form_params.append(('ParcelNumber', params['parcel_number']))  # noqa: E501
        if '_date' in params:
            form_params.append(('Date', params['_date']))  # noqa: E501
        if 'weight' in params:
            form_params.append(('Weight', params['weight']))  # noqa: E501

        body_params = None
        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/x-www-form-urlencoded'])  # noqa: E501

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

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/parcel_labels', '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_document_payment_request_document_numberpayments_post(self, accept, document_number, **kwargs):  # noqa: E501
        """Create a payment for a specific document.  # noqa: E501

        Create a payment for a specific document.  # 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_document_payment_request_document_numberpayments_post(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param CreateDocumentPaymentRequest body:
        :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.create_document_payment_request_document_numberpayments_post_with_http_info(accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.create_document_payment_request_document_numberpayments_post_with_http_info(accept, document_number, **kwargs)  # noqa: E501
            return data

    def create_document_payment_request_document_numberpayments_post_with_http_info(self, accept, document_number, **kwargs):  # noqa: E501
        """Create a payment for a specific document.  # noqa: E501

        Create a payment for a specific document.  # 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_document_payment_request_document_numberpayments_post_with_http_info(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param CreateDocumentPaymentRequest body:
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/payments', '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 delete_document_line_request_document_numberdocument_lines_number_delete(self, accept, document_number, number, **kwargs):  # noqa: E501
        """Delete a document line for a specific document  # noqa: E501

        Delete a document line for a specific document  # 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_document_line_request_document_numberdocument_lines_number_delete(accept, document_number, number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param int number: A consecutive number for each document line (required)
        :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.delete_document_line_request_document_numberdocument_lines_number_delete_with_http_info(accept, document_number, number, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_document_line_request_document_numberdocument_lines_number_delete_with_http_info(accept, document_number, number, **kwargs)  # noqa: E501
            return data

    def delete_document_line_request_document_numberdocument_lines_number_delete_with_http_info(self, accept, document_number, number, **kwargs):  # noqa: E501
        """Delete a document line for a specific document  # noqa: E501

        Delete a document line for a specific document  # 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_document_line_request_document_numberdocument_lines_number_delete_with_http_info(accept, document_number, number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param int number: A consecutive number for each document line (required)
        :return: None
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'document_number' in params:
            path_params['DocumentNumber'] = params['document_number']  # noqa: E501
        if 'number' in params:
            path_params['Number'] = params['number']  # noqa: E501

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # noqa: E501

        form_params = []
        local_var_files = {}

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

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/document_lines/{Number}', '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 download_document_pdf_request_document_numberpdf_get(self, accept, document_number, **kwargs):  # noqa: E501
        """Retrieve a PDF of a specific document.  # noqa: E501

        Returns a PDF of the document in contenttype \"application/pdf\"<br>This call does not work in SwaggerUI or other web UIs.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_document_pdf_request_document_numberpdf_get(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.download_document_pdf_request_document_numberpdf_get_with_http_info(accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.download_document_pdf_request_document_numberpdf_get_with_http_info(accept, document_number, **kwargs)  # noqa: E501
            return data

    def download_document_pdf_request_document_numberpdf_get_with_http_info(self, accept, document_number, **kwargs):  # noqa: E501
        """Retrieve a PDF of a specific document.  # noqa: E501

        Returns a PDF of the document in contenttype \"application/pdf\"<br>This call does not work in SwaggerUI or other web UIs.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.download_document_pdf_request_document_numberpdf_get_with_http_info(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :return: str
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/pdf', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='str',  # 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_document_payment_request_document_numberpayments_get(self, accept, document_number, **kwargs):  # noqa: E501
        """Retrieve the payments of a specific document.  # noqa: E501

        Retrieve the payments of a specific document.  # 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_document_payment_request_document_numberpayments_get(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :return: GetDocumentPaymentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_document_payment_request_document_numberpayments_get_with_http_info(accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.get_document_payment_request_document_numberpayments_get_with_http_info(accept, document_number, **kwargs)  # noqa: E501
            return data

    def get_document_payment_request_document_numberpayments_get_with_http_info(self, accept, document_number, **kwargs):  # noqa: E501
        """Retrieve the payments of a specific document.  # noqa: E501

        Retrieve the payments of a specific document.  # 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_document_payment_request_document_numberpayments_get_with_http_info(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :return: GetDocumentPaymentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/payments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetDocumentPaymentResponse',  # 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_document_request_document_number_get(self, accept, document_number, **kwargs):  # noqa: E501
        """Retrieve a specific document.  # noqa: E501

        Retrieve a specific document.  # 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_document_request_document_number_get(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"billing_address\", \"shipping_address\", \"document_lines\", \"document_lines\", \"document_lines_abda_artikelstamm\", \"payments\"\", \"parcel_labels\", \"prescription_images\",\"courier_service_delivery_slot\").
        :return: GetDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_document_request_document_number_get_with_http_info(accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.get_document_request_document_number_get_with_http_info(accept, document_number, **kwargs)  # noqa: E501
            return data

    def get_document_request_document_number_get_with_http_info(self, accept, document_number, **kwargs):  # noqa: E501
        """Retrieve a specific document.  # noqa: E501

        Retrieve a specific document.  # 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_document_request_document_number_get_with_http_info(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"billing_address\", \"shipping_address\", \"document_lines\", \"document_lines\", \"document_lines_abda_artikelstamm\", \"payments\"\", \"parcel_labels\", \"prescription_images\",\"courier_service_delivery_slot\").
        :return: GetDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/{DocumentNumber}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='GetDocumentResponse',  # 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 search_document_types_request_get(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of document types.  # noqa: E501

        Retrieve a list of document types.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_document_types_request_get(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :return: SearchDocumentTypesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_document_types_request_get_with_http_info(accept, **kwargs)  # noqa: E501
        else:
            (data) = self.search_document_types_request_get_with_http_info(accept, **kwargs)  # noqa: E501
            return data

    def search_document_types_request_get_with_http_info(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of document types.  # noqa: E501

        Retrieve a list of document types.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_document_types_request_get_with_http_info(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :return: SearchDocumentTypesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/document_types/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchDocumentTypesResponse',  # 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 search_documents_request_get(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of documents.  # noqa: E501

        Retrieve a list of documents.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_documents_request_get(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.)
        :param str order_number: An alphanumerical order number (in german: Auftrags-Nr.)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.))
        :param list[int] document_typ_ids: A list of document type Ids (e.g. order, delivery note, goods receipt) (in german: Belegtyp) (Deprecated: please use \"DocumentTypeIds\")
        :param list[int] document_type_ids: A list of document type IDs (e.g. order, delivery note, goods receipt) (in german: Belegtyp)
        :param list[str] document_types: A list of document type names (e.g. order, delivery note, goods receipt) (in german: Belegtyp)
        :param list[int] shipment_method_ids: A list of shipment method IDs (e.g. courier service, pickup) (in german: Versandart)
        :param list[str] shipment_methods: A list of shipment method names (e.g. courier service, pickup) (in german: Versandart)
        :param datetime document_date_min: ...
        :param datetime document_date_max: ...
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"billing_address\", \"shipping_address\", \"document_lines\", \"document_lines\", \"document_lines_abda_artikelstamm\", \"payments\"\", \"parcel_labels\", \"prescription_images\",\"courier_service_delivery_slot\").
        :param int offset: The (zero-based) offset of the first item in the collection to return (default: 0)
        :param int limit: The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. (default: 1000, maximum: 1000)
        :return: SearchDocumentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_documents_request_get_with_http_info(accept, **kwargs)  # noqa: E501
        else:
            (data) = self.search_documents_request_get_with_http_info(accept, **kwargs)  # noqa: E501
            return data

    def search_documents_request_get_with_http_info(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of documents.  # noqa: E501

        Retrieve a list of documents.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_documents_request_get_with_http_info(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.)
        :param str order_number: An alphanumerical order number (in german: Auftrags-Nr.)
        :param str customer_number: Alphanumerical unique identifier of a customer (always end with \"-K\") (in german: Kunden-Nr.))
        :param list[int] document_typ_ids: A list of document type Ids (e.g. order, delivery note, goods receipt) (in german: Belegtyp) (Deprecated: please use \"DocumentTypeIds\")
        :param list[int] document_type_ids: A list of document type IDs (e.g. order, delivery note, goods receipt) (in german: Belegtyp)
        :param list[str] document_types: A list of document type names (e.g. order, delivery note, goods receipt) (in german: Belegtyp)
        :param list[int] shipment_method_ids: A list of shipment method IDs (e.g. courier service, pickup) (in german: Versandart)
        :param list[str] shipment_methods: A list of shipment method names (e.g. courier service, pickup) (in german: Versandart)
        :param datetime document_date_min: ...
        :param datetime document_date_max: ...
        :param str include: Return additional data specified by a comma-separated list of values (current possible values: \"billing_address\", \"shipping_address\", \"document_lines\", \"document_lines\", \"document_lines_abda_artikelstamm\", \"payments\"\", \"parcel_labels\", \"prescription_images\",\"courier_service_delivery_slot\").
        :param int offset: The (zero-based) offset of the first item in the collection to return (default: 0)
        :param int limit: The maximum number of entries to return. If the value exceeds the maximum, then the maximum value will be used. (default: 1000, maximum: 1000)
        :return: SearchDocumentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['accept', 'document_number', 'order_number', 'customer_number', 'document_typ_ids', 'document_type_ids', 'document_types', 'shipment_method_ids', 'shipment_methods', 'document_date_min', 'document_date_max', 'include', 'offset', 'limit']  # 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 search_documents_request_get" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `search_documents_request_get`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'document_number' in params:
            query_params.append(('DocumentNumber', params['document_number']))  # noqa: E501
        if 'order_number' in params:
            query_params.append(('OrderNumber', params['order_number']))  # noqa: E501
        if 'customer_number' in params:
            query_params.append(('CustomerNumber', params['customer_number']))  # noqa: E501
        if 'document_typ_ids' in params:
            query_params.append(('DocumentTypIds', params['document_typ_ids']))  # noqa: E501
            collection_formats['DocumentTypIds'] = 'multi'  # noqa: E501
        if 'document_type_ids' in params:
            query_params.append(('DocumentTypeIds', params['document_type_ids']))  # noqa: E501
            collection_formats['DocumentTypeIds'] = 'multi'  # noqa: E501
        if 'document_types' in params:
            query_params.append(('DocumentTypes', params['document_types']))  # noqa: E501
            collection_formats['DocumentTypes'] = 'multi'  # noqa: E501
        if 'shipment_method_ids' in params:
            query_params.append(('ShipmentMethodIds', params['shipment_method_ids']))  # noqa: E501
            collection_formats['ShipmentMethodIds'] = 'multi'  # noqa: E501
        if 'shipment_methods' in params:
            query_params.append(('ShipmentMethods', params['shipment_methods']))  # noqa: E501
            collection_formats['ShipmentMethods'] = 'multi'  # noqa: E501
        if 'document_date_min' in params:
            query_params.append(('DocumentDateMin', params['document_date_min']))  # noqa: E501
        if 'document_date_max' in params:
            query_params.append(('DocumentDateMax', params['document_date_max']))  # noqa: E501
        if 'include' in params:
            query_params.append(('Include', params['include']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('Offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('Limit', params['limit']))  # noqa: E501

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchDocumentsResponse',  # 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 search_payment_methods_request_get(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of payment methods.  # noqa: E501

        Retrieve a list of payment methods.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_payment_methods_request_get(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :return: SearchPaymentMethodsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_payment_methods_request_get_with_http_info(accept, **kwargs)  # noqa: E501
        else:
            (data) = self.search_payment_methods_request_get_with_http_info(accept, **kwargs)  # noqa: E501
            return data

    def search_payment_methods_request_get_with_http_info(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of payment methods.  # noqa: E501

        Retrieve a list of payment methods.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_payment_methods_request_get_with_http_info(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :return: SearchPaymentMethodsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/payment_methods/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchPaymentMethodsResponse',  # 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 search_shipment_methods_request_get(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of shipment methods.  # noqa: E501

        Retrieve a list of shipment methods.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_shipment_methods_request_get(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :return: SearchShipmentMethodsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.search_shipment_methods_request_get_with_http_info(accept, **kwargs)  # noqa: E501
        else:
            (data) = self.search_shipment_methods_request_get_with_http_info(accept, **kwargs)  # noqa: E501
            return data

    def search_shipment_methods_request_get_with_http_info(self, accept, **kwargs):  # noqa: E501
        """Retrieve a list of shipment methods.  # noqa: E501

        Retrieve a list of shipment methods.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.search_shipment_methods_request_get_with_http_info(accept, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :return: SearchShipmentMethodsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/shipment_methods/', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='SearchShipmentMethodsResponse',  # 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 update_document_request_document_number_update(self, accept, document_number, **kwargs):  # noqa: E501
        """Update a document. (currently in experimental state)  # noqa: E501

        Update a document. (currently in experimental state)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_document_request_document_number_update(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param UpdateDocumentRequest body:
        :param str payment_method: Paymentmethod of the document (e.g. cash on delivery, debit, creditcard, PayPal) (in german: Zahlungsweise)
        :param str order_text:  (in german: Bestelltext)
        :param str marketing_text:  (in german: Bestelltext)
        :return: UpdateDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_document_request_document_number_update_with_http_info(accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.update_document_request_document_number_update_with_http_info(accept, document_number, **kwargs)  # noqa: E501
            return data

    def update_document_request_document_number_update_with_http_info(self, accept, document_number, **kwargs):  # noqa: E501
        """Update a document. (currently in experimental state)  # noqa: E501

        Update a document. (currently in experimental state)  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_document_request_document_number_update_with_http_info(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param UpdateDocumentRequest body:
        :param str payment_method: Paymentmethod of the document (e.g. cash on delivery, debit, creditcard, PayPal) (in german: Zahlungsweise)
        :param str order_text:  (in german: Bestelltext)
        :param str marketing_text:  (in german: Bestelltext)
        :return: UpdateDocumentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['accept', 'document_number', 'body', 'payment_method', 'order_text', 'marketing_text']  # 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 update_document_request_document_number_update" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'accept' is set
        if ('accept' not in params or
                params['accept'] is None):
            raise ValueError("Missing the required parameter `accept` when calling `update_document_request_document_number_update`")  # noqa: E501
        # verify the required parameter 'document_number' is set
        if ('document_number' not in params or
                params['document_number'] is None):
            raise ValueError("Missing the required parameter `document_number` when calling `update_document_request_document_number_update`")  # noqa: E501

        collection_formats = {}

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

        query_params = []
        if 'payment_method' in params:
            query_params.append(('PaymentMethod', params['payment_method']))  # noqa: E501
        if 'order_text' in params:
            query_params.append(('OrderText', params['order_text']))  # noqa: E501
        if 'marketing_text' in params:
            query_params.append(('MarketingText', params['marketing_text']))  # noqa: E501

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/{DocumentNumber}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpdateDocumentResponse',  # 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 update_document_type_request_document_numberdocument_type_create(self, accept, document_number, **kwargs):  # noqa: E501
        """Update the document type of a specific document  # noqa: E501

        Update the document type of a specific document  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_document_type_request_document_numberdocument_type_create(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param UpdateDocumentTypeRequest body:
        :return: UpdateDocumentTypeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_document_type_request_document_numberdocument_type_create_with_http_info(accept, document_number, **kwargs)  # noqa: E501
        else:
            (data) = self.update_document_type_request_document_numberdocument_type_create_with_http_info(accept, document_number, **kwargs)  # noqa: E501
            return data

    def update_document_type_request_document_numberdocument_type_create_with_http_info(self, accept, document_number, **kwargs):  # noqa: E501
        """Update the document type of a specific document  # noqa: E501

        Update the document type of a specific document  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_document_type_request_document_numberdocument_type_create_with_http_info(accept, document_number, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str accept: Accept Header (required)
        :param str document_number: Alphanumerical unique identifier of a document (always end with \"-B\") (in german: Beleg-Nr.) (required)
        :param UpdateDocumentTypeRequest body:
        :return: UpdateDocumentTypeResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

        query_params = []

        header_params = {}
        if 'accept' in params:
            header_params['Accept'] = params['accept']  # 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 = ['basic']  # noqa: E501

        return self.api_client.call_api(
            '/documents/{DocumentNumber}/document_type', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='UpdateDocumentTypeResponse',  # 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)
