AlipayEbppInvoiceTitleBatchqueryResponse.py 1.7 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.InvoiceElementModel import InvoiceElementModel
  6. class AlipayEbppInvoiceTitleBatchqueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayEbppInvoiceTitleBatchqueryResponse, self).__init__()
  9. self._invoice_element_list = None
  10. self._total_count = None
  11. self._user_id = None
  12. @property
  13. def invoice_element_list(self):
  14. return self._invoice_element_list
  15. @invoice_element_list.setter
  16. def invoice_element_list(self, value):
  17. if isinstance(value, list):
  18. self._invoice_element_list = list()
  19. for i in value:
  20. if isinstance(i, InvoiceElementModel):
  21. self._invoice_element_list.append(i)
  22. else:
  23. self._invoice_element_list.append(InvoiceElementModel.from_alipay_dict(i))
  24. @property
  25. def total_count(self):
  26. return self._total_count
  27. @total_count.setter
  28. def total_count(self, value):
  29. self._total_count = value
  30. @property
  31. def user_id(self):
  32. return self._user_id
  33. @user_id.setter
  34. def user_id(self, value):
  35. self._user_id = value
  36. def parse_response_content(self, response_content):
  37. response = super(AlipayEbppInvoiceTitleBatchqueryResponse, self).parse_response_content(response_content)
  38. if 'invoice_element_list' in response:
  39. self.invoice_element_list = response['invoice_element_list']
  40. if 'total_count' in response:
  41. self.total_count = response['total_count']
  42. if 'user_id' in response:
  43. self.user_id = response['user_id']