8000 [Librarian] Regenerated @ 1a532562bf3ce874c001a38784d8e0cf34f80aea · BioComputing/twilio-python@23a63a0 · GitHub
[go: up one dir, main page]

Skip to content

Commit 23a63a0

Browse files
committed
[Librarian] Regenerated @ 1a532562bf3ce874c001a38784d8e0cf34f80aea
1 parent 490dc04 commit 23a63a0

File tree

26 files changed

+2117
-106
lines changed

26 files changed

+2117
-106
lines changed

CHANGES.md

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

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

6+
[2018-07-11] Version 6.14.10
7+
-----------------------------
8+
**Api**
9+
- Add `cidr_prefix_length` param to SIP IpAddresses API
10+
11+
**Studio**
12+
- Add new /Execution endpoints to begin Engagement -> Execution migration
13+
14+
**Video**
15+
- [Rooms] Allow deletion of individual recordings from a room
16+
17+
618
[2018-07-05] Version 6.14.9
719
----------------------------
820
**Library**

tests/integration/api/v2010/account/sip/ip_access_control_list/test_ip_address.py

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,19 @@ def test_read_full_response(self):
4040
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4141
"date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
4242
"date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
43-
"friendly_name": "aaa",
43+
"friendly_name": "friendly_name",
4444
"ip_access_control_list_sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
45-
"ip_address": "192.1.1.2",
45+
"ip_address": "ip_address",
46+
"cidr_prefix_length": 32,
4647
"sid": "IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4748
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses/IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
4849
}
4950
],
50-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses.json?PageSize=50&Page=0",
5151
"next_page_uri": null,
52-
"num_pages": 1,
5352
"page": 0,
5453
"page_size": 50,
5554
"previous_page_uri": null,
5655
"start": 0,
57-
"total": 1,
5856
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses.json?PageSize=50&Page=0"
5957
}
6058
'''
@@ -75,14 +73,11 @@ def test_read_empty_response(self):
7573
"end": 0,
7674
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses.json?PageSize=50&Page=0",
7775
"ip_addresses": [],
78-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses.json?PageSize=50&Page=0",
7976
"next_page_uri": null,
80-
"num_pages": 1,
8177
"page": 0,
8278
"page_size": 50,
8379
"previous_page_uri": null,
8480
"start": 0,
85-
"total": 1,
8681
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses.json?PageSize=50&Page=0"
8782
}
8883
'''
@@ -120,9 +115,10 @@ def test_create_response(self):
120115
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
121116
"date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
122117
"date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
123-
"friendly_name": "aaa",
118+
"friendly_name": "friendly_name",
124119
"ip_access_control_list_sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
125-
"ip_address": "192.1.1.2",
120+
"ip_address": "ip_address",
121+
"cidr_prefix_length": 32,
126122
"sid": "IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
127123
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses/IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
128124
}
@@ -158,9 +154,10 @@ def test_fetch_response(self):
158154
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
159155
"date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
160156
"date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
161-
"friendly_name": "aaa",
157+
"friendly_name": "friendly_name",
162158
"ip_access_control_list_sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
163-
"ip_address": "192.1.1.2",
159+
"ip_address": "ip_address",
160+
"cidr_prefix_length": 32,
164161
"sid": "IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
165162
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses/IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
166163
}
@@ -196,9 +193,10 @@ def test_update_response(self):
196193
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
197194
"date_created": "Mon, 20 Jul 2015 17:27:10 +0000",
198195
"date_updated": "Mon, 20 Jul 2015 17:27:10 +0000",
199-
"friendly_name": "aaa",
196+
"friendly_name": "friendly_name",
200197
"ip_access_control_list_sid": "ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
201-
"ip_address": "192.1.1.2",
198+
"ip_address": "ip_address",
199+
"cidr_prefix_length": 32,
202200
"sid": "IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
203201
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/SIP/IpAccessControlLists/ALaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses/IPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
204202
}

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

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -153,9 +153,7 @@ def test_read_full_response(self):
153153
200,
154154
'''
155155
{
156-
"end": 0,
157156
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json?PageSize=1&Page=0",
158-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json?PageSize=1&Page=119771",
159157
"messages": [
160158
{
161159
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -183,12 +181,9 @@ def test_read_full_response(self):
183181
}
184182
],
185183
"next_page_uri": null,
186-
"num_pages": 119772,
187184
"page": 0,
188185
"page_size": 1,
189186
"previous_page_uri": null,
190-
"start": 0,
191-
"total": 119772,
192187
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages.json?PageSize=1&Page=0"
193188
}
194189
'''

