a.k.a. Rubik's Rings
Designed by E. Pap, made by Politoys in Hungary, 1982.
(left, plastic, 3.1 by 4.9 by 1/2 inches,
right is identical to left but with different colored balls,
bottom version circa 2000 is 3-dimensional but works the same way)
An old puzzle similar to this
(the Race War Puzzle),
with 22 balls in a ring and each ring one color,
is shown on Page 131 of the Slocum and Sonneveld
and the mechanism is presented in the 1892 patent of W. Churchill.
from: www.uspto.gov - patent no. 507,215