I want a functional equation for the function defined by the Dirichlet series, $$ D(s,a/q)= \sum_{n=1}^\infty \frac{e^{2\pi i n a/q}}{n^s}. $$ which sends $s$ to $1-s$ and preferably sends $a$ to $\bar{a}$ where $a\bar{a} \equiv 1 \pmod q$.
What I want should possibly be classified as a pre-Voronoi formula, where afterwards one takes a Mellin transform.
I could slightly generalize and look for a transformation formula for $$ \sum_{n=1}^\infty \frac{\chi(n) e^{2\pi i n a/q}}{n^s}$$ where $\chi$ is a Dirichlet charater. But I would be perfectly content with a functional equation for the first one as well.
One can write the above Dirichlet series in terms of Hurwitz zeta functions and apply the the functional equation of the Hurwitz zeta functions. When that is done, however, one does not have $D(\cdot,\cdot)$ on the right hand side but Hurwitz zeta functions, and neither does it change $a$ to $\bar{a}$.
Is such a formula known already?