Skip to content

Commit 1b575eb

Browse files
committed
[Librarian] Regenerated @ 2df4ac3e3d4eef8966d6e3125164dfe43634b9d7
1 parent bd90596 commit 1b575eb

File tree

15 files changed

+933
-6
lines changed

15 files changed

+933
-6
lines changed

CHANGES.md

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

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

6+
[2022-11-16] Version 7.15.3
7+
---------------------------
8+
**Library - Chore**
9+
- [PR #624](https://github.com/twilio/twilio-python/pull/624): upgrade GitHub Actions dependencies. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
10+
11+
**Api**
12+
- Set the Content resource to have public visibility as Preview
13+
14+
**Flex**
15+
- Adding new parameter `base_url` to 'gooddata' response in version `v1`
16+
17+
**Insights**
18+
- Added `answered_by` field in List Call Summary
19+
- Added `answered_by` field in call summary
20+
21+
622
[2022-11-10] Version 7.15.2
723
---------------------------
824
**Flex**

tests/integration/content/__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: 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: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
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 ContentTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.content.v1.contents("HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
35+
"friendly_name": "Some content",
36+
"language": "en",
37+
"variables": {
38+
"name": "foo"
39+
},
40+
"types": {
41+
"twilio/text": {
42+
"body": "Foo Bar Co is located at 39.7392, 104.9903"
43+
},
44+
"twilio/location": {
45+
"longitude": 104.9903,
46+
"latitude": 39.7392,
47+
"label": "Foo Bar Co"
48+
}
49+
},
50+
"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
51+
"date_created": "2015-07-30T19:00:00Z",
52+
"date_updated": "2015-07-30T19:00:00Z",
53+
"links": {
54+
"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",
55+
"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"
56+
}
57+
}
58+
'''
59+
))
60+
61+
actual = self.client.content.v1.contents("HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
62+
63+
self.assertIsNotNone(actual)
64+
65+
def test_create_request(self):
66+
self.holodeck.mock(Response(500, ''))
67+
68+
with self.assertRaises(TwilioException):
69+
self.client.content.v1.contents.create()
70+
71+
self.holodeck.assert_has_request(Request(
72+
'post',
73+
'https://content.twilio.com/v1/Content',
74+
))
75+
76+
def test_create_response(self):
77+
self.holodeck.mock(Response(
78+
201,
79+
'''
80+
{
81+
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
82+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
83+
"friendly_name": "",
84+
"language": "en",
85+
"variables": {
86+
"name": "foo"
87+
},
88+
"types": {
89+
"twilio/text": {
90+
"body": "Foo Bar Co is located at 39.7392, 104.9903"
91+
},
92+
"twilio/location": {
93+
"longitude": 104.9903,
94+
"latitude": 39.7392,
95+
"label": "Foo Bar Co"
96+
}
97+
},
98+
"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
99+
"date_created": "2015-07-30T19:00:00Z",
100+
"date_updated": "2015-07-30T19:00:00Z",
101+
"links": {
102+
"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",
103+
"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"
104+
}
105+
}
106+
'''
107+
))
108+
109+
actual = self.client.content.v1.contents.create()
110+
111+
self.assertIsNotNone(actual)
112+
113+
def test_delete_request(self):
114+
self.holodeck.mock(Response(500, ''))
115+
116+
with self.assertRaises(TwilioException):
117+
self.client.content.v1.contents("HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
118+
119+
self.holodeck.assert_has_request(Request(
120+
'delete',
121+
'https://content.twilio.com/v1/Content/HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
122+
))
123+
124+
def test_delete_response(self):
125+
self.holodeck.mock(Response(
126+
204,
127+
None,
128+
))
129+
130+
actual = self.client.content.v1.contents("HXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
131+
132+
self.assertTrue(actual)
133+
134+
def test_list_request(self):
135+
self.holodeck.mock(Response(500, ''))
136+
137+
with self.assertRaises(TwilioException):
138+
self.client.content.v1.contents.list()
139+
140+
self.holodeck.assert_has_request(Request(
141+
'get',
142+
'https://content.twilio.com/v1/Content',
143+
))
144+
145+
def test_read_empty_response(self):
146+
self.holodeck.mock(Response(
147+
200,
148+
'''
149+
{
150+
"contents": [],
151+
"meta": {
152+
"page": 0,
153+
"page_size": 10,
154+
"first_page_url": "https://content.twilio.com/v1/Content?PageSize=10&Page=0",
155+
"previous_page_url": null,
156+
"url": "https://content.twilio.com/v1/Content?PageSize=10&Page=0",
157+
"next_page_url": null,
158+
"key": "contents"
159+
}
160+
}
161+
'''
162+
))
163+
164+
actual = self.client.content.v1.contents.list()
165+
166+
self.assertIsNotNone(actual)
167+
168+
def test_read_results_response(self):
169+
self.holodeck.mock(Response(
170+
200,
171+
'''
172+
{
173+
"contents": [
174+
{
175+
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
176+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177+
"friendly_name": "Some content",
178+
"language": "en",
179+
"variables": {
180+
"name": "foo"
181+
},
182+
"types": {
183+
"twilio/text": {
184+
"body": "Foo Bar Co is located at 39.7392, 104.9903"
185+
},
186+
"twilio/location": {
187+
"longitude": 104.9903,
188+
"latitude": 39.7392,
189+
"label": "Foo Bar Co"
190+
}
191+
},
192+
"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193+
"date_created": "2015-07-30T19:00:00Z",
194+
"date_updated": "2015-07-30T19:00:00Z",
195+
"links": {
196+
"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",
197+
"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"
198+
}
199+
},
200+
{
201+
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
202+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
203+
"friendly_name": "Anotha content",
204+
"language": "en",
205+
"variables": {
206+
"name": "foo"
207+
},
208+
"types": {
209+
"twilio/text": {
210+
"body": "Foo Bar Co is located at 39.7392, 104.9903"
211+
},
212+
"twilio/location": {
213+
"longitude": 104.9903,
214+
"latitude": 39.7392,
215+
"label": "Foo Bar Co"
216+
}
217+
},
218+
"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
219+
"date_created": "2015-07-30T19:00:00Z",
220+
"date_updated": "2015-07-30T19:00:00Z",
221+
"links": {
222+
"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",
223+
"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"
224+
}
225+
},
226+
{
227+
"sid": "HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
228+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
229+
"friendly_name": "Third content",
230+
"language": "en",
231+
"variables": {
232+
"name": "foo"
233+
},
234+
"types": {
235+
"twilio/text": {
236+
"body": "Foo Bar Co is located at 39.7392, 104.9903"
237+
},
238+
"twilio/location": {
239+
"longitude": 104.9903,
240+
"latitude": 39.7392,
241+
"label": "Foo Bar Co"
242+
}
243+
},
244+
"url": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
245+
"date_created": "2015-07-30T19:00:00Z",
246+
"date_updated": "2015-07-30T19:00:00Z",
247+
"links": {
248+
"approval_create": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests/whatsapp",
249+
"approval_fetch": "https://content.twilio.com/v1/Content/HXaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ApprovalRequests"
250+
}
251+
}
252+
],
253+
"meta": {
254+
"page": 0,
255+
"page_size": 20,
256+
"first_page_url": "https://content.twilio.com/v1/Content?PageSize=20&Page=0",
257+
"previous_page_url": null,
258+
"url": "https://content.twilio.com/v1/Content?PageSize=20&Page=0",
259+
"next_page_url": null,
260+
"key": "contents"
261+
}
262+
}
263+
'''
264+
))
265+
266+
actual = self.client.content.v1.contents.list()
267+
268+
self.assertIsNotNone(actual)

tests/integration/flex_api/v1/test_good_data.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_create_response(self):
3535
"session_expiry": "2022-09-27T09:28:01Z",
3636
"workspace_id": "clbi1eelh1x8z4.......ijpnyu",
3737
"session_id": "-----BEGIN PGP MESSAGE-----\\n\\nwcBMA11tX1FL13rp\\u2026\\u2026kHXd\\n=vOBk\\n-----END PGP MESSAGE-----\\n",
38+
"gd_base_url": "https://analytics.ytica.com/",
3839
"url": "https://flex-api.twilio.com/v1/Accounts/GoodData"
3940
}
4041
'''

tests/integration/insights/v1/call/test_summary.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_fetch_response(self):
3535
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3636
"call_type": "carrier",
3737
"call_state": "ringing",
38+
"answered_by": "machine_start",
3839
"processing_state": "complete",
3940
"created_time": "2015-07-30T20:00:00Z",
4041
"start_time": "2015-07-30T20:00:00Z",

tests/integration/insights/v1/test_call_summaries.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ def test_read_with_carrier_response(self):
7373
"connect_duration": 20,
7474
"call_type": "carrier",
7575
"call_state": "completed",
76+
"answered_by": "machine_start",
7677
"from": {
7778
"caller": "+15555555555",
7879
"carrier": "T-Mobile USA, Inc.",
@@ -161,6 +162,7 @@ def test_read_with_carrier_response(self):
161162
"connect_duration": 18,
162163
"call_type": "carrier",
163164
"call_state": "completed",
165+
"answered_by": "machine_start",
164166
"from": {
165167
"caller": "+15555555555",
166168
"carrier": "T-Mobile USA, Inc.",
@@ -270,6 +272,7 @@ def test_read_with_subaccount_response(self):
270272
"connect_duration": 6,
271273
"call_type": "client",
272274
"call_state": "completed",
275+
"answered_by": "machine_start",
273276
"from": {
274277
"caller": "client:+15555555555",
275278
"connection": "twilio_sdk"
@@ -341,6 +344,7 @@ def test_read_with_subaccount_response(self):
341344
"connect_duration": 3,
342345
"call_type": "client",
343346
"call_state": "completed",
347+
"answered_by": "machine_start",
344348
"from": {
345349
"caller": "+15555555555",
346350
"carrier": "Verizon",
@@ -441,6 +445,7 @@ def test_read_with_trust_response(self):
441445
"connect_duration": 41,
442446
"call_type": "trunking",
443447
"call_state": "completed",
448+
"answered_by": "machine_start",
444449
"from": {
445450
"caller": "+15555555555",
446451
"carrier": "ACS",
@@ -534,6 +539,7 @@ def test_read_with_trust_response(self):
534539
"connect_duration": 6,
535540
"call_type": "carrier",
536541
"call_state": "completed",
542+
"answered_by": "machine_start",
537543
"from": {
538544
"caller": "+15555555555",
539545
"carrier": "T-Mobile USA, Inc.",
@@ -619,6 +625,7 @@ def test_read_with_trust_response(self):
619625
"connect_duration": 3,
620626
"call_type": "carrier",
621627
"call_state": "completed",
628+
"answered_by": "machine_start",
622629
"from": {
623630
"caller": "+15555555555",
624631
"carrier": "Hawaiian Telcom, Inc. - HI",
@@ -706,6 +713,7 @@ def test_read_with_abnormal_session_response(self):
706713
"connect_duration": 12,
707714
"call_type": "sip",
708715
"call_state": "completed",
716+
"answered_by": "machine_start",
709717
"from": {
710718
"caller": "+15555555555",
711719
"carrier": "XO Communications, Inc.",
@@ -785,6 +793,7 @@ def test_read_with_abnormal_session_response(self):
785793
"connect_duration": 41,
786794
"call_type": "trunking",
787795
"call_state": "completed",
796+
"answered_by": "machine_start",
788797
"from": {
789798
"caller": "+15555555555",
790799
"carrier": "ACS",

0 commit comments

Comments
 (0)