Stationary solutions to cubic nonlinear Schrödinger equations with quasi-periodic boundary conditions