CreditPayClauseVO.py 1.9 KB

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