KoubeiRetailWmsWarehouseModifyModel.py 2.1 KB

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