AlipayDataDataserviceAdPrincipalQueryResponse.py 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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.OuterAttachment import OuterAttachment
  6. class AlipayDataDataserviceAdPrincipalQueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayDataDataserviceAdPrincipalQueryResponse, self).__init__()
  9. self._alipay_pid = None
  10. self._attachment_list = None
  11. self._principal_id = None
  12. self._status = None
  13. self._trade_id = None
  14. @property
  15. def alipay_pid(self):
  16. return self._alipay_pid
  17. @alipay_pid.setter
  18. def alipay_pid(self, value):
  19. self._alipay_pid = value
  20. @property
  21. def attachment_list(self):
  22. return self._attachment_list
  23. @attachment_list.setter
  24. def attachment_list(self, value):
  25. if isinstance(value, list):
  26. self._attachment_list = list()
  27. for i in value:
  28. if isinstance(i, OuterAttachment):
  29. self._attachment_list.append(i)
  30. else:
  31. self._attachment_list.append(OuterAttachment.from_alipay_dict(i))
  32. @property
  33. def principal_id(self):
  34. return self._principal_id
  35. @principal_id.setter
  36. def principal_id(self, value):
  37. self._principal_id = value
  38. @property
  39. def status(self):
  40. return self._status
  41. @status.setter
  42. def status(self, value):
  43. self._status = value
  44. @property
  45. def trade_id(self):
  46. return self._trade_id
  47. @trade_id.setter
  48. def trade_id(self, value):
  49. self._trade_id = value
  50. def parse_response_content(self, response_content):
  51. response = super(AlipayDataDataserviceAdPrincipalQueryResponse, self).parse_response_content(response_content)
  52. if 'alipay_pid' in response:
  53. self.alipay_pid = response['alipay_pid']
  54. if 'attachment_list' in response:
  55. self.attachment_list = response['attachment_list']
  56. if 'principal_id' in response:
  57. self.principal_id = response['principal_id']
  58. if 'status' in response:
  59. self.status = response['status']
  60. if 'trade_id' in response:
  61. self.trade_id = response['trade_id']