#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class ZhimaMerchantCreditlifeRiskApplyModel(object): def __init__(self): self._address = None self._cert_no = None self._item_id = None self._mobile = None self._name = None self._transaction_id = None @property def address(self): return self._address @address.setter def address(self, value): self._address = value @property def cert_no(self): return self._cert_no @cert_no.setter def cert_no(self, value): self._cert_no = value @property def item_id(self): return self._item_id @item_id.setter def item_id(self, value): self._item_id = value @property def mobile(self): return self._mobile @mobile.setter def mobile(self, value): self._mobile = value @property def name(self): return self._name @name.setter def name(self, value): self._name = value @property def transaction_id(self): return self._transaction_id @transaction_id.setter def transaction_id(self, value): self._transaction_id = value def to_alipay_dict(self): params = dict() if self.address: if hasattr(self.address, 'to_alipay_dict'): params['address'] = self.address.to_alipay_dict() else: params['address'] = self.address if self.cert_no: if hasattr(self.cert_no, 'to_alipay_dict'): params['cert_no'] = self.cert_no.to_alipay_dict() else: params['cert_no'] = self.cert_no if self.item_id: if hasattr(self.item_id, 'to_alipay_dict'): params['item_id'] = self.item_id.to_alipay_dict() else: params['item_id'] = self.item_id if self.mobile: if hasattr(self.mobile, 'to_alipay_dict'): params['mobile'] = self.mobile.to_alipay_dict() else: params['mobile'] = self.mobile if self.name: if hasattr(self.name, 'to_alipay_dict'): params['name'] = self.name.to_alipay_dict() else: params['name'] = self.name if self.transaction_id: if hasattr(self.transaction_id, 'to_alipay_dict'): params['transaction_id'] = self.transaction_id.to_alipay_dict() else: params['transaction_id'] = self.transaction_id return params @staticmethod def from_alipay_dict(d): if not d: return None o = ZhimaMerchantCreditlifeRiskApplyModel() if 'address' in d: o.address = d['address'] if 'cert_no' in d: o.cert_no = d['cert_no'] if 'item_id' in d: o.item_id = d['item_id'] if 'mobile' in d: o.mobile = d['mobile'] if 'name' in d: o.name = d['name'] if 'transaction_id' in d: o.transaction_id = d['transaction_id'] return o