Fix Restangular type definitions

I made an error in my last pull request. I assumed `response`to be the wrong type. This PR fixes that. It also adds more tests.

I'm sorry for the inconvenience.