Each endpoint will be a class that can implement get/post/put/delete methods.
The routes are registered to WP REST API automatically based on the existence
of implemented methods. The endpoint classes are handled standard services and
therefore can leverage full powers of the DI container.
[MAILPOET-4135]