|
| 1 | +""" |
| 2 | +bridge.py |
| 3 | +
|
| 4 | +Bandwidth's Bridge BXML verb |
| 5 | +
|
| 6 | +@copyright Bandwidth INC |
| 7 | +""" |
| 8 | +from ..terminal_verb import TerminalVerb |
| 9 | + |
| 10 | + |
| 11 | +class Bridge(TerminalVerb): |
| 12 | + |
| 13 | + def __init__( |
| 14 | + self, target_call: str, bridge_complete_url: str=None, |
| 15 | + bridge_complete_method: str=None, |
| 16 | + bridge_complete_fallback_url: str=None, |
| 17 | + bridge_complete_fallback_method: str=None, |
| 18 | + bridge_target_complete_url: str=None, |
| 19 | + bridge_target_complete_method: str=None, |
| 20 | + bridge_target_complete_fallback_url: str=None, |
| 21 | + bridge_target_complete_fallback_method: str=None, |
| 22 | + username: str=None, password: str=None, |
| 23 | + fallback_username: str=None, fallback_password: str=None, |
| 24 | + tag: str=None |
| 25 | + ): |
| 26 | + """Initialize a <Bridge> verb |
| 27 | +
|
| 28 | + Args: |
| 29 | + target_call (str): _description_ |
| 30 | + bridge_complete_url (str, optional): _description_. Defaults to None. |
| 31 | + bridge_complete_method (str, optional): _description_. Defaults to None. |
| 32 | + bridge_complete_fallback_url (str, optional): _description_. Defaults to None. |
| 33 | + bridge_complete_fallback_method (str, optional): _description_. Defaults to None. |
| 34 | + bridge_target_complete_url (str, optional): _description_. Defaults to None. |
| 35 | + bridge_target_complete_method (str, optional): _description_. Defaults to None. |
| 36 | + bridge_target_complete_fallback_url (str, optional): _description_. Defaults to None. |
| 37 | + bridge_target_complete_fallback_method (str, optional): _description_. Defaults to None. |
| 38 | + username (str, optional): _description_. Defaults to None. |
| 39 | + password (str, optional): _description_. Defaults to None. |
| 40 | + fallback_username (str, optional): _description_. Defaults to None. |
| 41 | + fallback_password (str, optional): _description_. Defaults to None. |
| 42 | + tag (str, optional): _description_. Defaults to None. |
| 43 | + """ |
| 44 | + self.target_call = target_call |
| 45 | + self.bridge_complete_url = bridge_complete_url |
| 46 | + self.bridge_complete_method = bridge_complete_method |
| 47 | + self.bridge_complete_fallback_url = bridge_complete_fallback_url |
| 48 | + self.bridge_complete_fallback_method = bridge_complete_fallback_method |
| 49 | + self.bridge_target_complete_url = bridge_target_complete_url |
| 50 | + self.bridge_target_complete_method = bridge_target_complete_method |
| 51 | + self.bridge_target_complete_fallback_url = bridge_target_complete_fallback_url |
| 52 | + self.bridge_target_complete_fallback_method = bridge_target_complete_fallback_method |
| 53 | + self.username = username |
| 54 | + self.password = password |
| 55 | + self.fallback_username = fallback_username |
| 56 | + self.fallback_password = fallback_password |
| 57 | + self.tag = tag |
| 58 | + self.attributes = { |
| 59 | + "bridgeCompleteUrl": self.bridge_complete_url, |
| 60 | + "bridgeCompleteMethod": self.bridge_complete_method, |
| 61 | + "bridgeCompleteFallbackUrl": self.bridge_complete_fallback_url, |
| 62 | + "bridgeCompleteFallbackMethod": self.bridge_complete_fallback_method, |
| 63 | + "bridgeTargetCompleteUrl": self.bridge_target_complete_url, |
| 64 | + "bridgeTargetCompleteMethod": self.bridge_target_complete_method, |
| 65 | + "bridgeTargetCompleteFallback_url": self.bridge_target_complete_fallback_url, |
| 66 | + "bridgeTargetCompleteFallbackMethod": self.bridge_target_complete_fallback_method, |
| 67 | + "username": self.username, |
| 68 | + "password": self.password, |
| 69 | + "fallbackUsername": self.fallback_username, |
| 70 | + "fallbackPassword": self.fallback_password, |
| 71 | + "tag": self.tag |
| 72 | + } |
| 73 | + super().__init__( |
| 74 | + tag="Bridge", |
| 75 | + content=self.target_call, |
| 76 | + attributes=self.attributes |
| 77 | + ) |
0 commit comments