Add apply method to Endpoint companion

This allows for endpoint to be created with slightly prettier syntax.
Merge pull request #95 from benjumanji/feature/endpoint-companion

Add apply method to Endpoint companion