AlipayPcreditHuabeiAuthAccumulationQueryModel.py 1.9 KB

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