Skip to content

Commit f80d3aa

Browse files
committed
[Librarian] Regenerated @ 60ecdefbbef97861a931447f4c615fd12cc54767
1 parent d6ed109 commit f80d3aa

Some content is hidden

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

56 files changed

+3246
-769
lines changed

CHANGES.md

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

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

6+
[2022-03-23] Version 7.8.0
7+
--------------------------
8+
**Api**
9+
- Change `stream` url parameter to non optional
10+
- Add `verify-totp` and `verify-whatsapp-conversations-business-initiated` categories to `usage_record` API
11+
12+
**Chat**
13+
- Added v3 Channel update endpoint to support Public to Private channel migration
14+
15+
**Flex**
16+
- Private Beta release of the Interactions API to support the upcoming release of Flex Conversations at the end of Q1 2022.
17+
- Adding `channel_configs` object to Flex Configuration
18+
19+
**Media**
20+
- Add max_duration param to PlayerStreamer
21+
22+
**Supersim**
23+
- Remove Commands resource, use SmsCommands resource instead **(breaking change)**
24+
25+
**Taskrouter**
26+
- Add limits to `split_by_wait_time` for Cumulative Statistics Endpoint
27+
28+
**Video**
29+
- Change recording `status_callback_method` type from `enum` to `http_method` **(breaking change)**
30+
- Add `status_callback` and `status_callback_method` to composition
31+
- Add `status_callback` and `status_callback_method` to recording
32+
33+
634
[2022-03-09] Version 7.7.1
735
--------------------------
836
**Library - Chore**

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

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ def test_create_request(self):
2020
with self.assertRaises(TwilioException):
2121
self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
2222
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23-
.streams.create()
23+
.streams.create(url="https://example.com")
24+
25+
values = {'Url': "https://example.com", }
2426

2527
self.holodeck.assert_has_request(Request(
2628
'post',
2729
'https://api.twilio.com/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Calls/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Streams.json',
30+
data=values,
2831
))
2932

3033
def test_create_no_args_response(self):
@@ -45,7 +48,7 @@ def test_create_no_args_response(self):
4548

4649
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
4750
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
48-
.streams.create()
51+
.streams.create(url="https://example.com")
4952

5053
self.assertIsNotNone(actual)
5154

@@ -67,7 +70,7 @@ def test_create_with_args_response(self):
6770

