Skip to content

Commit 5a3f896

Browse files
committed
[Librarian] Regenerated @ 8a2e951f4fb6857d0989e8d2fded7c757e2ef2d4
1 parent 2d628f4 commit 5a3f896

File tree

17 files changed

+3082
-10
lines changed

17 files changed

+3082
-10
lines changed

CHANGES.md

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

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

6+
[2022-01-26] Version 7.5.1
7+
--------------------------
8+
**Insights**
9+
- Added new endpoint to fetch Conference Participant Summary
10+
- Added new endpoint to fetch Conference Summary
11+
12+
**Messaging**
13+
- Add government_entity parameter to brand apis
14+
15+
**Verify**
16+
- Add Access Token fetch endpoint to retrieve a previously created token.
17+
- Add Access Token payload to the Access Token creation endpoint, including a unique Sid, so it's addressable while it's TTL is valid.
18+
19+
620
[2022-01-12] Version 7.5.0
721
--------------------------
822
**Library - Chore**
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+

tests/integration/insights/v1/conference/test_conference_participant.py

Lines changed: 384 additions & 0 deletions
Large diffs are not rendered by default.

tests/integration/insights/v1/test_conference.py

Lines changed: 459 additions & 0 deletions
Large diffs are not rendered by default.

tests/integration/messaging/v1/test_brand_registration.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ def test_fetch_response(self):
4848
],
4949
"identity_status": "VERIFIED",
5050
"russell_3000": true,
51+
"government_entity": false,
5152
"tax_exempt_status": "501c3",
5253
"skip_automatic_sec_vet": false,
5354
"mock": false,
@@ -108,6 +109,7 @@ def test_read_response(self):
108109
"identity_status": "VERIFIED",
109110
"russell_3000": true,
110111
"tax_exempt_status": "501c3",
112+
"government_entity": false,
111113
"skip_automatic_sec_vet": false,
112114
"mock": false,
113115
"links": {
@@ -163,6 +165,7 @@ def test_create_response(self):
163165
],
164166
"identity_status": "VERIFIED",
165167
"russell_3000": true,
168+
"government_entity": false,
166169
"tax_exempt_status": "501c3",
167170
"skip_automatic_sec_vet": false,
168171
"mock": false,
@@ -211,6 +214,7 @@ def test_update_response(self):
211214
],
212215
"identity_status": "VERIFIED",
213216
"russell_3000": false,
217+
"government_entity": false,
214218
"tax_exempt_status": "501c3",
215219
"skip_automatic_sec_vet": false,
216220
"mock": false,
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
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 EsimProfileTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.supersim.v1.esim_profiles.create(eid="eid")
22+
23+
values = {'Eid': "eid", }
24+
25+
self.holodeck.assert_has_request(Request(
26+
'post',
27+
'https://supersim.twilio.com/v1/ESimProfiles',
28+
data=values,
29+
))
30+
31+
def test_create_default_smdp_response(self):
32+
self.holodeck.mock(Response(
33+
201,
34+
'''
35+
{
36+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"iccid": null,
39+
"sim_sid": null,
40+
"status": "reserving",
41+
"eid": "89049032005008882600033489aaaaaa",
42+
"smdp_plus_address": null,
43+
"error_code": null,
44+
"error_message": null,
45+
"date_created": "2020-09-01T20:00:00Z",
46+
"date_updated": "2020-09-01T20:00:00Z",
47+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
48+
}
49+
'''
50+
))
51+
52+
actual = self.client.supersim.v1.esim_profiles.create(eid="eid")
53+
54+
self.assertIsNotNone(actual)
55+
56+
def test_create_with_callback_response(self):
57+
self.holodeck.mock(Response(
58+
201,
59+
'''
60+
{
61+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
62+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
63+
"iccid": null,
64+
"sim_sid": null,
65+
"status": "reserving",
66+
"eid": "89049032005008882600033489aaaaaa",
67+
"smdp_plus_address": null,
68+
"error_code": null,
69+
"error_message": null,
70+
"date_created": "2020-09-01T20:00:00Z",
71+
"date_updated": "2020-09-01T20:00:00Z",
72+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
73+
}
74+
'''
75+
))
76+
77+
actual = self.client.supersim.v1.esim_profiles.create(eid="eid")
78+
79+
self.assertIsNotNone(actual)
80+
81+
def test_fetch_request(self):
82+
self.holodeck.mock(Response(500, ''))
83+
84+
with self.assertRaises(TwilioException):
85+
self.client.supersim.v1.esim_profiles("HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
86+
87+
self.holodeck.assert_has_request(Request(
88+
'get',
89+
'https://supersim.twilio.com/v1/ESimProfiles/HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
90+
))
91+
92+
def test_fetch_response(self):
93+
self.holodeck.mock(Response(
94+
200,
95+
'''
96+
{
97+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
98+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
99+
"iccid": "8988307aaaaaaaaaaaaa",
100+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
101+
"status": "available",
102+
"eid": "89049032005008882600033489aaaaaa",
103+
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
104+
"error_code": null,
105+
"error_message": null,
106+
"date_created": "2020-09-01T20:00:00Z",
107+
"date_updated": "2020-09-01T20:00:00Z",
108+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
109+
}
110+
'''
111+
))
112+
113+
actual = self.client.supersim.v1.esim_profiles("HPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
114+
115+
self.assertIsNotNone(actual)
116+
117+
def test_list_request(self):
118+
self.holodeck.mock(Response(500, ''))
119+
120+
with self.assertRaises(TwilioException):
121+
self.client.supersim.v1.esim_profiles.list()
122+
123+
self.holodeck.assert_has_request(Request(
124+
'get',
125+
'https://supersim.twilio.com/v1/ESimProfiles',
126+
))
127+
128+
def test_read_all_response(self):
129+
self.holodeck.mock(Response(
130+
200,
131+
'''
132+
{
133+
"esim_profiles": [
134+
{
135+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
136+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
137+
"iccid": "8988307aaaaaaaaaaaaa",
138+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
139+
"status": "available",
140+
"eid": "89049032005008882600033489aaaaaa",
141+
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
142+
"error_code": null,
143+
"error_message": null,
144+
"date_created": "2020-09-01T20:00:00Z",
145+
"date_updated": "2020-09-01T20:00:00Z",
146+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
147+
}
148+
],
149+
"meta": {
150+
"first_page_url": "https://supersim.twilio.com/v1/ESimProfiles?PageSize=50&Page=0",
151+
"key": "esim_profiles",
152+
"next_page_url": null,
153+
"page": 0,
154+
"page_size": 50,
155+
"previous_page_url": null,
156+
"url": "https://supersim.twilio.com/v1/ESimProfiles?PageSize=50&Page=0"
157+
}
158+
}
159+
'''
160+
))
161+
162+
actual = self.client.supersim.v1.esim_profiles.list()
163+
164+
self.assertIsNotNone(actual)
165+
166+
def test_read_by_eid_response(self):
167+
self.holodeck.mock(Response(
168+
200,
169+
'''
170+
{
171+
"esim_profiles": [
172+
{
173+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
174+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175+
"iccid": "8988307aaaaaaaaaaaaa",
176+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177+
"status": "available",
178+
"eid": "89049032005008882600033489aaaaaa",
179+
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
180+
"error_code": null,
181+
"error_message": null,
182+
"date_created": "2020-09-01T20:00:00Z",
183+
"date_updated": "2020-09-01T20:00:00Z",
184+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
185+
}
186+
],
187+
"meta": {
188+
"first_page_url": "https://supersim.twilio.com/v1/ESimProfiles?Eid=89049032005008882600033489aaaaaa&PageSize=50&Page=0",
189+
"key": "esim_profiles",
190+
"next_page_url": null,
191+
"page": 0,
192+
"page_size": 50,
193+
"previous_page_url": null,
194+
"url": "https://supersim.twilio.com/v1/ESimProfiles?Eid=89049032005008882600033489aaaaaa&PageSize=50&Page=0"
195+
}
196+
}
197+
'''
198+
))
199+
200+
actual = self.client.supersim.v1.esim_profiles.list()
201+
202+
self.assertIsNotNone(actual)
203+
204+
def test_read_by_sim_sid_response(self):
205+
self.holodeck.mock(Response(
206+
200,
207+
'''
208+
{
209+
"esim_profiles": [
210+
{
211+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
212+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
213+
"iccid": "8988307aaaaaaaaaaaaa",
214+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
215+
"status": "available",
216+
"eid": "89049032005008882600033489aaaaaa",
217+
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
218+
"error_code": null,
219+
"error_message": null,
220+
"date_created": "2020-09-01T20:00:00Z",
221+
"date_updated": "2020-09-01T20:00:00Z",
222+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
223+
}
224+
],
225+
"meta": {
226+
"first_page_url": "https://supersim.twilio.com/v1/ESimProfiles?SimSid=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",
227+
"key": "esim_profiles",
228+
"next_page_url": null,
229+
"page": 0,
230+
"page_size": 50,
231+
"previous_page_url": null,
232+
"url": "https://supersim.twilio.com/v1/ESimProfiles?SimSid=HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0"
233+
}
234+
}
235+
'''
236+
))
237+
238+
actual = self.client.supersim.v1.esim_profiles.list()
239+
240+
self.assertIsNotNone(actual)
241+
242+
def test_read_by_status_response(self):
243+
self.holodeck.mock(Response(
244+
200,
245+
'''
246+
{
247+
"esim_profiles": [
248+
{
249+
"sid": "HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
250+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
251+
"iccid": "8988307aaaaaaaaaaaaa",
252+
"sim_sid": "HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
253+
"status": "downloaded",
254+
"eid": "89049032005008882600033489aaaaaa",
255+
"smdp_plus_address": "https://sm-dp-plus.twilio.com",
256+
"error_code": null,
257+
"error_message": null,
258+
"date_created": "2020-09-01T20:00:00Z",
259+
"date_updated": "2020-09-01T20:00:00Z",
260+
"url": "https://supersim.twilio.com/v1/ESimProfiles/HPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
261+
}
262+
],
263+
"meta": {
264+
"first_page_url": "https://supersim.twilio.com/v1/ESimProfiles?Status=downloaded&PageSize=50&Page=0",
265+
"key": "esim_profiles",
266+
"next_page_url": null,
267+
"page": 0,
268+
"page_size": 50,
269+
"previous_page_url": null,
270+
"url": "https://supersim.twilio.com/v1/ESimProfiles?Status=downloaded&PageSize=50&Page=0"
271+
}
272+
}
273+
'''
274+
))
275+
276+
actual = self.client.supersim.v1.esim_profiles.list()
277+
278+
self.assertIsNotNone(actual)

tests/integration/verify/v2/service/test_access_token.py

Lines changed: 42 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@ def test_create_response(self):
3434
201,
3535
'''
3636
{
37-
"token": "eyJ6aXAiOiJERUYiLCJraWQiOiJTQVNfUzNfX19LTVNfdjEiLCJjdHkiOiJ0d2lsaW8tZnBhO3Y9MSIsImVuYyI6IkEyNTZHQ00iLCJhbGciOiJkaXIifQ..qjltWfIgQaTwp2De.81Z_6W4kR-hdlAUvJQCbwS8CQ7QAoFRkOvNMoySEj8zEB4BAY3MXhPARfaK4Lnr4YceA2cXEmrzPKQ7bPm0XZMGYm1fqLYzAR8YAqUetI9WEdQLFytg1h4XnJnXhgd99eNXsLkpKHhsCnFkchV9eGpRrdrfB0STR5Xq0fdakomb98iuIFt1XtP0_iqxvxQZKe1O4035XhK_ELVwQBz_qdI77XRZBFM0REAzlnEOe61nOcQxkaIM9Qel9L7RPhcndcCPFAyYjxo6Ri5c4vOnszLDiHmeK9Ep9fRE5-Oz0px0ZEg_FgTUEPFPo2OHQj076H1plJnFr-qPINDJkUL_i7loqG1IlapOi1JSlflPH-Ebj4hhpBdMIcs-OX7jhqzmVqkIKWkpPyPEmfvY2-eA5Zpoo08YpqAJ3G1l_xEcHl28Ijkefj1mdb6E8POx41skAwXCpdfIbzWzV_VjFpmwhacS3JZNt9C4hVG4Yp-RGPEl1C7aJHRIUavAmoRHaXbfG20zzv5Zu0P5PcopDszzoqVfZpzc.GCt35DWTurtP-QaIL5aBSQ"
37+
"sid": "YKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
38+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
39+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
40+
"entity_identity": "ff483d1ff591898a9942916050d2ca3f",
41+
"factor_type": "push",
42+
"factor_friendly_name": "John Doe iPhone",
43+
"token": "eyJ6aXAiOiJERUYiLCJraWQiOiJTQVNfUzNfX19LTVNfdjEiLCJjdHkiOiJ0d2lsaW8tZnBhO3Y9MSIsImVuYyI6IkEyNTZHQ00iLCJhbGciOiJkaXIifQ..qjltWfIgQaTwp2De.81Z_6W4kR-hdlAUvJQCbwS8CQ7QAoFRkOvNMoySEj8zEB4BAY3MXhPARfaK4Lnr4YceA2cXEmrzPKQ7bPm0XZMGYm1fqLYzAR8YAqUetI9WEdQLFytg1h4XnJnXhgd99eNXsLkpKHhsCnFkchV9eGpRrdrfB0STR5Xq0fdakomb98iuIFt1XtP0_iqxvxQZKe1O4035XhK_ELVwQBz_qdI77XRZBFM0REAzlnEOe61nOcQxkaIM9Qel9L7RPhcndcCPFAyYjxo6Ri5c4vOnszLDiHmeK9Ep9fRE5-Oz0px0ZEg_FgTUEPFPo2OHQj076H1plJnFr-qPINDJkUL_i7loqG1IlapOi1JSlflPH-Ebj4hhpBdMIcs-OX7jhqzmVqkIKWkpPyPEmfvY2-eA5Zpoo08YpqAJ3G1l_xEcHl28Ijkefj1mdb6E8POx41skAwXCpdfIbzWzV_VjFpmwhacS3JZNt9C4hVG4Yp-RGPEl1C7aJHRIUavAmoRHaXbfG20zzv5Zu0P5PcopDszzoqVfZpzc.GCt35DWTurtP-QaIL5aBSQ",
44+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens/YKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
3845
}
3946
'''
4047
))
@@ -43,3 +50,37 @@ def test_create_response(self):
4350
.access_tokens.create(identity="identity", factor_type="push")
4451

