8000 [Librarian] Regenerated @ aba00908e36e80cbd3912ca15e7a713893791637 · PavitraKailash/twilio-python@56ba87c · GitHub
[go: up one dir, main page]

Skip to content

Commit 56ba87c

Browse files
committed
[Librarian] Regenerated @ aba00908e36e80cbd3912ca15e7a713893791637
1 parent 65adee6 commit 56ba87c

Some content is hidden

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

44 files changed

+1533
-538
lines changed

CHANGES.md

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

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

6+
[2020-09-21] Version 6.45.3
7+
---------------------------
8+
**Library - Fix**
9+
- [PR #540](https://github.com/twilio/twilio-python/pull/540): allow API redirect responses. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
10+
11+
**Accounts**
12+
- Add Auth Token rotation API
13+
14+
**Conversations**
15+
- Change resource path for Webhook Configuration
16+
17+
**Events**
18+
- Schemas API get all Schemas names and versions
19+
20+
621
[2020-09-16] Version 6.45.2
722
---------------------------
823
**Conversations**
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/conversations/v1/test_webhook.py renamed to tests/integration/conversations/v1/configuration/test_webhook.py

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

2020
with self.assertRaises(TwilioException):
21-
self.client.conversations.v1.webhooks().fetch()
21+
self.client.conversations.v1.configuration \
22+
.webhooks().fetch()
2223

2324
self.holodeck.assert_has_request(Request(
2425
'get',
25-
'https://conversations.twilio.com/v1/Conversations/Webhooks',
26+
'https://conversations.twilio.com/v1/Configuration/Webhooks',
2627
))
2728

2829
def test_fetch_response(self):
@@ -39,24 +40,26 @@ def test_fetch_response(self):
3940
"onConversationUpdated"
4041
],
4142
"target": "webhook",
42-
"url": "https://conversations.twilio.com/v1/Conversations/Webhooks"
43+
"url": "https://conversations.twilio.com/v1/Configuration/Webhooks"
4344
}
4445
'''
4546
))
4647

47-
actual = self.client.conversations.v1.webhooks().fetch()
48+
actual = self.client.conversations.v1.configuration \
49+
.webhooks().fetch()
4850

4951
self.assertIsNotNone(actual)
5052

5153
def test_update_request(self):
5254
self.holodeck.mock(Response(500, ''))
5355

5456
with self.assertRaises(TwilioException):
55-
self.client.conversations.v1.webhooks().update()
57+
self.client.conversations.v1.configuration \
58+
.webhooks().update()
5659

5760
self.holodeck.assert_has_request(Request(
5861
'post',
59-
'https://conversations.twilio.com/v1/Conversations/Webhooks',
62+
'https://conversations.twilio.com/v1/Configuration/Webhooks',
6063
))
6164

6265
def test_update_response(self):
@@ -72,11 +75,12 @@ def test_update_response(self):
7275
"onConversationUpdated"
7376
],
7477
"target": "webhook",
75-
"url": "https://conversations.twilio.com/v1/Conversations/Webhooks"
78+
"url": "https://conversations.twilio.com/v1/Configuration/Webhooks"
7679
}
7780
'''
7881
))
7982

80-
actual = self.client.conversations.v1.webhooks().update()
83+
actual = self.client.conversations.v1.configuration \
84+
.webhooks().update()
8185

8286
self.assertIsNotNone(actual)
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/conversations/v1/test_notification.py renamed to tests/integration/conversations/v1/service/configuration/test_notification.py

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

