ZhimaCreditPeUserRiskConsultModel.py 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ZhimaCreditPeUserRiskConsultModel(object):
  6. def __init__(self):
  7. self._apply_amount = None
  8. self._biz_action = None
  9. self._category_code = None
  10. self._credit_scene = None
  11. self._ext = None
  12. self._out_order_no = None
  13. self._product_code = None
  14. self._risk_info = None
  15. @property
  16. def apply_amount(self):
  17. return self._apply_amount
  18. @apply_amount.setter
  19. def apply_amount(self, value):
  20. self._apply_amount = value
  21. @property
  22. def biz_action(self):
  23. return self._biz_action
  24. @biz_action.setter
  25. def biz_action(self, value):
  26. self._biz_action = value
  27. @property
  28. def category_code(self):
  29. return self._category_code
  30. @category_code.setter
  31. def category_code(self, value):
  32. self._category_code = value
  33. @property
  34. def credit_scene(self):
  35. return self._credit_scene
  36. @credit_scene.setter
  37. def credit_scene(self, value):
  38. self._credit_scene = value
  39. @property
  40. def ext(self):
  41. return self._ext
  42. @ext.setter
  43. def ext(self, value):
  44. self._ext = value
  45. @property
  46. def out_order_no(self):
  47. return self._out_order_no
  48. @out_order_no.setter
  49. def out_order_no(self, value):
  50. self._out_order_no = value
  51. @property
  52. def product_code(self):
  53. return self._product_code
  54. @product_code.setter
  55. def product_code(self, value):
  56. self._product_code = value
  57. @property
  58. def risk_info(self):
  59. return self._risk_info
  60. @risk_info.setter
  61. def risk_info(self, value):
  62. self._risk_info = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.apply_amount:
  66. if hasattr(self.apply_amount, 'to_alipay_dict'):
  67. params['apply_amount'] = self.apply_amount.to_alipay_dict()
  68. else:
  69. params['apply_amount'] = self.apply_amount
  70. if self.biz_action:
  71. if hasattr(self.biz_action, 'to_alipay_dict'):
  72. params['biz_action'] = self.biz_action.to_alipay_dict()
  73. else:
  74. params['biz_action'] = self.biz_action
  75. if self.category_code:
  76. if hasattr(self.category_code, 'to_alipay_dict'):
  77. params['category_code'] = self.category_code.to_alipay_dict()
  78. else:
  79. params['category_code'] = self.category_code
  80. if self.credit_scene:
  81. if hasattr(self.credit_scene, 'to_alipay_dict'):
  82. params['credit_scene'] = self.credit_scene.to_alipay_dict()
  83. else:
  84. params['credit_scene'] = self.credit_scene
  85. if self.ext:
  86. if hasattr(self.ext, 'to_alipay_dict'):
  87. params['ext'] = self.ext.to_alipay_dict()
  88. else:
  89. params['ext'] = self.ext
  90. if self.out_order_no:
  91. if hasattr(self.out_order_no, 'to_alipay_dict'):
  92. params['out_order_no'] = self.out_order_no.to_alipay_dict()
  93. else:
  94. params['out_order_no'] = self.out_order_no
  95. if self.product_code:
  96. if hasattr(self.product_code, 'to_alipay_dict'):
  97. params['product_code'] = self.product_code.to_alipay_dict()
  98. else:
  99. params['product_code'] = self.product_code
  100. if self.risk_info:
  101. if hasattr(self.risk_info, 'to_alipay_dict'):
  102. params['risk_info'] = self.risk_info.to_alipay_dict()
  103. else:
  104. params['risk_info'] = self.risk_info
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = ZhimaCreditPeUserRiskConsultModel()
  111. if 'apply_amount' in d:
  112. o.apply_amount = d['apply_amount']
  113. if 'biz_action' in d:
  114. o.biz_action = d['biz_action']
  115. if 'category_code' in d:
  116. o.category_code = d['category_code']
  117. if 'credit_scene' in d:
  118. o.credit_scene = d['credit_scene']
  119. if 'ext' in d:
  120. o.ext = d['ext']
  121. if 'out_order_no' in d:
  122. o.out_order_no = d['out_order_no']
  123. if 'product_code' in d:
  124. o.product_code = d['product_code']
  125. if 'risk_info' in d:
  126. o.risk_info = d['risk_info']
  127. return o