Skip to content

Commit ae0051e

Browse files
committed
[Librarian] Regenerated @ 18375def60d612c8e8bd57ea6e45050211ba4c08
1 parent ee01bdb commit ae0051e

File tree

11 files changed

+717
-24
lines changed

11 files changed

+717
-24
lines changed

CHANGES.md

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

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

6+
[2022-11-10] Version 7.15.2
7+
---------------------------
8+
**Flex**
9+
- Adding two new authorization API 'user_roles' and 'gooddata' in version `v1`
10+
11+
**Messaging**
12+
- Add new Campaign properties (MessageFlow, OptInMessage, OptInKeywords, OptOutMessage, OptOutKeywords, HelpMessage, HelpKeywords)
13+
14+
**Twiml**
15+
- Add new speech models to `Gather`.
16+
17+
618
[2022-10-31] Version 7.15.1
719
---------------------------
820
**Api**
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 GoodDataTestCase(IntegrationTestCase):
16+
17+
def test_create_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.flex_api.v1.good_data().create(token="token")
22+
23+
headers = {'Token': "token", }
24+
self.holodeck.assert_has_request(Request(
25+
'post',
26+
'https://flex-api.twilio.com/v1/Accounts/GoodData',
27+
headers=headers,
28+
))
29+
30+
def test_create_response(self):
31+
self.holodeck.mock(Response(
32+
201,
33+
'''
34+
{
35+
"session_expiry": "2022-09-27T09:28:01Z",
36+
"workspace_id": "clbi1eelh1x8z4.......ijpnyu",
37+
"session_id": "-----BEGIN PGP MESSAGE-----\\n\\nwcBMA11tX1FL13rp\\u2026\\u2026kHXd\\n=vOBk\\n-----END PGP MESSAGE-----\\n",
38+
"url": "https://flex-api.twilio.com/v1/Accounts/GoodData"
39+
}
40+
'''
41+
))
42+
43+
actual = self.client.flex_api.v1.good_data().create()
44+
45+
self.assertIsNotNone(actual)
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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 UserRolesTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.flex_api.v1.user_roles().fetch(token="token")
22+
23+
headers = {'Token': "token", }
24+
self.holodeck.assert_has_request(Request(
25+
'get',
26+
'https://flex-api.twilio.com/v1/Accounts/UserRoles',
27+
headers=headers,
28+
))
29+
30+
def test_fetch_response(self):
31+
self.holodeck.mock(Response(
32+
200,
33+
'''
34+
{
35+
"roles": [
36+
"wfo.full_access"
37+
],
38+
"url": "https://flex-api.twilio.com/v1/Accounts/UserRoles"
39+
}
40+
'''
41+
))
42+
43+
actual = self.client.flex_api.v1.user_roles().fetch()
44+
45+
self.assertIsNotNone(actual)

