Code does not work in class implementation but works fine in functions.php file

As Nathan has said in his comment above, the update_events() function needs to be a public function, not a private function:

  • public scope to make that variable/function available from anywhere, other classes and instances of the object.
  • private scope when you want your variable/function to be visible in its own class only.
  • protected scope when you want to make your variable/function visible in all classes that extend current class including the parent class.