KoubeiServindustryReservationShopBindModel.py 2.3 KB

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