8000 [Librarian] Regenerated @ 3e392763ec519734b6b7af8a2e5b295f2e08177c · githubib/twilio-python@001c744 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 001c744

Browse files
committed
[Librarian] Regenerated @ 3e392763ec519734b6b7af8a2e5b295f2e08177c
1 parent 153020a commit 001c744

File tree

23 files changed

+360
-94
lines changed

23 files changed

+360
-94
lines changed

CHANGES.md

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

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

6+
[2019-12-12] Version 6.35.0
7+
---------------------------
8+
**Library**
9+
- [PR #500](https://github.com/twilio/twilio-python/pull/500): feat: support http proxy in TwilioHttpClient. Thanks to [@thehackercat](https://github.com/thehackercat)!
10+
11+
**Api**
12+
- Make `twiml` conditional for create. One of `url`, `twiml`, or `application_sid` is now required.
13+
- Add `bundle_sid` parameter to /IncomingPhoneNumbers API
14+
- Removed discard / obfuscate parameters from ContentRetention, AddressRetention **(breaking change)**
15+
16+
**Chat**
17+
- Added `last_consumed_message_index` and `last_consumption_timestamp` parameters in update method for UserChannel resource **(breaking change)**
18+
19+
**Conversations**
20+
- Add Participant SID to Message properties
21+
22+
**Messaging**
23+
- Fix incorrectly typed capabilities property for ShortCodes. **(breaking change)**
24+
25+
626
[2019-12-04] Version 6.34.0
727
---------------------------
828
**Library**

tests/integration/api/v2010/account/incoming_phone_number/test_local.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def test_read_full_response(self):
6767
"voice_fallback_method": "POST",
6868
"voice_fallback_url": null,
6969
"voice_method": "POST",
70-
"voice_url": null
70+
"voice_url": null,
71+
"emergency_status": "Active",
72+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7174
}
7275
],
7376
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Local.json?PageSize=1&Page=2",
@@ -168,7 +171,10 @@ def test_create_response(self):
168171
"voice_fallback_method": "POST",
169172
"voice_fallback_url": null,
170173
"voice_method": "POST",
171-
"voice_url": null
174+
"voice_url": null,
175+
"emergency_status": "Active",
176+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
172178
}
173179
'''
174180
))

tests/integration/api/v2010/account/incoming_phone_number/test_mobile.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def test_read_full_response(self):
6767
"voice_fallback_method": "POST",
6868
"voice_fallback_url": null,
6969
"voice_method": "POST",
70-
"voice_url": null
70+
"voice_url": null,
71+
"emergency_status": "Active",
72+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7174
}
7275
],
7376
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/Mobile.json?Page=0&PageSize=50",
@@ -168,7 +171,10 @@ def test_create_response(self):
168171
"voice_fallback_method": "POST",
169172
"voice_fallback_url": null,
170173
"voice_method": "POST",
171-
"voice_url": null
174+
"voice_url": null,
175+
"emergency_status": "Active",
176+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
172178
}
173179
'''
174180
))

tests/integration/api/v2010/account/incoming_phone_number/test_toll_free.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,10 @@ def test_read_full_response(self):
6767
"voice_fallback_method": "POST",
6868
"voice_fallback_url": null,
6969
"voice_method": "POST",
70-
"voice_url": null
70+
"voice_url": null,
71+
"emergency_status": "Active",
72+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
73+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
7174
}
7275
],
7376
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers/TollFree.json?PageSize=1&Page=2",
@@ -168,7 +171,10 @@ def test_create_response(self):
168171
"voice_fallback_method": "POST",
169172
"voice_fallback_url": null,
170173
"voice_method": "POST",
171-
"voice_url": null
174+
"voice_url": null,
175+
"emergency_status": "Active",
176+
"emergency_address_sid": "ADaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
177+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
172178
}
173179
'''
174180
))

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

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ def test_update_response(self):
6464
"voice_fallback_method": "POST",
6565
"voice_fallback_url": null,
6666
"voice_method": "POST",
67-
"voice_url": null
67+
"voice_url": null,
68+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
6869
}
6970
'''
7071
))
@@ -124,7 +125,8 @@ def test_fetch_response(self):
124125
"voice_fallback_method": "POST",
125126
"voice_fallback_url": null,
126127
"voice_method": "POST",
127-
"voice_url": null
128+
"voice_url": null,
129+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
128130
}
129131
'''
130132
))
@@ -211,7 +213,8 @@ def test_read_full_response(self):
211213
"voice_fallback_method": "POST",
212214
"voice_fallback_url": null,
213215
"voice_method": "POST",
214-
"voice_url": null
216+
"voice_url": null,
217+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
215218
}
216219
],
217220
"last_page_uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/IncomingPhoneNumbers.json?PageSize=1&Page=2",
@@ -308,7 +311,8 @@ def test_create_response(self):
308311
"voice_fallback_method": "POST",
309312
"voice_fallback_url": null,
310313
"voice_method": "POST",
311-
"voice_url": null
314+
"voice_url": null,
315+
"bundle_sid": "BUaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
312316
}
313317
'''
314318
))