2020
with self.assertRaises(TwilioException):
21-
self.client.conversations.v1.notifications("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
21+
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.configuration \
23+
.notifications().update()
2224

2325
self.holodeck.assert_has_request(Request(
2426
'post',
@@ -54,15 +56,19 @@ def test_update_response(self):
5456
'''
5557
))
5658

57-
actual = self.client.conversations.v1.notifications("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
59+
actual = self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
60+
.configuration \
61+
.notifications().update()
5862

5963
self.assertIsNotNone(actual)
6064

6165
def test_fetch_request(self):
6266
self.holodeck.mock(Response(500, ''))
6367

6468
with self.assertRaises(TwilioException):
65-
self.client.conversations.v1.notifications("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
69+
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
70+
.configuration \
71+
.notifications().fetch()
6672

6773
self.holodeck.assert_has_request(Request(
6874
'get',
@@ -98,6 +104,8 @@ def test_fetch_response(self):
98104
'''
99105
))
100106

101-
actual = self.client.conversations.v1.notifications("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
107+
actual = self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
108+
.configuration \
109+
.notifications().fetch()
102110

103111
self.assertIsNotNone(actual)

tests/integration/conversations/v1/test_configuration.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ def test_fetch_response(self):
3737
"default_closed_timer": "PT10M",
3838
"url": "https://conversations.twilio.com/v1/Configuration",
3939
"links": {
40-
"service": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration"
40+
"service": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
41+
"webhooks": "https://conversations.twilio.com/v1/Configuration/Webhooks"
4142
}
4243
}
4344
'''
@@ -70,7 +71,8 @@ def test_update_response(self):
7071
"default_closed_timer": "PT10M",
7172
"url": "https://conversations.twilio.com/v1/Configuration",
7273
"links": {
73-
"service": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration"
74+
"service": "https://conversations.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Configuration",
75+
"webhooks": "https://conversations.twilio.com/v1/Configuration/Webhooks"
7476
}
7577
}
7678
'''
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: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
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 VersionTestCase(IntegrationTestCase):
16+
17+
def test_list_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.events.v1.schemas("id") \
22+
.versions.list()
23+
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://events.twilio.com/v1/Schemas/id/Versions',
27+
))
28+
29+
def test_read_empty_response(self):
30+
self.holodeck.mock(Response(
31+
200,
32+
'''
33+
{
34+
"schema_versions": [],
35+
"meta": {
36+
"page": 0,
37+
"page_size": 10,
38+
"first_page_url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions?PageSize=10&Page=0",
39+
"previous_page_url": null,
40+
"url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions?PageSize=10&Page=0",
41+
"next_page_url": null,
42+
"key": "schema_versions"
43+
}
44+
}
45+
'''
46+
))
47+
48+
actual = self.client.events.v1.schemas("id") \
49+
.versions.list()
50+
51+
self.assertIsNotNone(actual)
52+
53+
def test_read_results_response(self):
54+
self.holodeck.mock(Response(
55+
200,
56+
'''
57+
{
58+
"schema_versions": [
59+
{
60+
"id": "DataTaps.TestEventSchema",
61+
"schema_version": 1,
62+
"date_created": "2015-07-30T20:00:00Z",
63+
"url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions/1",
64+
"raw": "https://events-schemas.twilio.com/DataTaps.TestEventSchema/1"
65+
},
66+
{
67+
"id": "DataTaps.TestEventSchema",
68+
"schema_version": 2,
69+
"date_created": "2015-07-30T20:00:00Z",
70+
"url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions/2",
71+
"raw": "https://events-schemas.twilio.com/DataTaps.TestEventSchema/2"
72+
}
73+
],
74+
"meta": {
75+
"page": 0,
76+
"page_size": 50,
77+
"first_page_url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions?PageSize=50&Page=0",
78+
"previous_page_url": null,
79+
"url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions?PageSize=50&Page=0",
80+
"next_page_url": null,
81+
"key": "schema_versions"
82+
}
83+
}
84+
'''
85+
))
86+
87+
actual = self.client.events.v1.schemas("id") \
88+
.versions.list()
89+
90+
self.assertIsNotNone(actual)
91+
92+
def test_fetch_request(self):
93+
self.holodeck.mock(Response(500, ''))
94+
95+
with self.assertRaises(TwilioException):
96+
self.client.events.v1.schemas("id") \
97+
.versions(1).fetch()
98+
99+
self.holodeck.assert_has_request(Request(
100+
'get',
101+
'https://events.twilio.com/v1/Schemas/id/Versions/1',
102+
))
103+
104+
def test_fetch_response(self):
105+
self.holodeck.mock(Response(
106+
200,
107+
'''
108+
{
109+
"id": "DataTaps.TestEventSchema",
110+
"schema_version": 1,
111+
"date_created": "2015-07-30T20:00:00Z",
112+
"url": "https://events.twilio.com/v1/Schemas/DataTaps.TestEventSchema/Versions/1",
113+
"raw": "https://events-schemas.twilio.com/DataTaps.TestEventSchema/1"
114+
}
115+
'''
116+
))
117+
118+
actual = self.client.events.v1.schemas("id") \
119+
.versions(1).fetch()
120+
121+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0