lib/jamf/api/base_classes/resource.rb
def update_in_jamf
      @cnx.put(rsrc_path, to_jamf)
    rescue Jamf::Connection::APIError => e
      if e.status == 409 && self.class.included_modules.include?(Jamf::Lockable)
        raise Jamf::VersionLockError, "The #{self.class} has been modified since it was fetched. Please refetch and try again."
      end

      raise e
    end
# TODO: handle PATCH when it becomes a thing
handle PATCH when it becomes a thing
handle PATCH when it becomes a thing
def update_in_jamf
      @cnx.put(rsrc_path, to_jamf)
    rescue Jamf::Connection::APIError => e
      if e.status == 409 && self.class.included_modules.include?(Jamf::Lockable)
        raise Jamf::VersionLockError, "The #{self.class} has been modified since it was fetched. Please refetch and try again."
      end
      raise e
    end
def update_in_jamf @cnx . put ( rsrc_path , to_jamf ) rescue Jamf :: Connection :: APIError => e if e . status == 409 && self . class . included_modules . include? ( Jamf :: Lockable ) raise Jamf :: VersionLockError , "The #{self.class} has been modified since it was fetched. Please refetch and try again." end raise e end
TODO: handle PATCH when it becomes a thing
TODO : handle PATCH when it becomes a thing