123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class ZhimaCreditPeUserSceneConsultModel(object):
- def __init__(self):
- self._apply_amount = None
- self._buyer_id = None
- self._category_code = None
- self._credit_scene = None
- self._ext_params = None
- self._risk_info = None
- @property
- def apply_amount(self):
- return self._apply_amount
- @apply_amount.setter
- def apply_amount(self, value):
- self._apply_amount = value
- @property
- def buyer_id(self):
- return self._buyer_id
- @buyer_id.setter
- def buyer_id(self, value):
- self._buyer_id = value
- @property
- def category_code(self):
- return self._category_code
- @category_code.setter
- def category_code(self, value):
- self._category_code = value
- @property
- def credit_scene(self):
- return self._credit_scene
- @credit_scene.setter
- def credit_scene(self, value):
- self._credit_scene = value
- @property
- def ext_params(self):
- return self._ext_params
- @ext_params.setter
- def ext_params(self, value):
- self._ext_params = value
- @property
- def risk_info(self):
- return self._risk_info
- @risk_info.setter
- def risk_info(self, value):
- self._risk_info = value
- def to_alipay_dict(self):
- params = dict()
- if self.apply_amount:
- if hasattr(self.apply_amount, 'to_alipay_dict'):
- params['apply_amount'] = self.apply_amount.to_alipay_dict()
- else:
- params['apply_amount'] = self.apply_amount
- if self.buyer_id:
- if hasattr(self.buyer_id, 'to_alipay_dict'):
- params['buyer_id'] = self.buyer_id.to_alipay_dict()
- else:
- params['buyer_id'] = self.buyer_id
- if self.category_code:
- if hasattr(self.category_code, 'to_alipay_dict'):
- params['category_code'] = self.category_code.to_alipay_dict()
- else:
- params['category_code'] = self.category_code
- if self.credit_scene:
- if hasattr(self.credit_scene, 'to_alipay_dict'):
- params['credit_scene'] = self.credit_scene.to_alipay_dict()
- else:
- params['credit_scene'] = self.credit_scene
- if self.ext_params:
- if hasattr(self.ext_params, 'to_alipay_dict'):
- params['ext_params'] = self.ext_params.to_alipay_dict()
- else:
- params['ext_params'] = self.ext_params
- if self.risk_info:
- if hasattr(self.risk_info, 'to_alipay_dict'):
- params['risk_info'] = self.risk_info.to_alipay_dict()
- else:
- params['risk_info'] = self.risk_info
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = ZhimaCreditPeUserSceneConsultModel()
- if 'apply_amount' in d:
- o.apply_amount = d['apply_amount']
- if 'buyer_id' in d:
- o.buyer_id = d['buyer_id']
- if 'category_code' in d:
- o.category_code = d['category_code']
- if 'credit_scene' in d:
- o.credit_scene = d['credit_scene']
- if 'ext_params' in d:
- o.ext_params = d['ext_params']
- if 'risk_info' in d:
- o.risk_info = d['risk_info']
- return o
|