iro/controller/viewinterface.py
branchdevel
changeset 275 88d45c846f2b
parent 268 d0fcb1cde990
child 294 0e75bd39767d
equal deleted inserted replaced
274:1653470ccaff 275:88d45c846f2b
    99         :param string body: mail body
    99         :param string body: mail body
   100         :param list recipients:  a list of email addresses
   100         :param list recipients:  a list of email addresses
   101         :param route: route to use to send, or a list of routes as fallback
   101         :param route: route to use to send, or a list of routes as fallback
   102         :type route: string|list
   102         :type route: string|list
   103         :param string info: a name, to combine different jobs to one billing group
   103         :param string info: a name, to combine different jobs to one billing group
   104 
   104         :param string frm: sender mail address
   105         :return integer: the job id
   105         :return integer: the job id
   106         '''
   106         '''
   107         d = createJob(user, recipients, Mail(subject, body, frm), route, info)
   107         d = createJob(user, recipients, Mail(subject, body, frm), route, info)
   108         def ret(job):
   108         def ret(job):
   109             return job.dbjob
   109             return job.dbjob
   130     @dbdefer
   130     @dbdefer
   131     def defaultRoute(self, session, user, typ):
   131     def defaultRoute(self, session, user, typ):
   132         '''Returns all default offernames.
   132         '''Returns all default offernames.
   133  
   133  
   134         :param string user: apikey of a user
   134         :param string user: apikey of a user
       
   135         :param string typ: a typ of message -- one of in this list ["sms","fax","mail"]
   135 
   136 
   136         :return list: a list of all possible offer names for a typ
   137         :return list: a list of all possible offer names for a typ
   137         '''
   138         '''
   138         user = session.merge(user)
   139         user = session.merge(user)
   139         offers = user.routes(typ, default=True)
   140         offers = user.routes(typ, default=True)
   184     def telnumber(self,recipients):
   185     def telnumber(self,recipients):
   185         '''Return True, if all telnumbers a vaild.
   186         '''Return True, if all telnumbers a vaild.
   186         
   187         
   187         :param list recipients:  a list of telnumbers (use ITU-T E.123)
   188         :param list recipients:  a list of telnumbers (use ITU-T E.123)
   188 
   189 
   189         :return: True -- all numbers are valid
   190         :return boolean: True -- all numbers are valid
   190         '''
   191         '''
   191         return True
   192         return True
   192 
   193 
   193     @validate(kwd="recipients",func=vEmail)
   194     @validate(kwd="recipients",func=vEmail)
   194     def email(self,recipients):
   195     def email(self,recipients):
   195         '''Return True, if all mailadresses a valid.
   196         '''Return True, if all mailadresses a valid.
   196         
   197         
   197         :param list recipients:  a list of mailadresses
   198         :param list recipients:  a list of mailadresses
   198 
   199 
   199         :return: True -- all addresses are valid
   200         :return boolean: True -- all addresses are valid
   200         '''
   201         '''
   201         return True
   202         return True