def upsert(class_or_classname, field, value, attrs)
      clazz = find_or_materialize(class_or_classname)
      json_for_update = coerced_json(attrs, clazz)
      http_patch("/services/data/v#{self.version}/sobjects/#{clazz.sobject_name}/#{field}/#{value}", json_for_update)
    end
def upsert(class_or_classname, field, value, attrs)
      clazz = find_or_materialize(class_or_classname)
      json_for_update = coerced_json(attrs, clazz)
      http_patch("/services/data/v#{self.version}/sobjects/#{clazz.sobject_name}/#{field}/#{value}", json_for_update)
    end
Attempts to find the record on Force.com of type _class_or_classname_ with attribute _field_ set as _value_. If found, it will update the record with the _attrs_ hash.
 If not found, it will create a new record with _attrs_.

    client.upsert(Car, "Color", "Blue", {"Year" => "2012"})