8000 [Librarian] Regenerated @ 9097051d7a90710f6b2b85350d5cfa9f58bab4e3 · githubib/twilio-python@8344851 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8344851

Browse files
committed
[Librarian] Regenerated @ 9097051d7a90710f6b2b85350d5cfa9f58bab4e3
1 parent a1a611c commit 8344851

Some content is hidden

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

64 files changed

+1061
-842
lines changed

CHANGES.md

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

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

6+
[2019-09-04] Version 6.30.0
7+
----------------------------
8+
**Api**
9+
- Pass Twiml in call update request
10+
11+
**Conversations**
12+
- Add attributes to Conversations resources
13+
14+
**Flex**
15+
- Adding `features_enabled` and `serverless_service_sids` to Flex Configuration
16+
17+
**Messaging**
18+
- Message API required params updated **(breaking change)**
19+
20+
**Preview**
21+
- Added support for the optional `CallSid` to `/BrandedCalls` endpoint
22+
23+
624
[2019-08-21] Version 6.29.4
725
----------------------------
826
**Library**

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

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,3 +338,47 @@ def test_cancel_response(self):
338338
.calls(sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
339339

340340
self.assertIsNotNone(actual)
341+
342+
def test_posttwiml_response(self):
343+
self.holodeck.mock(Response(
344+
200,
345+
'''
346+
{
347+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
348+
"annotation": null,
349+
"answered_by": null,
350+
"api_version": "2010-04-01",
351+
"caller_name": null,
352+
"date_created": "Tue, 31 Aug 2010 20:36:28 +0000",
353+
"date_updated": "Tue, 31 Aug 2010 20:36:44 +0000",
354+
"direction": "inbound",
355+
"duration": "15",
356+
"end_time": "Tue, 31 Aug 2010 20:36:44 +0000",
357+
"forwarded_from": "+141586753093",
358+
"from": "+14158675308",
359+
"from_formatted": "(415) 867-5308",
360+
"group_sid": null,
361+
"parent_call_sid": null,
362+
"phone_number_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
363+
"price": "-0.03000",
364+
"price_unit": "USD",
365+
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
366+
"start_time": "Tue, 31 Aug 2010 20:36:29 +0000",
367+
"status": "canceled",
368+
"subresource_uris": {
369+
"notifications": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Notifications.json",
370+
"recordings": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Recordings.json",
371+
"feedback": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Feedback.json",
372+
"feedback_summaries": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/FeedbackSummary.json"
373+
},
374+
"to": "+14158675309",
375+
"to_formatted": "(415) 867-5309",
376+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Calls/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
377+
}
378+
'''
379+
))
380+
381+
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
382+
.calls(sid="CAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
383+
384+
self.assertIsNotNone(actual)

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

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,42 @@ def test_create_response(self):
6565

6666
self.assertIsNotNone(actual)
6767

68+
def test_create_wo_service_response(self):
69+
self.holodeck.mock(Response(
70+
201,
71+
'''
72+
{
73+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
74+
"api_version": "2010-04-01",
75+
"body": "Hello! \ud83d\udc4d",
76+
"date_created": "Thu, 30 Jul 2015 20:12:31 +0000",
77+
"date_sent": "Thu, 30 Jul 2015 20:12:33 +0000",
78+
"date_updated": "Thu, 30 Jul 2015 20:12:33 +0000",
79+
"direction": "outbound-api",
80+
"error_code": null,
81+
"error_message": null,
82+
"from": "+14155552345",
83+
"messaging_service_sid": null,
84+
"num_media": "0",
85+
"num_segments": "1",
86+
"price": "-0.00750",
87+
"price_unit": "USD",
88+
"sid": "SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
89+
"status": "sent",
90+
"subresource_uris": {
91+
"media": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Media.json"
92+
},
93+
"to": "+14155552345",
94+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Messages/SMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
95+
}
96+
'''
97+
))
98+
99+
actual = self.client.api.v2010.accounts(sid="ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
100+
.messages.create(to="+15558675310")
101+
102+
self.assertIsNotNone(actual)
103+
68104
def test_delete_request(self):
69105
self.holodeck.mock(Response(500, ''))
70106

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_create_response(self):
3636
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3737
"body": "Hello",
3838
"author": "message author",
39+
"attributes": "{ \\"importance\\": \\"high\\" }",
3940
"date_created": "2015-12-16T22:18:37Z",
4041
"date_updated": "2015-12-16T22:18:38Z",
4142
"index": 0,
@@ -71,6 +72,7 @@ def test_update_response(self):
7172
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7273
"body": "Hello",
7374
"author": "message author",
75+
"attributes": "{ \\"importance\\": \\"high\\" }",
7476
"date_created": "2015-12-16T22:18:37Z",
7577
"date_updated": "2015-12-16T22:18:38Z",
7678
"index": 0,
@@ -129,6 +131,7 @@ def test_fetch_response(self):
129131
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
130132
"body": "Welcome!",
131133
"author": "system",
134+
"attributes": "{ \\"importance\\": \\"high\\" }",
132135
"date_created": "2016-03-24T20:37:57Z",
133136
"date_updated": "2016-03-24T20:37:57Z",
134137
"index": 0,
@@ -175,6 +178,7 @@ def test_read_full_response(self):
175178
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
176179
"body": "I like pie.",
177180
"author": "pie_preferrer",
181+
"attributes": "{ \\"importance\\": \\"high\\" }",
178182
"date_created": "2016-03-24T20:37:57Z",
179183
"date_updated": "2016-03-24T20:37:57Z",
180184
"index": 0,
@@ -186,6 +190,7 @@ def test_read_full_response(self):
186190
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
187191
"body": "Cake is my favorite!",
188192
"author": "cake_lover",
193+
"attributes": "{ \\"importance\\": \\"high\\" }",
189194
"date_created": "2016-03-24T20:38:21Z",
190195
"date_updated": "2016-03-24T20:38:21Z",
191196
"index": 0,

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

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_create_sms_response(self):
3535
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3636
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3737
"identity": "null",
38+
"attributes": "{ \\"role\\": \\"driver\\" }",
3839
"messaging_binding": {
3940
"type": "sms",
4041
"address": "+15558675310",
@@ -61,11 +62,8 @@ def test_create_chat_response(self):
6162
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6263
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
6364
"identity": "IDENTITY",
64-
"messaging_binding": {
65-
"type": "chat",
66-
"address": "null",
67-
"proxy_address": "null"
68-
},
65+
"attributes": "{ \\"role\\": \\"driver\\" }",
66+
"messaging_binding": null,
6967
"date_created": "2015-12-16T22:18:37Z",
7068
"date_updated": "2015-12-16T22:18:38Z",
7169
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
@@ -99,6 +97,7 @@ def test_update_response(self):
9997
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
10098
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
10199
"identity": "null",
100+
"attributes": "{ \\"role\\": \\"driver\\" }",
102101
"messaging_binding": {
103102
"type": "sms",
104103
"address": "+15558675310",
@@ -160,6 +159,7 @@ def test_fetch_response(self):
160159
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
161160
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
162161
"identity": "null",
162+
"attributes": "{ \\"role\\": \\"driver\\" }",
163163
"messaging_binding": {
164164
"type": "sms",
165165
"address": "+15558675310",
@@ -209,6 +209,7 @@ def test_read_response(self):
209209
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
210210
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
211211
"identity": "null",
212+
"attributes": "{ \\"role\\": \\"driver\\" }",
212213
"messaging_binding": {
213214
"type": "sms",
214215
"address": "+15558675310",
@@ -223,11 +224,8 @@ def test_read_response(self):
223224
"conversation_sid": "CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
224225
"sid": "MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
225226
"identity": "IDENTITY",
226-
"messaging_binding": {
227-
"type": "chat",
228-
"address": "null",
229-
"proxy_address": "null"
230-
},
227+
"attributes": "{ \\"role\\": \\"driver\\" }",
228+
"messaging_binding": null,
231229
"date_created": "2016-03-24T21:05:50Z",
232230
"date_updated": "2016-03-24T21:05:50Z",
233231
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/MBaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

tests/integration/conversations/v1/test_conversation.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ def test_create_response(self):
3535
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3636
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
3737
"friendly_name": "friendly_name",
38+
"attributes": "{ \\"topic\\": \\"feedback\\" }",
3839
"date_created": "2015-12-16T22:18:37Z",
3940
"date_updated": "2015-12-16T22:18:38Z",
4041
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -72,6 +73,7 @@ def test_update_response(self):
7273
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7374
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
7475
"friendly_name": "friendly_name",
76+
"attributes": "{ \\"topic\\": \\"feedback\\" }",
7577
"date_created": "2015-12-16T22:18:37Z",
7678
"date_updated": "2015-12-16T22:18:38Z",
7779
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -130,6 +132,7 @@ def test_fetch_response(self):
130132
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
131133
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
132134
"friendly_name": "My First Conversation",
135+
"attributes": "{ \\"topic\\": \\"feedback\\" }",
133136
"date_created": "2015-12-16T22:18:37Z",
134137
"date_updated": "2015-12-16T22:18:38Z",
135138
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
@@ -169,6 +172,7 @@ def test_read_full_response(self):
169172
"chat_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
170173
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
171174
"friendly_name": "Home Repair Visit",
175+
"attributes": "{ \\"topic\\": \\"feedback\\" }",
172176
"date_created": "2015-12-16T22:18:37Z",
173177
"date_updated": "2015-12-16T22:18:38Z",
174178
"url": "https://conversations.twilio.com/v1/Conversations/CHaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",

tests/integration/flex_api/v1/test_configuration.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,14 @@ def test_fetch_response(self):
142142
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
143143
}
144144
},
145+
"features_enabled": [
146+
"some_feature",
147+
"another_feature"
148+
],
149+
"serverless_service_sids": [
150+
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
151+
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
152+
],
145153
"url": "https://flex-api.twilio.com/v1/Configuration"
146154
}
147155
'''
@@ -279,6 +287,14 @@ def test_create_response(self):
279287
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
280288
}
281289
},
290+
"features_enabled": [
291+
"some_feature",
292+
"another_feature"
293+
],
294+
"serverless_service_sids": [
295+
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
296+
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
297+
],
282298
"url": "https://flex-api.twilio.com/v1/Configuration"
283299
}
284300
'''
@@ -416,6 +432,14 @@ def test_update_response(self):
416432
"workflow_sid": "WWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
417433
}
418434
},
435+
"features_enabled": [
436+
"some_feature",
437+
"another_feature"
438+
],
439+
"serverless_service_sids": [
440+
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
441+
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
442+
],
419443
"url": "https://flex-api.twilio.com/v1/Configuration"
420444
}
421445
'''

tests/integration/preview/trusted_comms/test_branded_call.py

Lines changed: 1 addition & 0 deletions
741A
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ def test_create_response(self):
4141
"from": "+15000000000",
4242
"logo": "https://www.twilio.com/marketing/bundles/company/img/logos/red/twilio-logo-red.png",
4343
"reason": "Hello Jhon, your appointment has been confirmed.",
44+
"sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4445
"status": "unknown",
4546
"to": "+573000000000",
4647
"use_case": "conversational",

tests/integration/verify/v2/service/test_verification.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ def test_approve_verification_with_pn_response(self):
157157
"sid": "VEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
158158
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
159159
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
160-
"to": "+14159373912",
160+
"to": "+15017122661",
161161
"channel": "sms",
162162
"status": "approved",
163163
"valid": true,

twilio/rest/api/v2010/account/call/__init__.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,8 @@ def fetch(self):
438438

439439
def update(self, url=values.unset, method=values.unset, status=values.unset,
440440
fallback_url=values.unset, fallback_method=values.unset,
441-
status_callback=values.unset, status_callback_method=values.unset):
441+
status_callback=values.unset, status_callback_method=values.unset,
442+
twiml=values.unset):
442443
"""
443444
Update the CallInstance
444445
@@ -449,6 +450,7 @@ def update(self, url=values.unset, method=values.unset, status=values.unset,
449450
:param unicode fallback_method: HTTP Method to use with fallback_url
450451
:param unicode status_callback: The URL we should call to send status information to your application
451452
:param unicode status_callback_method: HTTP Method to use to call status_callback
453+
:param unicode twiml: TwiML instructions for the call
452454
453455
:returns: Updated CallInstance
454456
:rtype: twilio.rest.api.v2010.account.call.CallInstance
@@ -461,6 +463,7 @@ def update(self, url=values.unset, method=values.unset, status=values.unset,
461463
'FallbackMethod': fallback_method,
462464
'StatusCallback': status_callback,
463465
'StatusCallbackMethod': status_callback_method,
466+
'Twiml': twiml,
464467
})
465468

466469
payload = self._version.update(
@@ -837,7 +840,8 @@ def fetch(self):
837840

838841
def update(self, url=values.unset, method=values.unset, status=values.unset,
839842
fallback_url=values.unset, fallback_method=values.unset,
840-
status_callback=values.unset, status_callback_method=values.unset):
843+
status_callback=values.unset, status_callback_method=values.unset,
844+
twiml=values.unset):
841845
"""
842846
Update the CallInstance
843847
@@ -848,6 +852,7 @@ def update(self, url=values.unset, method=values.unset, status=values.unset,
848852
:param unicode fallback_method: HTTP Method to use with fallback_url
849853
:param unicode status_callback: The URL we should call to send status information to your application
850854
:param unicode status_callback_method: HTTP Method to use to call status_callback
855+
:param unicode twiml: TwiML instructions for the call
851856
852857
:returns: Updated CallInstance
853858
:rtype: twilio.rest.api.v2010.account.call.CallInstance
@@ -860,6 +865,7 @@ def update(self, url=values.unset, method=values.unset, status=values.unset,
860865
fallback_method=fallback_method,
861866
status_callback=status_callback,
862867
status_callback_method=status_callback_method,
868+
twiml=twiml,
863869
)
864870

865871
@property

0 commit comments

Comments
 (0)
0