Underscored namespaces: ApiResource.php

Fix for underscored namespaces and className method.

If the library is included in a project that uses an autoloader with underscored class names, the className method won't work correctly to get the API endpoint. This fixes that.
No need to substr, since we're just copying the string over.