def flush_logs(older_than: 0, period: :days)
      raise JSS::NoSuchItemError, "Policy doesn't exist in the JSS. Use #create first." unless @in_jss

      unless LOG_FLUSH_INTERVAL_INTEGERS.key?(older_than)
        raise JSS::InvalidDataError, "older_than must be one of these integers: #{LOG_FLUSH_INTERVAL_INTEGERS.keys.join ', '}"
      end

      unless LOG_FLUSH_INTERVAL_PERIODS.key?(period)
        raise JSS::InvalidDataError, "period must be one of these symbols: :#{LOG_FLUSH_INTERVAL_PERIODS.keys.join ', :'}"
      end

      interval = "#{LOG_FLUSH_INTERVAL_INTEGERS[older_than]}+#{LOG_FLUSH_INTERVAL_PERIODS[period]}"

      @api.delete_rsrc "#{LOG_FLUSH_RSRC}/policy/id/#{@id}/interval/#{interval}"
    end
def flush_logs(older_than: 0, period: :days)
      raise JSS::NoSuchItemError, "Policy doesn't exist in the JSS. Use #create first." unless @in_jss

      unless LOG_FLUSH_INTERVAL_INTEGERS.key?(older_than)
        raise JSS::InvalidDataError, "older_than must be one of these integers: #{LOG_FLUSH_INTERVAL_INTEGERS.keys.join ', '}"
      end

      unless LOG_FLUSH_INTERVAL_PERIODS.key?(period)
        raise JSS::InvalidDataError, "period must be one of these symbols: :#{LOG_FLUSH_INTERVAL_PERIODS.keys.join ', :'}"
      end

      interval = "#{LOG_FLUSH_INTERVAL_INTEGERS[older_than]}+#{LOG_FLUSH_INTERVAL_PERIODS[period]}"

      @api.delete_rsrc "#{LOG_FLUSH_RSRC}/policy/id/#{@id}/interval/#{interval}"
    end
Flush all policy logs for this policy older than
 some number of days, weeks, months or years.

 With no parameters, flushes all logs

 NOTE: Currently the API doesn't have a way to
 flush only failed policies.

 @param older_than[Integer] 0, 1, 2, 3, or 6

 @param period[Symbol] :days, :weeks, :months, or :years

 @return [void]