AlipayUserCertdocUrlQueryModel.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 AlipayUserCertdocUrlQueryModel(object):
  6. def __init__(self):
  7. self._biz_type = None
  8. self._cert_doc_type = None
  9. self._city = None
  10. self._url_type = None
  11. @property
  12. def biz_type(self):
  13. return self._biz_type
  14. @biz_type.setter
  15. def biz_type(self, value):
  16. self._biz_type = value
  17. @property
  18. def cert_doc_type(self):
  19. return self._cert_doc_type
  20. @cert_doc_type.setter
  21. def cert_doc_type(self, value):
  22. self._cert_doc_type = value
  23. @property
  24. def city(self):
  25. return self._city
  26. @city.setter
  27. def city(self, value):
  28. self._city = value
  29. @property
  30. def url_type(self):
  31. return self._url_type
  32. @url_type.setter
  33. def url_type(self, value):
  34. self._url_type = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.biz_type:
  38. if hasattr(self.biz_type, 'to_alipay_dict'):
  39. params['biz_type'] = self.biz_type.to_alipay_dict()
  40. else:
  41. params['biz_type'] = self.biz_type
  42. if self.cert_doc_type:
  43. if hasattr(self.cert_doc_type, 'to_alipay_dict'):
  44. params['cert_doc_type'] = self.cert_doc_type.to_alipay_dict()
  45. else:
  46. params['cert_doc_type'] = self.cert_doc_type
  47. if self.city:
  48. if hasattr(self.city, 'to_alipay_dict'):
  49. params['city'] = self.city.to_alipay_dict()
  50. else:
  51. params['city'] = self.city
  52. if self.url_type:
  53. if hasattr(self.url_type, 'to_alipay_dict'):
  54. params['url_type'] = self.url_type.to_alipay_dict()
  55. else:
  56. params['url_type'] = self.url_type
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayUserCertdocUrlQueryModel()
  63. if 'biz_type' in d:
  64. o.biz_type = d['biz_type']
  65. if 'cert_doc_type' in d:
  66. o.cert_doc_type = d['cert_doc_type']
  67. if 'city' in d:
  68. o.city = d['city']
  69. if 'url_type' in d:
  70. o.url_type = d['url_type']
  71. return o