def create(cls, card_id, name_on_card=None, pin_code=None, second_line=None,
               custom_headers=None):
        """
        Request a card replacement.

        :type user_id: int
        :type card_id: int
        :param name_on_card: The user's name as it will be on the card. Check
        'card-name' for the available card names for a user.
        :type name_on_card: str
        :param pin_code: The plaintext pin code. Requests require encryption to
        be enabled.
        :type pin_code: str
        :param second_line: The second line on the card.
        :type second_line: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseInt
        """

        if custom_headers is None:
            custom_headers = {}

        request_map = {
            cls.FIELD_NAME_ON_CARD: name_on_card,
            cls.FIELD_PIN_CODE: pin_code,
            cls.FIELD_SECOND_LINE: second_line
        }
        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 , name_on_card = None , pin_code = None , second_line = None , custom_headers = None ) : if custom_headers is None : custom_headers = { } request_map = { cls . FIELD_NAME_ON_CARD : name_on_card , cls . FIELD_PIN_CODE : pin_code , cls . FIELD_SECOND_LINE : second_line } 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 ) )
Request a card replacement.

        :type user_id: int
        :type card_id: int
        :param name_on_card: The user's name as it will be on the card. Check
        'card-name' for the available card names for a user.
        :type name_on_card: str
        :param pin_code: The plaintext pin code. Requests require encryption to
        be enabled.
        :type pin_code: str
        :param second_line: The second line on the card.
        :type second_line: str
        :type custom_headers: dict[str, str]|None

        :rtype: BunqResponseInt