Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. clientService = ClientServiceCalls()
  2.  
  3. clientResponse = clientService.GetClientsByString(self.USER_NAME, self.USER_PASSWORD, self.SITE_IDS, '')
  4. clientList = clientResponse.Clients.Client
  5.  
  6. clientVisitsDict = []
  7.  
  8. for c in clientList:
  9. clientResponseVisits = clientService.GetClientVisits(self.USER_NAME, self.USER_PASSWORD, self.SITE_IDS, str(c.ID), oneMonthAgo, datetime.today())
  10.  
  11. if clientResponseVisits.Visits:
  12. visitsList = clientResponseVisits.Visits.Visit
  13. for v in visitsList:
  14. q = {}
  15. q['cust_id'] = str(c.ID)
  16. q['timeframe'] = str(datetime.now().month) + '-' + str(datetime.now().year)
  17. q['profile'] = str(self.PROFILE)
  18. q['cust_name'] = str(c.FirstName) + ' ' + str(c.LastName)
  19. q['class_id'] = str(v.ClassID)
  20. q['class_time'] = str(v.ClassID)
  21. q['class_name'] = str(v.Name)
  22. q['class_location'] = str(v.Location.Name)
  23. q['class_instructor_id'] = str(v.Staff.ID)
  24. q['class_instructor_name'] = str(v.Staff.Name)
  25.  
  26. print q['class_instructor_name']
  27.  
  28. clientVisitsDict.append(q)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement