Skip to content

Commit 3051641

Browse files
committed
[Librarian] Regenerated @ 0648d4ca0c72e6caa5ef9ec33e4ee2c56259bb7e
1 parent 9accbc8 commit 3051641

File tree

14 files changed

+1196
-8
lines changed

14 files changed

+1196
-8
lines changed

CHANGES.md

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

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

6+
[2021-12-01] Version 7.3.2
7+
--------------------------
8+
**Conversations**
9+
- Add `Service Webhook Configuration` resource
10+
11+
**Flex**
12+
- Adding `flex_insights_drilldown` and `flex_url` objects to Flex Configuration
13+
14+
**Messaging**
15+
- Update us_app_to_person endpoints to remove beta feature flag based access
16+
17+
**Supersim**
18+
- Add IP Commands resource
19+
20+
**Verify**
21+
- Add optional `factor_friendly_name` parameter to the create access token endpoint.
22+
23+
**Video**
24+
- Add maxParticipantDuration param to Rooms
25+
26+
**Twiml**
27+
- Unrevert Add supported SSML children to `<emphasis>`, `<lang>`, `<p>`, `<prosody>`, `<s>`, and `<w>`.
28+
- Revert Add supported SSML children to `<emphasis>`, `<lang>`, `<p>`, `<prosody>`, `<s>`, and `<w>`.
29+
30+
631
[2021-11-17] Version 7.3.1
732
--------------------------
833
**Library - Fix**
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
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 WebhookTestCase(IntegrationTestCase):
16+
17+
def test_update_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.configuration \
23+
.webhooks().update()
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration/Webhooks',
28+
))
29+
30+
def test_update_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"pre_webhook_url": "https://www.example.com/pre",
38+
"post_webhook_url": "https://www.example.com/post",
39+
"filters": [
40+
"onMessageRemoved",
41+
"onParticipantAdded"
42+
],
43+
"method": "GET",
44+
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
45+
}
46+
'''
47+
))
48+
49+
actual = self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
50+
.configuration \
51+
.webhooks().update()
52+
53+
self.assertIsNotNone(actual)
54+
55+
def test_fetch_request(self):
56+
self.holodeck.mock(Response(500, ''))
57+
58+
with self.assertRaises(TwilioException):
59+
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
60+
.configuration \
61+
.webhooks().fetch()
62+
63+
self.holodeck.assert_has_request(Request(
64+
'get',
65+
'https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Configuration/Webhooks',
66+
))
67+
68+
def test_fetch_response(self):
69+
self.holodeck.mock(Response(
70+
200,
71+
'''
72+
{
73+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74+
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
75+
"pre_webhook_url": "https://www.example.com/pre",
76+
"post_webhook_url": "https://www.example.com/post",
77+
"filters": [
78+
"onMessageRemove",
79+
"onParticipantAdd"
80+
],
81+
"method": "POST",
82+
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
83+
}
84+
'''
85+
))
86+
87+
actual = self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
88+
.configuration \
89+
.webhooks().fetch()
90+
91+
self.assertIsNotNone(actual)
92+
93+
def test_fetch_empty_response(self):
94+
self.holodeck.mock(Response(
95+
200,
96+
'''
97+
{
98+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
99+
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
100+
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks",
101+
"pre_webhook_url": null,
102+
"post_webhook_url": null,
103+
"filters": null,
104+
"method": null
105+
}
106+
'''
107+
))
108+
109+
actual = self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
110+
.configuration \
111+
.webhooks().fetch()
112+
113+
self.assertIsNotNone(actual)

tests/integration/conversations/v1/service/test_configuration.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ def test_fetch_response(self):
3838
"reachability_enabled": false,
3939
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
4040
"links": {
41-
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications"
41+
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",
42+
"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
4243
}
4344
}
4445
'''
@@ -73,7 +74,8 @@ def test_update_response(self):
7374
"reachability_enabled": false,
7475
"url": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
7576
"links": {
76-
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications"
77+
"notifications": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Notifications",
78+
"webhooks": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration/Webhooks"
7779
}
7880
}
7981
'''

tests/integration/flex_api/v1/test_configuration.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ def test_fetch_response(self):
204204
}
205205
]
206206
},
207-
"url": "https://flex-api.twilio.com/v1/Configuration"
207+
"url": "https://flex-api.twilio.com/v1/Configuration",
208+
"flex_insights_drilldown": true,
209+
"flex_url": "https://flex.twilio.com"
208210
}
209211
'''
210212
))
@@ -390,7 +392,9 @@ def test_create_response(self):
390392
"mode": "readOnly"
391393
},
392394
"flex_insights_hr": null,
393-
"url": "https://flex-api.twilio.com/v1/Configuration"
395+
"url": "https://flex-api.twilio.com/v1/Configuration",
396+
"flex_insights_drilldown": false,
397+
"flex_url": "https://flex.twilio.com"
394398
}
395399
'''
396400
))
@@ -589,7 +593,9 @@ def test_update_response(self):
589593
}
590594
]
591595
},
592-
"url": "https://flex-api.twilio.com/v1/Configuration"
596+
"url": "https://flex-api.twilio.com/v1/Configuration",
597+
"flex_insights_drilldown": true,
598+
"flex_url": "https://flex.twilio.com"
593599
}
594600
'''
595601
))
Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
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 IpCommandTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.supersim.v1.ip_commands.create(sim="sim", payload="payload", device_port=1)
22+
23+
values = {'Sim': "sim", 'Payload': "payload", 'DevicePort': 1, }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://supersim.twilio.com/v1/IpCommands',
28+
data=values,
29+
))
30+
31+
def test_create_full_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"sid": "HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39+
"sim_iccid": "89883070000123456789",
40+
"status": "queued",
41+
"direction": "to_sim",
42+
"device_ip": "100.64.0.123",
43+
"device_port": 100,
44+
"payload_type": "text",
45+
"payload": "checkin: firmware update",
46+
"date_created": "2015-07-30T20:00:00Z",
47+
"date_updated": "2015-07-30T20:00:00Z",
48+
"url": "https://supersim.twilio.com/v1/IpCommands/HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
49+
}
50+
'''
51+
))
52+
53+
actual = self.client.supersim.v1.ip_commands.create(sim="sim", payload="payload", device_port=1)
54+
55+
self.assertIsNotNone(actual)
56+
57+
def test_create_minimal_response(self):
58+
self.holodeck.mock(Response(
59+
201,
60+
'''
61+
{
62+
"sid": "HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
63+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
64+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
65+
"sim_iccid": "89883070000123456789",
66+
"status": "queued",
67+
"direction": "to_sim",
68+
"device_ip": "100.64.0.123",
69+
"device_port": 100,
70+
"payload_type": "text",
71+
"payload": "checkin: firmware update",
72+
"date_created": "2015-07-30T20:00:00Z",
73+
"date_updated": "2015-07-30T20:00:00Z",
74+
"url": "https://supersim.twilio.com/v1/IpCommands/HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
75+
}
76+
'''
77+
))
78+
79+
actual = self.client.supersim.v1.ip_commands.create(sim="sim", payload="payload", device_port=1)
80+
81+
self.assertIsNotNone(actual)
82+
83+
def test_fetch_request(self):
84+
self.holodeck.mock(Response(500, ''))
85+
86+
with self.assertRaises(TwilioException):
87+
self.client.supersim.v1.ip_commands("HGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
88+
89+
self.holodeck.assert_has_request(Request(
90+
'get',
91+
'https://supersim.twilio.com/v1/IpCommands/HGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
92+
))
93+
94+
def test_fetch_response(self):
95+
self.holodeck.mock(Response(
96+
200,
97+
'''
98+
{
99+
"sid": "HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
100+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
102+
"sim_iccid": "89883070000123456789",
103+
"status": "queued",
104+
"direction": "to_sim",
105+
"device_ip": "100.64.0.123",
106+
"device_port": 100,
107+
"payload_type": "text",
108+
"payload": "checkin: firmware update",
109+
"date_created": "2015-07-30T20:00:00Z",
110+
"date_updated": "2015-07-30T20:00:00Z",
111+
"url": "https://supersim.twilio.com/v1/IpCommands/HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
112+
}
113+
'''
114+
))
115+
116+
actual = self.client.supersim.v1.ip_commands("HGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
117+
118+
self.assertIsNotNone(actual)
119+
120+
def test_list_request(self):
121+
self.holodeck.mock(Response(500, ''))
122+
123+
with self.assertRaises(TwilioException):
124+
self.client.supersim.v1.ip_commands.list()
125+
126+
self.holodeck.assert_has_request(Request(
127+
'get',
128+
'https://supersim.twilio.com/v1/IpCommands',
129+
))
130+
131+
def test_read_empty_response(self):
132+
self.holodeck.mock(Response(
133+
200,
134+
'''
135+
{
136+
"ip_commands": [],
137+
"meta": {
138+
"first_page_url": "https://supersim.twilio.com/v1/IpCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
139+
"key": "ip_commands",
140+
"next_page_url": null,
141+
"page": 0,
142+
"page_size": 50,
143+
"previous_page_url": null,
144+
"url": "https://supersim.twilio.com/v1/IpCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
145+
}
146+
}
147+
'''
148+
))
149+
150+
actual = self.client.supersim.v1.ip_commands.list()
151+
152+
self.assertIsNotNone(actual)
153+
154+
def test_read_full_response(self):
155+
self.holodeck.mock(Response(
156+
200,
157+
'''
158+
{
159+
"meta": {
160+
"first_page_url": "https://supersim.twilio.com/v1/IpCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
161+
"key": "ip_commands",
162+
"next_page_url": null,
163+
"page": 0,
164+
"page_size": 50,
165+
"previous_page_url": null,
166+
"url": "https://supersim.twilio.com/v1/IpCommands?Status=received&Sim=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
167+
},
168+
"ip_commands": [
169+
{
170+
"sid": "HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
171+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
172+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
173+
"sim_iccid": "89883070000123456789",
174+
"status": "received",
175+
"direction": "from_sim",
176+
"device_ip": "100.64.0.123",
177+
"device_port": 100,
178+
"payload_type": "text",
179+
"payload": "checkin: firmware update",
180+
"date_created": "2015-07-30T20:00:00Z",
181+
"date_updated": "2015-07-30T20:00:00Z",
182+
"url": "https://supersim.twilio.com/v1/IpCommands/HGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
183+
}
184+
]
185+
}
186+
'''
187+
))
188+
189+
actual = self.client.supersim.v1.ip_commands.list()
190+
191+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)