Compounds and methods for treating diseases mediated by a P2X 3 and/or a P2X 2/3 receptor antagonist, the methods comprising administering to a subject in need thereof an effective amount of a compound of formula (I) or a pharmaceutically acceptable salt, solvate or prodrug thereof, wherein D, X, Y, R 1 , R 2 , R 3 , R 4 , R 5 , R 6 , R 7 and R 8 are as defined herein,