4552
self.assertIsNotNone(actual)
53+
54+
def test_fetch_request(self):
55+
self.holodeck.mock(Response(500, ''))
56+
57+
with self.assertRaises(TwilioException):
58+
self.client.verify.v2.services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
59+
.access_tokens("YKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
60+
61+
self.holodeck.assert_has_request(Request(
62+
'get',
63+
'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AccessTokens/YKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
64+
))
65+
66+
def test_fetch_response(self):
67+
self.holodeck.mock(Response(
68+
200,
69+
'''
70+
{
71+
"sid": "YKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73+
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74+
"entity_identity": "ff483d1ff591898a9942916050d2ca3f",
75+
"factor_type": "push",
76+
"factor_friendly_name": "John Doe iPhone",
77+
"token": "eyJ6aXAiOiJERUYiLCJraWQiOiJTQVNfUzNfX19LTVNfdjEiLCJjdHkiOiJ0d2lsaW8tZnBhO3Y9MSIsImVuYyI6IkEyNTZHQ00iLCJhbGciOiJkaXIifQ..qjltWfIgQaTwp2De.81Z_6W4kR-hdlAUvJQCbwS8CQ7QAoFRkOvNMoySEj8zEB4BAY3MXhPARfaK4Lnr4YceA2cXEmrzPKQ7bPm0XZMGYm1fqLYzAR8YAqUetI9WEdQLFytg1h4XnJnXhgd99eNXsLkpKHhsCnFkchV9eGpRrdrfB0STR5Xq0fdakomb98iuIFt1XtP0_iqxvxQZKe1O4035XhK_ELVwQBz_qdI77XRZBFM0REAzlnEOe61nOcQxkaIM9Qel9L7RPhcndcCPFAyYjxo6Ri5c4vOnszLDiHmeK9Ep9fRE5-Oz0px0ZEg_FgTUEPFPo2OHQj076H1plJnFr-qPINDJkUL_i7loqG1IlapOi1JSlflPH-Ebj4hhpBdMIcs-OX7jhqzmVqkIKWkpPyPEmfvY2-eA5Zpoo08YpqAJ3G1l_xEcHl28Ijkefj1mdb6E8POx41skAwXCpdfIbzWzV_VjFpmwhacS3JZNt9C4hVG4Yp-RGPEl1C7aJHRIUavAmoRHaXbfG20zzv5Zu0P5PcopDszzoqVfZpzc.GCt35DWTurtP-QaIL5aBSQ",
78+
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AccessTokens/YKaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
79+
}
80+
'''
81+
))
82+
83+
actual = self.client.verify.v2.services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
84+
.access_tokens("YKXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
85+
86+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)