TradePrecreateConfirmPrecreateCodeInfo.py 2.3 KB

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