Skip to content

Commit 3d9eecb

Browse files
committed
[Librarian] Regenerated @ c9ac9b9736431d573d8dec29ad3095eee969cdea
1 parent 1ac2185 commit 3d9eecb

File tree

25 files changed

+367
-101
lines changed

25 files changed

+367
-101
lines changed

CHANGES.md

+15
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,21 @@ twilio-python Changelog
33

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

6+
[2023-09-21] Version 8.9.0
7+
--------------------------
8+
**Conversations**
9+
- Enable conversation email bindings, email address configurations and email message subjects
10+
11+
**Flex**
12+
- Adding `console_errors_included` to Flex Configuration field `debugger_integrations`
13+
- Introducing new channel status as `inactive` in modify channel endpoint for leave functionality **(breaking change)**
14+
- Adding `citrix_voice_vdi` to Flex Configuration
15+
16+
**Taskrouter**
17+
- Add Update Queues, Workers, Workflow Real Time Statistics API to flex-rt-data-api-v2 endpoint
18+
- Add Update Workspace Real Time Statistics API to flex-rt-data-api-v2 endpoint
19+
20+
621
[2023-09-07] Version 8.8.0
722
--------------------------
823
**Api**

twilio/rest/api/v2010/__init__.py

+8
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from twilio.base.version import Version
1717
from twilio.base.domain import Domain
1818
from twilio.rest.api.v2010.account import AccountList
19+
from twilio.rest.api.v2010.safelist import SafelistList
1920
from twilio.rest.api.v2010.account import AccountContext
2021

2122

