public static function create(
        int $cardId,
        string $nameOnCard = null,
        string $pinCode = null,
        string $secondLine = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), $cardId]
            ),
            [
                self::FIELD_NAME_ON_CARD => $nameOnCard,
                self::FIELD_PIN_CODE => $pinCode,
                self::FIELD_SECOND_LINE => $secondLine,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create(
        int $cardId,
        string $nameOnCard = null,
        string $pinCode = null,
        string $secondLine = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $apiClient->enableEncryption();
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), $cardId]
            ),
            [
                self::FIELD_NAME_ON_CARD => $nameOnCard,
                self::FIELD_PIN_CODE => $pinCode,
                self::FIELD_SECOND_LINE => $secondLine,
            ],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create ( int $ cardId , string $ nameOnCard = null , string $ pinCode = null , string $ secondLine = null , array $ customHeaders = [ ] ) : BunqResponseInt { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ apiClient -> enableEncryption ( ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) , $ cardId ] ) , [ self :: FIELD_NAME_ON_CARD => $ nameOnCard , self :: FIELD_PIN_CODE => $ pinCode , self :: FIELD_SECOND_LINE => $ secondLine , ] , $ customHeaders ) ; return BunqResponseInt :: castFromBunqResponse ( static :: processForId ( $ responseRaw ) ) ; }
Request a card replacement.

@param int $cardId
@param string|null $nameOnCard The user's name as it will be on the card.
Check 'card-name' for the available card names for a user.
@param string|null $pinCode    The plaintext pin code. Requests require
encryption to be enabled.
@param string|null $secondLine The second line on the card.
@param string[] $customHeaders

@return BunqResponseInt
Request a card replacement .