KoubeiCateringOrderInfoSyncModel.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiCateringOrderInfoSyncModel(object):
  6. def __init__(self):
  7. self._action = None
  8. self._action_info = None
  9. self._order_id = None
  10. @property
  11. def action(self):
  12. return self._action
  13. @action.setter
  14. def action(self, value):
  15. self._action = value
  16. @property
  17. def action_info(self):
  18. return self._action_info
  19. @action_info.setter
  20. def action_info(self, value):
  21. self._action_info = value
  22. @property
  23. def order_id(self):
  24. return self._order_id
  25. @order_id.setter
  26. def order_id(self, value):
  27. self._order_id = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.action:
  31. if hasattr(self.action, 'to_alipay_dict'):
  32. params['action'] = self.action.to_alipay_dict()
  33. else:
  34. params['action'] = self.action
  35. if self.action_info:
  36. if hasattr(self.action_info, 'to_alipay_dict'):
  37. params['action_info'] = self.action_info.to_alipay_dict()
  38. else:
  39. params['action_info'] = self.action_info
  40. if self.order_id:
  41. if hasattr(self.order_id, 'to_alipay_dict'):
  42. params['order_id'] = self.order_id.to_alipay_dict()
  43. else:
  44. params['order_id'] = self.order_id
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = KoubeiCateringOrderInfoSyncModel()
  51. if 'action' in d:
  52. o.action = d['action']
  53. if 'action_info' in d:
  54. o.action_info = d['action_info']
  55. if 'order_id' in d:
  56. o.order_id = d['order_id']
  57. return o