@@ -17,7 +17,7 @@ class Gather(AbstractBxmlVerb):
1717
1818 def __init__ (self , gather_url = None , gather_method = None , terminating_digits = None , tag = None , max_digits = None ,
1919 inter_digit_timeout = None , username = None , password = None , first_digit_timeout = None ,
20- play_audio = None , speak_sentence = None , repeat_count = None ):
20+ play_audio = None , speak_sentence = None , repeat_count = None , nested_verbs = None ):
2121 """
2222 Initializes the Gather class with the following parameters
2323
@@ -33,6 +33,7 @@ def __init__(self, gather_url=None, gather_method=None, terminating_digits=None,
3333 :param PlayAudio play_audio: The PlayAudio tag to include in the gather
3434 :param SpeakSentence speak_sentence: The SpeakSentence tag to include in the gather
3535 :param int repeat_count: The number of times to repeat the audio prompt
36+ :param list<PlayAudio|SpeakSentence> nested_verbs: The list of verbs to nest in the gather
3637 """
3738
3839 self .gather_url = gather_url
@@ -47,6 +48,7 @@ def __init__(self, gather_url=None, gather_method=None, terminating_digits=None,
4748 self .play_audio = play_audio
4849 self .speak_sentence = speak_sentence
4950 self .repeat_count = repeat_count
51+ self .nested_verbs = nested_verbs
5052
5153 def to_bxml (self ):
5254 root = etree .Element (GATHER_TAG )
@@ -74,4 +76,7 @@ def to_bxml(self):
7476 root .append (self .play_audio .to_etree_element ())
7577 if self .speak_sentence is not None :
7678 root .append (self .speak_sentence .to_etree_element ())
79+ if self .nested_verbs is not None :
80+ for verb in self .nested_verbs :
81+ root .append (verb .to_etree_element ())
7782 return etree .tostring (root ).decode ()
0 commit comments