AlipayEcoMycarMaintainOrderstatusUpdateModel.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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.MaintainOrderStatusExtParams import MaintainOrderStatusExtParams
  6. class AlipayEcoMycarMaintainOrderstatusUpdateModel(object):
  7. def __init__(self):
  8. self._ext_param = None
  9. self._industry_code = None
  10. self._order_no = None
  11. self._order_status = None
  12. self._type = None
  13. @property
  14. def ext_param(self):
  15. return self._ext_param
  16. @ext_param.setter
  17. def ext_param(self, value):
  18. if isinstance(value, MaintainOrderStatusExtParams):
  19. self._ext_param = value
  20. else:
  21. self._ext_param = MaintainOrderStatusExtParams.from_alipay_dict(value)
  22. @property
  23. def industry_code(self):
  24. return self._industry_code
  25. @industry_code.setter
  26. def industry_code(self, value):
  27. self._industry_code = value
  28. @property
  29. def order_no(self):
  30. return self._order_no
  31. @order_no.setter
  32. def order_no(self, value):
  33. self._order_no = value
  34. @property
  35. def order_status(self):
  36. return self._order_status
  37. @order_status.setter
  38. def order_status(self, value):
  39. self._order_status = value
  40. @property
  41. def type(self):
  42. return self._type
  43. @type.setter
  44. def type(self, value):
  45. self._type = value
  46. def to_alipay_dict(self):
  47. params = dict()
  48. if self.ext_param:
  49. if hasattr(self.ext_param, 'to_alipay_dict'):
  50. params['ext_param'] = self.ext_param.to_alipay_dict()
  51. else:
  52. params['ext_param'] = self.ext_param
  53. if self.industry_code:
  54. if hasattr(self.industry_code, 'to_alipay_dict'):
  55. params['industry_code'] = self.industry_code.to_alipay_dict()
  56. else:
  57. params['industry_code'] = self.industry_code
  58. if self.order_no:
  59. if hasattr(self.order_no, 'to_alipay_dict'):
  60. params['order_no'] = self.order_no.to_alipay_dict()
  61. else:
  62. params['order_no'] = self.order_no
  63. if self.order_status:
  64. if hasattr(self.order_status, 'to_alipay_dict'):
  65. params['order_status'] = self.order_status.to_alipay_dict()
  66. else:
  67. params['order_status'] = self.order_status
  68. if self.type:
  69. if hasattr(self.type, 'to_alipay_dict'):
  70. params['type'] = self.type.to_alipay_dict()
  71. else:
  72. params['type'] = self.type
  73. return params
  74. @staticmethod
  75. def from_alipay_dict(d):
  76. if not d:
  77. return None
  78. o = AlipayEcoMycarMaintainOrderstatusUpdateModel()
  79. if 'ext_param' in d:
  80. o.ext_param = d['ext_param']
  81. if 'industry_code' in d:
  82. o.industry_code = d['industry_code']
  83. if 'order_no' in d:
  84. o.order_no = d['order_no']
  85. if 'order_status' in d:
  86. o.order_status = d['order_status']
  87. if 'type' in d:
  88. o.type = d['type']
  89. return o