Skip to content

Commit 2c2128f

Browse files
committed
[Librarian] Regenerated @ 85d420e85461ff1892d00b72852ff7e138514cbc
1 parent 60e0505 commit 2c2128f

File tree

11 files changed

+416
-96
lines changed

11 files changed

+416
-96
lines changed

CHANGES.md

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

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

6+
[2022-07-13] Version 7.11.0
7+
---------------------------
8+
**Library - Fix**
9+
- [PR #611](https://github.com/twilio/twilio-python/pull/611): useragent regrex unit test for RC branch. Thanks to [@claudiachua](https://github.com/claudiachua)!
10+
11+
**Library - Test**
12+
- [PR #610](https://github.com/twilio/twilio-python/pull/610): Adding misc as PR type. Thanks to [@rakatyal](https://github.com/rakatyal)!
13+
14+
**Conversations**
15+
- Allowed to use `identity` as part of Participant's resource **(breaking change)**
16+
17+
**Lookups**
18+
- Remove `enhanced_line_type` from the lookup response **(breaking change)**
19+
20+
**Supersim**
21+
- Add support for `sim_ip_addresses` resource to helper libraries
22+
23+
**Verify**
24+
- Changed summary param `service_sid` to `verify_service_sid` to be consistent with list attempts API **(breaking change)**
25+
- Make `code` optional on Verification check to support `sna` attempts.
26+
27+
628
[2022-06-29] Version 7.10.0
729
---------------------------
830
**Api**

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

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,19 @@ def test_fetch_response(self):
5353
"attributes": {},
5454
"properties": {},
5555
"trust": {},
56-
"annotation": {},
56+
"annotation": {
57+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
58+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
59+
"answered_by": "human",
60+
"connectivity_issue": "invalid_number",
61+
"quality_issues": [
62+
"low_volume"
63+
],
64+
"spam": true,
65+
"call_score": 2,
66+
"comment": "this is a call",
67+
"incident": "https://twilio.zendesk.com/support/tickets/17353089"
68+
},
5769
"url": "https://insights.twilio.com/v1/Voice/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Summary"
5870
}
5971
'''

tests/integration/lookups/v2/test_phone_number.py

Lines changed: 0 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ def test_fetch_response(self):
4040
"sim_swap": null,
4141
"call_forwarding": null,
4242
"live_activity": null,
43-
"enhanced_line_type": null,
4443
"line_type_intelligence": null,
4544
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
4645
}
@@ -68,7 +67,6 @@ def test_fetch_invalid_response(self):
6867
"sim_swap": null,
6968
"call_forwarding": null,
7069
"live_activity": null,
71-
"enhanced_line_type": null,
7270
"line_type_intelligence": null,
7371
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+141599299600"
7472
}
@@ -98,7 +96,6 @@ def test_fetch_caller_name_response(self):
9896
"sim_swap": null,
9997
"call_forwarding": null,
10098
"live_activity": null,
101-
"enhanced_line_type": null,
10299
"line_type_intelligence": null,
103100
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
104101
}
@@ -134,7 +131,6 @@ def test_fetch_sim_swap_response(self):
134131
},
135132
"call_forwarding": null,
136133
"live_activity": null,
137-
"enhanced_line_type": null,
138134
"line_type_intelligence": null,
139135
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
140136
}
@@ -170,7 +166,6 @@ def test_fetch_sim_swap_without_last_sim_swap_date_response(self):
170166
},
171167
"call_forwarding": null,
172168
"live_activity": null,
173-
"enhanced_line_type": null,
174169
"line_type_intelligence": null,
175170
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
176171
}
@@ -206,7 +201,6 @@ def test_fetch_sim_swap_with_false_swapped_response(self):
206201
},
207202
"call_forwarding": null,
208203
"live_activity": null,
209-
"enhanced_line_type": null,
210204
"line_type_intelligence": null,
211205
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
212206
}
@@ -238,7 +232,6 @@ def test_fetch_call_forwarding_response(self):
238232
"error_code": null
239233
},
240234
"live_activity": null,
241-
"enhanced_line_type": null,
242235
"line_type_intelligence": null,
243236
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
244237
}
@@ -280,7 +273,6 @@ def test_fetch_sim_swap_and_call_forwarding_response(self):
280273
"error_code": null
281274
},
282275
"live_activity": null,
283-
"enhanced_line_type": null,
284276
"line_type_intelligence": null,
285277
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
286278
}
@@ -318,7 +310,6 @@ def test_fetch_live_activity_connectivity_response(self):
318310
"roaming_carrier": null,
319311
"error_code": null
320312
},
321-
"enhanced_line_type": null,
322313
"line_type_intelligence": null,
323314
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
324315
}
@@ -360,7 +351,6 @@ def test_fetch_live_activity_porting_response(self):
360351
"roaming_carrier": null,
361352
"error_code": null
362353
},
363-
"enhanced_line_type": null,
364354
"line_type_intelligence": null,
365355
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
366356
}
@@ -403,7 +393,6 @@ def test_fetch_live_activity_roaming_response(self):
403393
},
404394
"error_code": null
405395
},
406-
"enhanced_line_type": null,
407396
"line_type_intelligence": null,
408397
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+447772000001"
409398
}
@@ -414,44 +403,6 @@ def test_fetch_live_activity_roaming_response(self):
414403

415404
self.assertIsNotNone(actual)
416405

417-
def test_fetch_enhanced_line_type_response(self):
418-
self.holodeck.mock(Response(
419-
200,
420-
'''
421-
{
422-
"calling_country_code": "1",
423-
"country_code": "US",
424-
"phone_number": "+14159929960",
425-
"national_format": "(415) 992-9960",
426-
"valid": true,
427-
"validation_errors": null,
428-
"caller_name": null,
429-
"sim_swap": null,
430-
"call_forwarding": null,
431-
"live_activity": null,
432-
"enhanced_line_type": {
433-
"error_code": null,
434-
"mobile_country_code": "240",
435-
"mobile_network_code": "38",
436-
"carrier_name": "Twilio - SMS/MMS-SVR",
437-
"type": "nonFixedVoip"
438-
},
439-
"line_type_intelligence": {
440-
"error_code": null,
441-
"mobile_country_code": "240",
442-
"mobile_network_code": "38",
443-
"carrier_name": "Twilio - SMS/MMS-SVR",
444-
"type": "nonFixedVoip"
445-
},
446-
"url": "https://lookups.twilio.com/v2/PhoneNumbers/+14159929960"
447-
}
448-
'''
449-
))
450-
451-
actual = self.client.lookups.v2.phone_numbers("phone_number").fetch()
452-
453-
self.assertIsNotNone(actual)
454-
455406
def test_fetch_line_type_intelligence_response(self):
456407
self.holodeck.mock(Response(
457408
200,
@@ -467,13 +418,6 @@ def test_fetch_line_type_intelligence_response(self):
467418
"sim_swap": null,
468419
"call_forwarding": null,
469420
"live_activity": null,
470-
"enhanced_line_type": {
471-
"error_code": null,
472-
"mobile_country_code": "240",
473-
"mobile_network_code": "38",
474-
"carrier_name": "Twilio - SMS/MMS-SVR",
475-
"type": "nonFixedVoip"
476-
},
477421
"line_type_intelligence": {
478422
"error_code": null,
479423
"mobile_country_code": "240",
Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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 SimIpAddressTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.sim_ip_addresses.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://supersim.twilio.com/v1/Sims/HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/IpAddresses',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"meta": {
35+
"key": "ip_addresses",
36+
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses?PageSize=50&Page=0",
37+
"next_page_url": null,
38+
"page": 0,
39+
"page_size": 50,
40+
"previous_page_url": null,
41+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses?PageSize=50&Page=0"
42+
},
43+
"ip_addresses": []
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
49+
.sim_ip_addresses.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_read_non_empty_response(self):
54+
self.holodeck.mock(Response(
55+
200,
56+
'''
57+
{
58+
"meta": {
59+
"key": "ip_addresses",
60+
"first_page_url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses?PageSize=50&Page=0",
61+
"next_page_url": null,
62+
"page": 0,
63+
"page_size": 50,
64+
"previous_page_url": null,
65+
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses?PageSize=50&Page=0"
66+
},
67+
"ip_addresses": [
68+
{
69+
"ip_address": "8.8.8.8",
70+
"ip_address_version": "IPv4"
71+
}
72+
]
73+
}
74+
'''
75+
))
76+
77+
actual = self.client.supersim.v1.sims("HSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
78+
.sim_ip_addresses.list()
79+
80+
self.assertIsNotNone(actual)

tests/integration/supersim/v1/test_sim.py

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ def test_create_response(self):
4343
"date_updated": "2015-07-30T20:00:00Z",
4444
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4545
"links": {
46-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
46+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
47+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
4748
}
4849
}
4950
'''
@@ -79,7 +80,8 @@ def test_fetch_response(self):
7980
"date_updated": "2015-07-30T20:00:00Z",
8081
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
8182
"links": {
82-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
83+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
84+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
8385
}
8486
}
8587
'''
@@ -115,7 +117,8 @@ def test_update_unique_name_response(self):
115117
"date_updated": "2015-07-30T20:00:00Z",
116118
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
117119
"links": {
118-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
120+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
121+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
119122
}
120123
}
121124
'''
@@ -140,7 +143,8 @@ def test_update_status_response(self):
140143
"date_updated": "2015-07-30T20:00:00Z",
141144
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
142145
"links": {
143-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
146+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
147+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
144148
}
145149
}
146150
'''
@@ -165,7 +169,8 @@ def test_update_fleet_with_sid_response(self):
165169
"date_updated": "2015-07-30T20:00:00Z",
166170
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
167171
"links": {
168-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
172+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
173+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
169174
}
170175
}
171176
'''
@@ -190,7 +195,8 @@ def test_update_fleet_with_unique_name_response(self):
190195
"date_updated": "2015-07-30T20:00:00Z",
191196
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
192197
"links": {
193-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
198+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
199+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
194200
}
195201
}
196202
'''
@@ -215,7 +221,8 @@ def test_transfer_sim_to_another_account_response(self):
215221
"date_updated": "2015-07-30T20:00:00Z",
216222
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
217223
"links": {
218-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
224+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
225+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
219226
}
220227
}
221228
'''
@@ -285,7 +292,8 @@ def test_read_full_by_fleet_sid_response(self):
285292
"date_updated": "2015-07-30T20:00:00Z",
286293
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
287294
"links": {
288-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
295+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
296+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
289297
}
290298
}
291299
]
@@ -323,7 +331,8 @@ def test_read_full_by_fleet_name_response(self):
323331
"date_updated": "2015-07-30T20:00:00Z",
324332
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
325333
"links": {
326-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
334+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
335+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
327336
}
328337
}
329338
]
@@ -361,7 +370,8 @@ def test_read_by_iccid_response(self):
361370
"date_updated": "2015-07-30T20:00:00Z",
362371
"url": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
363372
"links": {
364-
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods"
373+
"billing_periods": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/BillingPeriods",
374+
"sim_ip_addresses": "https://supersim.twilio.com/v1/Sims/HSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IpAddresses"
365375
}
366376
}
367377
]

0 commit comments

Comments
 (0)