AlipayInsAutoServiceCouponVerifyModel.py 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayInsAutoServiceCouponVerifyModel(object):
  6. def __init__(self):
  7. self._biz_data = None
  8. self._coupon_id = None
  9. self._event = None
  10. self._event_date = None
  11. self._out_biz_no = None
  12. self._sp_coupon_id = None
  13. self._user_id = None
  14. @property
  15. def biz_data(self):
  16. return self._biz_data
  17. @biz_data.setter
  18. def biz_data(self, value):
  19. self._biz_data = value
  20. @property
  21. def coupon_id(self):
  22. return self._coupon_id
  23. @coupon_id.setter
  24. def coupon_id(self, value):
  25. self._coupon_id = value
  26. @property
  27. def event(self):
  28. return self._event
  29. @event.setter
  30. def event(self, value):
  31. self._event = value
  32. @property
  33. def event_date(self):
  34. return self._event_date
  35. @event_date.setter
  36. def event_date(self, value):
  37. self._event_date = value
  38. @property
  39. def out_biz_no(self):
  40. return self._out_biz_no
  41. @out_biz_no.setter
  42. def out_biz_no(self, value):
  43. self._out_biz_no = value
  44. @property
  45. def sp_coupon_id(self):
  46. return self._sp_coupon_id
  47. @sp_coupon_id.setter
  48. def sp_coupon_id(self, value):
  49. self._sp_coupon_id = value
  50. @property
  51. def user_id(self):
  52. return self._user_id
  53. @user_id.setter
  54. def user_id(self, value):
  55. self._user_id = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.biz_data:
  59. if hasattr(self.biz_data, 'to_alipay_dict'):
  60. params['biz_data'] = self.biz_data.to_alipay_dict()
  61. else:
  62. params['biz_data'] = self.biz_data
  63. if self.coupon_id:
  64. if hasattr(self.coupon_id, 'to_alipay_dict'):
  65. params['coupon_id'] = self.coupon_id.to_alipay_dict()
  66. else:
  67. params['coupon_id'] = self.coupon_id
  68. if self.event:
  69. if hasattr(self.event, 'to_alipay_dict'):
  70. params['event'] = self.event.to_alipay_dict()
  71. else:
  72. params['event'] = self.event
  73. if self.event_date:
  74. if hasattr(self.event_date, 'to_alipay_dict'):
  75. params['event_date'] = self.event_date.to_alipay_dict()
  76. else:
  77. params['event_date'] = self.event_date
  78. if self.out_biz_no:
  79. if hasattr(self.out_biz_no, 'to_alipay_dict'):
  80. params['out_biz_no'] = self.out_biz_no.to_alipay_dict()
  81. else:
  82. params['out_biz_no'] = self.out_biz_no
  83. if self.sp_coupon_id:
  84. if hasattr(self.sp_coupon_id, 'to_alipay_dict'):
  85. params['sp_coupon_id'] = self.sp_coupon_id.to_alipay_dict()
  86. else:
  87. params['sp_coupon_id'] = self.sp_coupon_id
  88. if self.user_id:
  89. if hasattr(self.user_id, 'to_alipay_dict'):
  90. params['user_id'] = self.user_id.to_alipay_dict()
  91. else:
  92. params['user_id'] = self.user_id
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = AlipayInsAutoServiceCouponVerifyModel()
  99. if 'biz_data' in d:
  100. o.biz_data = d['biz_data']
  101. if 'coupon_id' in d:
  102. o.coupon_id = d['coupon_id']
  103. if 'event' in d:
  104. o.event = d['event']
  105. if 'event_date' in d:
  106. o.event_date = d['event_date']
  107. if 'out_biz_no' in d:
  108. o.out_biz_no = d['out_biz_no']
  109. if 'sp_coupon_id' in d:
  110. o.sp_coupon_id = d['sp_coupon_id']
  111. if 'user_id' in d:
  112. o.user_id = d['user_id']
  113. return o