KoubeiRetailWmsOutboundworkDeleteModel.py 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. from alipay.aop.api.domain.OperateContext import OperateContext
  6. class KoubeiRetailWmsOutboundworkDeleteModel(object):
  7. def __init__(self):
  8. self._operate_context = None
  9. self._outbound_work_id = None
  10. @property
  11. def operate_context(self):
  12. return self._operate_context
  13. @operate_context.setter
  14. def operate_context(self, value):
  15. if isinstance(value, OperateContext):
  16. self._operate_context = value
  17. else:
  18. self._operate_context = OperateContext.from_alipay_dict(value)
  19. @property
  20. def outbound_work_id(self):
  21. return self._outbound_work_id
  22. @outbound_work_id.setter
  23. def outbound_work_id(self, value):
  24. self._outbound_work_id = value
  25. def to_alipay_dict(self):
  26. params = dict()
  27. if self.operate_context:
  28. if hasattr(self.operate_context, 'to_alipay_dict'):
  29. params['operate_context'] = self.operate_context.to_alipay_dict()
  30. else:
  31. params['operate_context'] = self.operate_context
  32. if self.outbound_work_id:
  33. if hasattr(self.outbound_work_id, 'to_alipay_dict'):
  34. params['outbound_work_id'] = self.outbound_work_id.to_alipay_dict()
  35. else:
  36. params['outbound_work_id'] = self.outbound_work_id
  37. return params
  38. @staticmethod
  39. def from_alipay_dict(d):
  40. if not d:
  41. return None
  42. o = KoubeiRetailWmsOutboundworkDeleteModel()
  43. if 'operate_context' in d:
  44. o.operate_context = d['operate_context']
  45. if 'outbound_work_id' in d:
  46. o.outbound_work_id = d['outbound_work_id']
  47. return o