def cancelSMS(self, id): msg = SimpleMessage() msg.setAccount(self.getAccount()) msg.setCode(self.getCode()) msg.setDispatch(self.config.cancelConfig()["dispatch"]) msg.setId(id) return self.response.getResponse(self.cancelSimple(msg));
def sendSimpleMsg(self, msg_txt, to, fromPar="", id="", schedule="", callback=0): msg = SimpleMessage() msg.setAccount(self.getAccount()) msg.setCode(self.getCode()) msg.setMessage("%s" % msg_txt) msg.setFrom(fromPar) msg.setMobile(to) msg.setId(id) msg.setCallBack(callback) msg.setSchedule(schedule) return self.response.getResponse(self.sendSimple(msg))