RecruitShopInfo.py 2.4 KB

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