AlipayEcoEduKtStudentQueryResponse.py 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.UserDetails import UserDetails
  6. class AlipayEcoEduKtStudentQueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayEcoEduKtStudentQueryResponse, self).__init__()
  9. self._child_name = None
  10. self._class_name = None
  11. self._school_name = None
  12. self._student_code = None
  13. self._student_identify = None
  14. self._users = None
  15. @property
  16. def child_name(self):
  17. return self._child_name
  18. @child_name.setter
  19. def child_name(self, value):
  20. self._child_name = value
  21. @property
  22. def class_name(self):
  23. return self._class_name
  24. @class_name.setter
  25. def class_name(self, value):
  26. self._class_name = value
  27. @property
  28. def school_name(self):
  29. return self._school_name
  30. @school_name.setter
  31. def school_name(self, value):
  32. self._school_name = value
  33. @property
  34. def student_code(self):
  35. return self._student_code
  36. @student_code.setter
  37. def student_code(self, value):
  38. self._student_code = value
  39. @property
  40. def student_identify(self):
  41. return self._student_identify
  42. @student_identify.setter
  43. def student_identify(self, value):
  44. self._student_identify = value
  45. @property
  46. def users(self):
  47. return self._users
  48. @users.setter
  49. def users(self, value):
  50. if isinstance(value, list):
  51. self._users = list()
  52. for i in value:
  53. if isinstance(i, UserDetails):
  54. self._users.append(i)
  55. else:
  56. self._users.append(UserDetails.from_alipay_dict(i))
  57. def parse_response_content(self, response_content):
  58. response = super(AlipayEcoEduKtStudentQueryResponse, self).parse_response_content(response_content)
  59. if 'child_name' in response:
  60. self.child_name = response['child_name']
  61. if 'class_name' in response:
  62. self.class_name = response['class_name']
  63. if 'school_name' in response:
  64. self.school_name = response['school_name']
  65. if 'student_code' in response:
  66. self.student_code = response['student_code']
  67. if 'student_identify' in response:
  68. self.student_identify = response['student_identify']
  69. if 'users' in response:
  70. self.users = response['users']