KoubeiCateringOrderCancelModel.py 2.2 KB

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