ZhimaCreditPeUserSceneConsultModel.py 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaCreditPeUserSceneConsultModel(object):
  6. def __init__(self):
  7. self._apply_amount = None
  8. self._buyer_id = None
  9. self._category_code = None
  10. self._credit_scene = None
  11. self._ext_params = None
  12. self._risk_info = None
  13. @property
  14. def apply_amount(self):
  15. return self._apply_amount
  16. @apply_amount.setter
  17. def apply_amount(self, value):
  18. self._apply_amount = value
  19. @property
  20. def buyer_id(self):
  21. return self._buyer_id
  22. @buyer_id.setter
  23. def buyer_id(self, value):
  24. self._buyer_id = value
  25. @property
  26. def category_code(self):
  27. return self._category_code
  28. @category_code.setter
  29. def category_code(self, value):
  30. self._category_code = value
  31. @property
  32. def credit_scene(self):
  33. return self._credit_scene
  34. @credit_scene.setter
  35. def credit_scene(self, value):
  36. self._credit_scene = value
  37. @property
  38. def ext_params(self):
  39. return self._ext_params
  40. @ext_params.setter
  41. def ext_params(self, value):
  42. self._ext_params = value
  43. @property
  44. def risk_info(self):
  45. return self._risk_info
  46. @risk_info.setter
  47. def risk_info(self, value):
  48. self._risk_info = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.apply_amount:
  52. if hasattr(self.apply_amount, 'to_alipay_dict'):
  53. params['apply_amount'] = self.apply_amount.to_alipay_dict()
  54. else:
  55. params['apply_amount'] = self.apply_amount
  56. if self.buyer_id:
  57. if hasattr(self.buyer_id, 'to_alipay_dict'):
  58. params['buyer_id'] = self.buyer_id.to_alipay_dict()
  59. else:
  60. params['buyer_id'] = self.buyer_id
  61. if self.category_code:
  62. if hasattr(self.category_code, 'to_alipay_dict'):
  63. params['category_code'] = self.category_code.to_alipay_dict()
  64. else:
  65. params['category_code'] = self.category_code
  66. if self.credit_scene:
  67. if hasattr(self.credit_scene, 'to_alipay_dict'):
  68. params['credit_scene'] = self.credit_scene.to_alipay_dict()
  69. else:
  70. params['credit_scene'] = self.credit_scene
  71. if self.ext_params:
  72. if hasattr(self.ext_params, 'to_alipay_dict'):
  73. params['ext_params'] = self.ext_params.to_alipay_dict()
  74. else:
  75. params['ext_params'] = self.ext_params
  76. if self.risk_info:
  77. if hasattr(self.risk_info, 'to_alipay_dict'):
  78. params['risk_info'] = self.risk_info.to_alipay_dict()
  79. else:
  80. params['risk_info'] = self.risk_info
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = ZhimaCreditPeUserSceneConsultModel()
  87. if 'apply_amount' in d:
  88. o.apply_amount = d['apply_amount']
  89. if 'buyer_id' in d:
  90. o.buyer_id = d['buyer_id']
  91. if 'category_code' in d:
  92. o.category_code = d['category_code']
  93. if 'credit_scene' in d:
  94. o.credit_scene = d['credit_scene']
  95. if 'ext_params' in d:
  96. o.ext_params = d['ext_params']
  97. if 'risk_info' in d:
  98. o.risk_info = d['risk_info']
  99. return o