AlipaySecurityProdCtidVerifyModel.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipaySecurityProdCtidVerifyModel(object):
  6. def __init__(self):
  7. self._id_number = None
  8. self._identify_model = None
  9. self._picture = None
  10. self._user_name = None
  11. @property
  12. def id_number(self):
  13. return self._id_number
  14. @id_number.setter
  15. def id_number(self, value):
  16. self._id_number = value
  17. @property
  18. def identify_model(self):
  19. return self._identify_model
  20. @identify_model.setter
  21. def identify_model(self, value):
  22. self._identify_model = value
  23. @property
  24. def picture(self):
  25. return self._picture
  26. @picture.setter
  27. def picture(self, value):
  28. self._picture = value
  29. @property
  30. def user_name(self):
  31. return self._user_name
  32. @user_name.setter
  33. def user_name(self, value):
  34. self._user_name = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.id_number:
  38. if hasattr(self.id_number, 'to_alipay_dict'):
  39. params['id_number'] = self.id_number.to_alipay_dict()
  40. else:
  41. params['id_number'] = self.id_number
  42. if self.identify_model:
  43. if hasattr(self.identify_model, 'to_alipay_dict'):
  44. params['identify_model'] = self.identify_model.to_alipay_dict()
  45. else:
  46. params['identify_model'] = self.identify_model
  47. if self.picture:
  48. if hasattr(self.picture, 'to_alipay_dict'):
  49. params['picture'] = self.picture.to_alipay_dict()
  50. else:
  51. params['picture'] = self.picture
  52. if self.user_name:
  53. if hasattr(self.user_name, 'to_alipay_dict'):
  54. params['user_name'] = self.user_name.to_alipay_dict()
  55. else:
  56. params['user_name'] = self.user_name
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipaySecurityProdCtidVerifyModel()
  63. if 'id_number' in d:
  64. o.id_number = d['id_number']
  65. if 'identify_model' in d:
  66. o.identify_model = d['identify_model']
  67. if 'picture' in d:
  68. o.picture = d['picture']
  69. if 'user_name' in d:
  70. o.user_name = d['user_name']
  71. return o