8000 [Librarian] Regenerated @ 964f1611ab7481d828261f49551385a276499e30 · arpitjain799/twilio-python@9b57e31 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b57e31

Browse files
committed
[Librarian] Regenerated @ 964f1611ab7481d828261f49551385a276499e30
1 parent c9b385b commit 9b57e31

28 files changed

+763
-87
lines changed

CHANGES.md

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

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

6+
[2022-12-14] Version 7.16.0
7+
---------------------------
8+
**Library - Docs**
9+
- [PR #631](https://github.com/twilio/twilio-python/pull/631): Updated docstrings for timeout to be float instead of int. Thanks to [@byarmis](https://github.com/byarmis)!
10+
11+
**Library - Chore**
12+
- [PR #627](https://github.com/twilio/twilio-python/pull/627): add support for python 3.11. Thanks to [@JenniferMah](https://github.com/JenniferMah)!
13+
14+
**Library - Test**
15+
- [PR #628](https://github.com/twilio/twilio-python/pull/628): Pinning ubuntu version for python 3.6 test runs. Thanks to [@rakatyal](https://github.com/rakatyal)!
16+
17+
**Api**
18+
- Add `street_secondary` param to address create and update
19+
- Make `method` optional for user defined message subscription **(breaking change)**
20+
21+
**Flex**
22+
- Flex Conversations is now Generally Available
23+
- Adding the ie1 mapping for authorization api, updating service base uri and base url response attribute **(breaking change)**
24+
- Change web channels to GA and library visibility to public
25+
- Changing the uri for authorization api from using Accounts to Insights **(breaking change)**
26+
27+
**Media**
28+
- Gate Twilio Live endpoints behind beta_feature for EOS
29+
30+
**Messaging**
31+
- Mark `MessageFlow` as a required field for Campaign Creation **(breaking change)**
32+
33+
**Oauth**
34+
- updated openid discovery endpoint uri **(breaking change)**
35+
- Added device code authorization endpoint
36+
37+
**Supersim**
38+
- Allow filtering the SettingsUpdates resource by `status`
39+
40+
**Twiml**
41+
- Add new Polly Neural voices
42+
- Add tr-TR, ar-AE, yue-CN, fi-FI languages to SSML `<lang>` element.
43+
- Add x-amazon-jyutping, x-amazon-pinyin, x-amazon-pron-kana, x-amazon-yomigana alphabets to SSML `<phoneme>` element.
44+
- Rename `character` value for SSML `<say-as>` `interpret-as` attribute to `characters`. **(breaking change)**
45+
- Rename `role` attribute to `format` in SSML `<say-as>` element. **(breaking change)**
46+
47+
648
[2022-11-30] Version 7.15.4
749
---------------------------
850
**Flex**

tests/integration/api/v2010/account/call/test_user_defined_message_subscription.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ def test_create_request(self):
2020
with self.assertRaises(TwilioException):
2121
self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
2222
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23-
.user_defined_message_subscriptions.create(callback="https://example.com", method="GET")
23+
.user_defined_message_subscriptions.create(callback="https://example.com")
2424

25-
values = {'Callback': "https://example.com", 'Method': "GET", }
25+
values = {'Callback': "https://example.com", }
2626

2727
self.holodeck.assert_has_request(Request(
2828
'post',
@@ -46,7 +46,7 @@ def test_create_response(self):
4646

4747
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
4848
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
49-
.user_defined_message_subscriptions.create(callback="https://example.com", method="GET")
49+
.user_defined_message_subscriptions.create(callback="https://example.com")
5050

5151
self.assertIsNotNone(actual)
5252

tests/integration/api/v2010/account/test_address.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ def test_create_response(self):
5353
"region": "CA",
5454
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5555
"street": "4th",
56+
"street_secondary": null,
5657
"validated": false,
5758
"verified": false,
5859
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
@@ -117,6 +118,7 @@ def test_fetch_response(self):
117118
"region": "CA",
118119
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
119120
"street": "4th",
121+
"street_secondary": null,
120122
"validated": false,
121123
"verified": false,
122124
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
@@ -158,6 +160,7 @@ def test_update_response(self):
158160
"region": "CA",
159161
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
160162
"street": "4th",
163+
"street_secondary": null,
161164
"validated": false,
162165
"verified": false,
163166
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
@@ -201,6 +204,7 @@ def test_read_full_response(self):
201204
"region": "CA",
202205
"sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
203206
"street": "4th",
207+
"street_secondary": null,
204208
"validated": false,
205209
"verified": false,
206210
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Addresses/ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"

tests/integration/flex_api/v1/test_good_data.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_create_request(self):
2323
headers = {'Token': "token", }
2424
self.holodeck.assert_has_request(Request(
2525
'post',
26-
'https://flex-api.twilio.com/v1/Accounts/GoodData',
26+
'https://flex-api.twilio.com/v1/Insights/Session',
2727
headers=headers,
2828
))
2929

@@ -35,8 +35,8 @@ def test_create_response(self):
3535
"session_expiry": "2022-09-27T09:28:01Z",
3636
"workspace_id": "clbi1eelh1x8z4.......ijpnyu",
3737
"session_id": "-----BEGIN PGP MESSAGE-----\\n\\nwcBMA11tX1FL13rp\\u2026\\u2026kHXd\\n=vOBk\\n-----END PGP MESSAGE-----\\n",
38-
"gd_base_url": "https://analytics.ytica.com/",
39-
"url": "https://flex-api.twilio.com/v1/Accounts/GoodData"
38+
"base_url": "https://analytics.ytica.com/",
39+
"url": "https://flex-api.twilio.com/v1/Insights/Session"
4040
}
4141
'''
4242
))

tests/integration/flex_api/v1/test_user_roles.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_fetch_request(self):
2323
headers = {'Token': "token", }
2424
self.holodeck.assert_has_request(Request(
2525
'get',
26-
'https://flex-api.twilio.com/v1/Accounts/UserRoles',
26+
'https://flex-api.twilio.com/v1/Insights/UserRoles',
2727
headers=headers,
2828
))
2929

@@ -35,7 +35,7 @@ def test_fetch_response(self):
3535
"roles": [
3636
"wfo.full_access"
3737
],
38-
"url": "https://flex-api.twilio.com/v1/Accounts/UserRoles"
38+
"url": "https://flex-api.twilio.com/v1/Insights/UserRoles"
3939
}
4040
179B '''
4141
))
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class WebChannelsTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.flex_api.v2.web_channels.create(address_sid="address_sid")
22+
23+
values = {'AddressSid': "address_sid", }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://flex-api.twilio.com/v2/WebChats',
28+
data=values,
29+
))
30+
31+
def test_create_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"identity": "seinfeld"
38+
}
39+
'''
40+
))
41+
42+
actual = self.client.flex_api.v2.web_channels.create(address_sid="address_sid")
43+
44+
self.assertIsNotNone(actual)

tests/integration/messaging/v1/service/test_us_app_to_person.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@ def test_create_request(self):
2020

2121
with self.assertRaises(TwilioException):
2222
self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23-
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
23+
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_flow="message_flow", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
2424

2525
values = {
2626
'BrandRegistrationSid': "BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
2727
'Description': "description",
28+
'MessageFlow': "message_flow",
2829
'MessageSamples': serialize.map(['message_samples'], lambda e: e),
2930
'UsAppToPersonUsecase': "us_app_to_person_usecase",
3031
'HasEmbeddedLinks': True,
@@ -88,7 +89,7 @@ def test_create_response(self):
8889
))
8990

9091
actual = self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
91-
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
92+
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_flow="message_flow", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
9293

9394
self.assertIsNotNone(actual)
9495

@@ -149,7 +150,7 @@ def test_create_with_defaults_response(self):
149150
))
150151

151152
actual = self.client.messaging.v1.services("MGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
152-
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
153+
.us_app_to_person.create(brand_registration_sid="BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", description="description", message_flow="message_flow", message_samples=['message_samples'], us_app_to_person_usecase="us_app_to_person_usecase", has_embedded_links=True, has_embedded_phone=True)
153154

154155
self.assertIsNotNone(actual)
155156

tests/integration/microvisor/v1/test_device.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ def test_read_full_response(self):
7575
"date_updated": "2021-01-01T12:34:56Z",
7676
"url": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7777
"links": {
78+
"device_configs": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configs",
7879
"device_secrets": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Secrets"
7980
}
8081
}
@@ -132,6 +133,7 @@ def test_fetch_response(self):
132133
"date_updated": "2021-01-01T12:34:56Z",
133134
"url": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
134135
"links": {
136+
"device_configs": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configs",
135137
"device_secrets": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Secrets"
136138
}
137139
}
@@ -178,6 +180,7 @@ def test_update_response(self):
178180
"date_updated": "2015-07-30T20:00:00Z",
179181
"url": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
180182
"links": {
183+
"device_configs": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configs",
181184
"device_secrets": "https://microvisor.twilio.com/v1/Devices/UVaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Secrets"
182185
}
183186
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from tests import IntegrationTestCase
10+
from tests.holodeck import Request
11+
from twilio.base import serialize
12+
from twilio.base.exceptions import TwilioException
13+
from twilio.http.response import Response
14+
15+
16+
class DeviceCodeTestCase(IntegrationTestCase):
17+
18+
def test_create_request(self):
19+
self.holodeck.mock(Response(500, ''))
20+
21+
with self.assertRaises(TwilioException):
22+
self.client.oauth.v1.device_code.create(client_sid="client_sid", scopes=['scopes'])
23+
24+
values = {'ClientSid': "client_sid", 'Scopes': serialize.map(['scopes'], lambda e: e), }
25+
26+
self.holodeck.assert_has_request(Request(
27+
'post',
28+
'https://oauth.twilio.com/v1/device/code',
29+
data=values,
30+
))
31+
32+
def test_create_response(self):
33+
self.holodeck.mock(Response(
34+
201,
35+
'''
36+
{
37+
"device_code": "LiwuhE0bIhqemK6sd34tXfobVCR9yrk0",
38+
"user_code": "Hkf1WaID3",
39+
"verification_uri": "v1/oauth2/device/activate",
40+
"verification_uri_complete": "v1/oauth2/device/activate?user_code=Hkf1WaID3",
41+
"expires_in": 299,
42+
"interval": 5
43+
}
44+
'''
45+
))
46+
47+
actual = self.client.oauth.v1.device_code.create(client_sid="client_sid", scopes=['scopes'])
48+
49+
self.assertIsNotNone(actual)

tests/integration/oauth/v1/test_openid_discovery.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def test_fetch_request(self):
2222

2323
self.holodeck.assert_has_request(Request(
2424
'get',
25-
'https://oauth.twilio.com/v1/well-known/openid-configuration',
25+
'https://oauth.twilio.com/v1/.well-known/openid-configuration',
2626
))
2727

2828
def test_fetch_response(self):
@@ -67,7 +67,7 @@ def test_fetch_response(self):
6767
"scp",
6868
"sub"
6969
],
70-
"url": "https://oauth.twilio.com/v1/well-known/openid-configuration"
70+
"url": "https://oauth.twilio.com/v1/.well-known/openid-configuration"
7171
}
7272
'''
7373
))

0 commit comments

Comments
 (0)
0