BeikeAccountResponse.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 BeikeAccountResponse(object):
  6. def __init__(self):
  7. self._change_amount = None
  8. self._current_amount = None
  9. self._outer_biz_no = None
  10. @property
  11. def change_amount(self):
  12. return self._change_amount
  13. @change_amount.setter
  14. def change_amount(self, value):
  15. self._change_amount = value
  16. @property
  17. def current_amount(self):
  18. return self._current_amount
  19. @current_amount.setter
  20. def current_amount(self, value):
  21. self._current_amount = value
  22. @property
  23. def outer_biz_no(self):
  24. return self._outer_biz_no
  25. @outer_biz_no.setter
  26. def outer_biz_no(self, value):
  27. self._outer_biz_no = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.change_amount:
  31. if hasattr(self.change_amount, 'to_alipay_dict'):
  32. params['change_amount'] = self.change_amount.to_alipay_dict()
  33. else:
  34. params['change_amount'] = self.change_amount
  35. if self.current_amount:
  36. if hasattr(self.current_amount, 'to_alipay_dict'):
  37. params['current_amount'] = self.current_amount.to_alipay_dict()
  38. else:
  39. params['current_amount'] = self.current_amount
  40. if self.outer_biz_no:
  41. if hasattr(self.outer_biz_no, 'to_alipay_dict'):
  42. params['outer_biz_no'] = self.outer_biz_no.to_alipay_dict()
  43. else:
  44. params['outer_biz_no'] = self.outer_biz_no
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = BeikeAccountResponse()
  51. if 'change_amount' in d:
  52. o.change_amount = d['change_amount']
  53. if 'current_amount' in d:
  54. o.current_amount = d['current_amount']
  55. if 'outer_biz_no' in d:
  56. o.outer_biz_no = d['outer_biz_no']
  57. return o