Can't send SoftwareSerial to Class Object
This is more of a work-around than a solution, but the code you're trying to get to work, worked for me once I changed

wifi.begin(115200);


to

wifi.begin(9600);


(sorry I don't have enough karma to just comment)