MybankPaymentTradeBankBranchQueryModel.py 2.0 KB

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