AlipayInsAutoAutoinsprodUserCertifyModel.py 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayInsAutoAutoinsprodUserCertifyModel(object):
  6. def __init__(self):
  7. self._agent_id_card_name = None
  8. self._agent_id_card_no = None
  9. self._agent_user_id = None
  10. @property
  11. def agent_id_card_name(self):
  12. return self._agent_id_card_name
  13. @agent_id_card_name.setter
  14. def agent_id_card_name(self, value):
  15. self._agent_id_card_name = value
  16. @property
  17. def agent_id_card_no(self):
  18. return self._agent_id_card_no
  19. @agent_id_card_no.setter
  20. def agent_id_card_no(self, value):
  21. self._agent_id_card_no = value
  22. @property
  23. def agent_user_id(self):
  24. return self._agent_user_id
  25. @agent_user_id.setter
  26. def agent_user_id(self, value):
  27. self._agent_user_id = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.agent_id_card_name:
  31. if hasattr(self.agent_id_card_name, 'to_alipay_dict'):
  32. params['agent_id_card_name'] = self.agent_id_card_name.to_alipay_dict()
  33. else:
  34. params['agent_id_card_name'] = self.agent_id_card_name
  35. if self.agent_id_card_no:
  36. if hasattr(self.agent_id_card_no, 'to_alipay_dict'):
  37. params['agent_id_card_no'] = self.agent_id_card_no.to_alipay_dict()
  38. else:
  39. params['agent_id_card_no'] = self.agent_id_card_no
  40. if self.agent_user_id:
  41. if hasattr(self.agent_user_id, 'to_alipay_dict'):
  42. params['agent_user_id'] = self.agent_user_id.to_alipay_dict()
  43. else:
  44. params['agent_user_id'] = self.agent_user_id
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = AlipayInsAutoAutoinsprodUserCertifyModel()
  51. if 'agent_id_card_name' in d:
  52. o.agent_id_card_name = d['agent_id_card_name']
  53. if 'agent_id_card_no' in d:
  54. o.agent_id_card_no = d['agent_id_card_no']
  55. if 'agent_user_id' in d:
  56. o.agent_user_id = d['agent_user_id']
  57. return o