10000 [Librarian] Regenerated @ ee964c66599ebcd125eb411ba410bde1e62b3503 · dialex-com/twilio-python@ea05bbf · GitHub
[go: up one dir, main page]

Skip to content

Commit ea05bbf

Browse files
committed
[Librarian] Regenerated @ ee964c66599ebcd125eb411ba410bde1e62b3503
1 parent cae59ba commit ea05bbf

File tree

43 files changed

+2917
-400
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2917
-400
lines changed

CHANGES.md

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

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

6+
[2020-03-04] Version 6.36.0
7+
---------------------------
8+
**Library - Feature**
9+
- [PR #507](https://github.com/twilio/twilio-python/pull/507): add new max_retries param to TwilioHttpClient. Thanks to [@msaelices](https://github.com/msaelices)!
10+
11+
**Authy**
12+
- Added the `configuration` property to services to return the service level configurations
13+
- Added optional parameter `Push` when creating a service to send the service level push factor configuration
14+
- Remove FactorStrength support for Factors and Challenges **(breaking change)**
15+
16+
**Messaging**
17+
- Correct the alpha sender capabilities property type **(breaking change)**
18+
19+
**Preview**
20+
- Removed `/Devices` register Branded Calls endpoint, as per iOS sample app deprecation **(breaking change)**
21+
- Removed `Twilio-Sandbox-Mode` request header from the Branded Calls endpoints, as not officially supported **(breaking change)**
22+
- Removed `Verify` version from `preview` subdomain in favor to `verify` subdomain. **(breaking change)**
23+
24+
**Serverless**
25+
- Add UI-Editable field to Services
26+
27+
**Supersim**
28+
- Add `inactive` status for Super SIM which is an alias for `deactivated`
29+
30+
**Taskrouter**
31+
- Adding value range to `priority` in task endpoint
32+
33+
**Verify**
34+
- Fix `SendCodeAttempts` type. It's an array of objects instead of a unique object. **(breaking change)**
35+
36+
637
[2020-02-19] Version 6.35.5
738
---------------------------
839
**Api**

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def test_update_request(self):
6969

7070
def test_collect_credit_card_number_response(self):
7171
self.holodeck.mock(Response(
72-
202,
72+
200,
7373
'''
7474
{
7575
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -90,7 +90,7 @@ def test_collect_credit_card_number_response(self):
9090

9191
def test_collect_credit_card_expiry_date_response(self):
9292
self.holodeck.mock(Response(
93-
202,
93+
200,
9494
'''
9595
{
9696
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -111,7 +111,7 @@ def test_collect_credit_card_expiry_date_response(self):
111111

112112
def test_complete_payment_response(self):
113113
self.holodeck.mock(Response(
114-
202,
114+
200,
115115
'''
116116
{
117117
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ def test_update_request(self):
414414

415415
def test_update_response(self):
416416
self.holodeck.mock(Response(
417-
202,
417+
200,
418418
'''
419419
{
420420
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",

tests/integration/authy/v1/service/entity/factor/test_challenge.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ def test_create_response(self):
4949
"responded_reason": "none",
5050
"details": "Hi! Mr. John Doe, would you like to sign up?",
5151
"hidden_details": "Hidden details about the sign up",
52-
"factor_strength": "low",
5352
"factor_type": "sms",
5453
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
5554
}
@@ -127,7 +126,6 @@ def test_fetch_sid_response(self):
127126
"responded_reason": "none",
128127
"details": "details",
129128
"hidden_details": "hidden_details",
130-
"factor_strength": "low",
131129
"factor_type": "sms",
132130
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
133131
}
@@ -160,7 +158,6 @@ def test_fetch_latest_response(self):
160158
"responded_reason": "none",
161159
"details": "details",
162160
"hidden_details": "hidden_details",
163-
"factor_strength": "low",
164161
"factor_type": "sms",
165162
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
166163
}
@@ -209,7 +206,6 @@ def test_verify_sid_response(self):
209206
"responded_reason": "none",
210207
"details": "Hi! Mr. John Doe, would you like to sign up?",
211208
"hidden_details": "Hidden details about the sign up",
212-
"factor_strength": "low",
213209
"factor_type": "sms",
214210
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
215211
}
@@ -242,7 +238,6 @@ def test_verify_latest_response(self):
242238
"responded_reason": "none",
243239
"details": "Hi! Mr. John Doe, would you like to sign up?",
244240
"hidden_details": "Hidden details about the sign up",
245-
"factor_strength": "low",
246241
"factor_type": "sms",
247242
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
248243
}

tests/integration/authy/v1/service/entity/test_factor.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ def test_create_response(self):
5050
"date_updated": "2015-07-30T20:00:00Z",
5151
"friendly_name": "friendly_name",
5252
"status": "unverified",
53-
"factor_strength": "low",
5453
"factor_type": "sms",
5554
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5655
"links": {
@@ -122,7 +121,6 @@ def test_fetch_response(self):
122121
"date_updated": "2015-07-30T20:00:00Z",
123122
"friendly_name": "friendly_name",
124123
"status": "unverified",
125-
"factor_strength": "low",
126124
"factor_type": "sms",
127125
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
128126
"links": {
@@ -194,7 +192,6 @@ def test_read_full_response(self):
194192
"date_updated": "2015-07-30T20:00:00Z",
195193
"friendly_name": "friendly_name",
196194
"status": "unverified",
197-
"factor_strength": "low",
198195
"factor_type": "sms",
199196
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
200197
"links": {
@@ -250,7 +247,6 @@ def test_verify_response(self):
250247
"date_updated": "2015-07-30T20:00:00Z",
251248
"friendly_name": "friendly_name",
252249
"status": "verified",
253-
"factor_strength": "low",
254250
"factor_type": "sms",
255251
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
256252
"links": {

tests/integration/authy/v1/test_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ def test_create_response(self):
4444
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4545
"date_created": "2015-07-30T20:00:00Z",
4646
"date_updated": "2015-07-30T20:00:00Z",
47+
"configuration": {},
4748
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4849
"links": {
4950
"entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
@@ -102,6 +103,7 @@ def test_fetch_response(self):
102103
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
103104
"date_created": "2015-07-30T20:00:00Z",
104105
"date_updated": "2015-07-30T20:00:00Z",
106+
"configuration": {},
105107
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
106108
"links": {
107109
"entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
@@ -162,6 +164,7 @@ def test_read_full_response(self):
162164
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
163165
"date_created": "2015-07-30T20:00:00Z",
164166
"date_updated": "2015-07-30T20:00:00Z",
167+
"configuration": {},
165168
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
166169
"links": {
167170
"entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"
@@ -208,6 +211,7 @@ def test_update_response(self):
208211
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
209212
"date_created": "2015-07-30T20:00:00Z",
210213
"date_updated": "2015-07-30T20:00:00Z",
214+
"configuration": {},
211215
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
212216
"links": {
213217
"entities": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities"

tests/integration/messaging/v1/service/test_alpha_sender.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ def test_create_response(self):
4040
"date_created": "2015-07-30T20:12:31Z",
4141
"date_updated": "2015-07-30T20:12:33Z",
4242
"alpha_sender": "Twilio",
43-
"capabilities": [],
43+
"capabilities": [
44+
"SMS"
45+
],
4446
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders/AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
4547
}
4648
'''
@@ -85,7 +87,9 @@ def test_read_full_response(self):
8587
"date_created": "2015-07-30T20:12:31Z",
8688
"date_updated": "2015-07-30T20:12:33Z",
8789
"alpha_sender": "Twilio",
88-
"capabilities": [],
90+
"capabilities": [
91+
"SMS"
92+
],
8993
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders/AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
9094
}
9195
]
@@ -121,7 +125,9 @@ def test_fetch_response(self):
121125
"date_created": "2015-07-30T20:12:31Z",
122126
"date_updated": "2015-07-30T20:12:33Z",
123127
"alpha_sender": "Twilio",
124-
"capabilities": [],
128+
"capabilities": [
129+
"SMS"
130+
],
125131
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AlphaSenders/AIaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
126132
}
127133
'''

tests/integration/preview/bulk_exports/export/test_day.py

Lines changed: 61 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@
1414

1515
class DayTestCase(IntegrationTestCase):
1616

17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.preview.bulk_exports.exports("resource_type") \
22+
.days("day").fetch()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://preview.twilio.com/BulkExports/Exports/resource_type/Days/day',
27+
))
28+
29+
def test_fetch_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"redirect_to": "https://com.twilio.dev-us1.exports.s3.amazonaws.com/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
35+
}
36+
'''
37+
))
38+
39+
actual = self.client.preview.bulk_exports.exports("resource_type") \
40+
.days("day").fetch()
41+
42+
self.assertIsNotNone(actual)
43+
1744
def test_list_request(self):
1845
self.holodeck.mock(Response(500, ''))
1946

@@ -26,26 +53,52 @@ def test_list_request(self):
2653
'https://preview.twilio.com/BulkExports/Exports/resource_type/Days',
2754
))
2855

29-
def test_read_response(self):
56+
def test_read_empty_response(self):
57+
self.holodeck.mock(Response(
58+
200,
59+
'''
60+
{
61+
"days": [],
62+
"meta": {
63+
"page": 0,
64+
"page_size": 50,
65+
"first_page_url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
66+
"previous_page_url": null,
67+
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
68+
"next_page_url": null,
69+
"key": "days"
70+
}
71+
}
72+
'''
73+
))
74+
75+
actual = self.client.preview.bulk_exports.exports("resource_type") \
76+
.days.list()
77+
78+
self.assertIsNotNone(actual)
79+
80+
def test_read_full_response(self):
3081
self.holodeck.mock(Response(
3182
200,
3283
'''
3384
{
3485
"days": [
3586
{
36-
"day": "2017-05-01",
37-
"size": 1234,
38-
"resource_type": "Calls"
87+
"day": "2017-04-01",
88+
"size": 100,
89+
"resource_type": "Calls",
90+
"create_date": "2017-04-02",
91+
"friendly_name": "friendly_name"
3992
}
4093
],
4194
"meta": {
42-
"key": "days",
43-
"page_size": 50,
44-
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
4595
"page": 0,
96+
"page_size": 50,
4697
"first_page_url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
4798
"previous_page_url": null,
48-
"next_page_url": null
99+
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Days?PageSize=50&Page=0",
100+
"next_page_url": null,
101+
"key": "days"
49102
}
50103
}
51104
'''

tests/integration/preview/trusted_comms/test_branded_call.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,10 @@ def test_create_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.preview.trusted_comms.branded_calls.create(from_="from", to="to", reason="reason", twilio_sandbox_mode="twilio_sandbox_mode")
21+
self.client.preview.trusted_comms.branded_calls.create(from_="from", to="to", reason="reason")
2222

2323
values = {'From': "from", 'To': "to", 'Reason': "reason", }
2424

25-
headers = {'Twilio-Sandbox-Mode': "twilio_sandbox_mode", }
26-
self.holodeck.assert_has_request(Request(
27-
'post',
28-
'https://preview.twilio.com/TrustedComms/Business/BrandedCalls',
29-
headers=headers,
30-
))
3125
self.holodeck.assert_has_request(Request(
3226
'post',
3327
'https://preview.twilio.com/TrustedComms/Business/BrandedCalls',

tests/integration/preview/trusted_comms/test_cps.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,9 @@ def test_fetch_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.preview.trusted_comms.cps().fetch(twilio_sandbox_mode="twilio_sandbox_mode", x_xcnam_sensitive_phone_number="x_xcnam_sensitive_phone_number")
21+
self.client.preview.trusted_comms.cps().fetch(x_xcnam_sensitive_phone_number="x_xcnam_sensitive_phone_number")
2222

23-
headers = {
24-
'Twilio-Sandbox-Mode': "twilio_sandbox_mode",
25-
'X-Xcnam-Sensitive-Phone-Number': "x_xcnam_sensitive_phone_number",
26-
}
23+
headers = {'X-Xcnam-Sensitive-Phone-Number': "x_xcnam_sensitive_phone_number", }
2724
self.holodeck.assert_has_request(Request(
2825
'get',
2926
'https://preview.twilio.com/TrustedComms/CPS',

tests/integration/preview/trusted_comms/test_current_call.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@ def test_fetch_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.preview.trusted_comms.current_calls().fetch(twilio_sandbox_mode="twilio_sandbox_mode", x_xcnam_sensitive_phone_number_from="x_xcnam_sensitive_phone_number_from", x_xcnam_sensitive_phone_number_to="x_xcnam_sensitive_phone_number_to")
21+
self.client.preview.trusted_comms.current_calls().fetch(x_xcnam_sensitive_phone_number_from="x_xcnam_sensitive_phone_number_from", x_xcnam_sensitive_phone_number_to="x_xcnam_sensitive_phone_number_to")
2222

2323
headers = {
24-
'Twilio-Sandbox-Mode': "twilio_sandbox_mode",
2524
'X-Xcnam-Sensitive-Phone-Number-From': "x_xcnam_sensitive_phone_number_from",
2625
'X-Xcnam-Sensitive-Phone-Number-To': "x_xcnam_sensitive_phone_number_to",
2726
}

0 commit comments

Comments
 (0)
0