diff --git a/clearbit/resource.py b/clearbit/resource.py index 3b7688a..64960fb 100644 --- a/clearbit/resource.py +++ b/clearbit/resource.py @@ -76,3 +76,13 @@ def delete(cls, url, **values): response.raise_for_status() return response + + def get_field(self, field, default): + return self.__dict__().get(field, default) + + def __dict__(self): + resource_dict = {} + for key, value in self.items(): + resource_dict[key] = value + return resource_dict +