public Rate GetRate(Address shipFrom, Address shipTo, Address shipper, UPScode code, Package package, string option = "Rate") { if (NetInfo.CheckForInternetConnection()) { try { _Rate = new Rate(option, UPSacct.A, UPSacct.I, UPSacct.P, UPSacct.N); _Rate = _Rate.SubmitRateRequest(shipFrom, shipFrom, shipTo, code, package); return(_Rate); } catch { return(null); } } return(null); }
public Ship GetShip(Address shipFrom, Address shipTo, Address shipper, UPScode code, Package package, string refers = "", string refers2 = "") { if (NetInfo.CheckForInternetConnection()) { try { _Ship = new Ship(UPSacct.A, UPSacct.I, UPSacct.P, UPSacct.N); _Ship.Testmode = TESTMODE; _Ship = _Ship.ProcessShipment(shipFrom, shipFrom, shipTo, code, package, refers, refers2); return(_Ship); } catch (Exception ex) { return(null); } } return(null); }