8000 [Librarian] Regenerated @ e1d98e904674be752473dcb1f0e54c720a5d0754 · RoadRunner11/twilio-python@97db756 · GitHub
[go: up one dir, main page]

Skip to content

Commit 97db756

Browse files
committed
[Librarian] Regenerated @ e1d98e904674be752473dcb1f0e54c720a5d0754
1 parent ccbc400 commit 97db756

File tree

11 files changed

+509
-6
lines changed

11 files changed

+509
-6
lines changed

CHANGES.md

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

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

6+
[2021-06-16] Version 6.60.0
7+
---------------------------
8+
**Api**
9+
- Update `status` enum for Messages to include 'canceled'
10+
- Update `update_status` enum for Messages to include 'canceled'
11+
12+
**Trusthub**
13+
- Corrected the sid for policy sid in customer_profile_evaluation.json and trust_product_evaluation.json **(breaking change)**
14+
15+
616
[2021-06-02] Version 6.59.1
717
---------------------------
818
**Events**
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: 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: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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 UserTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.frontline_api.v1.users("sid").fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://frontline-api.twilio.com/v1/Users/sid',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
34+
"identity": "john@example.com",
35+
"friendly_name": "John Doe",
36+
"avatar": "https://example.com/profile.png",
37+
"state": "active",
38+
"url": "https://frontline-api.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
39+
}
40+
'''
41+
))
42+
43+
actual = self.client.frontline_api.v1.users("sid").fetch()
44+
45+
self.assertIsNotNone(actual)
46+
47+
def test_update_request(self):
48+
self.holodeck.mock(Response(500, ''))
49+
50+
with self.assertRaises(TwilioException):
51+
self.client.frontline_api.v1.users("sid").update()
52+
53+
self.holodeck.assert_has_request(Request(
54+
'post',
55+
'https://frontline-api.twilio.com/v1/Users/sid',
56+
))
57+
58+
def test_update_response(self):
59+
self.holodeck.mock(Response(
60+
200,
61+
'''
62+
{
63+
"sid": "USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
64+
"identity": "john@example.com",
65+
"friendly_name": "John Doe",
66+
"avatar": "https://example.com/profile.png",
67+
"state": "active",
68+
"url": "https://frontline-api.twilio.com/v1/Users/USaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
69+
}
70+
'''
71+
))
72+
73+
actual = self.client.frontline_api.v1.users("sid").update()
74+
75+
self.assertIsNotNone(actual)

tests/integration/trusthub/v1/customer_profiles/test_customer_profiles_evaluations.py

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

2020
with self.assertRaises(TwilioException):
2121
self.client.trusthub.v1.customer_profiles("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22-
.customer_profiles_evaluations.create(policy_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
22+
.customer_profiles_evaluations.create(policy_sid="RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
2323

24-
values = {'PolicySid': "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
24+
values = {'PolicySid': "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
2525

2626
self.holodeck.assert_has_request(Request(
2727
'post',
@@ -197,7 +197,7 @@ def test_create_response(self):
197197
))
198198

199199
actual = self.client.trusthub.v1.customer_profiles("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
200-
.customer_profiles_evaluations.create(policy_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
200+
.customer_profiles_evaluations.create(policy_sid="RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
201201

202202
self.assertIsNotNone(actual)
203203

tests/integration/trusthub/v1/trust_products/test_trust_products_evaluations.py

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

2020
with self.assertRaises(TwilioException):
2121
self.client.trusthub.v1.trust_products("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
22-
.trust_products_evaluations.create(policy_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
22+
.trust_products_evaluations.create(policy_sid="RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
2323

24-
values = {'PolicySid': "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
24+
values = {'PolicySid': "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", }
2525

2626
self.holodeck.assert_has_request(Request(
2727
'post',
@@ -197,7 +197,7 @@ def test_create_response(self):
197197
))
198198

199199
actual = self.client.trusthub.v1.trust_products("BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX") \
200-
.trust_products_evaluations.create(policy_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
200+
.trust_products_evaluations.create(policy_sid="RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
201201

202202
self.assertIsNotNone(actual)
203203

twilio/rest/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ def __init__(self, username=None, password=None, account_sid=None, region=None,
6767
self._events = None
6868
self._fax = None
6969
self._flex_api = None
70+
self._frontline_api = None
7071
self._insights = None
7172
self._ip_messaging = None
7273
self._lookups = None
@@ -276,6 +277,19 @@ def flex_api(self):
276277
self._flex_api = FlexApi(self)
277278
return self._flex_api
278279

280+
@property
281+
def frontline_api(self):
282+
"""
283+
Access the FrontlineApi Twilio Domain
284+
285+
:returns: FrontlineApi Twilio Domain
286+
:rtype: twilio.rest.frontline_api.FrontlineApi
287+
"""
288+
if self._frontline_api is None:
289+
from twilio.rest.frontline_api import FrontlineApi
290+
self._frontline_api = FrontlineApi(self)
291+
return self._frontline_api
292+
279293
@property
280294
def insights(self):
281295
"""

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,10 @@ class Status(object):
408408
SCHEDULED = "scheduled"
409409
READ = "read"
410410
PARTIALLY_DELIVERED = "partially_delivered"
411+
CANCELED = "canceled"
412+
413+
class UpdateStatus(object):
414+
CANCELED = "canceled"
411415

412416
class Direction(object):
413417
INBOUND = "inbound"

twilio/rest/frontline_api/__init__.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from twilio.base.domain import Domain
10+
from twilio.rest.frontline_api.v1 import V1
11+
12+
13+
class FrontlineApi(Domain):
14+
15+
def __init__(self, twilio):
16+
"""
17+
Initialize the FrontlineApi Domain
18+
19+
:returns: Domain for FrontlineApi
20+
:rtype: twilio.rest.frontline_api.FrontlineApi
21+
"""
22+
super(FrontlineApi, self).__init__(twilio)
23+
24+
self.base_url = 'https://frontline-api.twilio.com'
25+
26+
# Versions
27+
self._v1 = None
28+
29+
@property
30+
def v1(self):
31+
"""
32+
:returns: Version v1 of frontline_api
33+
:rtype: twilio.rest.frontline_api.v1.V1
34+
"""
35+
if self._v1 is None:
36+
self._v1 = V1(self)
37+
return self._v1
38+
39+
@property
40+
def users(self):
41+
"""
42+
:rtype: twilio.rest.frontline_api.v1.user.UserList
43+
"""
44+
return self.v1.users
45+
46+
def __repr__(self):
47+
"""
48+
Provide a friendly representation
49+
50+
:returns: Machine friendly representation
51+
:rtype: str
52+
"""
53+
return '<Twilio.FrontlineApi>'
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# coding=utf-8
2+
r"""
3+
This code was generated by
4+
\ / _ _ _| _ _
5+
| (_)\/(_)(_|\/| |(/_ v1.0.0
6+
/ /
7+
"""
8+
9+
from twilio.base.version import Version
10+
from twilio.rest.frontline_api.v1.user import UserList
11+
12+
13+
class V1(Version):
14+
15+
def __init__(self, domain):
16+
"""
17+
Initialize the V1 version of FrontlineApi
18+
19+
:returns: V1 version of FrontlineApi
20+
:rtype: twilio.rest.frontline_api.v1.V1.V1
21+
"""
22+
super(V1, self).__init__(domain)
23+
self.version = 'v1'
24+
self._users = None
25+
26+
@property
27+
def users(self):
28+
"""
29+
:rtype: twilio.rest.frontline_api.v1.user.UserList
30+
"""
31+
if self._users is None:
32+
self._users = UserList(self)
33+
return self._users
34+
35+
def __repr__(self):
36+
"""
37+
Provide a friendly representation
38+
39+
:returns: Machine friendly representation
40+
:rtype: str
41+
"""
42+
return '<Twilio.FrontlineApi.V1>'

0 commit comments

Comments
 (0)
0