Skip to content

Commit ae0ed19

Browse files
committed
[Librarian] Regenerated @ c554bb4a2cf5db7afe4369a63a1515e7acbf55ed
1 parent b09935e commit ae0ed19

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2323
-1097
lines changed

CHANGES.md

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

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

6+
[2019-05-15] Version 6.27.0
7+
----------------------------
8+
**Api**
9+
- Make `method` optional for queue members update
10+
11+
**Chat**
12+
- Removed `webhook.*.format` update parameters in Service resource from public library visibility in v1 **(breaking change)**
13+
14+
**Insights**
15+
- Added client metrics as sdk_edge to summary.
16+
- Added optional query param processing_state.
17+
18+
**Numbers**
19+
- Add addtional metadata fields on a Document
20+
- Add status callback fields and parameters
21+
22+
**Taskrouter**
23+
- Added `channel_optimized_routing` attribute to task-channel endpoint
24+
25+
**Video**
26+
- [Rooms] Add Video Subscription API
27+
28+
**Wireless**
29+
- Added `imei` to Data Session resource.
30+
- Remove `imeisv` from Data Session resource. **(breaking change)**
31+
32+
633
[2019-05-01] Version 6.26.3
734
----------------------------
835
**Serverless**

tests/integration/api/v2010/account/queue/test_member.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,9 @@ def test_update_request(self):
7575
with self.assertRaises(TwilioException):
7676
self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
7777
.queues(sid="QUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
78-
.members(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(url="https://example.com", method="GET")
78+
.members(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(url="https://example.com")
7979

80-
values = {'Url': "https://example.com", 'Method': "GET", }
80+
values = {'Url': "https://example.com", }
8181

8282
self.holodeck.assert_has_request(Request(
8383
'post',
@@ -102,7 +102,7 @@ def test_update_response(self):
102102

103103
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
104104
.queues(sid="QUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
105-
.members(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(url="https://example.com", method="GET")
105+
.members(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(url="https://example.com")
106106

107107
self.assertIsNotNone(actual)
108108

@@ -123,7 +123,7 @@ def test_dequeue_front_response(self):
123123

124124
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
125125
.queues(sid="QUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
126-
.members(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(url="https://example.com", method="GET")
126+
.members(call_sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(url="https://example.com")
127127

128128
self.assertIsNotNone(actual)
129129

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

Lines changed: 83 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ def test_fetch_request(self):
2626
'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Conferences/CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
2727
))
2828

29-
def test_fetch_response(self):
29+
def test_fetch_valid_mixer_zone_response(self):
3030
self.holodeck.mock(Response(
3131
200,
3232
'''
3333
{
3434
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35-
"api_version": "2008-08-01",
35+
"api_version": "2010-04-01",
3636
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
3737
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
3838
"friendly_name": "AHH YEAH",
@@ -53,6 +53,87 @@ def test_fetch_response(self):
5353

5454
self.assertIsNotNone(actual)
5555

56+
def test_fetch_valid_region_in_progress_response(self):
57+
self.holodeck.mock(Response(
58+
200,
59+
'''
60+
{
61+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
62+
"api_version": "2010-04-01",
63+
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
64+
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
65+
"friendly_name": "AHH YEAH",
66+
"sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
67+
"region": "au1",
68+
"status": "in-progress",
69+
"subresource_uris": {
70+
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
71+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
72+
},
73+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
74+
}
75+
'''
76+
))
77+
78+
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
79+
.conferences(sid="CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
80+
81+
self.assertIsNotNone(actual)
82+
83+
def test_fetch_without_mixer_zone_integer_status_response(self):
84+
self.holodeck.mock(Response(
85+
200,
86+
'''
87+
{
88+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
89+
"api_version": "2010-04-01",
90+
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
91+
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
92+
"friendly_name": "AHH YEAH",
93+
"sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
94+
"region": "us1",
95+
"status": "completed",
96+
"subresource_uris": {
97+
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
98+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
99+
},
100+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
101+
}
102+
'''
103+
))
104+
105+
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
106+
.conferences(sid="CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
107+
108+
self.assertIsNotNone(actual)
109+
110+
def test_fetch_unknown_mixer_zone_init_integer_status_response(self):
111+
self.holodeck.mock(Response(
112+
200,
113+
'''
114+
{
115+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
116+
"api_version": "2010-04-01",
117+
"date_created": "Fri, 18 Feb 2011 19:26:50 +0000",
118+
"date_updated": "Fri, 18 Feb 2011 19:27:33 +0000",
119+
"friendly_name": "AHH YEAH",
120+
"sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
121+
"region": "unknown",
122+
"status": "init",
123+
"subresource_uris": {
124+
"participants": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants.json",
125+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json"
126+
},
127+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
128+
}
129+
'''
130+
))
131+
132+
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
133+
.conferences(sid="CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
134+
135+
self.assertIsNotNone(actual)
136+
56137
def test_list_request(self):
57138
self.holodeck.mock(Response(500, ''))
58139

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

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,14 +122,11 @@ def test_read_full_response(self):
122122
],
123123
"end": 0,
124124
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
125-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
126125
"next_page_uri": null,
127-
"num_pages": 1,
128126
"page": 0,
129127
"page_size": 50,
130128
"previous_page_uri": null,
131129
"start": 0,
132-
"total": 1,
133130
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json"
134131
}
135132
'''
@@ -148,14 +145,11 @@ def test_read_empty_response(self):
148145
"connect_apps": [],
149146
"end": 0,
150147
"first_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
151-
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json?Page=0&PageSize=50",
152148
"next_page_uri": null,
153-
"num_pages": 1,
154149
"page": 0,
155150
"page_size": 50,
156151
"previous_page_uri": null,
157152
"start": 0,
158-
"total": 1,
159153
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ConnectApps.json"
160154
}
161155
'''
@@ -165,3 +159,26 @@ def test_read_empty_response(self):
165159
.connect_apps.list()
166160

167161
self.assertIsNotNone(actual)
162+
163+
def test_delete_request(self):
164+
self.holodeck.mock(Response(500, ''))
165+
166+
with self.assertRaises(TwilioException):
167+
self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
168+
.connect_apps(sid="CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
169+
170+
self.holodeck.assert_has_request(Request(
171+
'delete',
172+
'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ConnectApps/CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.json',
173+
))
174+
175+
def test_delete_response(self):
176+
self.holodeck.mock(Response(
177+
204,
178+
None,
179+
))
180+
181+
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
182+
.connect_apps(sid="CNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
183+
184+
self.assertTrue(actual)

tests/integration/insights/v1/test_summary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_fetch_response(self):
4545
"to": {},
4646
"carrier_edge": {},
4747
"client_edge": {},
48+
"sdk_edge": {},
4849
"sip_edge": {},
4950
"tags": [
5051
"tags"
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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 CurrentCallTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.trusted_comms.current_calls().fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://preview.twilio.com/TrustedComms/CurrentCall',
26+
))
27+
28+
def test_read_found_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"from": "+15000000000",
35+
"to": "+573000000000",
36+
"reason": "Hello Jhon, your appointment has been confirmed.",
37+
"created_at": "2019-05-01T20:00:00Z",
38+
"url": "https://preview.twilio.com/TrustedComms/CurrentCall"
39+
}
40+
'''
41+
))
42+
43+
actual = self.client.preview.trusted_comms.current_calls().fetch()
44+
45+
self.assertIsNotNone(actual)
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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 DeviceTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.trusted_comms.devices.create(phone_number="phone_number", push_token="push_token")
22+
23+
values = {'PhoneNumber': "phone_number", 'PushToken': "push_token", }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://preview.twilio.com/TrustedComms/Devices',
28+
data=values,
29+
))
30+
31+
def test_create_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"sid": "DDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"binding_sid": "BSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"phone_number": "+573000000000",
39+
"url": "https://preview.twilio.com/TrustedComms/Devices"
40+
}
41+
'''
42+
))
43+
44+
actual = self.client.preview.trusted_comms.devices.create(phone_number="phone_number", push_token="push_token")
45+
46+
self.assertIsNotNone(actual)
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.exceptions import TwilioException
12+
from twilio.http.response import Response
13+
14+
15+
class PhoneCallTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.trusted_comms.phone_calls.create(from_="from", to="to", url="url")
22+
23+
values = {'From': "from", 'To': "to", 'Url': "url", }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://preview.twilio.com/TrustedComms/Business/PhoneCalls',
28+
data=values,
29+
))
30+
31+
def test_create_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"from": "+15000000000",
39+
"to": "+573000000000",
40+
"reason": "Hello Jhon, your appointment has been confirmed.",
41+
"created_at": "2019-05-01T20:00:00Z",
42+
"url": "https://preview.twilio.com/TrustedComms/Business/PhoneCalls"
43+
}
44+
'''
45+
))
46+
47+
actual = self.client.preview.trusted_comms.phone_calls.create(from_="from", to="to", url="url")
48+
49+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)