8000 [Librarian] Regenerated @ 1820de764052a95e2f0570d74a5de0ba04f74f2e · RoadRunner11/twilio-python@225b296 · GitHub
[go: up one dir, main page]

Skip to content

Commit 225b296

Browse files
committed
[Librarian] Regenerated @ 1820de764052a95e2f0570d74a5de0ba04f74f2e
1 parent 2b743fa commit 225b296

File tree

32 files changed

+1928
-166
lines changed

32 files changed

+1928
-166
lines changed

CHANGES.md

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

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

6+
[2021-02-10] Version 6.52.0
7+
---------------------------
8+
**Library - Docs**
9+
- [PR #553](https://github.com/twilio/twilio-python/pull/553): fix simple typo, ommited -> omitted. Thanks to [@timgates42](https://github.com/timgates42)!
10+
11+
**Library - Fix**
12+
- [PR #558](https://github.com/twilio/twilio-python/pull/558): shortcut syntax for new non-GA versions. Thanks to [@eshanholtz](https://github.com/eshanholtz)!
13+
14+
**Api**
15+
- Revert change that conference participant create `from` and `to` param to be endpoint type for supporting client identifier and sip address
16+
- Update the conference participant create `from` and `to` param to be endpoint type for supporting client identifier and sip address
17+
18+
**Events**
19+
- Documentation should state that no fields are PII
20+
21+
**Flex**
22+
- Adding `notifications` and `markdown` to Flex Configuration
23+
24+
**Messaging**
25+
- Add A2P use cases API
26+
- Add Brand Registrations API
27+
- Add Campaigns API
28+
29+
**Serverless**
30+
- Add runtime field to Build response and as an optional parameter to the Build create endpoint.
31+
- Add @twilio/runtime-handler dependency to Build response example.
32+
33+
**Sync**
34+
- Remove If-Match header for Document **(breaking change)**
35+
36+
**Twiml**
37+
- Add `refer_url` and `refer_method` to `Dial`.
38+
39+
640
[2021-01-27] Version 6.51.1
741
---------------------------
842
**Studio**

tests/integration/api/v2010/account/test_conference.py

Lines changed: 298 additions & 44 deletions
Large diffs are not rendered by default.

tests/integration/flex_api/v1/test_configuration.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,14 @@ def test_fetch_response(self):
182182
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
183183
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
184184
],
185+
"notifications": {
186+
"enabled": true,
187+
"mode": "whenNotInFocus"
188+
},
189+
"markdown": {
190+
"enabled": false,
191+
"mode": "readOnly"
192+
},
185193
"url": "https://flex-api.twilio.com/v1/Configuration"
186194
}
187195
'''
@@ -359,6 +367,14 @@ def test_create_response(self):
359367
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
360368
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
361369
],
370+
"notifications": {
371+
"enabled": true,
372+
"mode": "whenNotInFocus"
373+
},
374+
"markdown": {
375+
"enabled": false,
376+
"mode": "readOnly"
377+
},
362378
"url": "https://flex-api.twilio.com/v1/Configuration"
363379
}
364380
'''
@@ -536,6 +552,14 @@ def test_update_response(self):
536552
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
537553
"ZSaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
538554
],
555+
"notifications": {
556+
"enabled": true,
557+
"mode": "whenNotInFocus"
558+
},
559+
"markdown": {
560+
"enabled": false,
561+
"mode": "readOnly"
562+
},
539563
"url": "https://flex-api.twilio.com/v1/Configuration"
540564
}
541565
'''
Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
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 BrandRegistrationTestCase(IntegrationTestCase):
16+
17+
def test_fetch_request(self):
18+
self.holodeck.mock(Response(500, ''))
19+
20+
with self.assertRaises(TwilioException):
21+
self.client.messaging.v1.brand_registrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
22+
23+
self.holodeck.assert_has_request(Request(
24+
'get',
25+
'https://messaging.twilio.com/v1/a2p/BrandRegistrations/BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
26+
))
27+
28+
def test_fetch_response(self):
29+
self.holodeck.mock(Response(
30+
200,
31+
'''
32+
{
33+
"sid": "BN0044409f7e067e279523808d267e2d85",
34+
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
35+
"customer_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
36+
"a2p_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
37+
"date_created": "2021-01-27T14:18:35Z",
38+
"date_updated": "2021-01-27T14:18:36Z",
39+
"status": "IN_PROGRESS",
40+
"tcr_id": "BXXXXXX",
41+
"failure_reason": "Registration error",
42+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85"
43+
}
44+
'''
45+
))
46+
47+
actual = self.client.messaging.v1.brand_registrations("BNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX").fetch()
48+
49+
self.assertIsNotNone(actual)
50+
51+
def test_list_request(self):
52+
self.holodeck.mock(Response(500, ''))
53+
54+
with self.assertRaises(TwilioException):
55+
self.client.messaging.v1.brand_registrations.list()
56+
57+
self.holodeck.assert_has_request(Request(
58+
'get',
59+
'https://messaging.twilio.com/v1/a2p/BrandRegistrations',
60+
))
61+
62+
def test_read_response(self):
63+
self.holodeck.mock(Response(
64+
200,
65+
'''
66+
{
67+
"meta": {
68+
"page": 0,
69+
"page_size": 50,
70+
"first_page_url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations?PageSize=50&Page=0",
71+
"previous_page_url": null,
72+
"next_page_url": null,
73+
"key": "data",
74+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations?PageSize=50&Page=0"
75+
},
76+
"data": [
77+
{
78+
"sid": "BN0044409f7e067e279523808d267e2d85",
79+
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
80+
"customer_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
81+
"a2p_profile_bundle_sid": "BU3344409f7e067e279523808d267e2d85",
82+
"date_created": "2021-01-27T14:18:35Z",
83+
"date_updated": "2021-01-27T14:18:36Z",
84+
"status": "IN_PROGRESS",
85+
"tcr_id": "BXXXXXX",
86+
"failure_reason": "Registration error",
87+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85"
88+
}
89+
]
90+
}
91+
'''
92+
))
93+
94+
actual = self.client.messaging.v1.brand_registrations.list()
95+
96+
self.assertIsNotNone(actual)
97+
98+
def test_create_request(self):
99+
self.holodeck.mock(Response(500, ''))
100+
101+
with self.assertRaises(TwilioException):
102+
self.client.messaging.v1.brand_registrations.create(customer_profile_bundle_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", a2p_profile_bundle_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
103+
104+
values = {
105+
'CustomerProfileBundleSid': "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
106+
'A2PProfileBundleSid': "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
107+
}
108+
109+
self.holodeck.assert_has_request(Request(
110+
'post',
111+
'https://messaging.twilio.com/v1/a2p/BrandRegistrations',
112+
data=values,
113+
))
114+
115+
def test_create_response(self):
116+
self.holodeck.mock(Response(
117+
201,
118+
'''
119+
{
120+
"sid": "BN0044409f7e067e279523808d267e2d85",
121+
"account_sid": "AC78e8e67fc0246521490fb9907fd0c165",
122+
"customer_profile_bundle_sid": "BU0000009f7e067e279523808d267e2d90",
123+
"a2p_profile_bundle_sid": "BU1111109f7e067e279523808d267e2d85",
124+
"date_created": "2021-01-28T10:45:51Z",
125+
"date_updated": "2021-01-28T10:45:51Z",
126+
"status": "PENDING",
127+
"tcr_id": "BXXXXXX",
128+
"failure_reason": "Registration error",
129+
"url": "https://messaging.twilio.com/v1/a2p/BrandRegistrations/BN0044409f7e067e279523808d267e2d85"
130+
}
131+
'''
132+
))
133+
134+
actual = self.client.messaging.v1.brand_registrations.create(customer_profile_bundle_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", a2p_profile_bundle_sid="BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")
135+
136+
self.assertIsNotNone(actual)

0 commit comments

Comments
 (0)
0