AlipayFinanceFundFundnetvaluesBatchqueryResponse.py 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.NetValueVO import NetValueVO
  6. class AlipayFinanceFundFundnetvaluesBatchqueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayFinanceFundFundnetvaluesBatchqueryResponse, self).__init__()
  9. self._fund_code = None
  10. self._fund_type = None
  11. self._net_values = None
  12. @property
  13. def fund_code(self):
  14. return self._fund_code
  15. @fund_code.setter
  16. def fund_code(self, value):
  17. self._fund_code = value
  18. @property
  19. def fund_type(self):
  20. return self._fund_type
  21. @fund_type.setter
  22. def fund_type(self, value):
  23. self._fund_type = value
  24. @property
  25. def net_values(self):
  26. return self._net_values
  27. @net_values.setter
  28. def net_values(self, value):
  29. if isinstance(value, list):
  30. self._net_values = list()
  31. for i in value:
  32. if isinstance(i, NetValueVO):
  33. self._net_values.append(i)
  34. else:
  35. self._net_values.append(NetValueVO.from_alipay_dict(i))
  36. def parse_response_content(self, response_content):
  37. response = super(AlipayFinanceFundFundnetvaluesBatchqueryResponse, self).parse_response_content(response_content)
  38. if 'fund_code' in response:
  39. self.fund_code = response['fund_code']
  40. if 'fund_type' in response:
  41. self.fund_type = response['fund_type']
  42. if 'net_values' in response:
  43. self.net_values = response['net_values']