Modelling and parameter inference of predator–prey dynamics in heterogeneous environments using the direct integral approach