A generalization of the Brown–Halmos theorems for the unit ball