8000 [Librarian] Regenerated @ a61ffef2698621af92e36a6887a9c79e2de2acc1 · thecodeflash/twilio-python@35317d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 35317d4

Browse files
author
Doug Black
committed
[Librarian] Regenerated @ a61ffef2698621af92e36a6887a9c79e2de2acc1
1 parent c510654 commit 35317d4

File tree

18 files changed

+911
-744
lines changed

18 files changed

+911
-744
lines changed

CHANGES.md

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

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

6+
[2017-08-18] Version 6.5.2
< 57AE code>7+
---------------------------
8+
**Api**
9+
- Add VoiceReceiveMode {'voice', 'fax'} option to IncomingPhoneNumber UPDATE requests
10+
11+
**Chat**
12+
- Add channel message media information
13+
- Add service instance message media information
14+
15+
**Preview**
16+
- Removed 'email' from bulk_exports configuration api [bi]. No migration plan needed because api has not been used yet.
17+
- Add AvailableNumbers resource.
18+
19+
**Sync**
20+
- Add support for Service Instance unique names
21+
22+
623
[2017-08-18] Version 6.6.0
724
---------------------------
825
- Add connection pooling. This is enabled by default and will use one Session for all requests

tests/integration/chat/v2/service/channel/test_message.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,43 @@ def test_fetch_response(self):
4444
"attributes": "{}",
4545
"body": "Hello",
4646
"index": 0,
47+
"type": "text",
48+
"media": null,
49+
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
50+
}
51+
'''
52+
))
53+
54+
actual = self.client.chat.v2.services(sid="ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
55+
.channels(sid="CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
56+
.messages(sid="IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
57+
58+
self.assertIsNotNone(actual)
59+
60+
def test_fetch_media_response(self):
61+
self.holodeck.mock(Response(
62+
200,
63+
'''
64+
{
65+
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
66+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
67+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
68+
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
69+
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
70+
"date_created": "2016-03-24T20:37:57Z",
71+
"date_updated": "2016-03-24T20:37:57Z",
72+
"was_edited": false,
73+
"from": "system",
74+
"attributes": "{}",
75+
"body": "Hello",
76+
"index": 0,
77+
"type": "media",
78+
"media": {
79+
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80+
"size": 99999999999999,
81+
"content_type": "application/pdf",
82+
"filename": "hello.pdf"
83+
},
4784
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
4885
}
4986
'''
@@ -90,6 +127,8 @@ def test_create_response(self):
90127
"from": "system",
91128
"body": "Hello",
92129
"index": 0,
130+
"type": "text",
131+
"media": null,
93132
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
94133
}
95134
'''
@@ -118,6 +157,8 @@ def test_create_with_attributes_response(self):
118157
"attributes": "{}",
119158
"body": "Hello",
120159
"index": 0,
160+
"type": "text",
161+
"media": null,
121162
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
122163
}
123164
'''
@@ -170,6 +211,30 @@ def test_read_full_response(self):
170211
"attributes": "{}",
171212
"body": "Hello",
172213
"index": 0,
214+
"type": "text",
215+
"media": null,
216+
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
217+
},
218+
{
219+
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
220+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
221+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
222+
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
223+
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
224+
"date_created": "2016-03-24T20:37:57Z",
225+
"date_updated": "2016-03-24T20:37:57Z",
226+
"was_edited": false,
227+
"from": "system",
228+
"attributes": "{}",
229+
"body": "Hello",
230+
"index": 0,
231+
"type": "media",
232+
"media": {
233+
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
234+
"size": 99999999999999,
235+
"content_type": "application/pdf",
236+
"filename": "hello.pdf"
237+
},
173238
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
174239
}
175240
]
@@ -263,6 +328,8 @@ def test_update_response(self):
263328
"from": "system",
264329
"body": "Hello",
265330
"index": 0,
331+
"type": "text",
332+
"media": null,
266333
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
267334
}
268335
'''

