MybankFinanceYulibaoTransHistoryQueryResponse.py 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.YLBTransDetailInfo import YLBTransDetailInfo
  6. class MybankFinanceYulibaoTransHistoryQueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(MybankFinanceYulibaoTransHistoryQueryResponse, self).__init__()
  9. self._current_page = None
  10. self._has_next_page = None
  11. self._history_trans_detail_infos = None
  12. self._total_item_count = None
  13. @property
  14. def current_page(self):
  15. return self._current_page
  16. @current_page.setter
  17. def current_page(self, value):
  18. self._current_page = value
  19. @property
  20. def has_next_page(self):
  21. return self._has_next_page
  22. @has_next_page.setter
  23. def has_next_page(self, value):
  24. self._has_next_page = value
  25. @property
  26. def history_trans_detail_infos(self):
  27. return self._history_trans_detail_infos
  28. @history_trans_detail_infos.setter
  29. def history_trans_detail_infos(self, value):
  30. if isinstance(value, list):
  31. self._history_trans_detail_infos = list()
  32. for i in value:
  33. if isinstance(i, YLBTransDetailInfo):
  34. self._history_trans_detail_infos.append(i)
  35. else:
  36. self._history_trans_detail_infos.append(YLBTransDetailInfo.from_alipay_dict(i))
  37. @property
  38. def total_item_count(self):
  39. return self._total_item_count
  40. @total_item_count.setter
  41. def total_item_count(self, value):
  42. self._total_item_count = value
  43. def parse_response_content(self, response_content):
  44. response = super(MybankFinanceYulibaoTransHistoryQueryResponse, self).parse_response_content(response_content)
  45. if 'current_page' in response:
  46. self.current_page = response['current_page']
  47. if 'has_next_page' in response:
  48. self.has_next_page = response['has_next_page']
  49. if 'history_trans_detail_infos' in response:
  50. self.history_trans_detail_infos = response['history_trans_detail_infos']
  51. if 'total_item_count' in response:
  52. self.total_item_count = response['total_item_count']