8000 [Librarian] Regenerated @ 33636909396a2a29c9f7935bf42188ad426d5f3b · BioComputing/twilio-python@1661211 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1661211

Browse files
committed
[Librarian] Regenerated @ 33636909396a2a29c9f7935bf42188ad426d5f3b
1 parent 7de794d commit 1661211

File tree

15 files changed

+913
-142
lines changed

15 files changed

+913
-142
lines changed

CHANGES.md

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

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

6+
[2018-06-29] Version 6.14.7
7+
----------------------------
8+
**Library**
9+
- PR #428: Add Dockerfile and related changes to build the Docker image. Thanks to @jonatasbaldin!
10+
11+
612
[2018-06-21] Version 6.14.6
713
----------------------------
814
**Library**

tests/integration/proxy/v1/service/session/test_participant.py

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -165,46 +165,3 @@ def test_delete_response(self):
165165
.participants(sid="KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").delete()
166166

167167
self.assertTrue(actual)
168-
169-
def test_update_request(self):
170-
self.holodeck.mock(Response(500, ''))
171-
172-
with self.assertRaises(TwilioException):
173-
self.client.proxy.v1.services(sid="KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
174-
.sessions(sid="KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
175-
.participants(sid="KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
176-
177-
self.holodeck.assert_has_request(Request(
178-
'post',
179-
'https://proxy.twilio.com/v1/Services/KSXXXXXXX 9E81 XXXXXXXXXXXXXXXXXXXXXXXXX/Sessions/KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Participants/KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
180-
))
181-
182-
def test_update_response(self):
183-
self.holodeck.mock(Response(
184-
200,
185-
'''
186-
{
187-
"sid": "KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
188-
"session_sid": "KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
189-
"service_sid": "KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
190-
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
191-
"identifier": "identifier",
192-
"proxy_identifier": "proxy_identifier",
193-
"proxy_identifier_sid": "PNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
194-
"friendly_name": "friendly_name",
195-
"date_deleted": "2015-07-30T20:00:00Z",
196-
"date_updated": "2015-07-30T20:00:00Z",
197-
"date_created": "2015-07-30T20:00:00Z",
198-
"url": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
199-
"links": {
200-
"message_interactions": "https://proxy.twilio.com/v1/Services/KSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Sessions/KCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Participants/KPaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessageInteractions"
201-
}
202-
}
203-
'''
204-
))
205-
206-
actual = self.client.proxy.v1.services(sid="KSXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
207-
.sessions(sid="KCXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
208-
.participants(sid="KPXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").update()
209-
210-
self.assertIsNotNone(actual)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# coding=utf-8
2+
"""
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 CompositionSettingsTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.video.v1.composition_settings().fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://video.twilio.com/v1/CompositionSettings/Default',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"friendly_name": "string",
35+
"aws_credentials_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"encryption_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"aws_s3_url": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
38+
"aws_storage_enabled": true,
39+
"encryption_enabled": true,
40+
"url": "https://video.twilio.com/v1/CompositionSettings/Default"
41+
}
42+
'''
43+
))
44+
45+
actual = self.client.video.v1.composition_settings().fetch()
46+
47+
self.assertIsNotNone(actual)
48+
49+
def test_create_request(self):
50+
self.holodeck.mock(Response(500, ''))
51+
52+
with self.assertRaises(TwilioException):
53+
self.client.video.v1.composition_settings().create(friendly_name="friendly_name")
54+
55+
values = {'FriendlyName': "friendly_name", }
56+
57+
self.holodeck.assert_has_request(Request(
58+
'post',
59+
'https://video.twilio.com/v1/CompositionSettings/Default',
60+
data=values,
61+
))
62+
63+
def test_create_response(self):
64+
self.holodeck.mock(Response(
65+
201,
66+
'''
67+
{
68+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
69+
"friendly_name": "friendly_name",
70+
"aws_credentials_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
71+
"encryption_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72+
"aws_s3_url": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
73+
"aws_storage_enabled": true,
74+
"encryption_enabled": true,
75+
"url": "https://video.twilio.com/v1/CompositionSettings/Default"
76+
}
77+
'''
78+
))
79+
80+
actual = self.client.video.v1.composition_settings().create(friendly_name="friendly_name")
81+
82+
self.assertIsNotNone(actual)
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# coding=utf-8
2+
"""
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 RecordingSettingsTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.video.v1.recording_settings().fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://video.twilio.com/v1/RecordingSettings/Default',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"friendly_name": "string",
35+
"aws_credentials_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
36+
"encryption_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
37+
"aws_s3_url": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
38+
"aws_storage_enabled": true,
39+
"encryption_enabled": true,
40+
"url": "https://video.twilio.com/v1/RecordingSettings/Default"
41+
}
42+
'''
43+
))
44+
45+
actual = self.client.video.v1.recording_settings().fetch()
46+
47+
self.assertIsNotNone(actual)
48+
49+
def test_create_request(self):
50+
self.holodeck.mock(Response(500, ''))
51+
52+
with self.assertRaises(TwilioException):
53+
self.client.video.v1.recording_settings().create(friendly_name="friendly_name")
54+
55+
values = {'FriendlyName': "friendly_name", }
56+
57+
self.holodeck.assert_has_request(Request(
58+
'post',
59+
'https://video.twilio.com/v1/RecordingSettings/Default',
60+
data=values,
61+
))
62+
63+
def test_create_response(self):
64+
self.holodeck.mock(Response(
65+
201,
66+
'''
67+
{
68+
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
69+
"friendly_name": "friendly_name",
70+
"aws_credentials_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
71+
"encryption_key_sid": "CRaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
72+
"aws_s3_url": "https://my-super-duper-bucket.s3.amazonaws.com/my/path/",
73+
"aws_storage_enabled": true,
74+
"encryption_enabled": true,
75+
"url": "https://video.twilio.com/v1/RecordingSettings/Default"
76+
}
77+
'''
78+
))
79+
80+
actual = self.client.video.v1.recording_settings().create(friendly_name="friendly_name")
81+
82+
self.assertIsNotNone(actual)

twilio/rest/preview/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,18 +180,18 @@ def hosted_number_orders(self):
180180
return self.hosted_numbers.hosted_number_orders
181181

182182
@property
183-
def available_add_ons(self):
183+
def installed_add_ons(self):
184184
"""
185-
:rtype: twilio.rest.preview.marketplace.available_add_on.AvailableAddOnList
185+
:rtype: twilio.rest.preview.marketplace.installed_add_on.InstalledAddOnList
186186
"""
187-
return self.marketplace.available_add_ons
187+
return self.marketplace.installed_add_ons
188188

189189
@property
190-
def installed_add_ons(self):
190+
def available_add_ons(self):
191191
"""
192-
:rtype: twilio.rest.preview.marketplace.installed_add_on.InstalledAddOnList
192+
:rtype: twilio.rest.preview.marketplace.available_add_on.AvailableAddOnList
193193
"""
194-
return self.marketplace.installed_add_ons
194+
return self.marketplace.available_add_ons
195195

196196
@property
197197
def services(self):

twilio/rest/preview/marketplace/__init__.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,8 @@ def __init__(self, domain):
2222
"""
2323
super(Marketplace, self).__init__(domain)
2424
self.version = 'marketplace'
25-
self._available_add_ons = None
2625
self._installed_add_ons = None
27-
28-
@property
29-
def available_add_ons(self):
30-
"""
31-
:rtype: twilio.rest.preview.marketplace.available_add_on.AvailableAddOnList
32-
"""
33-
if self._available_add_ons is None:
34-
self._available_add_ons = AvailableAddOnList(self)
35-
return self._available_add_ons
26+
self._available_add_ons = None
3627

3728
@property
3829
def installed_add_ons(self):
@@ -43,6 +34,15 @@ def installed_add_ons(self):
4334
self._installed_add_ons = InstalledAddOnList(self)
4435
return self._installed_add_ons
4536

37+
@property
38+
def available_add_ons(self):
39+
"""
40+
:rtype: twilio.rest.preview.marketplace.available_add_on.AvailableAddOnList
41+
"""
42+
if self._available_add_ons is None:
43+
self._available_add_ons = AvailableAddOnList(self)
44+
return self._available_add_ons
45+
4646
def __repr__(self):
4747
"""
4848
Provide a friendly representation

twilio/rest/proxy/v1/service/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def update(self, unique_name=values.unset, default_ttl=values.unset,
285285
"""
286286
Update the ServiceInstance
287287
288-
:param unicode unique_name: A human readable description of this resource.
288+
:param unicode unique_name: A human-readable description of this resource.
289289
:param unicode default_ttl: Default TTL for Sessions in Service, in seconds.
290290
:param unicode callback_url: URL Twilio will send callbacks to
291291
:param ServiceInstance.GeoMatchLevel geo_match_level: Whether proxy number selected must be in the same area code as the participant identifier.
@@ -429,7 +429,7 @@ def sid(self):
429429
@property
430430
def unique_name(self):
431431
"""
432-
:returns: A human readable description of this resource.
432+
:returns: A human-readable description of this resource.
433433
:rtype: unicode
434434
"""
435435
return self._properties['unique_name']
@@ -548,7 +548,7 @@ def update(self, unique_name=values.unset, default_ttl=values.unset,
548548
"""
549549
Update the ServiceInstance
550550
551-
:param unicode unique_name: A human readable description of this resource.
551+
:param unicode unique_name: A human-readable description of this resource.
552552
:param unicode default_ttl: Default TTL for Sessions in Service, in seconds.
553553
:param unicode callback_url: URL Twilio will send callbacks to
554554
:param ServiceInstance.GeoMatchLevel geo_match_level: Whether proxy number selected must be in the same area code as the participant identifier.

twilio/rest/proxy/v1/service/phone_number.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ def create(self, sid=values.unset, phone_number=values.unset):
3838
"""
3939
Create a new PhoneNumberInstance
4040
41-
:param unicode sid: A string that uniquely identifies this Phone Number.
42-
:param unicode phone_number: The phone_number
41+
:param unicode sid: Phone Number Sid of Twilio Number to assign to your Proxy Service
42+
:param unicode phone_number: Twilio Number to assign to your Proxy Service
4343
4444
:returns: Newly created PhoneNumberInstance
4545
:rtype: twilio.rest.proxy.v1.service.phone_number.PhoneNumberInstance
@@ -370,7 +370,7 @@ def phone_number(self):
370370
@property
371371
def friendly_name(self):
372372
"""
373-
:returns: A human readable description of this resource.
373+
:returns: A human-readable description of this resource.
374374
:rtype: unicode
375375
"""
376376
return self._properties['friendly_name']

twilio/rest/proxy/v1/service/session/__init__.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -295,13 +295,11 @@ def delete(self):
295295
"""
296296
return self._version.delete('delete', self._uri)
297297

298-
def update(self, unique_name=values.unset, date_expiry=values.unset,
299-
ttl=values.unset, mode=values.unset, status=values.unset,
300-
participants=values.unset):
298+
def update(self, date_expiry=values.unset, ttl=values.unset, mode=values.unset,
299+
status=values.unset, participants=values.unset):
301300
"""
302301
Update the SessionInstance
303302
304-
:param unicode unique_name: The unique_name
305303
:param datetime date_expiry: The date this Session should expire
306304
:param unicode ttl: TTL for a Session, in seconds.
307305
:param SessionInstance.Mode mode: The mode
@@ -312,7 +310,6 @@ def update(self, unique_name=values.unset, date_expiry=values.unset,
312310
:rtype: twilio.rest.proxy.v1.service.session.SessionInstance
313311
"""
314312
data = values.of({
315-
'UniqueName': unique_name,
316313
'DateExpiry': serialize.iso8601_datetime(date_expiry),
317314
'Ttl': ttl,
318315
'Mode': mode,
@@ -588,13 +585,11 @@ def delete(self):
588585
"""
589586
return self._proxy.delete()
590587

591-
def update(self, unique_name=values.unset, date_expiry=values.unset,
592-
ttl=values.unset, mode=values.unset, status=values.unset,
593-
participants=values.unset):
588+
def update(self, date_expiry=values.unset, ttl=values.unset, mode=values.unset,
589+
status=values.unset, participants=values.unset):
594590
"""
595591
Update the SessionInstance
596592
597-
:param unicode unique_name: The unique_name
598593
:param datetime date_expiry: The date this Session should expire
599594
:param unicode ttl: TTL for a Session, in seconds.
600595
:param SessionInstance.Mode mode: The mode
@@ -605,7 +600,6 @@ def update(self, unique_name=values.unset, date_expiry=values.unset,
605600
:rtype: twilio.rest.proxy.v1.service.session.SessionInstance
606601
"""
607602
return self._proxy.update(
608-
unique_name=unique_name,
609603
date_expiry=date_expiry,
610604
ttl=ttl,
611605
mode=mode,

0 commit comments

Comments
 (0)
0