8000 [Librarian] Regenerated @ 9419ae9766a1f3421c32308ef0a457ca0c0248fd · kennygalang/twilio-python@cd8cc60 · GitHub
[go: up one dir, main page]

Skip to content

Commit cd8cc60

Browse files
committed
[Librarian] Regenerated @ 9419ae9766a1f3421c32308ef0a457ca0c0248fd
1 parent 91c0ab9 commit cd8cc60

File tree

8 files changed

+22
-189
lines changed

8 files changed

+22
-189
lines changed

CHANGES.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,22 @@ twilio-python Changelog
33

44
Here you can see the full list of changes between each twilio-python release.
55

6+
[2022-08-24] Version 7.13.0
7+
---------------------------
8+
**Library - Test**
9+
- [PR #614](https://github.com/twilio/twilio-python/pull/614): add test-docker rule. Thanks to [@beebzz](https://github.com/beebzz)!
10+
11+
**Api**
12+
- Remove `beta feature` from scheduling params and remove optimize parameters. **(breaking change)**
13+
14+
**Routes**
15+
- Remove Duplicate Create Method - Update Method will work even if Inbound Processing Region is currently empty/404. **(breaking change)**
16+
17+
**Twiml**
18+
- Add new Polly Neural voices
19+
- Add new languages to SSML `<lang>`.
20+
21+
622
[2022-08-10] Version 7.12.1
723
---------------------------
824
**Routes**

tests/integration/routes/v2/test_phone_number.py

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,50 +14,15 @@
1414

1515
class PhoneNumberTestCase(IntegrationTestCase):
1616

17-
def test_create_request(self):
18-
self.holodeck.mock(Response(500, ''))
19-
20-
with self.assertRaises(TwilioException):
21-
self.client.routes.v2.phone_numbers("phone_number").create()
22-
23-
self.holodeck.assert_has_request(Request(
24-
'post',
25-
'https://routes.twilio.com/v2/PhoneNumbers/phone_number',
26-
))
27-
28-
def test_create_response(self):
29-
self.holodeck.mock(Response(
30-
201,
31-
'''
32-
{
33-
"phone_number": "+18001234567",
34-
"url": "https://routes.twilio.com/v2/PhoneNumbers/+18001234567",
35-
"sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37-
"friendly_name": "friendly_name",
38-
"voice_region": "au1",
39-
"date_created": "2015-07-30T20:00:00Z",
40-
"date_updated": "2015-07-30T20:00:00Z"
41-
}
42-
'''
43-
))
44-
45-
actual = self.client.routes.v2.phone_numbers("phone_number").create()
46-
47-
self.assertIsNotNone(actual)
48-
4917
def test_update_request(self):
5018
self.holodeck.mock(Response(500, ''))
5119

5220
with self.assertRaises(TwilioException):
53-
self.client.routes.v2.phone_numbers("phone_number").update(voice_region="voice_region", friendly_name="friendly_name")
54-
55-
values = {'VoiceRegion': "voice_region", 'FriendlyName': "friendly_name", }
21+
self.client.routes.v2.phone_numbers("phone_number").update()
5622

5723
self.holodeck.assert_has_request(Request(
5824
'post',
5925
'https://routes.twilio.com/v2/PhoneNumbers/phone_number',
60-
data=values,
6126
))
6227

6328
def test_update_response(self):
@@ -77,7 +42,7 @@ def test_update_response(self):
7742
'''
7843
))
7944

80-
actual = self.client.routes.v2.phone_numbers("phone_number").update(voice_region="voice_region", friendly_name="friendly_name")
45+
actual = self.client.routes.v2.phone_numbers("phone_number").update()
8146

8247
self.assertIsNotNone(actual)
8348

tests/integration/routes/v2/test_sip_domain.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,6 @@
1414

1515
class SipDomainTestCase(IntegrationTestCase):
1616

17-
def test_create_request(self):
18-
self.holodeck.mock(Response(500, ''))
19-
20-
with self.assertRaises(TwilioException):
21-
self.client.routes.v2.sip_domains("sip_domain").create()
22-
23-
self.holodeck.assert_has_request(Request(
24-
'post',
25-
'https://routes.twilio.com/v2/SipDomains/sip_domain',
26-
))
27-
28-
def test_create_response(self):
29-
self.holodeck.mock(Response(
30-
201,
31-
'''
32-
{
33-
"url": "https://routes.twilio.com/v2/SipDomains/test.sip.twilio.com",
34-
"sip_domain": "test.sip.twilio.com",
35-
"sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37-
"friendly_name": "friendly_name",
38-
"voice_region": "au1",
39-
"date_created": "2020-08-07T22:29:24Z",
40-
"date_updated": "2020-08-07T22:29:24Z"
41-
}
42-
'''
43-
))
44-
45-
actual = self.client.routes.v2.sip_domains("sip_domain").create()
46-
47-
self.assertIsNotNone(actual)
48-
4917
def test_update_request(self):
5018
self.holodeck.mock(Response(500, ''))
5119

tests/integration/routes/v2/test_trunk.py

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,6 @@
1414

1515
class TrunkTestCase(IntegrationTestCase):
1616

17-
def test_create_request(self):
18-
self.holodeck.mock(Response(500, '& 10000 #39;))
19-
20-
with self.assertRaises(TwilioException):
21-
self.client.routes.v2.trunks("sip_trunk_domain").create()
22-
23-
self.holodeck.assert_has_request(Request(
24-
'post',
25-
'https://routes.twilio.com/v2/Trunks/sip_trunk_domain',
26-
))
27-
28-
def test_create_response(self):
29-
self.holodeck.mock(Response(
30-
201,
31-
'''
32-
{
33-
"sip_trunk_domain": "test.pstn.twilio.com",
34-
"url": "https://routes.twilio.com/v2/Trunks/test.pstn.twilio.com",
35-
"sid": "QQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37-
"friendly_name": "friendly_name",
38-
"voice_region": "au1",
39-
"date_created": "2020-08-07T22:29:24Z",
40-
"date_updated": "2020-08-07T22:29:24Z"
41-
}
42-
'''
43-
))
44-
45-
actual = self.client.routes.v2.trunks("sip_trunk_domain").create()
46-
47-
self.assertIsNotNone(actual)
48-
4917
def test_update_request(self):
5018
self.holodeck.mock(Response(500, ''))
5119

twilio/rest/routes/v2/phone_number.py

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -118,23 +118,7 @@ def __init__(self, version, phone_number):
118118
self._solution = {'phone_number': phone_number, }
119119
self._uri = '/PhoneNumbers/{phone_number}'.format(**self._solution)
120120

121-
def create(self, voice_region=values.unset, friendly_name=values.unset):
122-
"""
123-
Create the PhoneNumberInstance
124-
125-
:param unicode voice_region: The Inbound Processing Region used for this phone number for voice
126-
:param unicode friendly_name: A human readable description of this resource.
127-
128-
:returns: The created PhoneNumberInstance
129-
:rtype: twilio.rest.routes.v2.phone_number.PhoneNumberInstance
130-
"""
131-
data = values.of({'VoiceRegion': voice_region, 'FriendlyName': friendly_name, })
132-
133-
payload = self._version.create(method='POST', uri=self._uri, data=data, )
134-
135-
return PhoneNumberInstance(self._version, payload, phone_number=self._solution['phone_number'], )
136-
137-
def update(self, voice_region, friendly_name):
121+
def update(self, voice_region=values.unset, friendly_name=values.unset):
138122
"""
139123
Update the PhoneNumberInstance
140124
@@ -276,19 +260,7 @@ def date_updated(self):
276260
"""
277261
return self._properties['date_updated']
278262

279-
def create(self, voice_region=values.unset, friendly_name=values.unset):
280-
"""
281-
Create the PhoneNumberInstance
282-
283-
:param unicode voice_region: The Inbound Processing Region used for this phone number for voice
284-
:param unicode friendly_name: A human readable description of this resource.
285-
286-
:returns: The created PhoneNumberInstance
287-
:rtype: twilio.rest.routes.v2.phone_number.PhoneNumberInstance
288-
"""
289-
return self._proxy.create(voice_region=voice_region, friendly_name=friendly_name, )
290-
291-
def update(self, voice_region, friendly_name):
263+
def update(self, voice_region=values.unset, friendly_name=values.unset):
292264
"""
293265
Update the PhoneNumberInstance
294266
@@ -298,7 +270,7 @@ def update(self, voice_region, friendly_name):
298270
:returns: The updated PhoneNumberInstance
299271
:rtype: twilio.rest.routes.v2.phone_number.PhoneNumberInstance
300272
"""
301-
return self._proxy.update(voice_region, friendly_name, )
273+
return self._proxy.update(voice_region=voice_region, friendly_name=friendly_name, )
302274

303275
def fetch(self):
304276
"""

twilio/rest/routes/v2/sip_domain.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,6 @@ def __init__(self, version, sip_domain):
118118
self._solution = {'sip_domain': sip_domain, }
119119
self._uri = '/SipDomains/{sip_domain}'.format(**self._solution)
120120

121-
def create(self, voice_region=values.unset, friendly_name=values.unset):
122-
"""
123-
Create the SipDomainInstance
124-
125-
:param unicode voice_region: The voice_region
126-
:param unicode friendly_name: The friendly_name
127-
128-
:returns: The created SipDomainInstance
129-
:rtype: twilio.rest.routes.v2.sip_domain.SipDomainInstance
130-
"""
131-
data = values.of({'VoiceRegion': voice_region, 'FriendlyName': friendly_name, })
132-
133-
payload = self._version.create(method='POST', uri=self._uri, data=data, )
134-
135-
return SipDomainInstance(self._version, payload, sip_domain=self._solution['sip_domain'], )
136-
137121
def update(self, voice_region=values.unset, friendly_name=values.unset):
138122
"""
139123
Update the SipDomainInstance
@@ -276,18 +260,6 @@ def date_updated(self):
276260
"""
277261
return self._properties['date_updated']
278262

279-
def create(self, voice_region=values.unset, friendly_name=values.unset):
280-
"""
281-
Create the SipDomainInstance
282-
283-
:param unicode voice_region: The voice_region
284-
:param unicode friendly_name: The friendly_name
285-
286-
:returns: The created SipDomainInstance
287-
:rtype: twilio.rest.routes.v2.sip_domain.SipDomainInstance
288-
"""
289-
return self._proxy.create(voice_region=voice_region, friendly_name=friendly_name, )
290-
291263
def update(self, voice_region=values.unset, friendly_name=values.unset):
292264
"""
293265
Update the SipDomainInstance

twilio/rest/routes/v2/trunk.py

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -118,22 +118,6 @@ def __init__(self, version, sip_trunk_domain):
118118
self._solution = {'sip_trunk_domain': sip_trunk_domain, }
119119
self._uri = '/Trunks/{sip_trunk_domain}'.format(**self._solution)
120120

121-
def create(self, voice_region=values.unset, friendly_name=values.unset):
122-
"""
123-
Create the TrunkInstance
124-
125-
:param unicode voice_region: The Inbound Processing Region used for this SIP Trunk for voice
126-
:param unicode friendly_name: A human readable description of this resource.
127-
128-
:returns: The created TrunkInstance
129-
:rtype: twilio.rest.routes.v2.trunk.TrunkInstance
130-
"""
131-
data = values.of({'VoiceRegion': voice_region, 'FriendlyName': friendly_name, })
132-
133-
payload = self._version.create(method='POST', uri=self._uri, data=data, )
134-
135-
return TrunkInstance(self._version, payload, sip_trunk_domain=self._solution['sip_trunk_domain'], )
136-
137121
def update(self, voice_region=values.unset, friendly_name=values.unset):
138122
"""
139123
Update the TrunkInstance
@@ -276,18 +260,6 @@ def date_updated(self):
276260
"""
277261
return self._properties['date_updated']
278262

279-
def create(self, voice_region=values.unset, friendly_name=values.unset):
280-
"""
281-
Create the TrunkInstance
282-
283-
:param unicode voice_region: The Inbound Processing Region used for this SIP Trunk for voice
284-
:param unicode friendly_name: A human readable description of this resource.
285-
286-
:returns: The created TrunkInstance
287-
:rtype: twilio.rest.routes.v2.trunk.TrunkInstance
288-
"""
289-
return self._proxy.create(voice_region=voice_region, friendly_name=friendly_name, )
290-
291263
def update(self, voice_region=values.unset, friendly_name=values.unset):
292264
"""
293265
Update the TrunkInstance

twilio/rest/verify/v2/service/verification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def create(self, to, channel, custom_friendly_name=values.unset,
4848
:param unicode custom_friendly_name: A custom user defined friendly name
4949
:param unicode custom_message: The text of a custom message to use for the verification
5050
:param unicode send_digits: The digits to send after a phone call is answered
51-
:param unicode locale: The locale to use for the verification SMS, WhatsApp or call
51+
:param unicode locale: The override locale to use for the verification SMS, WhatsApp or call
5252
:param unicode custom_code: A pre-generated code
5353
:param unicode amount: The amount of the associated PSD2 compliant transaction.
5454
:param unicode payee: The payee of the associated PSD2 compliant transaction

0 commit comments

Comments
 (0)
0