AlipayInsSceneCouponReceiveResponse.py 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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.InsProduct import InsProduct
  6. class AlipayInsSceneCouponReceiveResponse(AlipayResponse):
  7. def __init__(self):
  8. super(AlipayInsSceneCouponReceiveResponse, self).__init__()
  9. self._policy_no = None
  10. self._product = None
  11. @property
  12. def policy_no(self):
  13. return self._policy_no
  14. @policy_no.setter
  15. def policy_no(self, value):
  16. self._policy_no = value
  17. @property
  18. def product(self):
  19. return self._product
  20. @product.setter
  21. def product(self, value):
  22. if isinstance(value, InsProduct):
  23. self._product = value
  24. else:
  25. self._product = InsProduct.from_alipay_dict(value)
  26. def parse_response_content(self, response_content):
  27. response = super(AlipayInsSceneCouponReceiveResponse, self).parse_response_content(response_content)
  28. if 'policy_no' in response:
  29. self.policy_no = response['policy_no']
  30. if 'product' in response:
  31. self.product = response['product']