It is narrated from Sayyiduna Umar bin Abi Salamah (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said to Sayyiduna Abdullah bin Mas'ud (may Allah be pleased with him): "Indeed, the (earlier nations') Books used to descend from the heaven through a single gate, whereas the Qur'an has been sent down through seven gates upon seven modes: the lawful, the unlawful, the decisive, the ambiguous, the striking of parables, that which commands, and that which restrains. So regard its lawful as lawful, regard its unlawful as unlawful, act upon its decisive, stop at its ambiguous, and take lesson from its parables, for all of it is from Allah, and none take heed except people of understanding."
Hadith Referenceالمعجم الكبير للطبراني / باب العين / 8265