|
| 1 | +""" |
| 2 | +start_gather.py |
| 3 | +
|
| 4 | +Bandwidth's StartGather BXML verb |
| 5 | +
|
| 6 | +@copyright Bandwidth INC |
| 7 | +""" |
| 8 | +from ..terminal_verb import TerminalVerb |
| 9 | + |
| 10 | + |
| 11 | +class StartGather(TerminalVerb): |
| 12 | + |
| 13 | + def __init__( |
| 14 | + self, dtmf_url: str, dtmf_method: str=None, username: str=None, |
| 15 | + password: str=None, tag: str=None, |
| 16 | + ): |
| 17 | + """Initialize a <StartGather> verb |
| 18 | +
|
| 19 | + Args: |
| 20 | + dtmf_url (str): URL to send the DTMF event to. May be a relative URL.. |
| 21 | + dtmf_method (str, optional): The HTTP method to use for the request to dtmfUrl. GET or POST. Default value is POST. Defaults to None. |
| 22 | + username (str, optional): The username to send in the HTTP request to dtmfUrl. Defaults to None. |
| 23 | + password (str, optional): The password to send in the HTTP request to dtmfUrl. Defaults to None. |
| 24 | + tag (str, optional): A custom string that will be sent with these and all future callbacks unless overwritten by a future tag attribute or cleared. May be cleared by setting tag="" Max length 256 characters. Defaults to None. |
| 25 | + """ |
| 26 | + self.dtmf_url = dtmf_url |
| 27 | + self.dtmf_method = dtmf_method |
| 28 | + self.username = username |
| 29 | + self.password = password |
| 30 | + self.tag = tag |
| 31 | + super().__init__( |
| 32 | + tag="StartGather" |
| 33 | + ) |
| 34 | + |
| 35 | + @property |
| 36 | + def _attributes(self): |
| 37 | + return { |
| 38 | + "dtmfUrl": self.dtmf_url, |
| 39 | + "dtmfMethod": self.dtmf_method, |
| 40 | + "username": self.username, |
| 41 | + "password": self.password, |
| 42 | + "tag": self.tag |
| 43 | + } |
0 commit comments