@classmethod
def first_or_create(cls, parent=None, **attributes):
    """
        Attempts to find the first resource with the same attributes, creates the resource if no matches are found.
        This will trigger an api GET request and a POST request if the resource does not exist.
        :param parent ResourceBase: the parent of the resource - used for nesting the request url, optional
        :param **attributes: any number of keyword arguments as attributes to search/create the resource
        :returns: a resource instance - the existing one if found, otherwise the newly created one
        """
    existing_resource = cls.find_by(parent, **attributes)
    if existing_resource:
        return existing_resource
    return cls(**attributes).create()