tests/integration/chat/v2/test_service.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ def test_fetch_response(self):
5858
"webhook_filters": [
5959
"webhook_filters"
6060
],
61-
"webhook_method": "webhook_method"
61+
"webhook_method": "webhook_method",
62+
"media": {
63+
"size_limit_mb": 150,
64+
"compatibility_message": "media compatibility message"
65+
}
6266
}
6367
'''
6468
))
@@ -137,7 +141,11 @@ def test_create_response(self):
137141
"webhook_filters": [
138142
"webhook_filters"
139143
],
140-
"webhook_method": "webhook_method"
144+
"webhook_method": "webhook_method",
145+
"media": {
146+
"size_limit_mb": 150,
147+
"compatibility_message": "media compatibility message"
148+
}
141149
}
142150
'''
143151
))
@@ -224,7 +232,11 @@ def test_read_full_response(self):
224232
"webhook_filters": [
225233
"webhook_filters"
226234
],
227-
"webhook_method": "webhook_method"
235+
"webhook_method": "webhook_method",
236+
"media": {
237+
"size_limit_mb": 150,
238+
"compatibility_message": "media compatibility message"
239+
}
228240
}
229241
]
230242
}
@@ -297,7 +309,11 @@ def test_update_response(self):
297309
"webhook_filters": [
298310
"webhook_filters"
299311
],
300-
"webhook_method": "webhook_method"
312+
"webhook_method": "webhook_method",
313+
"media": {
314+
"size_limit_mb": 150,
315+
"compatibility_message": "new media compatibility message"
316+
}
301317
}
302318
'''
303319
))

tests/integration/ip_messaging/v2/service/channel/test_message.py

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,43 @@ def test_fetch_response(self):
4444
"attributes": "{}",
4545
"body": "Hello",
4646
"index": 0,
47+
"type": "text",
48+
"media": null,
49+
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
50+
}
51+
'''
52+
))
53+
54+
actual = self.client.ip_messaging.v2.services(sid="ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
55+
.channels(sid="CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") \
56+
.messages(sid="IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa").fetch()
57+
58+
self.assertIsNotNone(actual)
59+
60+
def test_fetch_media_response(self):
61+
self.holodeck.mock(Response(
62+
200,
63+
'''
64+
{
65+
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
66+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
67+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
68+
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
69+
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
70+
"date_created": "2016-03-24T20:37:57Z",
71+
"date_updated": "2016-03-24T20:37:57Z",
72+
"was_edited": false,
73+
"from": "system",
74+
"attributes": "{}",
75+
"body": "Hello",
76+
"index": 0,
77+
"type": "media",
78+
"media": {
79+
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
80+
"size": 99999999999999,
81+
"content_type": "application/pdf",
82+
"filename": "hello.pdf"
83+
},
4784
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
4885
}
4986
'''
@@ -90,6 +127,8 @@ def test_create_response(self):
90127
"from": "system",
91128
"body": "Hello",
92129
"index": 0,
130+
"type": "text",
131+
"media": null,
93132
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
94133
}
95134
'''
@@ -118,6 +157,8 @@ def test_create_with_attributes_response(self):
118157
"attributes": "{}",
119158
"body": "Hello",
120159
"index": 0,
160+
"type": "text",
161+
"media": null,
121162
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
122163
}
123164
'''
@@ -170,6 +211,30 @@ def test_read_full_response(self):
170211
"attributes": "{}",
171212
"body": "Hello",
172213
"index": 0,
214+
"type": "text",
215+
"media": null,
216+
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
217+
},
218+
{
219+
"sid": "IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
220+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
221+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
222+
"to": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
223+
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
224+
"date_created": "2016-03-24T20:37:57Z",
225+
"date_updated": "2016-03-24T20:37:57Z",
226+
"was_edited": false,
227+
"from": "system",
228+
"attributes": "{}",
229+
"body": "Hello",
230+
"index": 0,
231+
"type": "media",
232+
"media": {
233+
"sid": "MEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
234+
"size": 99999999999999,
235+
"content_type": "application/pdf",
236+
"filename": "hello.pdf"
237+
},
173238
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
174239
}
175240
]
@@ -263,6 +328,8 @@ def test_update_response(self):
263328
"from": "system",
264329
"body": "Hello",
265330
"index": 0,
331+
"type": "text",
332+
"media": null,
266333
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/IMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
267334
}
268335
'''

tests/integration/ip_messaging/v2/test_service.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ def test_fetch_response(self):
5858
"webhook_filters": [
5959
"webhook_filters"
6060
],
61-
"webhook_method": "webhook_method"
61+
"webhook_method": "webhook_method",
62+
"media": {
63+
"size_limit_mb": 150,
64+
"compatibility_message": "media compatibility message"
65+
}
6266
}
6367
'''
6468
))
@@ -137,7 +141,11 @@ def test_create_response(self):
137141
"webhook_filters": [
138142
"webhook_filters"
139143
],
140-
"webhook_method": "webhook_method"
144+
"webhook_method": "webhook_method",
145+
"media": {
146+
"size_limit_mb": 150,
147+
"compatibility_message": "media compatibility message"
148+
}
141149
}
142150
'''
143151
))
@@ -224,7 +232,11 @@ def test_read_full_response(self):
224232
"webhook_filters": [
225233
"webhook_filters"
226234
],
227-
"webhook_method": "webhook_method"
235+
"webhook_method": "webhook_method",
236+
"media": {
237+
"size_limit_mb": 150,
238+
"compatibility_message": "media compatibility message"
239+
}
228240
}
229241
]
230242
}
@@ -297,7 +309,11 @@ def test_update_response(self):
297309
"webhook_filters": [
298310
"webhook_filters"
299311
],
300-
"webhook_method": "webhook_method"
312+
"webhook_method": "webhook_method",
313+
"media": {
314+
"size_limit_mb": 150,
315+
"compatibility_message": "new media compatibility message"
316+
}
301317
}
302318
'''
303319
))

