AlipayCommerceKidsAccountBindModel.py 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayCommerceKidsAccountBindModel(object):
  6. def __init__(self):
  7. self._child_cert_no = None
  8. self._child_cert_type = None
  9. self._child_id = None
  10. self._child_name = None
  11. self._class_name = None
  12. self._contact_mobile = None
  13. self._parent_uid = None
  14. self._scene_code = None
  15. self._school_id = None
  16. self._student_no = None
  17. @property
  18. def child_cert_no(self):
  19. return self._child_cert_no
  20. @child_cert_no.setter
  21. def child_cert_no(self, value):
  22. self._child_cert_no = value
  23. @property
  24. def child_cert_type(self):
  25. return self._child_cert_type
  26. @child_cert_type.setter
  27. def child_cert_type(self, value):
  28. self._child_cert_type = value
  29. @property
  30. def child_id(self):
  31. return self._child_id
  32. @child_id.setter
  33. def child_id(self, value):
  34. self._child_id = value
  35. @property
  36. def child_name(self):
  37. return self._child_name
  38. @child_name.setter
  39. def child_name(self, value):
  40. self._child_name = value
  41. @property
  42. def class_name(self):
  43. return self._class_name
  44. @class_name.setter
  45. def class_name(self, value):
  46. self._class_name = value
  47. @property
  48. def contact_mobile(self):
  49. return self._contact_mobile
  50. @contact_mobile.setter
  51. def contact_mobile(self, value):
  52. self._contact_mobile = value
  53. @property
  54. def parent_uid(self):
  55. return self._parent_uid
  56. @parent_uid.setter
  57. def parent_uid(self, value):
  58. self._parent_uid = value
  59. @property
  60. def scene_code(self):
  61. return self._scene_code
  62. @scene_code.setter
  63. def scene_code(self, value):
  64. self._scene_code = value
  65. @property
  66. def school_id(self):
  67. return self._school_id
  68. @school_id.setter
  69. def school_id(self, value):
  70. self._school_id = value
  71. @property
  72. def student_no(self):
  73. return self._student_no
  74. @student_no.setter
  75. def student_no(self, value):
  76. self._student_no = value
  77. def to_alipay_dict(self):
  78. params = dict()
  79. if self.child_cert_no:
  80. if hasattr(self.child_cert_no, 'to_alipay_dict'):
  81. params['child_cert_no'] = self.child_cert_no.to_alipay_dict()
  82. else:
  83. params['child_cert_no'] = self.child_cert_no
  84. if self.child_cert_type:
  85. if hasattr(self.child_cert_type, 'to_alipay_dict'):
  86. params['child_cert_type'] = self.child_cert_type.to_alipay_dict()
  87. else:
  88. params['child_cert_type'] = self.child_cert_type
  89. if self.child_id:
  90. if hasattr(self.child_id, 'to_alipay_dict'):
  91. params['child_id'] = self.child_id.to_alipay_dict()
  92. else:
  93. params['child_id'] = self.child_id
  94. if self.child_name:
  95. if hasattr(self.child_name, 'to_alipay_dict'):
  96. params['child_name'] = self.child_name.to_alipay_dict()
  97. else:
  98. params['child_name'] = self.child_name
  99. if self.class_name:
  100. if hasattr(self.class_name, 'to_alipay_dict'):
  101. params['class_name'] = self.class_name.to_alipay_dict()
  102. else:
  103. params['class_name'] = self.class_name
  104. if self.contact_mobile:
  105. if hasattr(self.contact_mobile, 'to_alipay_dict'):
  106. params['contact_mobile'] = self.contact_mobile.to_alipay_dict()
  107. else:
  108. params['contact_mobile'] = self.contact_mobile
  109. if self.parent_uid:
  110. if hasattr(self.parent_uid, 'to_alipay_dict'):
  111. params['parent_uid'] = self.parent_uid.to_alipay_dict()
  112. else:
  113. params['parent_uid'] = self.parent_uid
  114. if self.scene_code:
  115. if hasattr(self.scene_code, 'to_alipay_dict'):
  116. params['scene_code'] = self.scene_code.to_alipay_dict()
  117. else:
  118. params['scene_code'] = self.scene_code
  119. if self.school_id:
  120. if hasattr(self.school_id, 'to_alipay_dict'):
  121. params['school_id'] = self.school_id.to_alipay_dict()
  122. else:
  123. params['school_id'] = self.school_id
  124. if self.student_no:
  125. if hasattr(self.student_no, 'to_alipay_dict'):
  126. params['student_no'] = self.student_no.to_alipay_dict()
  127. else:
  128. params['student_no'] = self.student_no
  129. return params
  130. @staticmethod
  131. def from_alipay_dict(d):
  132. if not d:
  133. return None
  134. o = AlipayCommerceKidsAccountBindModel()
  135. if 'child_cert_no' in d:
  136. o.child_cert_no = d['child_cert_no']
  137. if 'child_cert_type' in d:
  138. o.child_cert_type = d['child_cert_type']
  139. if 'child_id' in d:
  140. o.child_id = d['child_id']
  141. if 'child_name' in d:
  142. o.child_name = d['child_name']
  143. if 'class_name' in d:
  144. o.class_name = d['class_name']
  145. if 'contact_mobile' in d:
  146. o.contact_mobile = d['contact_mobile']
  147. if 'parent_uid' in d:
  148. o.parent_uid = d['parent_uid']
  149. if 'scene_code' in d:
  150. o.scene_code = d['scene_code']
  151. if 'school_id' in d:
  152. o.school_id = d['school_id']
  153. if 'student_no' in d:
  154. o.student_no = d['student_no']
  155. return o