Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f4e7765

Browse files
committed
[Librarian] Regenerated @ c8ce9820730ef3b2a48912311d45afb8c26b9ee7 2ee5b1fa49840dd67929ff69952e93618b74425b
1 parent 2b875ec commit f4e7765

33 files changed

+1767
-1358
lines changed

CHANGES.md

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

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

6+
[2024-08-26] Version 9.2.4
7+
--------------------------
8+
**Library - Chore**
9+
- [PR #810](https://github.com/twilio/twilio-python/pull/810): add license identifier to project metadata. Thanks to [@mschoettle](https://github.com/mschoettle)!
10+
- [PR #808](https://github.com/twilio/twilio-python/pull/808): preview iam removal. Thanks to [@manisha1997](https://github.com/manisha1997)!
11+
- [PR #807](https://github.com/twilio/twilio-python/pull/807): update intersphinx_mapping. Thanks to [@tiwarishubham635](https://github.com/tiwarishubham635)!
12+
- [PR #804](https://github.com/twilio/twilio-python/pull/804): add init file. Thanks to [@manisha1997](https://github.com/manisha1997)!
13+
14+
**Api**
15+
- Update documentation of `error_code` and `error_message` on the Message resource.
16+
- Remove generic parameters from `transcription` resource
17+
- Added public documentation for Payload Data retrieval API
18+
19+
**Flex**
20+
- Adding update Flex User api
21+
22+
**Insights**
23+
- Added 'branded', 'business_profile' and 'voice_integrity' fields in List Call Summary
24+
25+
**Intelligence**
26+
- Add `words` array information to the Sentences v2 entity.
27+
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` headers for Operator Results.
28+
- Change the path parameter when fetching an `/OperatorType/{}` from `sid<EY>` to `string` to support searching by SID or by name
29+
- Add `X-Rate-Limit-Limit`, `X-Rate-Limit-Remaining`, and `X-Rate-Limit-Config` headers for Transcript and Service endpoints.
30+
31+
**Messaging**
32+
- Adds two new channel senders api to add/remove channel senders to/from a messaging service
33+
- Extend ERC api to accept an optional attribute in request body to indicate CNP migration for an ERC
34+
35+
**Numbers**
36+
- Modify visibility to public in bundle clone API
37+
- Add `port_date` field to Port In Request and Port In Phone Numbers Fetch APIs
38+
- Change properties docs for port in phone numbers api
39+
- Add is_test body param to the Bundle Create API
40+
- Change properties docs for port in api
41+
42+
**Trusthub**
43+
- Add new field in themeSetId in compliance_inquiry.
44+
45+
**Verify**
46+
- Update `custom_code_enabled` description on verification docs
47+
48+
649
[2024-07-02] Version 9.2.3
750
--------------------------
851
**Intelligence**

twilio/rest/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ def frontline_api(self) -> "FrontlineApi":
275275
self._frontline_api = FrontlineApi(self)
276276
return self._frontline_api
277277

278-
279278
@property
280279
def insights(self) -> "Insights":
281280
"""

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

Lines changed: 8 additions & 1196 deletions
Large diffs are not rendered by default.

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ class UpdateStatus(object):
7373
:ivar to: The recipient's phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format) or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g. `whatsapp:+15552229999`)
7474
:ivar date_updated: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was last updated
7575
:ivar price: The amount billed for the message in the currency specified by `price_unit`. The `price` is populated after the message has been sent/received, and may not be immediately availalble. View the [Pricing page](https://www.twilio.com/en-us/pricing) for more details.
76-
:ivar error_message: The description of the `error_code` if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`.
76+
:ivar error_message: The description of the `error_code` if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`. The value returned in this field for a specific error cause is subject to change as Twilio improves errors. Users should not use the `error_code` and `error_message` fields programmatically.
7777
:ivar uri: The URI of the Message resource, relative to `https://api.twilio.com`.
7878
:ivar account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) associated with the Message resource
7979
:ivar num_media: The number of media files associated with the Message resource.
@@ -82,7 +82,7 @@ class UpdateStatus(object):
8282
:ivar sid: The unique, Twilio-provided string that identifies the Message resource.
8383
:ivar date_sent: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message was sent. For an outgoing message, this is when Twilio sent the message. For an incoming message, this is when Twilio sent the HTTP request to your incoming message webhook URL.
8484
:ivar date_created: The [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822#section-3.3) timestamp (in GMT) of when the Message resource was created
85-
:ivar error_code: The [error code](https://www.twilio.com/docs/api/errors) returned if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`.
85+
:ivar error_code: The [error code](https://www.twilio.com/docs/api/errors) returned if the Message `status` is `failed` or `undelivered`. If no error was encountered, the value is `null`. The value returned in this field for a specific error cause is subject to change as Twilio improves errors. Users should not use the `error_code` and `error_message` fields programmatically.
8686
:ivar price_unit: The currency in which `price` is measured, in [ISO 4127](https://www.iso.org/iso/home/standards/currency_codes.htm) format (e.g. `usd`, `eur`, `jpy`).
8787
:ivar api_version: The API version used to process the Message
8888
:ivar subresource_uris: A list of related resources identified by their URIs relative to `https://api.twilio.com`

twilio/rest/api/v2010/account/recording/add_on_result/payload.py renamed to twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from twilio.base.list_resource import ListResource
2121
from twilio.base.version import Version
2222
from twilio.base.page import Page
23+
from twilio.rest.api.v2010.account.recording.add_on_result.payload.data import DataList
2324

2425

2526
class PayloadInstance(InstanceResource):
@@ -130,6 +131,13 @@ async def fetch_async(self) -> "PayloadInstance":
130131
"""
131132
return await self._proxy.fetch_async()
132133

134+
@property
135+
def data(self) -> DataList:
136+
"""
137+
Access the data
138+
"""
139+
return self._proxy.data
140+
133141
def __repr__(self) -> str:
134142
"""
135143
Provide a friendly representation
@@ -172,6 +180,8 @@ def __init__(
172180
**self._solution
173181
)
174182

183+
self._data: Optional[DataList] = None
184+
175185
def delete(self) -> bool:
176186
"""
177187
Deletes the PayloadInstance
@@ -240,6 +250,21 @@ async def fetch_async(self) -> PayloadInstance:
240250
sid=self._solution["sid"],
241251
)
242252

253+
@property
254+
def data(self) -> DataList:
255+
"""
256+
Access the data
257+
"""
258+
if self._data is None:
259+
self._data = DataList(
260+
self._version,
261+
self._solution["account_sid"],
262+
self._solution["reference_sid"],
263+
self._solution["add_on_result_sid"],
264+
self._solution["sid"],
265+
)
266+
return self._data
267+
243268
def __repr__(self) -> str:
244269
"""
245270
Provide a friendly representation
Lines changed: 242 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,242 @@
1+
r"""
2+
This code was generated by
3+
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
4+
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
5+
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
6+
7+
Twilio - Api
8+
This is the public Twilio REST API.
9+
10+
NOTE: This class is auto generated by OpenAPI Generator.
11+
https://openapi-generator.tech
12+
Do not edit the class manually.
13+
"""
14+
15+
from typing import Any, Dict, Optional
16+
from twilio.base.instance_context import InstanceContext
17+
from twilio.base.instance_resource import InstanceResource
18+
from twilio.base.list_resource import ListResource
19+
from twilio.base.version import Version
20+
21+
22+
class DataInstance(InstanceResource):
23+
"""
24+
:ivar redirect_to: The URL to redirect to to get the data returned by the AddOn that was previously stored.
25+
"""
26+
27+
def __init__(
28+
self,
29+
version: Version,
30+
payload: Dict[str, Any],
31+
account_sid: str,
32+
reference_sid: str,
33+
add_on_result_sid: str,
34+
payload_sid: str,
35+
):
36+
super().__init__(version)
37+
38+
self.redirect_to: Optional[str] = payload.get("redirect_to")
39+
40+
self._solution = {
41+
"account_sid": account_sid,
42+
"reference_sid": reference_sid,
43+
"add_on_result_sid": add_on_result_sid,
44+
"payload_sid": payload_sid,
45+
}
46+
self._context: Optional[DataContext] = None
47+
48+
@property
49+
def _proxy(self) -> "DataContext":
50+
"""
51+
Generate an instance context for the instance, the context is capable of
52+
performing various actions. All instance actions are proxied to the context
53+
54+
:returns: DataContext for this DataInstance
55+
"""
56+
if self._context is None:
57+
self._context = DataContext(
58+
self._version,
59+
account_sid=self._solution["account_sid"],
60+
reference_sid=self._solution["reference_sid"],
61+
add_on_result_sid=self._solution["add_on_result_sid"],
62+
payload_sid=self._solution["payload_sid"],
63+
)
64+
return self._context
65+
66+
def fetch(self) -> "DataInstance":
67+
"""
68+
Fetch the DataInstance
69+
70+
71+
:returns: The fetched DataInstance
72+
"""
73+
return self._proxy.fetch()
74+
75+
async def fetch_async(self) -> "DataInstance":
76+
"""
77+
Asynchronous coroutine to fetch the DataInstance
78+
79+
80+
:returns: The fetched DataInstance
81+
"""
82+
return await self._proxy.fetch_async()
83+
84+
def __repr__(self) -> str:
85+
"""
86+
Provide a friendly representation
87+
88+
:returns: Machine friendly representation
89+
"""
90+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
91+
return "<Twilio.Api.V2010.DataInstance {}>".format(context)
92+
93+
94+
class DataContext(InstanceContext):
95+
96+
def __init__(
97+
self,
98+
version: Version,
99+
account_sid: str,
100+
reference_sid: str,
101+
add_on_result_sid: str,
102+
payload_sid: str,
103+
):
104+
"""
105+
Initialize the DataContext
106+
107+
:param version: Version that contains the resource
108+
:param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch.
109+
:param reference_sid: The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.
110+
:param add_on_result_sid: The SID of the AddOnResult to which the payload to fetch belongs.
111+
:param payload_sid: The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.
112+
"""
113+
super().__init__(version)
114+
115+
# Path Solution
116+
self._solution = {
117+
"account_sid": account_sid,
118+
"reference_sid": reference_sid,
119+
"add_on_result_sid": add_on_result_sid,
120+
"payload_sid": payload_sid,
121+
}
122+
self._uri = "/Accounts/{account_sid}/Recordings/{reference_sid}/AddOnResults/{add_on_result_sid}/Payloads/{payload_sid}/Data.json".format(
123+
**self._solution
124+
)
125+
126+
def fetch(self) -> DataInstance:
127+
"""
128+
Fetch the DataInstance
129+
130+
131+
:returns: The fetched DataInstance
132+
"""
133+
134+
payload = self._version.fetch(
135+
method="GET",
136+
uri=self._uri,
137+
)
138+
139+
return DataInstance(
140+
self._version,
141+
payload,
142+
account_sid=self._solution["account_sid"],
143+
reference_sid=self._solution["reference_sid"],
144+
add_on_result_sid=self._solution["add_on_result_sid"],
145+
payload_sid=self._solution["payload_sid"],
146+
)
147+
148+
async def fetch_async(self) -> DataInstance:
149+
"""
150+
Asynchronous coroutine to fetch the DataInstance
151+
152+
153+
:returns: The fetched DataInstance
154+
"""
155+
156+
payload = await self._version.fetch_async(
157+
method="GET",
158+
uri=self._uri,
159+
)
160+
161+
return DataInstance(
162+
self._version,
163+
payload,
164+
account_sid=self._solution["account_sid"],
165+
reference_sid=self._solution["reference_sid"],
166+
add_on_result_sid=self._solution["add_on_result_sid"],
167+
payload_sid=self._solution["payload_sid"],
168+
)
169+
170+
def __repr__(self) -> str:
171+
"""
172+
Provide a friendly representation
173+
174+
:returns: Machine friendly representation
175+
"""
176+
context = " ".join("{}={}".format(k, v) for k, v in self._solution.items())
177+
return "<Twilio.Api.V2010.DataContext {}>".format(context)
178+
179+
180+
class DataList(ListResource):
181+
182+
def __init__(
183+
self,
184+
version: Version,
185+
account_sid: str,
186+
reference_sid: str,
187+
add_on_result_sid: str,
188+
payload_sid: str,
189+
):
190+
"""
191+
Initialize the DataList
192+
193+
:param version: Version that contains the resource
194+
:param account_sid: The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Recording AddOnResult Payload resource to fetch.
195+
:param reference_sid: The SID of the recording to which the AddOnResult resource that contains the payload to fetch belongs.
196+
:param add_on_result_sid: The SID of the AddOnResult to which the payload to fetch belongs.
197+
:param payload_sid: The Twilio-provided string that uniquely identifies the Recording AddOnResult Payload resource to fetch.
198+
199+
"""
200+
super().__init__(version)
201+
202+
# Path Solution
203+
self._solution = {
204+
"account_sid": account_sid,
205+
"reference_sid": reference_sid,
206+
"add_on_result_sid": add_on_result_sid,
207+
"payload_sid": payload_sid,
208+
}
209+
210+
def get(self) -> DataContext:
211+
"""
212+
Constructs a DataContext
213+
214+
"""
215+
return DataContext(
216+
self._version,
217+
account_sid=self._solution["account_sid"],
218+
reference_sid=self._solution["reference_sid"],
219+
add_on_result_sid=self._solution["add_on_result_sid"],
220+
payload_sid=self._solution["payload_sid"],
221+
)
222+
223+
def __call__(self) -> DataContext:
224+
"""
225+
Constructs a DataContext
226+
227+
"""
228+
return DataContext(
229+
self._version,
230+
account_sid=self._solution["account_sid"],
231+
reference_sid=self._solution["reference_sid"],
232+
add_on_result_sid=self._solution["add_on_result_sid"],
233+
payload_sid=self._solution["payload_sid"],
234+
)
235+
236+
def __repr__(self) -> str:
237+
"""
238+
Provide a friendly representation
239+
240+
:returns: Machine friendly representation
241+
"""
242+
return "<Twilio.Api.V2010.DataList>"

0 commit comments

Comments
 (0)