EbppUserChargeInstInfo.py 2.4 KB

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