The three judges scored the fight 114-114, 115-113 and 115-113.
Parker has become the first New Zealand World Heavyweight Champion in winning the title.
The 24-year-old is now undefeated in 22 of his professional fights and holds one of the four major world titles.
Parker and Ruiz fought in front of a near-capacity crowd at Vector Arena in Auckland.
Ruiz caught Parker with a couple of bruising hits to the head in the first round as the two fighters tried to scope each other out early in the bout.