def create(cls, card_id, type_=None, custom_headers=None):
        """
        Generate a new CVC2 code for a card.

        :type user_id: int
        :type card_id: int
        :param type_: The type of generated cvc2. Can be STATIC or GENERATED.
        :type type_: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseInt
        """

        if custom_headers is None:
            custom_headers = {}

        request_map = {
            cls.FIELD_TYPE: type_
        }
        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()
        request_bytes = security.encrypt(cls._get_api_context(), request_bytes,
                                         custom_headers)
        endpoint_url = cls._ENDPOINT_URL_CREATE.format(cls._determine_user_id(),
                                                       card_id)
        response_raw = api_client.post(endpoint_url, request_bytes,
                                       custom_headers)

        return BunqResponseInt.cast_from_bunq_response(
            cls._process_for_id(response_raw)
        )
def create ( cls , card_id , type_ = None , custom_headers = None ) : if custom_headers is None : custom_headers = { } request_map = { cls . FIELD_TYPE : type_ } 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 ( ) request_bytes = security . encrypt ( cls . _get_api_context ( ) , request_bytes , custom_headers ) endpoint_url = cls . _ENDPOINT_URL_CREATE . format ( cls . _determine_user_id ( ) , card_id ) response_raw = api_client . post ( endpoint_url , request_bytes , custom_headers ) return BunqResponseInt . cast_from_bunq_response ( cls . _process_for_id ( response_raw ) )
Generate a new CVC2 code for a card.

        :type user_id: int
        :type card_id: int
        :param type_: The type of generated cvc2. Can be STATIC or GENERATED.
        :type type_: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseInt