8000 [Librarian] Regenerated @ d93b125feef8f080ce53c51ce6f0297da3413bab · dialex-com/twilio-python@e03d15e · GitHub
[go: up one dir, main page]

Skip to content

Commit e03d15e

Browse files
committed
[Librarian] Regenerated @ d93b125feef8f080ce53c51ce6f0297da3413bab
1 parent 09f30a0 commit e03d15e

File tree

34 files changed

+2971
-24
lines changed

34 files changed

+2971
-24
lines changed

CHANGES.md

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

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

B41A 6+
[2020-04-01] Version 6.38.0
7+
---------------------------
8+
**Api**
9+
- Add optional 'secure' parameter to SIP Domain
10+
11+
**Authy**
12+
- Added an endpoint to list the challenges of a factor
13+
- Added optional parameter `Push` when updating a service to send the service level push factor configuration
14+
15+
**Bulkexports**
16+
- exposing bulk exports (vault/slapchop) API as public beta API
17+
18+
**Flex**
19+
- Adding `queue_stats_configuration` and `wfm_integrations` to Flex Configuration
20+
21+
**Serverless**
22+
- Add Function Version Content endpoint
23+
- Allow build_sid to be optional for deployment requests
24+
25+
**Supersim**
26+
- Remove `deactivated` status for Super SIM which is replaced by `inactive` **(breaking change)**
27+
28+
629
[2020-03-18] Version 6.37.0
730
---------------------------
831
**Api**

tests/integration/api/v2010/account/sip/test_domain.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def test_read_full_response(self):
5454
"voice_status_callback_method": "POST",
5555
"voice_status_callback_url": null,
5656
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
57-
"emergency_calling_enabled": true
57+
"emergency_calling_enabled": true,
58+
"secure": true
5859
}
5960
],
6061
"start": 0,
@@ -140,7 +141,8 @@ def test_create_response(self):
140141
"voice_status_callback_method": "POST",
141142
"voice_status_callback_url": null,
142143
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
143-
"emergency_calling_enabled": true
144+
"emergency_calling_enabled": true,
145+
"secure": true
144146
}
145147
'''
146148
))
@@ -189,7 +191,8 @@ def test_fetch_response(self):
189191
"voice_status_callback_method": "POST",
190192
"voice_status_callback_url": null,
191193
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
192-
"emergency_calling_enabled": true
194+
"emergency_calling_enabled": true,
195+
"secure": true
193196
}
194197
'''
195198
))
@@ -238,7 +241,8 @@ def test_update_response(self):
238241
"voice_status_callback_method": "POST",
239242
"voice_status_callback_url": null,
240243
"voice_url": "https://dundermifflin.example.com/twilio/app.php",
241-
"emergency_calling_enabled": true
244+
"emergency_calling_enabled": true,
245+
"secure": true
242246
}
243247
'''
244248
))

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

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,93 @@ def test_fetch_latest_response(self):
171171

172172
self.assertIsNotNone(actual)
173173

174+
def test_list_request(self):
175+
self.holodeck.mock(Response(500, ''))
176+
177+
with self.assertRaises(TwilioException):
178+
self.client.authy.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
179+
.entities("identity") \
180+
.factors("YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
181+
.challenges.list(twilio_authy_sandbox_mode="twilio_authy_sandbox_mode")
182+
183+
headers = {'Twilio-Authy-Sandbox-Mode': "twilio_authy_sandbox_mode", }
184+
self.holodeck.assert_has_request(Request(
185+
'get',
186+
'https://authy.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors/YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Challenges',
187+
headers=headers,
188+
))
189+
190+
def test_read_empty_response(self):
191+
self.holodeck.mock(Response(
192+
200,
193+
'''
194+
{
195+
"challenges": [],
196+
"meta": {
197+
"page": 0,
198+
"page_size": 50,
199+
"first_page_url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges?PageSize=50&Page=0",
200+
"previous_page_url": null,
201+
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges?PageSize=50&Page=0",
202+
"next_page_url": null,
203+
"key": "challenges"
204+
}
205+
}
206+
'''
207+
))
208+
209+
actual = self.client.authy.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
210+
.entities("identity") \
211+
.factors("YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
212+
.challenges.list()
213+
214+
self.assertIsNotNone(actual)
215+
216+
def test_read_full_response(self):
217+
self.holodeck.mock(Response(
218+
200,
219+
'''
220+
{
221+
"challenges": [
222+
{
223+
"sid": "YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
224+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
225+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
226+
"entity_sid": "YEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
227+
"identity": "ff483d1ff591898a9942916050d2ca3f",
228+
"factor_sid": "YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
229+
"date_created": "2015-07-30T20:00:00Z",
230+
"date_updated": "2015-07-30T20:00:00Z",
231+
"date_responded": "2015-07-30T20:00:00Z",
232+
"expiration_date": "2015-07-30T20:00:00Z",
233+
"status": "pending",
234+
"responded_reason": "none",
235+
"details": "details",
236+
"hidden_details": "hidden_details",
237+
"factor_type": "sms",
238+
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges/YCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
239+
}
240+
],
241+
"meta": {
242+
"page": 0,
243+
"page_size": 50,
244+
"first_page_url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges?PageSize=50&Page=0",
245+
"previous_page_url": null,
246+
"url": "https://authy.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Entities/ff483d1ff591898a9942916050d2ca3f/Factors/YFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Challenges?PageSize=50&Page=0",
247+
"next_page_url": null,
248+
"key": "challenges"
249+
}
250+
}
251+
'''
252+
))
253+
254+
actual = self.client.authy.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
255+
.entities("identity") \
256+
.factors("YFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
257+
.challenges.list()
258+
259+
self.assertIsNotNone(actual)
260+
174261
def test_update_request(self):
175262
self.holodeck.mock(Response(500, ''))
176263

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: 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: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
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 DayTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.bulkexports.v1.exports("resource_type") \
22+
.days("day").fetch()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://bulkexports.twilio.com/v1/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://api.bulkexports.s3.amazonaws.com/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
35+
}
36+
'''
37+
))
38+
39+
actual = self.client.bulkexports.v1.exports("resource_type") \
40+
.days("day").fetch()
41+
42+
self.assertIsNotNone(actual)
43+
44+
def test_list_request(self):
45+
self.holodeck.mock(Response(500, ''))
46+
47+
with self.assertRaises(TwilioException):
48+
self.client.bulkexports.v1.exports("resource_type") \
49+
.days.list()
50+
51+
self.holodeck.assert_has_request(Request(
52+
'get',
53+
'https://bulkexports.twilio.com/v1/Exports/resource_type/Days',
54+
))
55+
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://bulkexports.twilio.com/v1/Exports/Calls/Days?PageSize=50&Page=0",
66+
"previous_page_url": null,
67+
"url": "https://bulkexports.twilio.com/v1/Exports/Calls/Days?PageSize=50&Page=0",
68+
"next_page_url": null,
69+
"key": "days"
70+
}
71+
}
72+
'''
73+
))
74+
75+
actual = self.client.bulkexports.v1.exports("resource_type") \
76+
.days.list()
77+
78+
self.assertIsNotNone(actual)
79+
80+
def test_read_full_response(self):
81+
self.holodeck.mock(Response(
82+
200,
83+
'''
84+
{
85+
"days": [
86+
{
87+
"day": "2017-04-01",
88+
"size": 100,
89+
"resource_type": "Calls",
90+
"create_date": "2017-04-02",
91+
"friendly_name": "friendly_name"
92+
}
93+
],
94+
"meta": {
95+
"page": 0,
96+
"page_size": 50,
97+
"first_page_url": "https://bulkexports.twilio.com/v1/Exports/Calls/Days?PageSize=50&Page=0",
98+
"previous_page_url": null,
99+
"url": "https://bulkexports.twilio.com/v1/Exports/Calls/Days?PageSize=50&Page=0",
100+
"next_page_url": null,
101+
"key": "days"
102+
}
103+
}
104+
'''
105+
))
106+
107+
actual = self.client.bulkexports.v1.exports("resource_type") \
108+
.days.list()
109+
110+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0