Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
class ClickEvent(SimpleEvent):
__type__ = 'click_event'
class ViewEvent(SimpleEvent):
__type__ = 'view_event'
class LocationEvent(WeChatEvent):
__type__ = 'location_event'
latitude = FloatEntry('Latitude')
longitude = FloatEntry('Longitude')
precision = FloatEntry('Precision')
class TemplateSendJobFinishEvent(WeChatEvent):
__type__ = 'templatesendjobfinish_event'
status = StringEntry('Status')
class BaseProductEvent(WeChatEvent):
key_standard = StringEntry('KeyStandard')
key_str = StringEntry('KeyStr')
ext_info = StringEntry('ExtInfo')
class UserScanProductEvent(BaseProductEvent):
__type__ = 'user_scan_product_event'
country = StringEntry('Country')
province = StringEntry('Province')
city = StringEntry('City')
sex = IntEntry('Sex')
__type__ = 'view_event'
class LocationEvent(WeChatEvent):
__type__ = 'location_event'
latitude = FloatEntry('Latitude')
longitude = FloatEntry('Longitude')
precision = FloatEntry('Precision')
class TemplateSendJobFinishEvent(WeChatEvent):
__type__ = 'templatesendjobfinish_event'
status = StringEntry('Status')
class BaseProductEvent(WeChatEvent):
key_standard = StringEntry('KeyStandard')
key_str = StringEntry('KeyStr')
ext_info = StringEntry('ExtInfo')
class UserScanProductEvent(BaseProductEvent):
__type__ = 'user_scan_product_event'
country = StringEntry('Country')
province = StringEntry('Province')
city = StringEntry('City')
sex = IntEntry('Sex')
scene = IntEntry('Scene')
class UserScanProductEnterSessionEvent(BaseProductEvent):
__type__ = 'user_scan_product_enter_session_event'
class BaseCardCheckEvent(WeChatEvent):
card_id = StringEntry('CardId')
refuse_reason = StringEntry('RefuseReason')
class CardPassCheckEvent(BaseCardCheckEvent):
__type__ = 'card_pass_check_event'
class CardNotPassCheckEvent(BaseCardCheckEvent):
__type__ = 'card_not_pass_check_event'
class BaseCardEvent(WeChatEvent):
card_id = StringEntry('CardId')
user_card_code = StringEntry('UserCardCode')
class UserGetCardEvent(BaseCardEvent):
__type__ = 'user_get_card_event'
is_give_by_friend = IntEntry('IsGiveByFriend')
friend_user_name = StringEntry('FriendUserName')
outer_id = IntEntry('OuterId')
old_user_card_code = StringEntry('OldUserCardCode')
outer_str = StringEntry('OuterStr')
is_restore_member_card = IntEntry('IsRestoreMemberCard')
is_recommend_by_friend = IntEntry('IsRecommendByFriend')
class UserGiftingCardEvent(BaseCardEvent):
__type__ = 'user_enter_session_from_card_event'
class UpdateMemberCardEvent(BaseCardEvent):
__type__ = 'update_member_card_event'
modify_bonus = IntEntry('ModifyBonus')
modify_balance = IntEntry('ModifyBalance')
class CardSkuRemindEvent(WeChatEvent):
__type__ = 'card_sku_remind_event'
card_id = StringEntry('CardId')
detail = StringEntry('Detail')
class CardPayOrderEvent(WeChatEvent):
__type__ = 'card_pay_order_event'
order_id = StringEntry('OrderId')
status = StringEntry('Status')
create_order_time = IntEntry('CreateOrderTime')
pay_finish_time = IntEntry('PayFinishTime')
desc = StringEntry('Desc')
free_coin_count = StringEntry('FreeCoinCount')
pay_coin_count = StringEntry('PayCoinCount')
refund_free_coin_count = StringEntry('RefundFreeCoinCount')
refund_pay_coin_count = StringEntry('RefundPayCoinCount')
order_type = StringEntry('OrderType')
memo = StringEntry('Memo')
receipt_info = StringEntry('ReceiptInfo')
class SubmitMembercardUserInfoEvent(BaseCardEvent):
class UserScanProductAsyncEvent(BaseProductEvent):
__type__ = 'user_scan_product_async_event'
region_code = StringEntry('RegionCode')
class UserScanProductVerifyActionEvent(WeChatEvent):
__type__ = 'user_scan_product_verify_action_event'
key_standard = StringEntry('KeyStandard')
key_str = StringEntry('KeyStr')
result = StringEntry('Result')
reason_msg = StringEntry('ReasonMsg')
class BaseCardCheckEvent(WeChatEvent):
card_id = StringEntry('CardId')
refuse_reason = StringEntry('RefuseReason')
class CardPassCheckEvent(BaseCardCheckEvent):
__type__ = 'card_pass_check_event'
class CardNotPassCheckEvent(BaseCardCheckEvent):
__type__ = 'card_not_pass_check_event'
class BaseCardEvent(WeChatEvent):
card_id = StringEntry('CardId')
user_card_code = StringEntry('UserCardCode')
class SimpleEvent(WeChatEvent):
key = StringEntry('EventKey')
class TicketEvent(WeChatEvent):
key = StringEntry('EventKey')
ticket = StringEntry('Ticket')
class SubscribeEvent(TicketEvent):
__type__ = 'subscribe_event'
class UnSubscribeEvent(WeChatEvent):
__type__ = 'unsubscribe_event'
class ScanEvent(TicketEvent):
__type__ = 'scan_event'
class ScanCodePushEvent(SimpleEvent):
__type__ = 'scancode_push_event'
scan_type = StringEntry('ScanCodeInfo.ScanType')
scan_result = StringEntry('ScanCodeInfo.ScanResult')
class ScanCodeWaitMsgEvent(ScanCodePushEvent):
__type__ = 'scancode_waitmsg_event'
scan_type = StringEntry('ScanCodeInfo.ScanType')
class UserViewCardEvent(BaseCardEvent):
__type__ = 'user_view_card_event'
outer_str = StringEntry('OuterStr')
class UserEnterSessionFromCardEvent(BaseCardEvent):
__type__ = 'user_enter_session_from_card_event'
class UpdateMemberCardEvent(BaseCardEvent):
__type__ = 'update_member_card_event'
modify_bonus = IntEntry('ModifyBonus')
modify_balance = IntEntry('ModifyBalance')
class CardSkuRemindEvent(WeChatEvent):
__type__ = 'card_sku_remind_event'
card_id = StringEntry('CardId')
detail = StringEntry('Detail')
class CardPayOrderEvent(WeChatEvent):
__type__ = 'card_pay_order_event'
order_id = StringEntry('OrderId')
status = StringEntry('Status')
create_order_time = IntEntry('CreateOrderTime')
pay_finish_time = IntEntry('PayFinishTime')
desc = StringEntry('Desc')
free_coin_count = StringEntry('FreeCoinCount')
pay_coin_count = StringEntry('PayCoinCount')
refund_free_coin_count = StringEntry('RefundFreeCoinCount')
refund_pay_coin_count = StringEntry('RefundPayCoinCount')
province = StringEntry('Province')
city = StringEntry('City')
sex = IntEntry('Sex')
scene = IntEntry('Scene')
class UserScanProductEnterSessionEvent(BaseProductEvent):
__type__ = 'user_scan_product_enter_session_event'
class UserScanProductAsyncEvent(BaseProductEvent):
__type__ = 'user_scan_product_async_event'
region_code = StringEntry('RegionCode')
class UserScanProductVerifyActionEvent(WeChatEvent):
__type__ = 'user_scan_product_verify_action_event'
key_standard = StringEntry('KeyStandard')
key_str = StringEntry('KeyStr')
result = StringEntry('Result')
reason_msg = StringEntry('ReasonMsg')
class BaseCardCheckEvent(WeChatEvent):
card_id = StringEntry('CardId')
refuse_reason = StringEntry('RefuseReason')
class CardPassCheckEvent(BaseCardCheckEvent):
__type__ = 'card_pass_check_event'
@six.add_metaclass(EventMetaClass)
class WeChatEvent(object):
target = StringEntry('ToUserName')
source = StringEntry('FromUserName')
time = IntEntry('CreateTime')
message_id = IntEntry('MsgID', 0)
def __init__(self, message):
self.__dict__.update(message)
class SimpleEvent(WeChatEvent):
key = StringEntry('EventKey')
class TicketEvent(WeChatEvent):
key = StringEntry('EventKey')
ticket = StringEntry('Ticket')
class SubscribeEvent(TicketEvent):
__type__ = 'subscribe_event'
class UnSubscribeEvent(WeChatEvent):
__type__ = 'unsubscribe_event'
class ScanEvent(TicketEvent):
__type__ = 'scan_event'
class EventMetaClass(WeRoBotMetaClass):
pass
@six.add_metaclass(EventMetaClass)
class WeChatEvent(object):
target = StringEntry('ToUserName')
source = StringEntry('FromUserName')
time = IntEntry('CreateTime')
message_id = IntEntry('MsgID', 0)
def __init__(self, message):
self.__dict__.update(message)
class SimpleEvent(WeChatEvent):
key = StringEntry('EventKey')
class TicketEvent(WeChatEvent):
key = StringEntry('EventKey')
ticket = StringEntry('Ticket')
class SubscribeEvent(TicketEvent):
__type__ = 'subscribe_event'
class UnSubscribeEvent(WeChatEvent):
__type__ = 'unsubscribe_event'