Пример #1
0
 def validate_actions(actions):
     assert (isinstance(actions, list))
     for a in actions:
         assert (validate_email(a) or 
                 validate_international_phonenumber(a) or
                 validate_instance_action(a) or
                 validate_groupnotification_action(a))
Пример #2
0
 def get_action_type(self, action):
     if validate_email(action):
         return "email"
     elif validate_international_phonenumber(action):
         return "SMS"
     elif validate_instance_action(action):
         return "InstanceAction"
     elif validate_groupnotification_action(action):
         return "GroupNotificationAction"
Пример #3
0
 def get_action_type(self, action):
     if validate_email(action):
         return "email"
     elif validate_international_phonenumber(action):
         return "SMS"
     elif validate_instance_action(action):
         return "InstanceAction"
     elif validate_groupnotification_action(action):
         return "GroupNotificationAction"
Пример #4
0
 def get_action_type(self, action):
     if validate_email(action):
         return "email"
     elif validate_international_phonenumber(action):
         return "SMS"
Пример #5
0
 def validate_actions(actions):
     assert isinstance(actions, list)
     for a in actions:
         assert validate_email(a) or validate_international_phonenumber(a)