tests/integration/preview/bulk_exports/test_export_configuration.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@ def test_fetch_response(self):
3434
"enabled": true,
3535
"webhook_url": "",
3636
"webhook_method": "",
37-
"resource_type": "Calls",
38-
"email": ""
37+
"resource_type": "Calls"
3938
}
4039
'''
4140
))
@@ -62,7 +61,6 @@ def test_update_response(self):
6261
{
6362
"url": "https://preview.twilio.com/BulkExports/Exports/Calls/Configuration",
6463
"enabled": true,
65-
"email": "bogus@twilio.com",
6664
"webhook_url": "",
6765
"resource_type": "Calls",
6866
"webhook_method": ""

tests/integration/sync/v1/test_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ def test_fetch_response(self):
4040
"maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
4141
},
4242
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
43+
"unique_name": "unique_name",
4344
"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4445
"webhook_url": "http://www.example.com",
4546
"reachability_webhooks_enabled": false,
@@ -99,6 +100,7 @@ def test_create_response(self):
99100
"maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
100101
},
101102
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
103+
"unique_name": "unique_name",
102104
"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
103105
"webhook_url": "http://www.example.com",
104106
"reachability_webhooks_enabled": false,
@@ -171,6 +173,7 @@ def test_read_full_response(self):
171173
"maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
172174
},
173175
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
176+
"unique_name": "unique_name",
174177
"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
175178
"webhook_url": "http://www.example.com",
176179
"reachability_webhooks_enabled": false,
@@ -211,6 +214,7 @@ def test_update_response(self):
211214
"maps": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Maps"
212215
},
213216
"sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
217+
"unique_name": "unique_name",
214218
"url": "https://sync.twilio.com/v1/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
215219
"webhook_url": "http://www.example.com",
216220
"reachability_webhooks_enabled": false,

0 commit comments

Comments
 (0)
0