  From a system consisting of a right non-degenerate ring $R$, a pair of
$R$-bimodules $Q$ and $P$ and an $R$-bimodule homomorphism $\psi:P\otimes
Q\longrightarrow R$ we construct a $\Z$-graded ring $\mathcal{T}_{(P,Q,\psi)}$
called the Toeplitz ring and (for certain systems) a $\Z$-graded quotient
$\mathcal{O}_{(P,Q,\psi)}$ of $\mathcal{T}_{(P,Q,\psi)}$ called the
Cuntz-Pimsner ring. These rings are the algebraic analogs of the Toeplitz
$C^*$-algebra and the Cuntz-Pimsner $C^*$-algebra associated to a
$C^*$-correspondence (also called a Hilbert bimodule).
  This new construction generalizes for example the algebraic crossed product
by a single automorphism, corner skew Laurent polynomial ring by a single
corner automorphism and Leavitt path algebras. We also describe the structure
of the graded ideals of our graded rings in terms of pairs of ideals of the
coefficient ring.
