8000 [Librarian] Regenerated @ b3b357d40fb666a2496b2956780d9ec33e26ab2f · aditya274/twilio-python@a83ee3c · GitHub
[go: up one dir, main page]

Skip to content

Commit a83ee3c

Browse files
committed
[Librarian] Regenerated @ b3b357d40fb666a2496b2956780d9ec33e26ab2f
1 parent abdcfc8 commit a83ee3c

File tree

29 files changed

+2232
-162
lines changed

29 files changed

+2232
-162
lines changed

CHANGES.md

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

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

6+
[2019-11-13] Version 6.33.1
7+
---------------------------
8+
**Library**
9+
- [PR #498](https://github.com/twilio/twilio-python/pull/498): docs: Add local testing docs. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
10+
- [PR #497](https://github.com/twilio/twilio-python/pull/497): fix: Resolve some bug risks and code quality issues. Thanks to [@sanketsaurav](https://github.com/sanketsaurav)!
11+
- [PR #495](https://github.com/twilio/twilio-python/pull/495): Rename child twiml methods to be the tag name and deprecate old methods. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
12+
- [PR #490](https://github.com/twilio/twilio-python/pull/490): fix: Change ObsoleteException to inherit from Exception instead of BaseException. Thanks to [@fefi95](https://github.com/fefi95)!
13+
14+
**Api**
15+
- Make `persistent_action` parameter public
16+
- Add `twiml` optional private parameter for call create
17+
18+
**Autopilot**
19+
- Add Export resource to Autopilot Assistant.
20+
21+
**Flex**
22+
- Added Integration.RetryCount attribute to Flex Flow
23+
- Updating a Flex Flow `channel_type` options documentation
24+
25+
**Insights**
26+
- Added edges to events and metrics
27+
- Added new endpoint definitions for Events and Metrics
28+
29+
**Messaging**
30+
- **create** support for sender registration
31+
- **fetch** support for fetching a sender
32+
- **update** support for sender verification
33+
34+
**Supersim**
35+
- Add `Direction` filter parameter to list commands endpoint
36+
- Allow filtering commands list by Sim Unique Name
37+
- Add `Iccid` filter parameter to list sims endpoint
38+
39+
**Twiml**
40+
- Add support for `<Refer>` verb
41+
42+
643
[2019-10-30] Version 6.33.0
744
---------------------------
845
**Library**

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

Lines changed: 259 additions & 45 deletions
Large diffs are not rendered by default.
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 ExportAssistantTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck 10000 .mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.autopilot.v1.assistants(sid="UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.export_assistant().fetch()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://autopilot.twilio.com/v1/Assistants/UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Export',
27+
))
28+
29+
def test_fetch_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export",
35+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"assistant_sid": "UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"date_created": "2015-07-30T20:00:00Z",
38+
"status": "building",
39+
"error_code": null,
40+
"schema": {}
41+
}
42+
'''
43+
))
44+
45+
actual = self.client.autopilot.v1.assistants(sid="UAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
46+
.export_assistant().fetch()
47+
48+
self.assertIsNotNone(actual)

tests/integration/autopilot/v1/test_assistant.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ def test_fetch_response(self):
4848
"style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
4949
"defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
5050
"dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
51-
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
51+
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
52+
"export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
5253
},
5354
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5455
"callback_url": "https://example.com/callback_url",
@@ -120,7 +121,8 @@ def test_read_full_response(self):
120121
"style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
121122
"defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
122123
"dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
123-
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
124+
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
125+
"export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
124126
},
125127
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
126128
"callback_url": "https://example.com/callback_url",
@@ -178,7 +180,8 @@ def test_create_response(self):
178180
"style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
179181
"defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
180182
"dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
181-
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
183+
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
184+
"export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
182185
},
183186
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
184187
"callback_url": "https://example.com/callback_url",
@@ -225,7 +228,8 @@ def test_update_response(self):
225228
"style_sheet": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/StyleSheet",
226229
"defaults": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Defaults",
227230
"dialogues": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Dialogues",
228-
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks"
231+
"webhooks": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Webhooks",
232+
"export_assistant": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Export"
229233
},
230234
"url": "https://autopilot.twilio.com/v1/Assistants/UAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
231235
"callback_url": "https://example.com/callback_url",

tests/integration/flex_api/v1/test_flex_flow.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def test_read_full_response(self):
5252
"enabled": true,
5353
"integration_type": "studio",
5454
"integration": {
55-
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
55+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
56+
"retry_count": 1
5657
},
5758
"long_lived": true,
5859
"janitor_enabled": true,
@@ -117,7 +118,8 @@ def test_fetch_response(self):
117118
"enabled": true,
118119
"integration_type": "studio",
119120
"integration": {
120-
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
121+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122+
"retry_count": 1
121123
},
122124
"long_lived": true,
123125
"janitor_enabled": true,
@@ -164,7 +166,8 @@ def test_create_response(self):
164166
"enabled": true,
165167
"integration_type": "studio",
166168
"integration": {
167-
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
169+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170+
"retry_count": 1
168171
},
169172
"long_lived": true,
170173
"janitor_enabled": true,
@@ -204,7 +207,8 @@ def test_update_response(self):
204207
"enabled": true,
205208
"integration_type": "studio",
206209
"integration": {
207-
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
210+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
211+
"retry_count": 1
208212
},
209213
"long_lived": true,
210214
"janitor_enabled": true,
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: 169 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,169 @@
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 EventTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.insights.v1.calls(sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.events.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://insights.twilio.com/v1/Voice/CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Events',
27+
))
28+
29+
def test_read_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"meta": {
35+
"page": 0,
36+
"page_size": 50,
37+
"first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0",
38+
"previous_page_url": null,
39+
"next_page_url": null,
40+
"key": "events",
41+
"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=50&Page=0"
42+
},
43+
"events": [
44+
{
45+
"timestamp": "2019-09-19T22:15:23Z",
46+
"call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
47+
"account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
48+
"edge": "sdk_edge",
49+
"group": "connection",
50+
"name": "error",
51+
"level": "ERROR",
52+
"sdk_edge": {
53+
"error": {
54+
"code": 31600
55+
},
56+
"metadata": {
57+
"client_name": "GTI9300323095d271b890c91568931321395",
58+
"location": {
59+
"lat": 37.4192,
60+
"lon": -122.0574
61+
},
62+
"city": "Mountain View",
63+
"country_code": "US",
64+
"country_subdivision": "California",
65+
"ip_address": "108.177.7.83",
66+
"sdk": {
67+
"type": "twilio-voice-android",
68+
"version": "4.5.1",
69+
"platform": "android",
70+
"selected_region": "gll",
71+
"os": {
72+
"name": "android",
73+
"version": "4.3"
74+
},
75+
"device": {
76+
"model": "GT-I9300",
77+
"type": "GT-I9300",
78+
"vendor": "samsung",
79+
"arch": "armeabi-v7a"
80+
}
81+
}
82+
}
83+
},
84+
"client_edge": null,
85+
"carrier_edge": null,
86+
"sip_edge": null,
87+
"gateway": null,
88+
"client": null
89+
}
90+
]
91+
}
92+
'''
93+
))
94+
95+
actual = self.client.insights.v1.calls(sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
96+
.events.list()
97+
98+
self.assertIsNotNone(actual)
99+
100+
def test_read_deep_response(self):
101+
self.holodeck.mock(Response(
102+
200,
103+
'''
104+
{
105+
"meta": {
106+
"page": 10,
107+
"page_size": 5,
108+
"first_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=5&Page=0",
109+
"previous_page_url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=5&Page=9&PageToken=DP10",
110+
"next_page_url": null,
111+
"key": "events",
112+
"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Events?PageSize=5&Page=10"
113+
},
114+
"events": [
115+
{
116+
"timestamp": "2019-09-19T22:15:23Z",
117+
"call_sid": "CA03a02b156c6faa96c86906f7e9ad0f38",
118+
"account_sid": "AC998c10b68cbfda9f67277f7d8f4439c9",
119+
"edge": "sdk_edge",
120+
"group": "connection",
121+
"name": "error",
122+
"level": "ERROR",
123+
"sdk_edge": {
124+
"error": {
125+
"code": 31600
126+
},
127+
"metadata": {
128+
"client_name": "GTI9300323095d271b890c91568931321395",
129+
"location": {
130+
"lat": 37.4192,
131+
"lon": -122.0574
132+
},
133+
"city": "Mountain View",
134+
"country_code": "US",
135+
"country_subdivision": "California",
136+
"ip_address": "108.177.7.83",
137+
"sdk": {
138+
"type": "twilio-voice-android",
139+
"version": "4.5.1",
140+
"platform": "android",
141+
"selected_region": "gll",
142+
"os": {
143+
"name": "android",
144+
"version": "4.3"
145+
},
146+
"device": {
147+
"model": "GT-I9300",
148+
"type": "GT-I9300",
149+
"vendor": "samsung",
150+
"arch": "armeabi-v7a"
151+
}
152+
}
153+
}
154+
},
155+
"client_edge": null,
156+
"carrier_edge": null,
157+
"sip_edge": null,
158+
"gateway": null,
159+
"client": null
160+
}
161+
]
162+
}
163+
'''
164+
))
165+
166+
actual = self.client.insights.v1.calls(sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
167+< 341A /span>
.events.list()
168+
169+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0