tests/integration/chat/v2/service/user/test_user_channel.py

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,14 @@ def test_update_request(self):
167167
with self.assertRaises(TwilioException):
168168
self.client.chat.v2.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
169169
.users(sid="USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
170-
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(notification_level="default")
171-
172-
values = {'NotificationLevel': "default", }
170+
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
173171

174172
self.holodeck.assert_has_request(Request(
175173
'post',
176174
'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
177-
data=values,
178175
))
179176

180-
def test_update_response(self):
177+
def test_update_notification_level_response(self):
181178
self.holodeck.mock(Response(
182179
200,
183180
'''
@@ -202,6 +199,35 @@ def test_update_response(self):
202199

203200
actual = self.client.chat.v2.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
204201
.users(sid="USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
205-
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(notification_level="default")
202+
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
203+
204+
self.assertIsNotNone(actual)
205+
206+
def test_update_last_consumed_message_index_response(self):
207+
self.holodeck.mock(Response(
208+
200,
209+
'''
210+
{
211+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
212+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
213+
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
214+
"user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
215+
"member_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
216+
"status": "joined",
217+
"last_consumed_message_index": 10,
218+
"unread_messages_count": 5,
219+
"notification_level": "muted",
220+
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
221+
"links": {
222+
"channel": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
223+
"member": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
224+
}
225+
}
226+
'''
227+
))
228+
229+
actual = self.client.chat.v2.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
230+
.users(sid="USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
231+
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
206232

207233
self.assertIsNotNone(actual)

tests/integration/conversations/v1/conversation/test_message.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def test_create_response(self):
3939
"body": "Hello",
4040
"media": null,
4141
"author": "message author",
42+
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4243
"attributes": "{ \\"importance\\": \\"high\\" }",
4344
"date_created": "2015-12-16T22:18:37Z",
4445
"date_updated": "2015-12-16T22:18:38Z",
@@ -71,6 +72,7 @@ def test_create_with_media_response(self):
7172
}
7273
],
7374
"author": "message author",
75+
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7476
"attributes": "{ \\"importance\\": \\"high\\" }",
7577
"date_created": "2015-12-16T22:18:37Z",
7678
"date_updated": "2015-12-16T22:18:38Z",
@@ -110,6 +112,7 @@ def test_update_response(self):
110112
"body": "Hello",
111113
"media": null,
112114
"author": "message author",
115+
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
113116
"attributes": "{ \\"importance\\": \\"high\\" }",
114117
"date_created": "2015-12-16T22:18:37Z",
115118
"date_updated": "2015-12-16T22:18:38Z",
@@ -172,6 +175,7 @@ def test_fetch_response(self):
172175
"body": "Welcome!",
173176
"media": null,
174177
"author": "system",
178+
"participant_sid": null,
175179
"attributes": "{ \\"importance\\": \\"high\\" }",
176180
"date_created": "2016-03-24T20:37:57Z",
177181
"date_updated": "2016-03-24T20:37:57Z",
@@ -220,6 +224,7 @@ def test_read_full_response(self):
220224
"body": "I like pie.",
221225
"media": null,
222226
"author": "pie_preferrer",
227+
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
223228
"attributes": "{ \\"importance\\": \\"high\\" }",
224229
"date_created": "2016-03-24T20:37:57Z",
225230
"date_updated": "2016-03-24T20:37:57Z",
@@ -233,6 +238,7 @@ def test_read_full_response(self):
233238
"body": "Cake is my favorite!",
234239
"media": null,
235240
"author": "cake_lover",
241+
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
236242
"attributes": "{ \\"importance\\": \\"high\\" }",
237243
"date_created": "2016-03-24T20:38:21Z",
238244
"date_updated": "2016-03-24T20:38:21Z",
@@ -253,6 +259,7 @@ def test_read_full_response(self):
253259
}
254260
],
255261
"author": "cake_lover",
262+
"participant_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
256263
"attributes": "{ \\"importance\\": \\"high\\" }",
257264
"date_created": "2016-03-24T20:38:21Z",
258265
"date_updated": "2016-03-24T20:38:21Z",

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,7 @@ def test_read_response(self):
8383
},
8484
"client_edge": null,
8585
"carrier_edge": null,
86-
"sip_edge": null,
87-
"gateway": null,
88-
"client": null
86+
"sip_edge": null
8987
}
9088
]
9189
}
@@ -154,9 +152,7 @@ def test_read_deep_response(self):
154152
},
155153
"client_edge": null,
156154
"carrier_edge": null,
157-
"sip_edge": null,
158-
"gateway": null,
159-
"client": null
155+
"sip_edge": null
160156
}
161157
]
162158
}

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

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,7 @@ def test_read_response(self):
7777
},
7878
"client_edge": null,
7979
"carrier_edge": null,
80-
"sip_edge": null,
81-
"gateway": null,
82-
"client": null
80+
"sip_edge": null
8381
}
8482
]
8583
}
@@ -142,9 +140,7 @@ def test_read_full_response(self):
142140
},
143141
"client_edge": null,
144142
"carrier_edge": null,
145-
"sip_edge": null,
146-
"gateway": null,
147-
"client": null
143+
"sip_edge": null
148144
}
149145
]
150146
}

tests/integration/ip_messaging/v2/service/user/test_user_channel.py

Lines changed: 32 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,17 +167,14 @@ def test_update_request(self):
167167
with self.assertRaises(TwilioException):
168168
self.client.ip_messaging.v2.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
169169
.users(sid="USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
170-
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(notification_level="default")
171-
172-
values = {'NotificationLevel': "default", }
170+
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
173171

174172
self.holodeck.assert_has_request(Request(
175173
'post',
176174
'https://chat.twilio.com/v2/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Channels/CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
177-
data=values,
178175
))
179176

180-
def test_update_response(self):
177+
def test_update_notification_level_response(self):
181178
self.holodeck.mock(Response(
182179
200,
183180
'''
@@ -202,6 +199,35 @@ def test_update_response(self):
202199

203200
actual = self.client.ip_messaging.v2.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
204201
.users(sid="USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
205-
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(notification_level="default")
202+
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
203+
204+
self.assertIsNotNone(actual)
205+
206+
def test_update_last_consumed_message_index_response(self):
207+
self.holodeck.mock(Response(
208+
200,
209+
'''
210+
{
211+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
212+
"service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
213+
"channel_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
214+
"user_sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
215+
"member_sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
216+
"status": "joined",
217+
"last_consumed_message_index": 10,
218+
"unread_messages_count": 5,
219+
"notification_level": "muted",
220+
"url": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
221+
"links": {
222+
"channel": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
223+
"member": "https://chat.twilio.com/v2/Services/ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Channels/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Members/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
224+
}
225+
}
226+
'''
227+
))
228+
229+
actual = self.client.ip_messaging.v2.services(sid="ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
230+
.users(sid="USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
231+
.user_channels(channel_sid="CHXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
206232

207233
self.assertIsNotNone(actual)

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

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@ def test_create_response(self):
4141
"date_updated": "2015-07-30T20:12:33Z",
4242
"short_code": "12345",
4343
"country_code": "US",
44-
"capabilities": [],
44+
"capabilities": [
45+
"SMS"
46+
],
4547
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
4648
}
4749
'''
@@ -110,7 +112,9 @@ def test_read_full_response(self):
110112
"date_updated": "2015-07-30T20:12:33Z",
111113
"short_code": "12345",
112114
"country_code": "US",
113-
"capabilities": [],
115+
"capabilities": [
116+
"SMS"
117+
],
114118
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
115119
}
116120
]
@@ -147,7 +151,9 @@ def test_fetch_response(self):
147151
"date_updated": "2015-07-30T20:12:33Z",
148152
"short_code": "12345",
149153
"country_code": "US",
150-
"capabilities": [],
154+
"capabilities": [
155+
"SMS"
156+
],
151157
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ShortCodes/SCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
152158
}
153159
'''

0 commit comments

Comments
 (0)
0