Skip to content

Commit 310b848

Browse files
Refactored due to addition of terminal verb
1 parent fde41ff commit 310b848

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

bandwidth/model/bxml/verbs/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from .bridge import Bridge
2+
from .pause import Pause
23
from .phone_number import PhoneNumber
34
from .sip_uri import SipUri
45
from .tag import Tag

bandwidth/model/bxml/verbs/pause.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Bandwidth's Pause BXML verb
44
@copyright Bandwidth INC
55
"""
6-
from ..verb import Verb
7-
class Pause(Verb):
6+
from ..terminal_verb import TerminalVerb
7+
class Pause(TerminalVerb):
88
def __init__(self, duration:str=None):
99
"""Initialize a <Pause> verb
1010
Args:
@@ -14,13 +14,4 @@ def __init__(self, duration:str=None):
1414
"duration": duration
1515
}
1616

17-
super().__init__(tag="Pause", content=None, attributes=self.attributes, nested_verbs=None)
18-
19-
def add_verb(self, verb: Verb):
20-
"""Adding verbs is not allowed for <Pause>
21-
Args:
22-
verb (Verb): BXML verb
23-
Raises:
24-
AttributeError: This method is not allowed for <Pause>
25-
"""
26-
raise AttributeError('Adding verbs is not supported by <Pause>')
17+
super().__init__(tag="Pause", content=None, attributes=self.attributes)

0 commit comments

Comments
 (0)