Adding magic getter and setter methods for resources
Adding custom exception for handling returned API errors