In the most general case of an arbitrary current distribution in space, the magnetic moment of such a distribution can be found from the following equation:
SO, you need to use this formula to calculate the dipole moment, at the center of the cuboid it will be zero.