# coding: utf-8

"""
    vault/kernel/core_api/proto/v1/accounts/core_api_account_schedule_tags.proto

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

    OpenAPI spec version: version not set
    
    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 common.vault.oas.api_client import ApiClient


class CoreAPIPaymentDevicesApi(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 batch_get_payment_device_links(self, **kwargs):  # noqa: E501
        """Returns the payment device links for the provided IDs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.batch_get_payment_device_links(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] ids: List of IDs of payment device links to fetch. Required; must be non-empty.
        :return: PaymentDevicesBatchGetPaymentDeviceLinksResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.batch_get_payment_device_links_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.batch_get_payment_device_links_with_http_info(**kwargs)  # noqa: E501
            return data

    def batch_get_payment_device_links_with_http_info(self, **kwargs):  # noqa: E501
        """Returns the payment device links for the provided IDs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.batch_get_payment_device_links_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] ids: List of IDs of payment device links to fetch. Required; must be non-empty.
        :return: PaymentDevicesBatchGetPaymentDeviceLinksResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ids' in params:
            query_params.append(('ids', params['ids']))  # noqa: E501
            collection_formats['ids'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1/payment-device-links:batchGet', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesBatchGetPaymentDeviceLinksResponse',  # 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 batch_get_payment_devices(self, **kwargs):  # noqa: E501
        """Returns the payment devices for the provided IDs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.batch_get_payment_devices(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] ids: List of IDs of payment devices to fetch. Required; must be non-empty.
        :return: PaymentDevicesBatchGetPaymentDevicesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.batch_get_payment_devices_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.batch_get_payment_devices_with_http_info(**kwargs)  # noqa: E501
            return data

    def batch_get_payment_devices_with_http_info(self, **kwargs):  # noqa: E501
        """Returns the payment devices for the provided IDs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.batch_get_payment_devices_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] ids: List of IDs of payment devices to fetch. Required; must be non-empty.
        :return: PaymentDevicesBatchGetPaymentDevicesResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'ids' in params:
            query_params.append(('ids', params['ids']))  # noqa: E501
            collection_formats['ids'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1/payment-devices:batchGet', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesBatchGetPaymentDevicesResponse',  # 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_payment_device(self, body, **kwargs):  # noqa: E501
        """Creates a new payment device.  # 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_payment_device(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesCreatePaymentDeviceRequest body: (required)
        :return: PaymentDevicesPaymentDevice
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_payment_device_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_payment_device_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_payment_device_with_http_info(self, body, **kwargs):  # noqa: E501
        """Creates a new payment device.  # 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_payment_device_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesCreatePaymentDeviceRequest body: (required)
        :return: PaymentDevicesPaymentDevice
                 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_payment_device" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_payment_device`")  # noqa: E501

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/payment-devices', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesPaymentDevice',  # 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_payment_device_link(self, body, **kwargs):  # noqa: E501
        """Creates a payment-device-link linking a payment device to the account. The payment device that is being linked to must have a status of PAYMENT_DEVICE_STATUS_ACTIVE or PAYMENT_DEVICE_STATUS_PENDING for the request to succeed.  # 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_payment_device_link(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesCreatePaymentDeviceLinkRequest body: (required)
        :return: PaymentDevicesPaymentDeviceLink
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_payment_device_link_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_payment_device_link_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def create_payment_device_link_with_http_info(self, body, **kwargs):  # noqa: E501
        """Creates a payment-device-link linking a payment device to the account. The payment device that is being linked to must have a status of PAYMENT_DEVICE_STATUS_ACTIVE or PAYMENT_DEVICE_STATUS_PENDING for the request to succeed.  # 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_payment_device_link_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesCreatePaymentDeviceLinkRequest body: (required)
        :return: PaymentDevicesPaymentDeviceLink
                 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_payment_device_link" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `create_payment_device_link`")  # noqa: E501

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/payment-device-links', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesPaymentDeviceLink',  # 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 list_payment_device_links(self, **kwargs):  # noqa: E501
        """Lists the payment device links that match the provided criteria. Must provide at least one token, payment device ID or account ID.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_payment_device_links(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] tokens: List of payment device link tokens.
        :param list[str] payment_device_ids: List of payment device IDs.
        :param list[str] account_ids: List of account IDs.
        :param datetime effective_timestamp: Maximum start timestamp of listed links. Optional. Defaults to current time.
        :param bool include_inactive: Indicates whether to include inactive payment device links in the response.
        :return: PaymentDevicesListPaymentDeviceLinksResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_payment_device_links_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.list_payment_device_links_with_http_info(**kwargs)  # noqa: E501
            return data

    def list_payment_device_links_with_http_info(self, **kwargs):  # noqa: E501
        """Lists the payment device links that match the provided criteria. Must provide at least one token, payment device ID or account ID.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.list_payment_device_links_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param list[str] tokens: List of payment device link tokens.
        :param list[str] payment_device_ids: List of payment device IDs.
        :param list[str] account_ids: List of account IDs.
        :param datetime effective_timestamp: Maximum start timestamp of listed links. Optional. Defaults to current time.
        :param bool include_inactive: Indicates whether to include inactive payment device links in the response.
        :return: PaymentDevicesListPaymentDeviceLinksResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['tokens', 'payment_device_ids', 'account_ids', 'effective_timestamp', 'include_inactive']  # 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 list_payment_device_links" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'tokens' in params:
            query_params.append(('tokens', params['tokens']))  # noqa: E501
            collection_formats['tokens'] = 'multi'  # noqa: E501
        if 'payment_device_ids' in params:
            query_params.append(('payment_device_ids', params['payment_device_ids']))  # noqa: E501
            collection_formats['payment_device_ids'] = 'multi'  # noqa: E501
        if 'account_ids' in params:
            query_params.append(('account_ids', params['account_ids']))  # noqa: E501
            collection_formats['account_ids'] = 'multi'  # noqa: E501
        if 'effective_timestamp' in params:
            query_params.append(('effective_timestamp', params['effective_timestamp']))  # noqa: E501
        if 'include_inactive' in params:
            query_params.append(('include_inactive', params['include_inactive']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/v1/payment-device-links', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesListPaymentDeviceLinksResponse',  # 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_payment_device(self, body, payment_device_id, **kwargs):  # noqa: E501
        """Updates an existing payment device.  # 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_payment_device(body, payment_device_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesUpdatePaymentDeviceRequest body: (required)
        :param str payment_device_id: Caller injected or Vault auto-generated unique ID for payment device. Optional. When auto-generated, this is a UUID in the canonical 8-4-4-4-12 form. (required)
        :return: PaymentDevicesPaymentDevice
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_payment_device_with_http_info(body, payment_device_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_payment_device_with_http_info(body, payment_device_id, **kwargs)  # noqa: E501
            return data

    def update_payment_device_with_http_info(self, body, payment_device_id, **kwargs):  # noqa: E501
        """Updates an existing payment device.  # 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_payment_device_with_http_info(body, payment_device_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesUpdatePaymentDeviceRequest body: (required)
        :param str payment_device_id: Caller injected or Vault auto-generated unique ID for payment device. Optional. When auto-generated, this is a UUID in the canonical 8-4-4-4-12 form. (required)
        :return: PaymentDevicesPaymentDevice
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'payment_device_id' in params:
            path_params['payment_device.id'] = params['payment_device_id']  # noqa: E501

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/payment-devices/{payment_device.id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesPaymentDevice',  # 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_payment_device_link(self, body, payment_device_link_id, **kwargs):  # noqa: E501
        """Updates an existing payment device link.  # 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_payment_device_link(body, payment_device_link_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesUpdatePaymentDeviceLinkRequest body: (required)
        :param str payment_device_link_id: A caller-injected or Vault auto-generated unique ID for the payment device link. When auto-generated, this is a UUID in the canonical 8-4-4-4-12 form. (required)
        :return: PaymentDevicesPaymentDeviceLink
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_payment_device_link_with_http_info(body, payment_device_link_id, **kwargs)  # noqa: E501
        else:
            (data) = self.update_payment_device_link_with_http_info(body, payment_device_link_id, **kwargs)  # noqa: E501
            return data

    def update_payment_device_link_with_http_info(self, body, payment_device_link_id, **kwargs):  # noqa: E501
        """Updates an existing payment device link.  # 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_payment_device_link_with_http_info(body, payment_device_link_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param PaymentDevicesUpdatePaymentDeviceLinkRequest body: (required)
        :param str payment_device_link_id: A caller-injected or Vault auto-generated unique ID for the payment device link. When auto-generated, this is a UUID in the canonical 8-4-4-4-12 form. (required)
        :return: PaymentDevicesPaymentDeviceLink
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'payment_device_link_id' in params:
            path_params['payment_device_link.id'] = params['payment_device_link_id']  # noqa: E501

        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 = ['ApiKeyAuth']  # noqa: E501

        return self.api_client.call_api(
            '/v1/payment-device-links/{payment_device_link.id}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='PaymentDevicesPaymentDeviceLink',  # 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)
