The photo is not the gumball machine I made, but resembles what I often saw on the market. Instead of a turning a dowel, this one dispenses a candy when the slider is pulled outward. There is no coin-operated mechanism. My daughter wanted to be sure to charge her brother and her sister for all gumballs they consumed, so the coin-operated feature was a requirement.
(The photo is from Bing Images.)
Step 1: My mechanism and how it works
"A" and "B" are made from a good, but inexpensive close-grained and easily-worked hardwood. The thicker end of "B" is as thick as the diameter of the gumballs you will be using plus just a little bit more, perhaps a little less than 1/16 of an inch. The hole marked "C" should be just slightly larger in diameter than the largest gumball in any package of the type you buy and use.