InsHealthGiftBatchValidGiftResult.py 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class InsHealthGiftBatchValidGiftResult(object):
  6. def __init__(self):
  7. self._biz_type = None
  8. self._latest_policy_no = None
  9. self._product_group_biz_type = None
  10. self._sp_no = None
  11. @property
  12. def biz_type(self):
  13. return self._biz_type
  14. @biz_type.setter
  15. def biz_type(self, value):
  16. self._biz_type = value
  17. @property
  18. def latest_policy_no(self):
  19. return self._latest_policy_no
  20. @latest_policy_no.setter
  21. def latest_policy_no(self, value):
  22. self._latest_policy_no = value
  23. @property
  24. def product_group_biz_type(self):
  25. return self._product_group_biz_type
  26. @product_group_biz_type.setter
  27. def product_group_biz_type(self, value):
  28. self._product_group_biz_type = value
  29. @property
  30. def sp_no(self):
  31. return self._sp_no
  32. @sp_no.setter
  33. def sp_no(self, value):
  34. self._sp_no = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.biz_type:
  38. if hasattr(self.biz_type, 'to_alipay_dict'):
  39. params['biz_type'] = self.biz_type.to_alipay_dict()
  40. else:
  41. params['biz_type'] = self.biz_type
  42. if self.latest_policy_no:
  43. if hasattr(self.latest_policy_no, 'to_alipay_dict'):
  44. params['latest_policy_no'] = self.latest_policy_no.to_alipay_dict()
  45. else:
  46. params['latest_policy_no'] = self.latest_policy_no
  47. if self.product_group_biz_type:
  48. if hasattr(self.product_group_biz_type, 'to_alipay_dict'):
  49. params['product_group_biz_type'] = self.product_group_biz_type.to_alipay_dict()
  50. else:
  51. params['product_group_biz_type'] = self.product_group_biz_type
  52. if self.sp_no:
  53. if hasattr(self.sp_no, 'to_alipay_dict'):
  54. params['sp_no'] = self.sp_no.to_alipay_dict()
  55. else:
  56. params['sp_no'] = self.sp_no
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = InsHealthGiftBatchValidGiftResult()
  63. if 'biz_type' in d:
  64. o.biz_type = d['biz_type']
  65. if 'latest_policy_no' in d:
  66. o.latest_policy_no = d['latest_policy_no']
  67. if 'product_group_biz_type' in d:
  68. o.product_group_biz_type = d['product_group_biz_type']
  69. if 'sp_no' in d:
  70. o.sp_no = d['sp_no']
  71. return o