# coding: utf-8

"""
    The Selling Partner API for Amazon Seller Wallet Open Banking API Spec.  For more information, refer to the [Seller Wallet Open Banking API Use Case Guide](doc:seller-wallet-open-banking-api-v2024-03-01-use-case-guide).

    The Selling Partner API for Seller Wallet (Seller Wallet API) provides financial information that is relevant to a seller's Seller Wallet account. You can obtain financial events, balances, and transfer schedules for Seller Wallet accounts. You can also schedule and initiate transactions.

    The version of the OpenAPI document: 2024-03-01
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from spapi.api_client import ApiClient


class TransferScheduleApi(object):
    """NOTE: This class is auto generated by the openapi generator.

    Do not edit the class manually.
    """

    api_models_module = "spapi.models.seller_wallet_2024_03_01"

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

    def create_transfer_schedule(self, dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs):  # noqa: E501
        """Create a transfer schedule request from Amazon SW account to another customer provided account  # noqa: E501

        Create a transfer schedule request from a Seller Wallet account to another customer-provided account.  # 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_transfer_schedule(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str dest_account_digital_signature: Digital signature for the destination bank account details. (required)
        :param str amount_digital_signature: Digital signature for the source currency transaction amount. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param TransferScheduleRequest body: Defines the actual payload of the request (required)
        :return: TransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.create_transfer_schedule_with_http_info(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.create_transfer_schedule_with_http_info(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs)  # noqa: E501
            return data

    def create_transfer_schedule_with_http_info(self, dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs):  # noqa: E501
        """Create a transfer schedule request from Amazon SW account to another customer provided account  # noqa: E501

        Create a transfer schedule request from a Seller Wallet account to another customer-provided account.  # 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_transfer_schedule_with_http_info(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str dest_account_digital_signature: Digital signature for the destination bank account details. (required)
        :param str amount_digital_signature: Digital signature for the source currency transaction amount. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param TransferScheduleRequest body: Defines the actual payload of the request (required)
        :return: TransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}
        if 'dest_account_digital_signature' in params:
            header_params['destAccountDigitalSignature'] = params['dest_account_digital_signature']  # noqa: E501
        if 'amount_digital_signature' in params:
            header_params['amountDigitalSignature'] = params['amount_digital_signature']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/finances/transfers/wallet/2024-03-01/transferSchedules', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TransferSchedule',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def delete_schedule_transaction(self, transfer_schedule_id, marketplace_id, **kwargs):  # noqa: E501
        """Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account  # noqa: E501

        Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account.  # 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_schedule_transaction(transfer_schedule_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str transfer_schedule_id: A unique reference ID for a scheduled transfer. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: DeleteTransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.delete_schedule_transaction_with_http_info(transfer_schedule_id, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.delete_schedule_transaction_with_http_info(transfer_schedule_id, marketplace_id, **kwargs)  # noqa: E501
            return data

    def delete_schedule_transaction_with_http_info(self, transfer_schedule_id, marketplace_id, **kwargs):  # noqa: E501
        """Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account  # noqa: E501

        Delete a transaction request that is scheduled from Amazon Seller Wallet account to another customer-provided account.  # 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_schedule_transaction_with_http_info(transfer_schedule_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str transfer_schedule_id: A unique reference ID for a scheduled transfer. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: DeleteTransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/finances/transfers/wallet/2024-03-01/transferSchedules/{transferScheduleId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='DeleteTransferSchedule',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def get_transfer_schedule(self, transfer_schedule_id, marketplace_id, **kwargs):  # noqa: E501
        """Find particular Amazon Seller Wallet account transfer schedule by Amazon transfer schedule identifier  # noqa: E501

        Find a particular Amazon Seller Wallet account transfer schedule.  # 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_transfer_schedule(transfer_schedule_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str transfer_schedule_id: The schedule ID of the Amazon Seller Wallet transfer. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: TransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.get_transfer_schedule_with_http_info(transfer_schedule_id, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.get_transfer_schedule_with_http_info(transfer_schedule_id, marketplace_id, **kwargs)  # noqa: E501
            return data

    def get_transfer_schedule_with_http_info(self, transfer_schedule_id, marketplace_id, **kwargs):  # noqa: E501
        """Find particular Amazon Seller Wallet account transfer schedule by Amazon transfer schedule identifier  # noqa: E501

        Find a particular Amazon Seller Wallet account transfer schedule.  # 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_transfer_schedule_with_http_info(transfer_schedule_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str transfer_schedule_id: The schedule ID of the Amazon Seller Wallet transfer. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :return: TransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

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

        collection_formats = {}

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

        query_params = []
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/finances/transfers/wallet/2024-03-01/transferSchedules/{transferScheduleId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TransferSchedule',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def list_transfer_schedules(self, account_id, marketplace_id, **kwargs):  # noqa: E501
        """The API will return all the transfer schedules for a given Amazon SW account  # noqa: E501

        Retrieve transfer schedules of a Seller Wallet bank account.  # 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_transfer_schedules(account_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str account_id: ID of the Amazon SW account (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param str next_page_token: Pagination token to retrieve a specific page of results.
        :return: TransferScheduleListing
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.list_transfer_schedules_with_http_info(account_id, marketplace_id, **kwargs)  # noqa: E501
        else:
            (data) = self.list_transfer_schedules_with_http_info(account_id, marketplace_id, **kwargs)  # noqa: E501
            return data

    def list_transfer_schedules_with_http_info(self, account_id, marketplace_id, **kwargs):  # noqa: E501
        """The API will return all the transfer schedules for a given Amazon SW account  # noqa: E501

        Retrieve transfer schedules of a Seller Wallet bank account.  # 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_transfer_schedules_with_http_info(account_id, marketplace_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str account_id: ID of the Amazon SW account (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param str next_page_token: Pagination token to retrieve a specific page of results.
        :return: TransferScheduleListing
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'account_id' in params:
            query_params.append(('accountId', params['account_id']))  # noqa: E501
        if 'marketplace_id' in params:
            query_params.append(('marketplaceId', params['marketplace_id']))  # noqa: E501
        if 'next_page_token' in params:
            query_params.append(('nextPageToken', params['next_page_token']))  # 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 = []  # noqa: E501

        return self.api_client.call_api(
            '/finances/transfers/wallet/2024-03-01/transferSchedules', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TransferScheduleListing',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)

    def update_transfer_schedule(self, dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs):  # noqa: E501
        """Update a transfer schedule information. Only fields (i.e; transferScheduleInformation, paymentPreference, transferScheduleStatus) in the request body can be updated.  # noqa: E501

        Returns a transfer belonging to the updated scheduled transfer request  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_transfer_schedule(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str dest_account_digital_signature: Digital signature for the destination bank account details. (required)
        :param str amount_digital_signature: Digital signature for the source currency transaction amount. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param TransferSchedule body: Defines the actual payload of the scheduled transfer request that is to be updated.  (required)
        :return: TransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.update_transfer_schedule_with_http_info(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.update_transfer_schedule_with_http_info(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs)  # noqa: E501
            return data

    def update_transfer_schedule_with_http_info(self, dest_account_digital_signature, amount_digital_signature, marketplace_id, body, **kwargs):  # noqa: E501
        """Update a transfer schedule information. Only fields (i.e; transferScheduleInformation, paymentPreference, transferScheduleStatus) in the request body can be updated.  # noqa: E501

        Returns a transfer belonging to the updated scheduled transfer request  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.update_transfer_schedule_with_http_info(dest_account_digital_signature, amount_digital_signature, marketplace_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str dest_account_digital_signature: Digital signature for the destination bank account details. (required)
        :param str amount_digital_signature: Digital signature for the source currency transaction amount. (required)
        :param str marketplace_id: The marketplace for which items are returned. The marketplace ID is the globally unique identifier of a marketplace. To find the ID for your marketplace, refer to [Marketplace IDs](https://developer-docs.amazon.com/sp-api/docs/marketplace-ids). (required)
        :param TransferSchedule body: Defines the actual payload of the scheduled transfer request that is to be updated.  (required)
        :return: TransferSchedule
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}

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

        header_params = {}
        if 'dest_account_digital_signature' in params:
            header_params['destAccountDigitalSignature'] = params['dest_account_digital_signature']  # noqa: E501
        if 'amount_digital_signature' in params:
            header_params['amountDigitalSignature'] = params['amount_digital_signature']  # noqa: E501

        form_params = []
        local_var_files = {}

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

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

        # Authentication setting
        auth_settings = []  # noqa: E501

        return self.api_client.call_api(
            '/finances/transfers/wallet/2024-03-01/transferSchedules', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TransferSchedule',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats, api_models_module=self.api_models_module)
