AlipayOpenEchoSendResponse.py 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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.MyObjectDdd import MyObjectDdd
  6. class AlipayOpenEchoSendResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayOpenEchoSendResponse, self).__init__()
  9. self._obj = None
  10. self._out_a = None
  11. self._out_b = None
  12. self._out_c = None
  13. self._out_d = None
  14. self._word = None
  15. @property
  16. def obj(self):
  17. return self._obj
  18. @obj.setter
  19. def obj(self, value):
  20. if isinstance(value, MyObjectDdd):
  21. self._obj = value
  22. else:
  23. self._obj = MyObjectDdd.from_alipay_dict(value)
  24. @property
  25. def out_a(self):
  26. return self._out_a
  27. @out_a.setter
  28. def out_a(self, value):
  29. self._out_a = value
  30. @property
  31. def out_b(self):
  32. return self._out_b
  33. @out_b.setter
  34. def out_b(self, value):
  35. self._out_b = value
  36. @property
  37. def out_c(self):
  38. return self._out_c
  39. @out_c.setter
  40. def out_c(self, value):
  41. self._out_c = value
  42. @property
  43. def out_d(self):
  44. return self._out_d
  45. @out_d.setter
  46. def out_d(self, value):
  47. self._out_d = value
  48. @property
  49. def word(self):
  50. return self._word
  51. @word.setter
  52. def word(self, value):
  53. self._word = value
  54. def parse_response_content(self, response_content):
  55. response = super(AlipayOpenEchoSendResponse, self).parse_response_content(response_content)
  56. if 'obj' in response:
  57. self.obj = response['obj']
  58. if 'out_a' in response:
  59. self.out_a = response['out_a']
  60. if 'out_b' in response:
  61. self.out_b = response['out_b']
  62. if 'out_c' in response:
  63. self.out_c = response['out_c']
  64. if 'out_d' in response:
  65. self.out_d = response['out_d']
  66. if 'word' in response:
  67. self.word = response['word']