8000 [Librarian] Regenerated @ 38ba2b0d95a2827fc370f2fe666eb7cce8f2c9e3 · githubib/twilio-python@b88d7e2 · GitHub
[go: up one dir, main page]

Skip to content

Commit b88d7e2

Browse files
committed
[Librarian] Regenerated @ 38ba2b0d95a2827fc370f2fe666eb7cce8f2c9e3
1 parent 2cc25bd commit b88d7e2

File tree

35 files changed

+537
-219
lines changed

35 files changed

+537
-219
lines changed

CHANGES.md

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

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

6+
[2020-09-28] Version 6.45.4
7+
---------------------------
8+
**Library - Docs**
9+
- [PR #541](https://github.com/twilio/twilio-python/pull/541): Fix pip download link. Thanks to [@swarnava](https://github.com/swarnava)!
10+
11+
**Api**
12+
- Add optional property `call_reason` in the participant create request
13+
- Make sip-domain-service endpoints available in stage-au1 and prod-au1
14+
15+
**Messaging**
16+
- Removed beta feature gate from WhatsApp Templates API
17+
18+
**Serverless**
19+
- Add Build Status endpoint
20+
21+
**Video**
22+
- [Rooms] Add new room type "go" for WebRTC Go
23+
24+
625
[2020-09-21] Version 6.45.3
726
---------------------------
827
**Library - Fix**

tests/integration/api/v2010/account/conference/test_participant.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,35 @@ def test_create_with_friendly_name_caller_id_response(self):
433433

434434
self.assertIsNotNone(actual)
435435

436+
def test_create_with_friendly_name_reason_response(self):
437+
self.holodeck.mock(Response(
438+
201,
439+
'''
440+
{
441+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
442+
"call_sid": "CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
443+
"label": null,
444+
"conference_sid": "CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
445+
"date_created": "Fri, 18 Feb 2011 21:07:19 +0000",
446+
"date_updated": "Fri, 18 Feb 2011 21:07:19 +0000",
447+
"end_conference_on_exit": false,
448+
"muted": false,
449+
"hold": false,
450+
"status": "complete",
451+
"start_conference_on_enter": true,
452+
"coaching": false,
453+
"call_sid_to_coach": null,
454+
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Conferences/CFaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/CAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.json"
455+
}
456+
'''
457+
))
458+
459+
actual = self.client.api.v2010.accounts("ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
460+
.conferences("CFXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
461+
.participants.create(from_="+15017122661", to="+15558675310")
462+
463+
self.assertIsNotNone(actual)
464+
436465
def test_delete_request(self):
437466
self.holodeck.mock(Response(500, ''))
438467

tests/integration/conversations/v1/service/test_user.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,16 @@ def test_create_request(self):
1919

2020
with self.assertRaises(TwilioException):
2121
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22-
.users.create(identity="identity")
22+
.users.create(identity="identity", x_twilio_webhook_enabled="true")
2323

2424
values = {'Identity': "identity", }
2525

26+
headers = {'X-Twilio-Webhook-Enabled': "true", }
27+
self.holodeck.assert_has_request(Request(
28+
'post',
29+
'https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users',
30+
headers=headers,
31+
))
2632
self.holodeck.assert_has_request(Request(
2733
'post',
2834
'https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users',
@@ -59,11 +65,13 @@ def test_update_request(self):
5965

6066
with self.assertRaises(TwilioException):
6167
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
62-
.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
68+
.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(x_twilio_webhook_enabled="true")
6369

70+
headers = {'X-Twilio-Webhook-Enabled': "true", }
6471
self.holodeck.assert_has_request(Request(
6572
'post',
6673
'https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
74+
headers=headers,
6775
))
6876

6977
def test_update_response(self):
@@ -96,11 +104,13 @@ def test_delete_request(self):
96104

97105
with self.assertRaises(TwilioException):
98106
self.client.conversations.v1.services("ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
99-
.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
107+
.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete(x_twilio_webhook_enabled="true")
100108

109+
headers = {'X-Twilio-Webhook-Enabled': "true", }
101110
self.holodeck.assert_has_request(Request(
102111
'delete',
103112
'https://conversations.twilio.com/v1/Services/ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
113+
headers=headers,
104114
))
105115

106116
def test_delete_response(self):

tests/integration/conversations/v1/test_user.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@ def test_create_request(self):
1818
self.holodeck.mock(Response(500, ''))
1919

2020
with self.assertRaises(TwilioException):
21-
self.client.conversations.v1.users.create(identity="identity")
21+
self.client.conversations.v1.users.create(identity="identity", x_twilio_webhook_enabled="true")
2222

2323
values = {'Identity': "identity", }
2424

25+
headers = {'X-Twilio-Webhook-Enabled': "true", }
26+
self.holodeck.assert_has_request(Request(
27+
'post',
28+
'https://conversations.twilio.com/v1/Users',
29+
headers=headers,
30+
))
2531
self.holodeck.assert_has_request(Request(
2632
'post',
2733
'https://conversations.twilio.com/v1/Users',
@@ -56,11 +62,13 @@ def test_update_request(self):
5662
self.holodeck.mock(Response(500, ''))
5763

5864
with self.assertRaises(TwilioException):
59-
self.client.conversations.v1.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
65+
self.client.conversations.v1.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update(x_twilio_webhook_enabled="true")
6066

67+
headers = {'X-Twilio-Webhook-Enabled': "true", }
6168
self.holodeck.assert_has_request(Request(
6269
'post',
6370
'https://conversations.twilio.com/v1/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
71+
headers=headers,
6472
))
6573

6674
def test_update_response(self):
@@ -91,11 +99,13 @@ def test_delete_request(self):
9199
self.holodeck.mock(Response(500, ''))
92100

93101
with self.assertRaises(TwilioException):
94-
self.client.conversations.v1.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
102+
self.client.conversations.v1.users("USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete(x_twilio_webhook_enabled="true")
95103

104+
headers = {'X-Twilio-Webhook-Enabled': "true", }
96105
self.holodeck.assert_has_request(Request(
97106
'delete',
98107
'https://conversations.twilio.com/v1/Users/USXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
108+
headers=headers,
99109
))
100110

101111
def test_delete_response(self):
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: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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 BuildStatusTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22+
.builds("ZBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
23+
.build_status().fetch()
24+
25+
self.holodeck.assert_has_request(Request(
26+
'get',
27+
'https://serverless.twilio.com/v1/Services/ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Builds/ZBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Status',
28+
))
29+
30+
def test_fetch_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"sid": "ZB00000000000000000000000000000000",
36+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"service_sid": "ZS00000000000000000000000000000000",
38+
"status": "completed",
39+
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
40+
}
41+
'''
42+
))
43+
44+
actual = self.client.serverless.v1.services("ZSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
45+
.builds("ZBXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
46+
.build_status().fetch()
47+
48+
self.assertIsNotNone(actual)

tests/integration/serverless/v1/service/test_build.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ def test_fetch_response(self):
101101
"status": "deploying",
102102
"date_created": "2018-11-10T20:00:00Z",
103103
"date_updated": "2018-11-10T20:00:00Z",
104-
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000"
104+
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
105+
"links": {
106+
"build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
107+
}
105108
}
106109
'''
107110
))
@@ -185,7 +188,10 @@ def test_create_response(self):
185188
"status": "building",
186189
"date_created": "2018-11-10T20:00:00Z",
187190
"date_updated": "2018-11-10T20:00:00Z",
188-
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000"
191+
"url": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000",
192+
"links": {
193+
"build_status": "https://serverless.twilio.com/v1/Services/ZS00000000000000000000000000000000/Builds/ZB00000000000000000000000000000000/Status"
194+
}
189195
}
190196
'''
191197
))

tests/integration/verify/v2/service/entity/test_factor.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_create_request(self):
2020
with self.assertRaises(TwilioException):
2121
self.client.verify.v2.services("VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
2222
.entities("identity") \
23-
.factors.create(binding="binding", friendly_name="friendly_name", factor_type="push", config="config", twilio_sandbox_mode="twilio_sandbox_mode", authorization="authorization")
23+
.factors.create(binding="binding", friendly_name="friendly_name", factor_ty 10000 pe="push", config="config", twilio_sandbox_mode="twilio_sandbox_mode")
2424

2525
values = {
2626
'Binding': "binding",
@@ -29,7 +29,7 @@ def test_create_request(self):
2929
'Config': "config",
3030
}
3131

32-
headers = {'Twilio-Sandbox-Mode': "twilio_sandbox_mode", 'Authorization': "authorization", }
32+
headers = {'Twilio-Sandbox-Mode': "twilio_sandbox_mode", }
3333
self.holodeck.assert_has_request(Request(
3434
'post',
3535
'https://verify.twilio.com/v2/Services/VAXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Entities/identity/Factors',

tests/integration/video/v1/test_room.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def test_create_response(self):
108108

109109
self.assertIsNotNone(actual)
110110

111-
def test_create_p2p_basic_response(self):
111+
def test_create_webrtc_go_response(self):
112112
self.holodeck.mock(Response(
113113
201,
114114
'''
@@ -117,7 +117,7 @@ def test_create_p2p_basic_response(self):
117117
"date_created": "2015-07-30T20:00:00Z",
118118
"date_updated": "2015-07-30T20:00:00Z",
119119
"status": "in-progress",
120-
"type": "peer-to-peer-basic",
120+
"type": "go",
121121
"sid": "RMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
122122
"enable_turn": true,
123123
"unique_name": "room1",

twilio/rest/api/v2010/account/conference/participant.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def create(self, from_, to, status_callback=values.unset,
5757
conference_recording_status_callback_event=values.unset,
5858
coaching=values.unset, call_sid_to_coach=values.unset,
5959
jitter_buffer_size=values.unset, byoc=values.unset,
60-
caller_id=values.unset):
60+
caller_id=values.unset, call_reason=values.unset):
6161
"""
6262
Create the ParticipantInstance
6363
@@ -97,6 +97,7 @@ def create(self, from_, to, status_callback=values.unset,
9797
:param unicode jitter_buffer_size: Jitter Buffer size for the connecting participant
9898
:param unicode byoc: BYOC trunk SID (Beta)
9999
:param unicode caller_id: The phone number, Client identifier, or username portion of SIP address that made this call.
100+
:param unicode call_reason: Reason for the call (Branded Calls Beta)
100101
101102
:returns: The created ParticipantInstance
102103
:rtype: twilio.rest.api.v2010.account.conference.participant.ParticipantInstance
@@ -138,6 +139,7 @@ def create(self, from_, to, status_callback=values.unset,
138139
'JitterBufferSize': jitter_buffer_size,
139140
'Byoc': byoc,
140141
'CallerId': caller_id,
142+
'CallReason': call_reason,
141143
})
142144

143145
payload = self._version.create(method='POST', uri=self._uri, data=data, )

twilio/rest/conversations/v1/configuration/__init__.py

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616

1717
class ConfigurationList(ListResource):
18-
""" PLEASE NOTE that this class contains beta products that are subject to
19-
change. Use them with caution. """
2018

2119
def __init__(self, version):
2220
"""
@@ -76,8 +74,6 @@ def __repr__(self):
7674

7775

7876
class ConfigurationPage(Page):
79-
""" PLEASE NOTE that this class contains beta products that are subject to
80-
change. Use them with caution. """
8177

8278
def __init__(self, version, response, solution):
8379
"""
@@ -116,8 +112,6 @@ def __repr__(self):
116112

117113

118114
class ConfigurationContext(InstanceContext):
119-
""" PLEASE NOTE that this class contains beta products that are subject to
120-
change. Use them with caution. """
121115

122116
def __init__(self, version):
123117
"""
@@ -183,8 +177,6 @@ def __repr__(self):
183177

184178

185179
class ConfigurationInstance(InstanceResource):
186-
""" PLEASE NOTE that this class contains beta products that are subject to
187-
change. Use them with caution. """
188180

189181
def __init__(self, version, payload):
190182
"""
@@ -266,15 +258,15 @@ def default_closed_timer(self):
266258
@property
267259
def url(self):
268260
"""
269-
:returns: The url
261+
:returns: An absolute URL for this global configuration.
270262
:rtype: unicode
271263
"""
272264
return self._properties['url']
273265

274266
@property
275267
def links(self):
276268
"""
277-
:returns: The links
269+
:returns: Absolute URLs to access the webhook and default service configurations.
278270
:rtype: unicode
279271
"""
280272
return self._properties['links']

twilio/rest/conversations/v1/configuration/webhook.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515

1616

1717
class WebhookList(ListResource):
18-
""" PLEASE NOTE that this class contains beta products that are subject to
19-
change. Use them with caution. """
2018

2119
def __init__(self, version):
2220
"""
@@ -61,8 +59,6 @@ def __repr__(self):
6159

6260

6361
class WebhookPage(Page):
64-
""" PLEASE NOTE that this class contains beta products that are subject to
65-
change. Use them with caution. """
6662

6763
def __init__(self, version, response, solution):
6864
"""
@@ -101,8 +97,6 @@ def __repr__(self):
10197

10298

10399
class WebhookContext(InstanceContext):
104-
""" PLEASE NOTE that this class contains beta products that are subject to
105-
change. Use them with caution. """
106100

107101
def __init__(self, version):
108102
"""
@@ -169,8 +163,6 @@ def __repr__(self):
169163

170164

171165
class WebhookInstance(InstanceResource):
172-
""" PLEASE NOTE that this class contains beta products that are subject to
173-
change. Use them with caution. """
174166

175167
class Target(object):
176168
WEBHOOK = "webhook"

0 commit comments

Comments
 (0)
0