def create(cls, token, custom_headers=None):
        """
        Create a request from an ideal transaction.

        :type user_id: int
        :param token: The token passed from a site or read from a QR code.
        :type token: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseTokenQrRequestIdeal
        """

        if custom_headers is None:
            custom_headers = {}

        request_map = {
            cls.FIELD_TOKEN: token
        }
        request_map_string = converter.class_to_json(request_map)
        request_map_string = cls._remove_field_for_request(request_map_string)

        api_client = client.ApiClient(cls._get_api_context())
        request_bytes = request_map_string.encode()
        endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id())
        response_raw = api_client.post(endpoint_url, request_bytes,
                                       custom_headers)

        return BunqResponseTokenQrRequestIdeal.cast_from_bunq_response(
            cls._from_json(response_raw, cls._OBJECT_TYPE_POST)
        )
def create ( cls , token , custom_headers = None ) : if custom_headers is None : custom_headers = { } request_map = { cls . FIELD_TOKEN : token } request_map_string = converter . class_to_json ( request_map ) request_map_string = cls . _remove_field_for_request ( request_map_string ) api_client = client . ApiClient ( cls . _get_api_context ( ) ) request_bytes = request_map_string . encode ( ) endpoint_url = cls . _ENDPOINT_URL_CREATE . format ( cls . _determine_user_id ( ) ) response_raw = api_client . post ( endpoint_url , request_bytes , custom_headers ) return BunqResponseTokenQrRequestIdeal . cast_from_bunq_response ( cls . _from_json ( response_raw , cls . _OBJECT_TYPE_POST ) )
Create a request from an ideal transaction.

        :type user_id: int
        :param token: The token passed from a site or read from a QR code.
        :type token: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseTokenQrRequestIdeal