Figured that out. RTFM.
thisDocument = app.activeDocument;
docSelection = thisDocument.selection;
selectionLen = docSelection.length;
for (i = 0; i < selectionLen; i++) {
oldFill = docSelection;
if (oldFill.typename == "PathItem" || oldFill.typename == "CompoundPathItem") {
checkPath = oldFill;
if (oldFill.typename == "CompoundPathItem") {
checkPath = oldFill.pathItems[0];
}
if (checkPath.filled == true && checkPath.fillColor.typename == "GradientColor") {
if (checkPath.fillColor.gradient.type == GradientType.LINEAR) {
//make rotation multiple of 5
var angleVal = prompt("Make angle of gradients to be multiple of:","5","Gradient Angle")
var oldAngle = checkPath.fillColor.angle;
var newAngle = (Math.round(oldAngle / angleVal)) * angleVal;
var angleDiff = newAngle - oldAngle;
oldFill.rotate(angleDiff, 0, 0, 1, 0);
//make stops position at multiple of 5
var stopVal = prompt("Make gradient stops position at multiple of:","5","Gradient Stops")
var numOfStops = checkPath.fillColor.gradient.gradientStops.length;
for (k = 0; k < numOfStops; k++) {
var oldRamp = checkPath.fillColor.gradient.gradientStops.rampPoint;
var newRamp = (Math.round(oldRamp / stopVal)) * stopVal;
checkPath.fillColor.gradient.gradientStops.rampPoint = newRamp;
}
}
}
}
}