ZhimaCreditPeUserOrderConsultModel.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 ZhimaCreditPeUserOrderConsultModel(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._out_order_no = None
  13. self._risk_info = None
  14. self._seller_id = 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 buyer_id(self):
  23. return self._buyer_id
  24. @buyer_id.setter
  25. def buyer_id(self, value):
  26. self._buyer_id = 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_params(self):
  41. return self._ext_params
  42. @ext_params.setter
  43. def ext_params(self, value):
  44. self._ext_params = 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 risk_info(self):
  53. return self._risk_info
  54. @risk_info.setter
  55. def risk_info(self, value):
  56. self._risk_info = value
  57. @property
  58. def seller_id(self):
  59. return self._seller_id
  60. @seller_id.setter
  61. def seller_id(self, value):
  62. self._seller_id = 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.buyer_id:
  71. if hasattr(self.buyer_id, 'to_alipay_dict'):
  72. params['buyer_id'] = self.buyer_id.to_alipay_dict()
  73. else:
  74. params['buyer_id'] = self.buyer_id
  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_params:
  86. if hasattr(self.ext_params, 'to_alipay_dict'):
  87. params['ext_params'] = self.ext_params.to_alipay_dict()
  88. else:
  89. params['ext_params'] = self.ext_params
  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.risk_info:
  96. if hasattr(self.risk_info, 'to_alipay_dict'):
  97. params['risk_info'] = self.risk_info.to_alipay_dict()
  98. else:
  99. params['risk_info'] = self.risk_info
  100. if self.seller_id:
  101. if hasattr(self.seller_id, 'to_alipay_dict'):
  102. params['seller_id'] = self.seller_id.to_alipay_dict()
  103. else:
  104. params['seller_id'] = self.seller_id
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = ZhimaCreditPeUserOrderConsultModel()
  111. if 'apply_amount' in d:
  112. o.apply_amount = d['apply_amount']
  113. if 'buyer_id' in d:
  114. o.buyer_id = d['buyer_id']
  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_params' in d:
  120. o.ext_params = d['ext_params']
  121. if 'out_order_no' in d:
  122. o.out_order_no = d['out_order_no']
  123. if 'risk_info' in d:
  124. o.risk_info = d['risk_info']
  125. if 'seller_id' in d:
  126. o.seller_id = d['seller_id']
  127. return o