tests/integration/preview/hosted_numbers/test_authorization_document.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,12 +169,14 @@ def test_create_request(self):
169169
self.holodeck.mock(Response(500, ''))
170170

171171
with self.assertRaises(TwilioException):
172-
self.client.preview.hosted_numbers.authorization_documents.create(hosted_number_order_sids=['hosted_number_order_sids'], address_sid="ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", email="email")
172+
self.client.preview.hosted_numbers.authorization_documents.create(hosted_number_order_sids=['hosted_number_order_sids'], address_sid="ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", email="email", contact_title="contact_title", contact_phone_number="contact_phone_number")
173173

174174
values = {
175175
'HostedNumberOrderSids': serialize.map(['hosted_number_order_sids'], lambda e: e),
176176
'AddressSid': "ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
177177
'Email': "email",
178+
'ContactTitle': "contact_title",
179+
'ContactPhoneNumber': "contact_phone_number",
178180
}
179181

180182
self.holodeck.assert_has_request(Request(
@@ -206,6 +208,6 @@ def test_create_response(self):
206208
'''
207209
))
208210

209-
actual = self.client.preview.hosted_numbers.authorization_documents.create(hosted_number_order_sids=['hosted_number_order_sids'], address_sid="ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", email="email")
211+
actual = self.client.preview.hosted_numbers.authorization_documents.create(hosted_number_order_sids=['hosted_number_order_sids'], address_sid="ADXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", email="email", contact_title="contact_title", contact_phone_number="contact_phone_number")
210212

211213
self.assertIsNotNone(actual)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# coding=utf-8
2+
"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# coding=utf-8
2+
"""
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 ExecutionStepContextTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23+
.steps(sid="FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
24+
.step_context().fetch()
25+
26+
self.holodeck.assert_has_request(Request(
27+
'get',
28+
'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Steps/FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Context',
29+
))
30+
31+
def test_fetch_response(self):
32+
self.holodeck.mock(Response(
33+
200,
34+
'''
35+
{
36+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"context": {
38+
"foo": "bar"
39+
},
40+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41+
"execution_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
42+
"step_sid": "FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
43+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
49+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
50+
.steps(sid="FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
51+
.step_context().fetch()
52+
53+
self.assertIsNotNone(actual)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# coding=utf-8
2+
"""
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 ExecutionContextTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23+
.execution_context().fetch()
24+
25+
self.holodeck.assert_has_request(Request(
26+
'get',
27+
'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Context',
28+
))
29+
30+
def test_fetch_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"context": {
37+
"foo": "bar"
38+
},
39+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40+
"execution_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
41+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
42+
}
43+
'''
44+
))
45+
46+
actual = self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
47+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
48+
.execution_context 10000 ().fetch()
49+
50+
self.assertIsNotNone(actual)
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# coding=utf-8
2+
"""
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 ExecutionStepTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23+
.steps.list()
24+
25+
self.holodeck.assert_has_request(Request(
26+
'get',
27+
'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Steps',
28+
))
29+
30+
def test_read_empty_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"meta": {
36+
"previous_page_url": null,
37+
"next_page_url": null,
38+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",
39+
"page": 0,
40+
"first_page_url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps?PageSize=50&Page=0",
41+
"page_size": 50,
42+
"key": "steps"
43+
},
44+
"steps": []
45+
}
46+
'''
47+
))
48+
49+
actual = self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
50+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
51+
.steps.list()
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.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
60+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
61+
.steps(sid="FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
62+
63+
self.holodeck.assert_has_request(Request(
64+
'get',
65+
'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Steps/FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
66+
))
67+
68+
def test_fetch_response(self):
69+
self.holodeck.mock(Response(
70+
200,
71+
'''
72+
{
73+
"sid": "FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
75+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
76+
"execution_sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
77+
"name": "incomingRequest",
78+
"context": {},
79+
"transitioned_from": "Trigger",
80+
"transitioned_to": "Ended",
81+
"date_created": "2017-11-06T12:00:00Z",
82+
"date_updated": null,
83+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
84+
"links": {
85+
"step_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps/FTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
86+
}
87+
}
88+
'''
89+
))
90+
91+
actual = self.client.studio.v1.flows(sid="FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
92+
.executions(sid="FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
93+
.steps(sid="FTXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
94+
95+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0