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

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

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
public static function create ( int $ cardId , string $ type = null , array $ customHeaders = [ ] ) : BunqResponseInt { $ apiClient = new ApiClient ( static :: getApiContext ( ) ) ; $ apiClient -> enableEncryption ( ) ; $ responseRaw = $ apiClient -> post ( vsprintf ( self :: ENDPOINT_URL_CREATE , [ static :: determineUserId ( ) , $ cardId ] ) , [ self :: FIELD_TYPE => $ type ] , $ customHeaders ) ; return BunqResponseInt :: castFromBunqResponse ( static :: processForId ( $ responseRaw ) ) ; }
Generate a new CVC2 code for a card.

@param int $cardId
@param string|null $type The type of generated cvc2. Can be STATIC or
GENERATED.
@param string[] $customHeaders

@return BunqResponseInt
Generate a new CVC2 code for a card .