AlipayEcoBasicBizinfoQueryModel.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoBasicBizinfoQueryModel(object):
  6. def __init__(self):
  7. self._biz_inst = None
  8. self._biz_type = None
  9. self._data_code = None
  10. self._ext_info = None
  11. self._request_context = None
  12. @property
  13. def biz_inst(self):
  14. return self._biz_inst
  15. @biz_inst.setter
  16. def biz_inst(self, value):
  17. self._biz_inst = value
  18. @property
  19. def biz_type(self):
  20. return self._biz_type
  21. @biz_type.setter
  22. def biz_type(self, value):
  23. self._biz_type = value
  24. @property
  25. def data_code(self):
  26. return self._data_code
  27. @data_code.setter
  28. def data_code(self, value):
  29. self._data_code = value
  30. @property
  31. def ext_info(self):
  32. return self._ext_info
  33. @ext_info.setter
  34. def ext_info(self, value):
  35. self._ext_info = value
  36. @property
  37. def request_context(self):
  38. return self._request_context
  39. @request_context.setter
  40. def request_context(self, value):
  41. self._request_context = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.biz_inst:
  45. if hasattr(self.biz_inst, 'to_alipay_dict'):
  46. params['biz_inst'] = self.biz_inst.to_alipay_dict()
  47. else:
  48. params['biz_inst'] = self.biz_inst
  49. if self.biz_type:
  50. if hasattr(self.biz_type, 'to_alipay_dict'):
  51. params['biz_type'] = self.biz_type.to_alipay_dict()
  52. else:
  53. params['biz_type'] = self.biz_type
  54. if self.data_code:
  55. if hasattr(self.data_code, 'to_alipay_dict'):
  56. params['data_code'] = self.data_code.to_alipay_dict()
  57. else:
  58. params['data_code'] = self.data_code
  59. if self.ext_info:
  60. if hasattr(self.ext_info, 'to_alipay_dict'):
  61. params['ext_info'] = self.ext_info.to_alipay_dict()
  62. else:
  63. params['ext_info'] = self.ext_info
  64. if self.request_context:
  65. if hasattr(self.request_context, 'to_alipay_dict'):
  66. params['request_context'] = self.request_context.to_alipay_dict()
  67. else:
  68. params['request_context'] = self.request_context
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = AlipayEcoBasicBizinfoQueryModel()
  75. if 'biz_inst' in d:
  76. o.biz_inst = d['biz_inst']
  77. if 'biz_type' in d:
  78. o.biz_type = d['biz_type']
  79. if 'data_code' in d:
  80. o.data_code = d['data_code']
  81. if 'ext_info' in d:
  82. o.ext_info = d['ext_info']
  83. if 'request_context' in d:
  84. o.request_context = d['request_context']
  85. return o