Synecdoche n. (Rhet.) A figure or trope by which a part of a thing is put for the whole (as, fifty sail for fifty ships), or the whole for a part (as, the smiling year for spring), the species for the genus (as, cutthroat for assassin), the genus for the species (as, a creature for a man), the name of the material for the thing made, etc.
... olden "Harem" (or gynaeceum, Pers. Zenanah, Serraglio): Harim is also used by synecdoche for the inmates; ... — The Book of the Thousand Nights and a Night, Volume 1 • Richard F. Burton