8000 Add DependentPhoneNumbers shortcut · codemunkee/twilio-python@726d963 · GitHub
[go: up one dir, main page]

Skip to content

Commit 726d963

Browse files
committed
Add DependentPhoneNumbers shortcut
1 parent 5325dcf commit 726d963

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

twilio/rest/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ def feedback(self, call_sid):
153153
)
154154
return CallFeedback(call_feedback_list)
155155

156+
def dependent_phone_numbers(self, address_sid):
157+
"""
158+
Return a :class:`DependentPhoneNumbers <twilio.rest.resources.DependentPhoneNumbers>` instance for
159+
the :class:`Address <twilio.rest.resources.Address>` with the given address_sid
160+
"""
161+
base_uri = "%s/Addresses/%s" % (self.account_uri, address_sid)
162+
return DependentPhoneNumbers(base_uri, self.auth, self.timeout)
163+
156164
def request(self, path, method=None, vars=None):
157165
"""sends a request and gets a response from the Twilio REST API
158166

0 commit comments

Comments
 (0)
0