ZhimaCreditWatchlistiiGetModel.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaCreditWatchlistiiGetModel(object):
  6. def __init__(self):
  7. self._product_code = None
  8. self._transaction_id = None
  9. @property
  10. def product_code(self):
  11. return self._product_code
  12. @product_code.setter
  13. def product_code(self, value):
  14. self._product_code = value
  15. @property
  16. def transaction_id(self):
  17. return self._transaction_id
  18. @transaction_id.setter
  19. def transaction_id(self, value):
  20. self._transaction_id = value
  21. def to_alipay_dict(self):
  22. params = dict()
  23. if self.product_code:
  24. if hasattr(self.product_code, 'to_alipay_dict'):
  25. params['product_code'] = self.product_code.to_alipay_dict()
  26. else:
  27. params['product_code'] = self.product_code
  28. if self.transaction_id:
  29. if hasattr(self.transaction_id, 'to_alipay_dict'):
  30. params['transaction_id'] = self.transaction_id.to_alipay_dict()
  31. else:
  32. params['transaction_id'] = self.transaction_id
  33. return params
  34. @staticmethod
  35. def from_alipay_dict(d):
  36. if not d:
  37. return None
  38. o = ZhimaCreditWatchlistiiGetModel()
  39. if 'product_code' in d:
  40. o.product_code = d['product_code']
  41. if 'transaction_id' in d:
  42. o.transaction_id = d['transaction_id']
  43. return o