#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayPcreditHuabeiAuthAccumulationQueryModel(object): def __init__(self): self._agreement_no = None self._alipay_user_id = None self._period = None @property def agreement_no(self): return self._agreement_no @agreement_no.setter def agreement_no(self, value): self._agreement_no = value @property def alipay_user_id(self): return self._alipay_user_id @alipay_user_id.setter def alipay_user_id(self, value): self._alipay_user_id = value @property def period(self): return self._period @period.setter def period(self, value): self._period = value def to_alipay_dict(self): params = dict() if self.agreement_no: if hasattr(self.agreement_no, 'to_alipay_dict'): params['agreement_no'] = self.agreement_no.to_alipay_dict() else: params['agreement_no'] = self.agreement_no if self.alipay_user_id: if hasattr(self.alipay_user_id, 'to_alipay_dict'): params['alipay_user_id'] = self.alipay_user_id.to_alipay_dict() else: params['alipay_user_id'] = self.alipay_user_id if self.period: if hasattr(self.period, 'to_alipay_dict'): params['period'] = self.period.to_alipay_dict() else: params['period'] = self.period return params @staticmethod def from_alipay_dict(d): if not d: return None o = AlipayPcreditHuabeiAuthAccumulationQueryModel() if 'agreement_no' in d: o.agreement_no = d['agreement_no'] if 'alipay_user_id' in d: o.alipay_user_id = d['alipay_user_id'] if 'period' in d: o.period = d['period'] return o