Beltran accepts trade to Giants