I did piston pumps for awhile. Gear pumps are usually throw away and replace. Vane pumps are basically kit units where you buy new cartridges and go back to work. Fixed displacement piston pumps can be rebuildable depending on what went wrong in the first place. If they need a lot of new parts, it can be cheaper to replace. Excavator pumps usually have some type of manufacturer exchange program to lessen the cost and also require the controls and pump to be set up on a dyno or adjusted after installation in the machine.
All rebuilt pumps have disclaimers to limit warranty issues. Many state that you need to replace all the fluid, clean the reservoirs and change the filters. All that is a gray area used to deny warranty coverage. It's good practice but you are on the hook to prove that it was done. I've been called in when pumps have failed shortly after installation and the supplier claimed the reason is foreign material got into the pump. Doing load sensing hydraulic pumps is a lot like rebuilding engines. They can be very complicated, are subject to lots of manufacturer updates and don't take much of a mistake that will cost you thousands.