6871
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
6972
.calls("CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
70-
.streams.create()
73+
.streams.create(url="https://example.com")
7174

7275
self.assertIsNotNone(actual)
7376

tests/integration/chat/v3/__init__.py

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: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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 ChannelTestCase(IntegrationTestCase):
16+
17+
def test_update_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.chat.v3.channels("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(x_twilio_webhook_enabled="true")
22+
23+
headers = {'X-Twilio-Webhook-Enabled': "true", }
24+
self.holodeck.assert_has_request(Request(
25+
'post',
26+
'https://chat.twilio.com/v3/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
27+
headers=headers,
28+
))
29+
30+
def test_update_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39+
"friendly_name": "friendly_name",
40+
"unique_name": "unique_name",
41+
"attributes": "{ \\"foo\\": \\"bar\\" }",
42+
"type": "public",
43+
"date_created": "2015-12-16T22:18:37Z",
44+
"date_updated": "2015-12-16T22:18:38Z",
45+
"created_by": "username",
46+
"members_count": 0,
47+
"messages_count": 0,
48+
"url": "https://chat.twilio.com/v3/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
49+
}
50+
'''
51+
))
52+
53+
actual = self.client.chat.v3.channels("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
54+
55+
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+
r"""
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+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
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 InteractionChannelInviteTestCase(IntegrationTestCase):
17+
18+
def test_create_request(self):
19+
self.holodeck.mock(Response(500, ''))
20+
21+
with self.assertRaises(TwilioException):
22+
self.client.flex_api.v1.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23+
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
24+
.invites.create(routing={})
25+
26+
values = {'Routing': serialize.object({}), }
27+
28+
self.holodeck.assert_has_request(Request(
29+
'post',
30+
'https://flex-api.twilio.com/v1/Interactions/KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Invites',
31+
data=values,
32+
))
33+
34+
def test_create_response(self):
35+
self.holodeck.mock(Response(
36+
201,
37+
'''
38+
{
39+
"sid": "KGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40+
"channel_sid": "UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
41+
"interaction_sid": "KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
42+
"routing": {
43+
"properties": {
44+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
45+
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
46+
"sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
47+
"date_created": 1634845217,
48+
"date_updated": 1634845217,
49+
"attributes": "{\\"customerAddress\\":\\"customer email address\\",\\"conversationSid\\":\\"UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1\\",\\"customerName\\":\\"customer name\\"}",
50+
"assignment_status": "pending",
51+
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
52+
"workflow_name": "Default Fifo Workflow",
53+
"queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
54+
"queue_name": "Sample Queue",
55+
"priority": 0,
56+
"age": 0,
57+
"reason": null,
58+
"timeout": 86400,
59+
"assignmentCounter": 0,
60+
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
61+
"task_channel_unique_name": "default",
62+
"routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
63+
"task_queue_entered_date": 1634845217,
64+
"age_in_queue": 0,
65+
"addons": "{}"
66+
}
67+
},
68+
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Invites/KGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
69+
}
70+
'''
71+
))
72+
73+
actual = self.client.flex_api.v1.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
74+
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
75+
.invites.create(routing={})
76+
77+
self.assertIsNotNone(actual)
78+
79+
def test_list_request(self):
80+
self.holodeck.mock(Response(500, ''))
81+
82+
with self.assertRaises(TwilioException):
83+
self.client.flex_api.v1.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
84+
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
85+
.invites.list()
86+
87+
self.holodeck.assert_has_request(Request(
88+
'get',
89+
'https://flex-api.twilio.com/v1/Interactions/KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Invites',
90+
))
91+
92+
def test_read_response(self):
93+
self.holodeck.mock(Response(
94+
200,
95+
'''
96+
{
97+
"invites": [
98+
{
99+
"sid": "KGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
100+
"channel_sid": "UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
101+
"interaction_sid": "KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
102+
"routing": {
103+
"properties": {
104+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
105+
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
106+
"sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
107+
"date_created": 1634845217,
108+
"date_updated": 1634845217,
109+
"attributes": "{\\"customerAddress\\":\\"customer email address\\",\\"conversationSid\\":\\"UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1\\",\\"customerName\\":\\"customer name\\"}",
110+
"assignment_status": "pending",
111+
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
112+
"workflow_name": "Default Fifo Workflow",
113+
"queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
114+
"queue_name": "Sample Queue",
115+
"priority": 0,
116+
"age": 0,
117+
"reason": null,
118+
"timeout": 86400,
119+
"assignmentCounter": 0,
120+
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
121+
"task_channel_unique_name": "default",
122+
"routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
123+
"task_queue_entered_date": 1634845217,
124+
"age_in_queue": 0,
125+
"addons": "{}"
126+
}
127+
},
128+
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Invites/KGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1"
129+
},
130+
{
131+
"sid": "KGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2",
132+
"channel_sid": "UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1",
133+
"interaction_sid": "KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
134+
"routing": {
135+
"properties": {
136+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
137+
"workspace_sid": "WSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
138+
"sid": "WTaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
139+
"date_created": 1634845217,
140+
"date_updated": 1634845217,
141+
"attributes": "{\\"customerAddress\\":\\"customer email address\\",\\"conversationSid\\":\\"UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1\\",\\"customerName\\":\\"customer name\\"}",
142+
"assignment_status": "pending",
143+
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
144+
"workflow_name": "Default Fifo Workflow",
145+
"queue_sid": "WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
146+
"queue_name": "Sample Queue",
147+
"priority": 0,
148+
"age": 0,
149+
"reason": null,
150+
"timeout": 86400,
151+
"assignmentCounter": 0,
152+
"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
153+
"task_channel_unique_name": "default",
154+
"routing_target": "WKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
155+
"task_queue_entered_date": 1634845217,
156+
"age_in_queue": 0,
157+
"addons": "{}"
158+
}
159+
},
160+
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Invites/KGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2"
161+
}
162+
],
163+
"meta": {
164+
"page": 0,
165+
"page_size": 50,
166+
"first_page_url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Invites?PageSize=50&Page=0",
167+
"previous_page_url": null,
168+
"url": "https://flex-api.twilio.com/v1/Interactions/KDaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/UOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1/Invites?PageSize=50&Page=0",
169+
"next_page_url": null,
170+
"key": "invites"
171+
}
172+
}
173+
'''
174+
))
175+
176+
actual = self.client.flex_api.v1.interaction("KDXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
177+
.channels("UOXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
178+
.invites.list()
179+
180+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)