AlipayCommerceOperationContentApplyResponse.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.OperationExtDataModel import OperationExtDataModel
  6. class AlipayCommerceOperationContentApplyResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayCommerceOperationContentApplyResponse, self).__init__()
  9. self._ext_data = None
  10. self._out_biz_no = None
  11. self._record_id = None
  12. self._target_id = None
  13. @property
  14. def ext_data(self):
  15. return self._ext_data
  16. @ext_data.setter
  17. def ext_data(self, value):
  18. if isinstance(value, OperationExtDataModel):
  19. self._ext_data = value
  20. else:
  21. self._ext_data = OperationExtDataModel.from_alipay_dict(value)
  22. @property
  23. def out_biz_no(self):
  24. return self._out_biz_no
  25. @out_biz_no.setter
  26. def out_biz_no(self, value):
  27. self._out_biz_no = value
  28. @property
  29. def record_id(self):
  30. return self._record_id
  31. @record_id.setter
  32. def record_id(self, value):
  33. self._record_id = value
  34. @property
  35. def target_id(self):
  36. return self._target_id
  37. @target_id.setter
  38. def target_id(self, value):
  39. self._target_id = value
  40. def parse_response_content(self, response_content):
  41. response = super(AlipayCommerceOperationContentApplyResponse, self).parse_response_content(response_content)
  42. if 'ext_data' in response:
  43. self.ext_data = response['ext_data']
  44. if 'out_biz_no' in response:
  45. self.out_biz_no = response['out_biz_no']
  46. if 'record_id' in response:
  47. self.record_id = response['record_id']
  48. if 'target_id' in response:
  49. self.target_id = response['target_id']