# coding: utf-8

"""
    BTCPay Greenfield API

    A full API to use your BTCPay Server  # noqa: E501

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


class CustodiansApi(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 api_v1_stores_store_id_custodian_accounts_account_id_addresses_payment_method_get(self, store_id, account_id, payment_method, **kwargs):  # noqa: E501
        """Get a deposit address for custodian  # noqa: E501

        Get a new deposit address for the custodian using the specified payment method (network + crypto code).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_addresses_payment_method_get(store_id, account_id, payment_method, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param str payment_method: The payment method to use for the deposit. Example: \"BTC-OnChain\" or \"BTC-Lightning\" (required)
        :return: InlineResponse200
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_account_id_addresses_payment_method_get_with_http_info(store_id, account_id, payment_method, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_addresses_payment_method_get_with_http_info(store_id, account_id, payment_method, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_addresses_payment_method_get_with_http_info(self, store_id, account_id, payment_method, **kwargs):  # noqa: E501
        """Get a deposit address for custodian  # noqa: E501

        Get a new deposit address for the custodian using the specified payment method (network + crypto code).  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_addresses_payment_method_get_with_http_info(store_id, account_id, payment_method, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param str payment_method: The payment method to use for the deposit. Example: \"BTC-OnChain\" or \"BTC-Lightning\" (required)
        :return: InlineResponse200
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'store_id' in params:
            path_params['storeId'] = params['store_id']  # noqa: E501
        if 'account_id' in params:
            path_params['accountId'] = params['account_id']  # noqa: E501
        if 'payment_method' in params:
            path_params['paymentMethod'] = params['payment_method']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}/addresses/{paymentMethod}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='InlineResponse200',  # 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 api_v1_stores_store_id_custodian_accounts_account_id_delete(self, **kwargs):  # noqa: E501
        """Delete store custodian account  # noqa: E501

        Deletes a custodial 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.api_v1_stores_store_id_custodian_accounts_account_id_delete(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :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.api_v1_stores_store_id_custodian_accounts_account_id_delete_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_delete_with_http_info(**kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_delete_with_http_info(self, **kwargs):  # noqa: E501
        """Delete store custodian account  # noqa: E501

        Deletes a custodial 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.api_v1_stores_store_id_custodian_accounts_account_id_delete_with_http_info(async_req=True)
        >>> result = thread.get()

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

        all_params = []  # 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 api_v1_stores_store_id_custodian_accounts_account_id_delete" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}', '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 api_v1_stores_store_id_custodian_accounts_account_id_get(self, store_id, account_id, **kwargs):  # noqa: E501
        """Get store custodian 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.api_v1_stores_store_id_custodian_accounts_account_id_get(store_id, account_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID (required)
        :param bool asset_balances: Enable if you want the result to include the 'assetBalances' field. This will make the call slower or could cause the call to fail if the asset balances cannot be loaded (i.e. due to a bad API key).
        :return: CustodianAccountData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_account_id_get_with_http_info(store_id, account_id, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_get_with_http_info(store_id, account_id, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_get_with_http_info(self, store_id, account_id, **kwargs):  # noqa: E501
        """Get store custodian 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.api_v1_stores_store_id_custodian_accounts_account_id_get_with_http_info(store_id, account_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID (required)
        :param bool asset_balances: Enable if you want the result to include the 'assetBalances' field. This will make the call slower or could cause the call to fail if the asset balances cannot be loaded (i.e. due to a bad API key).
        :return: CustodianAccountData
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'store_id' in params:
            path_params['storeId'] = params['store_id']  # noqa: E501
        if 'account_id' in params:
            path_params['accountId'] = params['account_id']  # noqa: E501

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

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustodianAccountData',  # 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 api_v1_stores_store_id_custodian_accounts_account_id_put(self, body, **kwargs):  # noqa: E501
        """Update custodial account  # noqa: E501

        Update custodial 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.api_v1_stores_store_id_custodian_accounts_account_id_put(body, async_req=True)
        >>> result = thread.get()

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

    def api_v1_stores_store_id_custodian_accounts_account_id_put_with_http_info(self, body, **kwargs):  # noqa: E501
        """Update custodial account  # noqa: E501

        Update custodial 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.api_v1_stores_store_id_custodian_accounts_account_id_put_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateCustodianAccountRequest body: (required)
        :return: CustodianAccountData
                 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 api_v1_stores_store_id_custodian_accounts_account_id_put" % 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 `api_v1_stores_store_id_custodian_accounts_account_id_put`")  # 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 = ['API_Key']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}', 'PUT',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustodianAccountData',  # 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 api_v1_stores_store_id_custodian_accounts_account_id_trades_market_post(self, store_id, account_id, **kwargs):  # noqa: E501
        """Trade one asset for another  # noqa: E501

        Trade one asset for another using a market order (=instant purchase with instant result or failure). A suitable asset pair will automatically be selected. If no asset pair is available, the call will fail.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_trades_market_post(store_id, account_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param TradeRequestData body:
        :return: TradeResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_account_id_trades_market_post_with_http_info(store_id, account_id, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_trades_market_post_with_http_info(store_id, account_id, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_trades_market_post_with_http_info(self, store_id, account_id, **kwargs):  # noqa: E501
        """Trade one asset for another  # noqa: E501

        Trade one asset for another using a market order (=instant purchase with instant result or failure). A suitable asset pair will automatically be selected. If no asset pair is available, the call will fail.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_trades_market_post_with_http_info(store_id, account_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param TradeRequestData body:
        :return: TradeResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'store_id' in params:
            path_params['storeId'] = params['store_id']  # noqa: E501
        if 'account_id' in params:
            path_params['accountId'] = params['account_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 = ['API_Key']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/market', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='TradeResultData',  # 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 api_v1_stores_store_id_custodian_accounts_account_id_trades_quote_get(self, store_id, account_id, from_asset, to_asset, **kwargs):  # noqa: E501
        """Get quote for trading one asset for another  # noqa: E501

        Get the current bid and ask price for converting one asset into another.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_trades_quote_get(store_id, account_id, from_asset, to_asset, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param str from_asset: The asset to convert. (required)
        :param str to_asset: The asset you want. (required)
        :return: QuoteResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_account_id_trades_quote_get_with_http_info(store_id, account_id, from_asset, to_asset, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_trades_quote_get_with_http_info(store_id, account_id, from_asset, to_asset, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_trades_quote_get_with_http_info(self, store_id, account_id, from_asset, to_asset, **kwargs):  # noqa: E501
        """Get quote for trading one asset for another  # noqa: E501

        Get the current bid and ask price for converting one asset into another.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_trades_quote_get_with_http_info(store_id, account_id, from_asset, to_asset, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param str from_asset: The asset to convert. (required)
        :param str to_asset: The asset you want. (required)
        :return: QuoteResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'store_id' in params:
            path_params['storeId'] = params['store_id']  # noqa: E501
        if 'account_id' in params:
            path_params['accountId'] = params['account_id']  # noqa: E501

        query_params = []
        if 'from_asset' in params:
            query_params.append(('fromAsset', params['from_asset']))  # noqa: E501
        if 'to_asset' in params:
            query_params.append(('toAsset', params['to_asset']))  # 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 = ['API_Key']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}/trades/quote', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='QuoteResultData',  # 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 api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post(self, body, store_id, account_id, **kwargs):  # noqa: E501
        """Withdraw to store wallet  # noqa: E501

        Withdraw an asset to your store wallet.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post(body, store_id, account_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param WithdrawalRequestData body: (required)
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :return: WithdrawalResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post_with_http_info(body, store_id, account_id, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post_with_http_info(body, store_id, account_id, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post_with_http_info(self, body, store_id, account_id, **kwargs):  # noqa: E501
        """Withdraw to store wallet  # noqa: E501

        Withdraw an asset to your store wallet.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post_with_http_info(body, store_id, account_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param WithdrawalRequestData body: (required)
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :return: WithdrawalResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body', 'store_id', 'account_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 api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post" % 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 `api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post`")  # noqa: E501
        # verify the required parameter 'store_id' is set
        if ('store_id' not in params or
                params['store_id'] is None):
            raise ValueError("Missing the required parameter `store_id` when calling `api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post`")  # noqa: E501
        # verify the required parameter 'account_id' is set
        if ('account_id' not in params or
                params['account_id'] is None):
            raise ValueError("Missing the required parameter `account_id` when calling `api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_post`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'store_id' in params:
            path_params['storeId'] = params['store_id']  # noqa: E501
        if 'account_id' in params:
            path_params['accountId'] = params['account_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 = ['API_Key']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WithdrawalResultData',  # 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 api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_withdrawal_id_post(self, store_id, account_id, withdrawal_id, **kwargs):  # noqa: E501
        """Get withdrawal info  # noqa: E501

        Get the details about a past withdrawal.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_withdrawal_id_post(store_id, account_id, withdrawal_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param str withdrawal_id: The Withdrawal ID. (required)
        :return: WithdrawalResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_withdrawal_id_post_with_http_info(store_id, account_id, withdrawal_id, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_withdrawal_id_post_with_http_info(store_id, account_id, withdrawal_id, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_withdrawal_id_post_with_http_info(self, store_id, account_id, withdrawal_id, **kwargs):  # noqa: E501
        """Get withdrawal info  # noqa: E501

        Get the details about a past withdrawal.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_account_id_withdrawals_withdrawal_id_post_with_http_info(store_id, account_id, withdrawal_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param str account_id: The Custodian Account ID. (required)
        :param str withdrawal_id: The Withdrawal ID. (required)
        :return: WithdrawalResultData
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

        path_params = {}
        if 'store_id' in params:
            path_params['storeId'] = params['store_id']  # noqa: E501
        if 'account_id' in params:
            path_params['accountId'] = params['account_id']  # noqa: E501
        if 'withdrawal_id' in params:
            path_params['withdrawalId'] = params['withdrawal_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts/{accountId}/withdrawals/{withdrawalId}', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='WithdrawalResultData',  # 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 api_v1_stores_store_id_custodian_accounts_get(self, store_id, **kwargs):  # noqa: E501
        """List store custodian accounts  # noqa: E501

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

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param bool asset_balances: Enable if you want the result to include the 'assetBalances' field. This will make the call slower or could cause the call to fail if the asset balances cannot be loaded (i.e. due to a bad API key).
        :return: list[CustodianAccountData]
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.api_v1_stores_store_id_custodian_accounts_get_with_http_info(store_id, **kwargs)  # noqa: E501
        else:
            (data) = self.api_v1_stores_store_id_custodian_accounts_get_with_http_info(store_id, **kwargs)  # noqa: E501
            return data

    def api_v1_stores_store_id_custodian_accounts_get_with_http_info(self, store_id, **kwargs):  # noqa: E501
        """List store custodian accounts  # noqa: E501

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

        :param async_req bool
        :param str store_id: The Store ID (required)
        :param bool asset_balances: Enable if you want the result to include the 'assetBalances' field. This will make the call slower or could cause the call to fail if the asset balances cannot be loaded (i.e. due to a bad API key).
        :return: list[CustodianAccountData]
                 If the method is called asynchronously,
                 returns the request thread.
        """

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

        collection_formats = {}

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

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

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[CustodianAccountData]',  # 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 api_v1_stores_store_id_custodian_accounts_post(self, body, **kwargs):  # noqa: E501
        """Add a custodial account to a store.  # noqa: E501

        Add a custodial account to a store.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_post(body, async_req=True)
        >>> result = thread.get()

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

    def api_v1_stores_store_id_custodian_accounts_post_with_http_info(self, body, **kwargs):  # noqa: E501
        """Add a custodial account to a store.  # noqa: E501

        Add a custodial account to a store.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.api_v1_stores_store_id_custodian_accounts_post_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param CreateCustodianAccountRequest body: (required)
        :return: CustodianAccountData
                 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 api_v1_stores_store_id_custodian_accounts_post" % 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 `api_v1_stores_store_id_custodian_accounts_post`")  # 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 = ['API_Key']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/stores/{storeId}/custodian-accounts', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='CustodianAccountData',  # 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 custodians_get_supported_custodians(self, **kwargs):  # noqa: E501
        """List supported custodians  # noqa: E501

        List all supported custodians for the BTCPay instance. You can install plugins to add more custodians.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custodians_get_supported_custodians(async_req=True)
        >>> result = thread.get()

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

    def custodians_get_supported_custodians_with_http_info(self, **kwargs):  # noqa: E501
        """List supported custodians  # noqa: E501

        List all supported custodians for the BTCPay instance. You can install plugins to add more custodians.  # noqa: E501
        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.custodians_get_supported_custodians_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: list[CustodianData]
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # 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 custodians_get_supported_custodians" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

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

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

        return self.api_client.call_api(
            '/api/v1/custodians', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='list[CustodianData]',  # 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)
