class VerifyExpiredEvent(BaseEvent): """ 认证过期失效通知 详情请参阅 http://mp.weixin.qq.com/wiki/1/7f81dec16b801b34629091094c099439.html """ event = 'verify_expired' expired_time = DateTimeField('ExpiredTime')
class AnnualRenewEvent(BaseEvent): """ 年审通知事件 详情请参阅 http://mp.weixin.qq.com/wiki/1/7f81dec16b801b34629091094c099439.html """ event = 'annual_renew' expired_time = DateTimeField('ExpiredTime')
class NamingVerifySuccessEvent(BaseEvent): """ 名称认证成功事件 详情请参阅 http://mp.weixin.qq.com/wiki/1/7f81dec16b801b34629091094c099439.html """ event = 'naming_verify_success' expired_time = DateTimeField('ExpiredTime')
class QualificationVerifySuccessEvent(BaseEvent): """ 资质认证成功事件 详情请参阅 http://mp.weixin.qq.com/wiki/1/7f81dec16b801b34629091094c099439.html """ event = 'qualification_verify_success' expired_time = DateTimeField('ExpiredTime')
class NamingVerifyFailEvent(BaseEvent): """ 名称认证失败事件 客户端不打勾,但仍有接口权限。详情请参阅 http://mp.weixin.qq.com/wiki/1/7f81dec16b801b34629091094c099439.html """ event = 'naming_verify_fail' fail_time = DateTimeField('FailTime') fail_reason = StringField('FailReason')
class QualificationVerifyFailEvent(BaseEvent): """ 资质认证失败事件 详情请参阅 http://mp.weixin.qq.com/wiki/1/7f81dec16b801b34629091094c099439.html """ event = 'qualification_verify_fail' fail_time = DateTimeField('FailTime') fail_reason = StringField('FailReason')
class BaseComponentMessage(six.with_metaclass(MessageMetaClass)): """Base class for all component messages and events""" type = 'unknown' appid = StringField('AppId') create_time = DateTimeField('CreateTime') def __init__(self, message): self._data = message def __repr__(self): _repr = "{klass}({msg})".format(klass=self.__class__.__name__, msg=repr(self._data)) if six.PY2: return to_binary(_repr) else: return to_text(_repr)
class BaseMessage(six.with_metaclass(MessageMetaClass)): """Base class for all messages and events""" type = 'unknown' id = IntegerField('MsgId', 0) source = StringField('FromUserName') target = StringField('ToUserName') create_time = DateTimeField('CreateTime') time = IntegerField('CreateTime') def __init__(self, message): self._data = message def __repr__(self): _repr = "{klass}({msg})".format(klass=self.__class__.__name__, msg=repr(self._data)) if six.PY2: return to_binary(_repr) else: return to_text(_repr)