Synecdoche is a literary device in which a part of something represents the whole or it may use a whole to represent a part.
Synecdoche may also use larger groups to refer to smaller groups or vice versa. It may also call a thing by the name of the material it is made of or it may refer to a thing in a container or packing by the name of that container or packing.