8000 [Librarian] Regenerated @ b95e4374f2017825b07b12403ea7f7dc8da44e82 · githubib/twilio-python@83176eb · GitHub
[go: up one dir, main page]

Skip to content

Commit 83176eb

Browse files
committed
[Librarian] Regenerated @ b95e4374f2017825b07b12403ea7f7dc8da44e82
1 parent a36f0e7 commit 83176eb

File tree

15 files changed

+267
-83
lines changed

15 files changed

+267
-83
lines changed

CHANGES.md

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

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

6+
[2020-04-15] Version 6.38.1
7+
---------------------------
8+
**Library - Chore**
9+
- [PR #513](https://github.com/twilio/twilio-python/pull/513): remove S3 URLs from test data. Thanks to [@childish-sambino](https://github.com/childish-sambino)!
10+
11+
**Api**
12+
- Updated description for property `call_reason` in the call create request
13+
14+
**Contacts**
15+
- Added Read, Delete All, and Delete by SID docs
16+
- Initial Release
17+
18+
**Studio**
19+
- Rename `flow_valid` to `flow_validate`
20+
- Removed `errors` and `warnings` from flows error response and added new property named `details`
21+
- Add Update Execution endpoints to v1 and v2 to end execution via API
22+
- Add new `warnings` attribute v2 flow POST api
23+
24+
**Twiml**
25+
- Add enhanced attribute to use with `speech_model` for the `Gather` verb
26+
27+
628
[2020-04-01] Version 6.38.0
729
---------------------------
830
**Api**

tests/integration/studio/v1/flow/test_execution.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,3 +155,46 @@ def test_delete_response(self):
155155
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
156156

157157
self.assertTrue(actual)
158+
159+
def test_update_request(self):
160+
self.holodeck.mock(Response(500, ''))
161+
162+
with self.assertRaises(TwilioException):
163+
self.clie B421 nt.studio.v1.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
164+
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(status="active")
165+
166+
values = {'Status': "active", }
167+
168+
self.holodeck.assert_has_request(Request(
169+
'post',
170+
'https://studio.twilio.com/v1/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
171+
data=values,
172+
))
173+
174+
def test_update_response(self):
175+
self.holodeck.mock(Response(
176+
200,
177+
'''
178+
{
179+
"url": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
180+
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
181+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
182+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
183+
"context": {},
184+
"contact_sid": "FCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
185+
"contact_channel_address": "+14155555555",
186+
"status": "ended",
187+
"date_created": "2017-11-06T12:00:00Z",
188+
"date_updated": "2017-11-06T12:00:00Z",
189+
"links": {
190+
"steps": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps",
191+
"execution_context": "https://studio.twilio.com/v1/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
192+
}
193+
}
194+
'''
195+
))
196+
197+
actual = self.client.studio.v1.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
198+
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(status="active")
199+
200+
self.assertIsNotNone(actual)

tests/integration/studio/v2/flow/test_execution.py

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,45 @@ def test_delete_response(self):
153153
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
154154

155155
self.assertTrue(actual)
156+
157+
def test_update_request(self):
158+
self.holodeck.mock(Response(500, ''))
159+
160+
with self.assertRaises(TwilioException):
161+
self.client.studio.v2.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
162+
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(status="active")
163+
164+
values = {'Status': "active", }
165+
166+
self.holodeck.assert_has_request(Request(
167+
'post',
168+
'https://studio.twilio.com/v2/Flows/FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Executions/FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
169+
data=values,
170+
))
171+
172+
def test_update_response(self):
173+
self.holodeck.mock(Response(
174+
200,
175+
'''
176+
{
177+
"url": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
178+
"sid": "FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
179+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
180+
"flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
181+
"context": {},
182+
"contact_channel_address": "+14155555555",
183+
"status": "ended",
184+
"date_created": "2017-11-06T12:00:00Z",
185+
"date_updated": "2017-11-06T12:00:00Z",
186+
"links": {
187+
"steps": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Steps",
188+
"execution_context": "https://studio.twilio.com/v2/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Executions/FNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Context"
189+
}
190+
}
191+
'''
192+
))
193+
194+
actual = self.client.studio.v2.flows("FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
195+
.executions("FNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(status="active")
196+
197+
self.assertIsNotNone(actual)

tests/integration/studio/v2/test_flow.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def test_create_response(self):
4545
"commit_message": null,
4646
"valid": true,
4747
"errors": [],
48+
"warnings": [],
4849
"webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
4950
"date_created": "2017-11-06T12:00:00Z",
5051
"date_updated": null,
@@ -92,6 +93,7 @@ def test_update_response(self):
9293
"commit_message": null,
9394
"valid": true,
9495
"errors": [],
96+
"warnings": [],
9597
"webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
9698
"date_created": "2017-11-06T12:00:00Z",
9799
"date_updated": "2017-11-06T12:00:00Z",
@@ -145,6 +147,7 @@ def test_read_empty_response(self):
145147
"commit_message": null,
146148
"valid": null,
147149
"errors": null,
150+
"warnings": null,
148151
"webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
149152
"date_created": "2017-11-06T12:00:00Z",
150153
"date_updated": "2017-11-06T12:00:00Z",
@@ -191,6 +194,7 @@ def test_fetch_response(self):
191194
"commit_message": "commit",
192195
"valid": true,
193196
"errors": [],
197+
"warnings": [],
194198
"webhook_url": "http://webhooks.twilio.com/v1/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Flows/FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
195199
"date_created": "2017-11-06T12:00:00Z",
196200
"date_updated": null,

tests/integration/studio/v2/test_flow_validate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def test_update_request(self):
1919
self.holodeck.mock(Response(500, ''))
2020

2121
with self.assertRaises(TwilioException):
22-
self.client.studio.v2.flow_valid.update(friendly_name="friendly_name", status="draft", definition={})
22+
self.client.studio.v2.flow_validate.update(friendly_name="friendly_name", status="draft", definition={})
2323

2424
values = {'FriendlyName': "friendly_name", 'Status': "draft", 'Definition': serialize.object({}), }
2525

@@ -39,6 +39,6 @@ def test_update_response(self):
3939
'''
4040
))
4141

42-
actual = self.client.studio.v2.flow_valid.update(friendly_name="friendly_name", status="draft", definition={})
42+
actual = self.client.studio.v2.flow_validate.update(friendly_name="friendly_name", status="draft", definition={})
4343

4444
self.assertIsNotNone(actual)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ def create(self, to, from_, method=values.unset, fallback_url=values.unset,
9393
:param unicode async_amd_status_callback: The URL we should call to send amd status information to your application
9494
:param unicode async_amd_status_callback_method: HTTP Method to use with async_amd_status_callback
9595
:param unicode byoc: BYOC trunk SID (Beta)
96-
:param unicode call_reason: Reason for the call (Beta)
96+
:param unicode call_reason: Reason for the call (Branded Calls Beta)
9797
:param unicode url: The absolute URL that returns TwiML for this call
9898
:param unicode twiml: TwiML instructions for the call
9999
:param unicode application_sid: The SID of the Application resource that will handle the call

twilio/rest/studio/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,11 @@ def flows(self):
5656
return self.v2.flows
5757

5858
@property
59-
def flow_valid(self):
59+
def flow_validate(self):
6060
"""
6161
:rtype: twilio.rest.studio.v2.flow_validate.FlowValidateList
6262
"""
63-
return self.v2.flow_valid
63+
return self.v2.flow_validate
6464

6565
def __repr__(self):
6666
"""

twilio/rest/studio/v1/flow/execution/__init__.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,26 @@ def delete(self):
275275
"""
276276
return self._version.delete(method='DELETE', uri=self._uri, )
277277

278+
def update(self, status):
279+
"""
280+
Update the ExecutionInstance
281+
282+
:param ExecutionInstance.Status status: The status of the Execution
283+
284+
:returns: The updated ExecutionInstance
285+
:rtype: twilio.rest.studio.v1.flow.execution.ExecutionInstance
286+
"""
287+
data = values.of({'Status': status, })
288+
289+
payload = self._version.update(method='POST', uri=self._uri, data=data, )
290+
291+
return ExecutionInstance(
292+
self._version,
293+
payload,
294+
flow_sid=self._solution['flow_sid'],
295+
sid=self._solution['sid'],
296+
)
297+
278298
@property
279299
def steps(self):
280300
"""
@@ -476,6 +496,17 @@ def delete(self):
476496
"""
477497
return self._proxy.delete()
478498

499+
def update(self, status):
500+
"""
501+
Update the ExecutionInstance
502+
503+
:param ExecutionInstance.Status status: The status of the Execution
504+
505+
:returns: The updated ExecutionInstance
506+
:rtype: twilio.rest.studio.v1.flow.execution.ExecutionInstance
507+
"""
508+
return self._proxy.update(status, )
509+
479510
@property
480511
def steps(self):
481512
"""

twilio/rest/studio/v2/__init__.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def __init__(self, domain):
2323
super(V2, self).__init__(domain)
2424
self.version = 'v2'
2525
self._flows = None
26-
self._flow_valid = None
26+
self._flow_validate = None
2727

2828
@property
2929
def flows(self):
@@ -35,13 +35,13 @@ def flows(self):
3535
return self._flows
3636

3737
@property
38-
def flow_valid(self):
38+
def flow_validate(self):
3939
"""
4040
:rtype: twilio.rest.studio.v2.flow_validate.FlowValidateList
4141
"""
42-
if self._flow_valid is None:
43-
self._flow_valid = FlowValidateList(self)
44-
return self._flow_valid
42+
if self._flow_validate is None:
43+
self._flow_validate = FlowValidateList(self)
44+
return self._flow_validate
4545

4646
def __repr__(self):
4747
"""

twilio/rest/studio/v2/flow/__init__.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ def __init__(self, version, payload, sid=None):
354354
'commit_message': payload.get('commit_message'),
355355
'valid': payload.get('valid'),
356356
'errors': payload.get('errors'),
357+
'warnings': payload.get('warnings'),
357358
'date_created': deserialize.iso8601_datetime(payload.get('date_created')),
358359
'date_updated': deserialize.iso8601_datetime(payload.get('date_updated')),
359360
'webhook_url': payload.get('webhook_url'),
@@ -450,6 +451,14 @@ def errors(self):
450451
"""
451452
return self._properties['errors']
452453

454+
@property
455+
def warnings(self):
456+
"""
457+
:returns: List of warnings in the flow definition
458+
:rtype: dict
459+
"""
460+
return self._properties['warnings']
461+
453462
@property
454463
def date_created(self):
455464
"""

0 commit comments

Comments
 (0)
0