@@ -28,6 +29,7 @@ def __init__(self, domain: Domain):
2829
"""
2930
super().__init__(domain, "2010-04-01")
3031
self._accounts: Optional[AccountList] = None
32+
self._safelist: Optional[SafelistList] = None
3133
self._account: Optional[AccountContext] = None
3234

3335
@property
@@ -36,6 +38,12 @@ def accounts(self) -> AccountList:
3638
self._accounts = AccountList(self)
3739
return self._accounts
3840

41+
@property
42+
def safelist(self) -> SafelistList:
43+
if self._safelist is None:
44+
self._safelist = SafelistList(self)
45+
return self._safelist
46+
3947
@property
4048
def account(self) -> AccountContext:
4149
if self._account is None:

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

+2-2
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def create(
525525
:param content_variables: For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
526526
:param tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
527527
:param risk_check:
528-
:param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
528+
:param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
529529
:param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
530530
:param body: The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
531531
:param media_url: The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.
@@ -625,7 +625,7 @@ async def create_async(
625625
:param content_variables: For [Content Editor/API](https://www.twilio.com/docs/content) only: Key-value pairs of [Template variables](https://www.twilio.com/docs/content/using-variables-with-content-api) and their substitution values. `content_sid` parameter must also be provided. If values are not defined in the `content_variables` parameter, the [Template's default placeholder values](https://www.twilio.com/docs/content/content-api-resources#create-templates) are used.
626626
:param tags: A string containing a JSON map of key value pairs of tags to be recorded as metadata for the message. The object may contain up to 10 tags. Keys and values can each be up to 128 characters in length.
627627
:param risk_check:
628-
:param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belong to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
628+
:param from_: The sender's Twilio phone number (in [E.164](https://en.wikipedia.org/wiki/E.164) format), [alphanumeric sender ID](https://www.twilio.com/docs/sms/send-messages#use-an-alphanumeric-sender-id), [Wireless SIM](https://www.twilio.com/docs/iot/wireless/programmable-wireless-send-machine-machine-sms-commands), [short code](https://www.twilio.com/docs/sms/api/short-code), or [channel address](https://www.twilio.com/docs/messaging/channels) (e.g., `whatsapp:+15554449999`). The value of the `from` parameter must be a sender that is hosted within Twilio and belongs to the Account creating the Message. If you are using `messaging_service_sid`, this parameter can be empty (Twilio assigns a `from` value from the Messaging Service's Sender Pool) or you can provide a specific sender from your Sender Pool.
629629
:param messaging_service_sid: The SID of the [Messaging Service](https://www.twilio.com/docs/messaging/services) you want to associate with the Message. When this parameter is provided and the `from` parameter is omitted, Twilio selects the optimal sender from the Messaging Service's Sender Pool. You may also provide a `from` parameter if you want to use a specific Sender from the Sender Pool.
630630
:param body: The text content of the outgoing message. Can be up to 1,600 characters in length. SMS only: If the `body` contains more than 160 [GSM-7](https://www.twilio.com/docs/glossary/what-is-gsm-7-character-encoding) characters (or 70 [UCS-2](https://www.twilio.com/docs/glossary/what-is-ucs-2-character-encoding) characters), the message is segmented and charged accordingly. For long `body` text, consider using the [send_as_mms parameter](https://www.twilio.com/blog/mms-for-long-text-messages).
631631
:param media_url: The URL of media to include in the Message content. `jpeg`, `jpg`, `gif`, and `png` file types are fully supported by Twilio and content is formatted for delivery on destination devices. The media size limit is 5 MB for supported file types (`jpeg`, `jpg`, `png`, `gif`) and 500 KB for [other types](https://www.twilio.com/docs/sms/accepted-mime-types) of accepted media. To send more than one image in the message, provide multiple `media_url` parameters in the POST request. You can include up to ten `media_url` parameters per message. [International](https://support.twilio.com/hc/en-us/articles/223179808-Sending-and-receiving-MMS-messages) and [carrier](https://support.twilio.com/hc/en-us/articles/223133707-Is-MMS-supported-for-all-carriers-in-US-and-Canada-) limits apply.

twilio/rest/api/v2010/safelist.py

+129
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
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+
16+
from typing import Any, Dict, Optional
17+
from twilio.base import values
18+
19+
from twilio.base.instance_resource import InstanceResource
20+
from twilio.base.list_resource import ListResource
21+
from twilio.base.version import Version
22+
23+
24+
class SafelistInstance(InstanceResource):
25+
26+
"""
27+
:ivar sid: The unique string that we created to identify the SafeList resource.
28+
:ivar phone_number: The phone number in SafeList.
29+
"""
30+
31+
def __init__(self, version: Version, payload: Dict[str, Any]):
32+
super().__init__(version)
33+
34+
self.sid: Optional[str] = payload.get("sid")
35+
self.phone_number: Optional[str] = payload.get("phone_number")
36+
37+
def __repr__(self) -> str:
38+
"""
39+
Provide a friendly representation
40+
41+
:returns: Machine friendly representation
42+
"""
43+
44+
return "<Twilio.Api.V2010.SafelistInstance>"
45+
46+
47+
class SafelistList(ListResource):
48+
def __init__(self, version: Version):
49+
"""
50+
Initialize the SafelistList
51+
52+
:param version: Version that contains the resource
53+
54+
"""
55+
super().__init__(version)
56+
57+
self._uri = "/SafeList/Numbers.json"
58+
59+
def create(self, phone_number: str) -> SafelistInstance:
60+
"""
61+
Create the SafelistInstance
62+
63+
:param phone_number: The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
64+
65+
:returns: The created SafelistInstance
66+
"""
67+
data = values.of(
68+
{
69+
"PhoneNumber": phone_number,
70+
}
71+
)
72+
73+
payload = self._version.create(
74+
method="POST",
75+
uri=self._uri,
76+
data=data,
77+
)
78+
79+
return SafelistInstance(self._version, payload)
80+
81+
async def create_async(self, phone_number: str) -> SafelistInstance:
82+
"""
83+
Asynchronously create the SafelistInstance
84+
85+
:param phone_number: The phone number to be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
86+
87+
:returns: The created SafelistInstance
88+
"""
89+
data = values.of(
90+
{
91+
"PhoneNumber": phone_number,
92+
}
93+
)
94+
95+
payload = await self._version.create_async(
96+
method="POST",
97+
uri=self._uri,
98+
data=data,
99+
)
100+
101+
return SafelistInstance(self._version, payload)
102+
103+
def fetch(self) -> SafelistInstance:
104+
"""
105+
Asynchronously fetch the SafelistInstance
106+
107+
:returns: The fetched SafelistInstance
108+
"""
109+
payload = self._version.fetch(method="GET", uri=self._uri)
110+
111+
return SafelistInstance(self._version, payload)
112+
113+
async def fetch_async(self) -> SafelistInstance:
114+
"""
115+
Asynchronously fetch the SafelistInstance
116+
117+
:returns: The fetched SafelistInstance
118+
"""
119+
payload = await self._version.fetch_async(method="GET", uri=self._uri)
120+
121+
return SafelistInstance(self._version, payload)
122+
123+
def __repr__(self) -> str:
124+
"""
125+
Provide a friendly representation
126+
127+
:returns: Machine friendly representation
128+
"""
129+
return "<Twilio.Api.V2010.SafelistList>"

twilio/rest/chat/v3/channel.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class WebhookEnabledType(object):
4444
:ivar created_by: The `identity` of the User that created the channel. If the Channel was created by using the API, the value is `system`.
4545
:ivar members_count: The number of Members in the Channel.
4646
:ivar messages_count: The number of Messages that have been passed in the Channel.
47-
:ivar messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to.
47+
:ivar messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
4848
:ivar url: The absolute URL of the Channel resource.
4949
"""
5050

@@ -115,7 +115,7 @@ def update(
115115
116116
:param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
117117
:param type:
118-
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to.
118+
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
119119
120120
:returns: The updated ChannelInstance
121121
"""
@@ -138,7 +138,7 @@ async def update_async(
138138
139139
:param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
140140
:param type:
141-
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to.
141+
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
142142
143143
:returns: The updated ChannelInstance
144144
"""
@@ -189,7 +189,7 @@ def update(
189189
190190
:param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
191191
:param type:
192-
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to.
192+
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
193193
194194
:returns: The updated ChannelInstance
195195
"""
@@ -229,7 +229,7 @@ async def update_async(
229229
230230
:param x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header
231231
:param type:
232-
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/services/api) this channel belongs to.
232+
:param messaging_service_sid: The unique ID of the [Messaging Service](https://www.twilio.com/docs/messaging/api/service-resource) this channel belongs to.
233233
234234
:returns: The updated ChannelInstance
235235
"""

twilio/rest/conversations/v1/address_configuration.py

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class Type(object):
3838
WHATSAPP = "whatsapp"
3939
MESSENGER = "messenger"
4040
GBM = "gbm"
41+
EMAIL = "email"
4142

4243
"""
4344
:ivar sid: A 34 character string that uniquely identifies this resource.

0 commit comments

Comments
 (0)