Skip to content

Commit 8937a79

Browse files
committed
[Librarian] Regenerated @ f96923c630f48d9ea3cd9bb44a0e00d4222f426c
1 parent aa88e12 commit 8937a79

File tree

25 files changed

+274
-43
lines changed

25 files changed

+274
-43
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+
[2022-02-23] Version 7.7.0
7+
--------------------------
8+
**Api**
9+
- Add `uri` to `stream` resource
10+
- Add A2P Registration Fee category (`a2p-registration-fee`) to usage records
11+
- Detected a bug and removed optional boolean include_soft_deleted parameter to retrieve soft deleted recordings. **(breaking change)**
12+
- Add optional boolean include_soft_deleted parameter to retrieve soft deleted recordings.
13+
14+
**Numbers**
15+
- Unrevert valid_until and sort filter params added to List Bundles resource
16+
- Revert valid_until and sort filter params added to List Bundles resource
17+
- Update sorting params added to List Bundles resource in the previous release
18+
19+
**Preview**
20+
- Moved `web_channels` from preview to beta under `flex-api` **(breaking change)**
21+
22+
**Taskrouter**
23+
- Add `ETag` as Response Header to List of Task, Reservation & Worker
24+
25+
**Verify**
26+
- Remove outdated documentation commentary to contact sales. Product is already in public beta.
27+
- Add optional `metadata` to factors.
28+
29+
**Twiml**
30+
- Add new Polly Neural voices
31+
32+
633
[2022-02-09] Version 7.6.0
734
--------------------------
835
**Library - Chore**

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_create_no_args_response(self):
3737
"sid": "SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3838
"name": null,
3939
"status": "in-progress",
40-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
40+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
41+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Siprec/SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
4142
}
4243
'''
4344
))
@@ -58,7 +59,8 @@ def test_create_with_args_response(self):
5859
"sid": "SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5960
"name": "myName",
6061
"status": "in-progress",
61-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
62+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
63+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Siprec/SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
6264
}
6365
'''
6466
))
@@ -95,7 +97,8 @@ def test_update_by_sid_response(self):
9597
"sid": "SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9698
"name": null,
9799
"status": "stopped",
98-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
100+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
101+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Siprec/SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
99102
}
100103
'''
101104
))
@@ -116,7 +119,8 @@ def test_update_by_name_response(self):
116119
"sid": "SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
117120
"name": "mySiprec",
118121
"status": "stopped",
119-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
122+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
123+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Siprec/SRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
120124
}
121125
'''
122126
))

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_create_no_args_response(self):
3737
"sid": "MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3838
"name": null,
3939
"status": "in-progress",
40-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
40+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
41+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
4142
}
4243
'''
4344
))
@@ -58,7 +59,8 @@ def test_create_with_args_response(self):
5859
"sid": "MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5960
"name": "myName",
6061
"status": "in-progress",
61-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
62+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
63+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
6264
}
6365
'''
6466
))
@@ -95,7 +97,8 @@ def test_update_by_sid_response(self):
9597
"sid": "MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9698
"name": null,
9799
"status": "stopped",
98-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
100+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
101+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
99102
}
100103
'''
101104
))
@@ -116,7 +119,8 @@ def test_update_by_name_response(self):
116119
"sid": "MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
117120
"name": "myStream",
118121
"status": "stopped",
119-
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000"
122+
"date_updated": "Thu, 30 Jul 2015 20:00:00 +0000",
123+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Streams/MZaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
120124
}
121125
'''
122126
))

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

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -229,13 +229,13 @@ def test_create_scheduled_message_mms_response(self):
229229
"num_segments": "1",
230230
"price": null,
231231
"price_unit": null,
232-
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
232+
"sid": "MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
233233
"status": "scheduled",
234234
"subresource_uris": {
235-
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
235+
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
236236
},
237237
"to": "+15558675310",
238-
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
238+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/MMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
239239
}
240240
'''
241241
))
@@ -601,13 +601,13 @@ def test_redact_body_response(self):
601601
"date_sent": "Fri, 24 May 2019 17:18:28 +0000",
602602
"date_updated": "Fri, 24 May 2019 17:18:28 +0000",
603603
"direction": "outbound-api",
604-
"error_code": 30007,
605-
"error_message": "Carrier violation",
604+
"error_code": null,
605+
"error_message": null,
606606
"from": "+12019235161",
607607
"messaging_service_sid": "MGdeadbeefdeadbeefdeadbeefdeadbeef",
608608
"num_media": "0",
609609
"num_segments": "1",
610-
"price": "-0.00750",
610+
"price": null,
611611
"price_unit": "USD",
612612
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
613613
"status": "sent",
@@ -633,18 +633,18 @@ def test_cancel_message_response(self):
633633
{
634634
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
635635
"api_version": "2010-04-01",
636-
"body": "",
636+
"body": "Hello World!",
637637
"date_created": "Fri, 24 May 2019 17:18:27 +0000",
638-
"date_sent": "Fri, 24 May 2019 17:18:28 +0000",
639-
"date_updated": "Fri, 24 May 2019 17:18:28 +0000",
638+
"date_sent": null,
639+
"date_updated": "Fri, 24 May 2019 18:18:28 +0000",
640640
"direction": "outbound-api",
641-
"error_code": 30007,
642-
"error_message": "Carrier violation",
643-
"from": "+12019235161",
641+
"error_code": null,
642+
"error_message": null,
643+
"from": null,
644644
"messaging_service_sid": "MGdeadbeefdeadbeefdeadbeefdeadbeef",
645645
"num_media": "0",
646646
"num_segments": "1",
647-
"price": "-0.00750",
647+
"price": null,
648648
"price_unit": "USD",
649649
"sid": "SMb7c0a2ce80504485a6f653a7110836f5",
650650
"status": "canceled",

tests/integration/api/v2010/account/usage/test_trigger.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,12 +133,12 @@ def test_create_request(self):
133133
with self.assertRaises(TwilioException):
134134
self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
135135
.usage \
136-
.triggers.create(callback_url="https://example.com", trigger_value="trigger_value", usage_category="agent-conference")
136+
.triggers.create(callback_url="https://example.com", trigger_value="trigger_value", usage_category="a2p-registration-fees")
137137

138138
values = {
139139
'CallbackUrl': "https://example.com",
140140
'TriggerValue': "trigger_value",
141-
'UsageCategory': "agent-conference",
141+
'UsageCategory': "a2p-registration-fees",
142142
}
143143

144144
self.holodeck.assert_has_request(Request(
@@ -174,7 +174,7 @@ def test_create_response(self):
174174

175175
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
176176
.usage \
177-
.triggers.create(callback_url="https://example.com", trigger_value="trigger_value", usage_category="agent-conference")
177+
.triggers.create(callback_url="https://example.com", trigger_value="trigger_value", usage_category="a2p-registration-fees")
178178

179179
self.assertIsNotNone(actual)
180180

tests/integration/numbers/v2/regulatory_compliance/test_bundle.py

Lines changed: 131 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,138 @@ def test_read_full_response(self):
123123
"meta": {
124124
"page": 0,
125125
"page_size": 50,
126-
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&HasValidUntilDate=true&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
126+
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
127127
"previous_page_url": null,
128-
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&HasValidUntilDate=true&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
128+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=draft&RegulationSid=RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&IsoCountry=US&FriendlyName=friendly_name&NumberType=mobile&PageSize=50&Page=0",
129+
"next_page_url": null,
130+
"key": "results"
131+
}
132+
}
133+
'''
134+
))
135+
136+
actual = self.client.numbers.v2.regulatory_compliance \
137+
.bundles.list()
138+
139+
self.assertIsNotNone(actual)
140+
141+
def test_read_approved_au_mobile_with_date_response(self):
142+
self.holodeck.mock(Response(
143+
200,
144+
'''
145+
{
146+
"results": [
147+
{
148+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
149+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
150+
"regulation_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
151+
"friendly_name": "friendly_name",
152+
"status": "twilio-approved",
153+
"email": "email",
154+
"status_callback": "http://www.example.com",
155+
"valid_until": "2022-11-29T01:00:00Z",
156+
"date_created": "2021-08-30T22:29:24Z",
157+
"date_updated": "2021-08-31T01:09:00Z",
158+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
159+
"links": {
160+
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
161+
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments",
162+
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Copies"
163+
}
164+
}
165+
],
166+
"meta": {
167+
"page": 0,
168+
"page_size": 50,
169+
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=twilio-approved&IsoCountry=AU&HasValidUntilDate=true&NumberType=mobile&PageSize=50&Page=0",
170+
"previous_page_url": null,
171+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=twilio-approved&IsoCountry=AU&HasValidUntilDate=true&NumberType=mobile&PageSize=50&Page=0",
172+
"next_page_url": null,
173+
"key": "results"
174+
}
175+
}
176+
'''
177+
))
178+
179+
actual = self.client.numbers.v2.regulatory_compliance \
180+
.bundles.list()
181+
182+
self.assertIsNotNone(actual)
183+
184+
def test_read_approved_au_mobile_date_less_response(self):
185+
self.holodeck.mock(Response(
186+
200,
187+
'''
188+
{
189+
"results": [
190+
{
191+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
192+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
193+
"regulation_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
194+
"friendly_name": "friendly_name",
195+
"status": "twilio-approved",
196+
"email": "email",
197+
"status_callback": "http://www.example.com",
198+
"valid_until": "2022-11-29T01:00:00Z",
199+
"date_created": "2021-08-30T22:29:24Z",
200+
"date_updated": "2021-08-31T01:09:00Z",
201+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
202+
"links": {
203+
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
204+
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments",
205+
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Copies"
206+
}
207+
}
208+
],
209+
"meta": {
210+
"page": 0,
211+
"page_size": 50,
212+
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=twilio-approved&IsoCountry=AU&ValidUntilDate%3C=2022-11-29T23%3A59%3A59Z&NumberType=mobile&PageSize=50&Page=0",
213+
"previous_page_url": null,
214+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=twilio-approved&IsoCountry=AU&ValidUntilDate%3C=2022-11-29T23%3A59%3A59Z&NumberType=mobile&PageSize=50&Page=0",
215+
"next_page_url": null,
216+
"key": "results"
217+
}
218+
}
219+
'''
220+
))
221+
222+
actual = self.client.numbers.v2.regulatory_compliance \
223+
.bundles.list()
224+
225+
self.assertIsNotNone(actual)
226+
227+
def test_read_approved_japan_tollfree_date_between_response(self):
228+
self.holodeck.mock(Response(
229+
200,
230+
'''
231+
{
232+
"results": [
233+
{
234+
"sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
235+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
236+
"regulation_sid": "RNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
237+
"friendly_name": "friendly_name",
238+
"status": "twilio-approved",
239+
"email": "email",
240+
"status_callback": "http://www.example.com",
241+
"valid_until": "2022-11-29T01:00:00Z",
242+
"date_created": "2021-08-30T22:29:24Z",
243+
"date_updated": "2021-08-31T01:09:00Z",
244+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
245+
"links": {
246+
"evaluations": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Evaluations",
247+
"item_assignments": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ItemAssignments",
248+
"bundle_copies": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles/BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Copies"
249+
}
250+
}
251+
],
252+
"meta": {
253+
"page": 0,
254+
"page_size": 50,
255+
"first_page_url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=twilio-approved&IsoCountry=JP&ValidUntilDate%3E=2022-01-01T00%3A00%3A00Z&ValidUntilDate%3C=2022-11-29T23%3A59%3A59Z&NumberType=tollfree&PageSize=50&Page=0",
256+
"previous_page_url": null,
257+
"url": "https://numbers.twilio.com/v2/RegulatoryCompliance/Bundles?Status=twilio-approved&IsoCountry=JP&ValidUntilDate%3E=2022-01-01T00%3A00%3A00Z&ValidUntilDate%3C=2022-11-29T23%3A59%3A59Z&NumberType=tollfree&PageSize=50&Page=0",
129258
"next_page_url": null,
130259
"key": "results"
131260
}

0 commit comments

Comments
 (0)