tests/integration/messaging/v1/service/test_us_app_to_person.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,19 @@ def test_create_response(self):
6666
"brand_tier": "TOP"
6767
}
6868
},
69+
"message_flow": "End users opt-in by visiting www.examplewebsite.com and adding their phone number. They then check a box agreeing to receive text messages from Example Brand. Additionally, end users can also opt-in by texting START to (111) 222-3333 to opt in.",
70+
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
71+
"opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
72+
"help_message": "Acme Corporation: Please visit www.acmecorporation.com to get support. To opt-out, reply STOP.",
73+
"opt_in_keywords": [
74+
"START"
75+
],
76+
"opt_out_keywords": [
77+
"STOP"
78+
],
79+
"help_keywords": [
80+
"HELP"
81+
],
6982
"date_created": "2021-02-18T14:48:52Z",
7083
"date_updated": "2021-02-18T14:48:52Z",
7184
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
@@ -145,6 +158,19 @@ def test_read_full_response(self):
145158
"brand_tier": "TOP"
146159
}
147160
},
161+
"message_flow": "End users opt-in by visiting www.examplewebsite.com and adding their phone number. They then check a box agreeing to receive text messages from Example Brand. Additionally, end users can also opt-in by texting START to (111) 222-3333 to opt in.",
162+
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
163+
"opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
164+
"help_message": "Acme Corporation: Please visit www.acmecorporation.com to get support. To opt-out, reply STOP.",
165+
"opt_in_keywords": [
166+
"START"
167+
],
168+
"opt_out_keywords": [
169+
"STOP"
170+
],
171+
"help_keywords": [
172+
"HELP"
173+
],
148174
"date_created": "2021-02-18T14:48:52Z",
149175
"date_updated": "2021-02-18T14:48:52Z",
150176
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",
@@ -210,6 +236,19 @@ def test_fetch_response(self):
210236
"brand_tier": "TOP"
211237
}
212238
},
239+
"message_flow": "End users opt-in by visiting www.examplewebsite.com and adding their phone number. They then check a box agreeing to receive text messages from Example Brand. Additionally, end users can also opt-in by texting START to (111) 222-3333 to opt in.",
240+
"opt_in_message": "Acme Corporation: You are now opted-in. For help, reply HELP. To opt-out, reply STOP",
241+
"opt_out_message": "You have successfully been unsubscribed from Acme Corporation. You will not receive any more messages from this number.",
242+
"help_message": "Acme Corporation: Please visit www.acmecorporation.com to get support. To opt-out, reply STOP.",
243+
"opt_in_keywords": [
244+
"START"
245+
],
246+
"opt_out_keywords": [
247+
"STOP"
248+
],
249+
"help_keywords": [
250+
"HELP"
251+
],
213252
"date_created": "2021-02-18T14:48:52Z",
214253
"date_updated": "2021-02-18T14:48:52Z",
215254
"url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/Compliance/Usa2p/QE2c6890da8086d771620e9b13fadeba0b",

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ def __init__(self, version, account_sid, call_sid):
2020
Initialize the UserDefinedMessageList
2121
2222
:param Version version: Version that contains the resource
23-
:param account_sid: Account Sid.
24-
:param call_sid: Call Sid.
23+
:param account_sid: Account SID.
24+
:param call_sid: Call SID.
2525
2626
:returns: twilio.rest.api.v2010.account.call.user_defined_message.UserDefinedMessageList
2727
:rtype: twilio.rest.api.v2010.account.call.user_defined_message.UserDefinedMessageList
@@ -36,7 +36,7 @@ def create(self, content, idempotency_key=values.unset):
3636
"""
3737
Create the UserDefinedMessageInstance
3838
39-
:param unicode content: A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.
39+
:param unicode content: The User Defined Message in the form of URL-encoded JSON string.
4040
:param unicode idempotency_key: A unique string value to identify API call. This should be a unique string value per API call and can be a randomly generated.
4141
4242
:returns: The created UserDefinedMessageInstance
@@ -71,8 +71,8 @@ def __init__(self, version, response, solution):
7171
7272
:param Version version: Version that contains the resource
7373
:param Response response: Response from the API
74-
:param account_sid: Account Sid.
75-
:param call_sid: Call Sid.
74+
:param account_sid: Account SID.
75+
:param call_sid: Call SID.
7676
7777
:returns: twilio.rest.api.v2010.account.call.user_defined_message.UserDefinedMessagePage
7878
:rtype: twilio.rest.api.v2010.account.call.user_defined_message.UserDefinedMessagePage
@@ -134,31 +134,31 @@ def __init__(self, version, payload, account_sid, call_sid):
134134
@property
135135
def account_sid(self):
136136
"""
137-
:returns: Account Sid.
137+
:returns: Account SID.
138138
:rtype: unicode
139139
"""
140140
return self._properties['account_sid']
141141

142142
@property
143143
def call_sid(self):
144144
"""
145-
:returns: Call Sid.
145+
:returns: Call SID.
146146
:rtype: unicode
147147
"""
148148
return self._properties['call_sid']
149149

150150
@property
151151
def sid(self):
152152
"""
153-
:returns: A string that uniquely identifies this User Defined Message.
153+
:returns: User Defined Message SID.
154154
:rtype: unicode
155155
"""
156156
return self._properties['sid']
157157

158158
@property
159159
def date_created(self):
160160
"""
161-
:returns: The date this User Defined Message was created
161+
:returns: The date this User Defined Message was created.
162162
:rtype: datetime
163163
"""
164164
return self._properties['date_created']

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

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ def __init__(self, version, account_sid, call_sid):
2121
Initialize the UserDefinedMessageSubscriptionList
2222
2323
:param Version version: Version that contains the resource
24-
:param account_sid: Account Sid.
25-
:param call_sid: Call Sid.
24+
:param account_sid: Account SID.
25+
:param call_sid: Call SID.
2626
2727
:returns: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionList
2828
:rtype: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionList
@@ -59,7 +59,7 @@ def get(self, sid):
5959
"""
6060
Constructs a UserDefinedMessageSubscriptionContext
6161
62-
:param sid: User Defined Message Subscription Sid
62+
:param sid: User Defined Message Subscription SID.
6363
6464
:returns: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionContext
6565
:rtype: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionContext
@@ -75,7 +75,7 @@ def __call__(self, sid):
7575
"""
7676
Constructs a UserDefinedMessageSubscriptionContext
7777
78-
:param sid: User Defined Message Subscription Sid
78+
:param sid: User Defined Message Subscription SID.
7979
8080
:returns: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionContext
8181
:rtype: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionContext
@@ -105,8 +105,8 @@ def __init__(self, version, response, solution):
105105
106106
:param Version version: Version that contains the resource
107107
:param Response response: Response from the API
108-
:param account_sid: Account Sid.
109-
:param call_sid: Call Sid.
108+
:param account_sid: Account SID.
109+
:param call_sid: Call SID.
110110
111111
:returns: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionPage
112112
:rtype: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionPage
@@ -149,9 +149,9 @@ def __init__(self, version, account_sid, call_sid, sid):
149149
Initialize the UserDefinedMessageSubscriptionContext
150150
151151
:param Version version: Version that contains the resource
152-
:param account_sid: Account Sid.
153-
:param call_sid: Call Sid.
154-
:param sid: User Defined Message Subscription Sid
152+
:param account_sid: Account SID.
153+
:param call_sid: Call SID.
154+
:param sid: User Defined Message Subscription SID.
155155
156156
:returns: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionContext
157157
:rtype: twilio.rest.api.v2010.account.call.user_defined_message_subscription.UserDefinedMessageSubscriptionContext
@@ -231,39 +231,39 @@ def _proxy(self):
231231
@property
232232
def account_sid(self):
233233
"""
234-
:returns: Account Sid.
234+
:returns: Account SID.
235235
:rtype: unicode
236236
"""
237237
return self._properties['account_sid']
238238

239239
@property
240240
def call_sid(self):
241241
"""
242-
:returns: Call Sid.
242+
:returns: Call SID.
243243
:rtype: unicode
244244
"""
245245
return self._properties['call_sid']
246246

247247
@property
248248
def sid(self):
249249
"""
250-
:returns: User Defined Message Subscription Sid
250+
:returns: User Defined Message Subscription SID.
251251
:rtype: unicode
252252
"""
253253
return self._properties['sid']
254254

255255
@property
256256
def date_created(self):
257257
"""
258-
:returns: The date this User Defined Message Subscription was created
258+
:returns: The date this User Defined Message Subscription was created.
259259
:rtype: datetime
260260
"""
261261
return self._properties['date_created']
262262

263263
@property
264264
def uri(self):
265265
"""
266-
:returns: The URI of the resource, relative to `https://api.twilio.com`.
266+
:returns: The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`.
267267
:rtype: unicode
268268
"""
269269
return self._properties['uri']

twilio/rest/flex_api/__init__.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,27 @@ def flex_flow(self):
5757
"""
5858
return self.v1.flex_flow
5959

60+
@property
61+
def good_data(self):
62+
"""
63+
:rtype: twilio.rest.flex_api.v1.good_data.GoodDataList
64+
"""
65+
return self.v1.good_data
66+
6067
@property
6168
def interaction(self):
6269
"""
6370
:rtype: twilio.rest.flex_api.v1.interaction.InteractionList
6471
"""
6572
return self.v1.interaction
6673

74+
@property
75+
def user_roles(self):
76+
"""
77+
:rtype: twilio.rest.flex_api.v1.user_roles.UserRolesList
78+
"""
79+
return self.v1.user_roles
80+
6781
@property
6882
def web_channel(self):
6983
"""

0 commit comments

Comments
 (0)