8000 Per Twilio Rest Docs, you should be able to set the Sms Application, … · michaelhelmick/twilio-python@b87a34b · GitHub
[go: up one dir, main page]

Skip to content

Commit b87a34b

Browse files
author
Mike Helmick
committed
Per Twilio Rest Docs, you should be able to set the Sms Application, Voice Application, as well as a "Friendly Name". Friendly Name was in a previous version of this library when purchasing a number, but seems to have been lost.
1 parent 248f2c6 commit b87a34b

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

twilio/rest/resources.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,8 @@ def purchase(self, phone_number=None, area_code=None, voice_url=None,
859859
status_callback_url=None, status_callback_method=None,
860860
sms_url=None, sms_method=None, sms_fallback_url=None,
861861
sms_fallback_method=None, voice_caller_id_lookup=None,
862-
account_sid=None, application_sid=None):
862+
account_sid=None, sms_application_sid=None,
863+
voice_application_sid=None, friendly_name=None):
863864
"""
864865
Attempt to purchase the specified number. The only required parameters
865866
are **either** phone_number or area_code
@@ -880,7 +881,9 @@ def purchase(self, phone_number=None, area_code=None, voice_url=None,
880881
"StatusCallbackMethod": status_callback_method,
881882
"VoiceCallerIdLookup": voice_caller_id_lookup,
882883
"AccountSid": account_sid,
883-
"ApplicationSid": application_sid,
884+
"SmsApplicationSid": sms_application_sid,
885+
"VoiceApplicationSid": voice_application_sid,
886+
"FriendlyName": friendly_name,
884887
})
885888

886889
if phone_number:

0 commit comments

Comments
 (0)
0