Exemplo n.º 1
0
 def GetOwnerInfoFromLogin(self):
   reply = self.soap_client.service.GetOwnerInfoFromLogin()
   status = self._extract_status(reply)
   if hasattr(reply, 'dbOwnerInfo'):
     message = models.dbOwnerInfo(reply.dbOwnerInfo)
   else:
     message = None
   return Reply(status, message)
Exemplo n.º 2
0
 def FindDataBox(self, info):
   """info = dbOwnerInfo instance"""
   soap_info = self.soap_client.factory.create("dbOwnerInfo")
   info.copy_to_soap_object(soap_info)
   reply = self.soap_client.service.FindDataBox(soap_info)
   if reply.dbStatus and reply.dbStatus.dbStatusCode == "0003":
     # this is a special case where non-zero status code is not an error
     status = reply.dbStatus
   else:
     status = self._extract_status(reply)
   if hasattr(reply, 'dbResults') and reply.dbResults:
     ret_infos = reply.dbResults.dbOwnerInfo
     if type(ret_infos) != list:
       ret_infos = [ret_infos]
     result = [models.dbOwnerInfo(ret_info) for ret_info in ret_infos]
   else:
     result = []
   return Reply(status, result)