Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit518dc8a

Browse files
committed
[Librarian] Regenerated @ 160660ccc2266b2b6f15f8e8291a4b07d233dc21 817197bb9e54bf7b3518030a6183a4c45eb689fa
1 parent317a5bb commit518dc8a

File tree

25 files changed

+257
-6115
lines changed

25 files changed

+257
-6115
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+
[2025-03-20] Version 9.5.1
7+
--------------------------
8+
**Accounts**
9+
- Update Safelist API docs as part of prefix supoort
10+
11+
**Flex**
12+
- Removing`first_name`,`last_name`, and`friendly_name` from the Flex User API
13+
14+
**Messaging**
15+
- Add missing tests under transaction/phone_numbers and transaction/short_code
16+
17+
618
[2025-03-11] Version 9.5.0
719
--------------------------
820
**Library - Feature**

‎twilio/rest/accounts/v1/safelist.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
classSafelistInstance(InstanceResource):
2424
"""
2525
:ivar sid: The unique string that we created to identify the SafeList resource.
26-
:ivar phone_number: The phone number in SafeList.
26+
:ivar phone_number: The phone numberor phone number 1k prefixin SafeList.
2727
"""
2828

2929
def__init__(self,version:Version,payload:Dict[str,Any]):
@@ -59,7 +59,7 @@ def create(self, phone_number: str) -> SafelistInstance:
5959
"""
6060
Create the SafelistInstance
6161
62-
: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).
62+
:param phone_number: The phone numberor phone number 1k prefixto be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
6363
6464
:returns: The created SafelistInstance
6565
"""
@@ -85,7 +85,7 @@ async def create_async(self, phone_number: str) -> SafelistInstance:
8585
"""
8686
Asynchronously create the SafelistInstance
8787
88-
: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).
88+
:param phone_number: The phone numberor phone number 1k prefixto be added in SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
8989
9090
:returns: The created SafelistInstance
9191
"""
@@ -111,7 +111,7 @@ def delete(self, phone_number: Union[str, object] = values.unset) -> bool:
111111
"""
112112
Asynchronously delete the SafelistInstance
113113
114-
:param phone_number: The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
114+
:param phone_number: The phone numberor phone number 1k prefixto be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
115115
:returns: True if delete succeeds, False otherwise
116116
"""
117117
headers=values.of({"Content-Type":"application/x-www-form-urlencoded"})
@@ -131,7 +131,7 @@ async def delete_async(
131131
"""
132132
Asynchronously delete the SafelistInstance
133133
134-
:param phone_number: The phone number to be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
134+
:param phone_number: The phone numberor phone number 1k prefixto be removed from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
135135
:returns: True if delete succeeds, False otherwise
136136
"""
137137
headers=values.of({"Content-Type":"application/x-www-form-urlencoded"})
@@ -151,7 +151,7 @@ def fetch(
151151
"""
152152
Asynchronously fetch the SafelistInstance
153153
154-
:param phone_number: The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
154+
:param phone_number: The phone numberor phone number 1k prefixto be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
155155
:returns: The fetched SafelistInstance
156156
"""
157157
headers=values.of({"Content-Type":"application/x-www-form-urlencoded"})
@@ -176,7 +176,7 @@ async def fetch_async(
176176
"""
177177
Asynchronously fetch the SafelistInstance
178178
179-
:param phone_number: The phone number to be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
179+
:param phone_number: The phone numberor phone number 1k prefixto be fetched from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
180180
:returns: The fetched SafelistInstance
181181
"""
182182
headers=values.of({"Content-Type":"application/x-www-form-urlencoded"})

‎twilio/rest/api/v2010/account/conference/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class UpdateStatus(object):
5151
:ivar date_updated: The date and time in UTC that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format.
5252
:ivar api_version: The API version used to create this conference.
5353
:ivar friendly_name: A string that you assigned to describe this conference room. Maximum length is 128 characters.
54-
:ivar region: A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants.
54+
:ivar region: A string that represents the Twilio Region where the conference audio was mixed. May be `us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, and `jp1`. Basic conference audio will always be mixed in `us1`. Global Conference audio will be mixed nearest to the majority of participants.
5555
:ivar sid: The unique, Twilio-provided string used to identify this Conference resource.
5656
:ivar status:
5757
:ivar uri: The URI of this resource, relative to `https://api.twilio.com`.

‎twilio/rest/api/v2010/account/conference/participant.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ def create(
625625
:param recording_status_callback_method: The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
626626
:param sip_auth_username: The SIP username used for authentication.
627627
:param sip_auth_password: The SIP password for authentication.
628-
:param region: The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
628+
:param region: The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
629629
:param conference_recording_status_callback: The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
630630
:param conference_recording_status_callback_method: The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
631631
:param recording_status_callback_event: The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.
@@ -814,7 +814,7 @@ async def create_async(
814814
:param recording_status_callback_method: The HTTP method we should use when we call `recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
815815
:param sip_auth_username: The SIP username used for authentication.
816816
:param sip_auth_password: The SIP password for authentication.
817-
:param region: The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
817+
:param region: The [region](https://support.twilio.com/hc/en-us/articles/223132167-How-global-low-latency-routing-and-region-selection-work-for-conferences-and-Client-calls) where we should mix the recorded audio. Can be:`us1`, `us2`, `ie1`, `de1`, `sg1`, `br1`, `au1`, or `jp1`.
818818
:param conference_recording_status_callback: The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available.
819819
:param conference_recording_status_callback_method: The HTTP method we should use to call `conference_recording_status_callback`. Can be: `GET` or `POST` and defaults to `POST`.
820820
:param recording_status_callback_event: The recording state changes that should generate a call to `recording_status_callback`. Can be: `started`, `in-progress`, `paused`, `resumed`, `stopped`, `completed`, `failed`, and `absent`. Separate multiple values with a space, ex: `'in-progress completed failed'`.

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class Status(object):
6262
PARTIALLY_DELIVERED="partially_delivered"
6363
CANCELED="canceled"
6464

65+
classTrafficType(object):
66+
FREE="free"
67+
6568
classUpdateStatus(object):
6669
CANCELED="canceled"
6770

@@ -505,6 +508,7 @@ def create(
505508
]=values.unset,
506509
smart_encoded:Union[bool,object]=values.unset,
507510
persistent_action:Union[List[str],object]=values.unset,
511+
traffic_type:Union["MessageInstance.TrafficType",object]=values.unset,
508512
shorten_urls:Union[bool,object]=values.unset,
509513
schedule_type:Union["MessageInstance.ScheduleType",object]=values.unset,
510514
send_at:Union[datetime,object]=values.unset,
@@ -532,6 +536,7 @@ def create(
532536
:param address_retention:
533537
:param smart_encoded: Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
534538
:param persistent_action: Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
539+
:param traffic_type:
535540
:param shorten_urls: For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
536541
:param schedule_type:
537542
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
@@ -561,6 +566,7 @@ def create(
561566
"AddressRetention":address_retention,
562567
"SmartEncoded":serialize.boolean_to_string(smart_encoded),
563568
"PersistentAction":serialize.map(persistent_action,lambdae:e),
569+
"TrafficType":traffic_type,
564570
"ShortenUrls":serialize.boolean_to_string(shorten_urls),
565571
"ScheduleType":schedule_type,
566572
"SendAt":serialize.iso8601_datetime(send_at),
@@ -606,6 +612,7 @@ async def create_async(
606612
]=values.unset,
607613
smart_encoded:Union[bool,object]=values.unset,
608614
persistent_action:Union[List[str],object]=values.unset,
615+
traffic_type:Union["MessageInstance.TrafficType",object]=values.unset,
609616
shorten_urls:Union[bool,object]=values.unset,
610617
schedule_type:Union["MessageInstance.ScheduleType",object]=values.unset,
611618
send_at:Union[datetime,object]=values.unset,
@@ -633,6 +640,7 @@ async def create_async(
633640
:param address_retention:
634641
:param smart_encoded: Whether to detect Unicode characters that have a similar GSM-7 character and replace them. Can be: `true` or `false`.
635642
:param persistent_action: Rich actions for non-SMS/MMS channels. Used for [sending location in WhatsApp messages](https://www.twilio.com/docs/whatsapp/message-features#location-messages-with-whatsapp).
643+
:param traffic_type:
636644
:param shorten_urls: For Messaging Services with [Link Shortening configured](https://www.twilio.com/docs/messaging/features/link-shortening) only: A Boolean indicating whether or not Twilio should shorten links in the `body` of the Message. Default value is `false`. If `true`, the `messaging_service_sid` parameter must also be provided.
637645
:param schedule_type:
638646
:param send_at: The time that Twilio will send the message. Must be in ISO 8601 format.
@@ -662,6 +670,7 @@ async def create_async(
662670
"AddressRetention":address_retention,
663671
"SmartEncoded":serialize.boolean_to_string(smart_encoded),
664672
"PersistentAction":serialize.map(persistent_action,lambdae:e),
673+
"TrafficType":traffic_type,
665674
"ShortenUrls":serialize.boolean_to_string(shorten_urls),
666675
"ScheduleType":schedule_type,
667676
"SendAt":serialize.iso8601_datetime(send_at),

‎twilio/rest/flex_api/v2/flex_user.py

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,8 @@ class FlexUserInstance(InstanceResource):
3030
:ivar worker_sid: The unique SID identifier of the worker.
3131
:ivar workspace_sid: The unique SID identifier of the workspace.
3232
:ivar flex_team_sid: The unique SID identifier of the Flex Team.
33-
:ivar first_name: First name of the User.
34-
:ivar last_name: Last name of the User.
3533
:ivar username: Username of the User.
3634
:ivar email: Email of the User.
37-
:ivar friendly_name: Friendly name of the User.
3835
:ivar locale: The locale preference of the user.
3936
:ivar roles: The roles of the user.
4037
:ivar created_date: The date that this user was created, given in ISO 8601 format.
@@ -59,11 +56,8 @@ def __init__(
5956
self.worker_sid:Optional[str]=payload.get("worker_sid")
6057
self.workspace_sid:Optional[str]=payload.get("workspace_sid")
6158
self.flex_team_sid:Optional[str]=payload.get("flex_team_sid")
62-
self.first_name:Optional[str]=payload.get("first_name")
63-
self.last_name:Optional[str]=payload.get("last_name")
6459
self.username:Optional[str]=payload.get("username")
6560
self.email:Optional[str]=payload.get("email")
66-
self.friendly_name:Optional[str]=payload.get("friendly_name")
6761
self.locale:Optional[str]=payload.get("locale")
6862
self.roles:Optional[List[str]]=payload.get("roles")
6963
self.created_date:Optional[datetime]=deserialize.iso8601_datetime(
@@ -117,60 +111,42 @@ async def fetch_async(self) -> "FlexUserInstance":
117111

118112
defupdate(
119113
self,
120-
first_name:Union[str,object]=values.unset,
121-
last_name:Union[str,object]=values.unset,
122114
email:Union[str,object]=values.unset,
123-
friendly_name:Union[str,object]=values.unset,
124115
user_sid:Union[str,object]=values.unset,
125116
locale:Union[str,object]=values.unset,
126117
)->"FlexUserInstance":
127118
"""
128119
Update the FlexUserInstance
129120
130-
:param first_name: First name of the User.
131-
:param last_name: Last name of the User.
132121
:param email: Email of the User.
133-
:param friendly_name: Friendly name of the User.
134122
:param user_sid: The unique SID identifier of the Twilio Unified User.
135123
:param locale: The locale preference of the user.
136124
137125
:returns: The updated FlexUserInstance
138126
"""
139127
returnself._proxy.update(
140-
first_name=first_name,
141-
last_name=last_name,
142128
email=email,
143-
friendly_name=friendly_name,
144129
user_sid=user_sid,
145130
locale=locale,
146131
)
147132

148133
asyncdefupdate_async(
149134
self,
150-
first_name:Union[str,object]=values.unset,
151-
last_name:Union[str,object]=values.unset,
152135
email:Union[str,object]=values.unset,
153-
friendly_name:Union[str,object]=values.unset,
154136
user_sid:Union[str,object]=values.unset,
155137
locale:Union[str,object]=values.unset,
156138
)->"FlexUserInstance":
157139
"""
158140
Asynchronous coroutine to update the FlexUserInstance
159141
160-
:param first_name: First name of the User.
161-
:param last_name: Last name of the User.
162142
:param email: Email of the User.
163-
:param friendly_name: Friendly name of the User.
164143
:param user_sid: The unique SID identifier of the Twilio Unified User.
165144
:param locale: The locale preference of the user.
166145
167146
:returns: The updated FlexUserInstance
168147
"""
169148
returnawaitself._proxy.update_async(
170-
first_name=first_name,
171-
last_name=last_name,
172149
email=email,
173-
friendly_name=friendly_name,
174150
user_sid=user_sid,
175151
locale=locale,
176152
)
@@ -252,20 +228,14 @@ async def fetch_async(self) -> FlexUserInstance:
252228

253229
defupdate(
254230
self,
255-
first_name:Union[str,object]=values.unset,
256-
last_name:Union[str,object]=values.unset,
257231
email:Union[str,object]=values.unset,
258-
friendly_name:Union[str,object]=values.unset,
259232
user_sid:Union[str,object]=values.unset,
260233
locale:Union[str,object]=values.unset,
261234
)->FlexUserInstance:
262235
"""
263236
Update the FlexUserInstance
264237
265-
:param first_name: First name of the User.
266-
:param last_name: Last name of the User.
267238
:param email: Email of the User.
268-
:param friendly_name: Friendly name of the User.
269239
:param user_sid: The unique SID identifier of the Twilio Unified User.
270240
:param locale: The locale preference of the user.
271241
@@ -274,10 +244,7 @@ def update(
274244

275245
data=values.of(
276246
{
277-
"FirstName":first_name,
278-
"LastName":last_name,
279247
"Email":email,
280-
"FriendlyName":friendly_name,
281248
"UserSid":user_sid,
282249
"Locale":locale,
283250
}
@@ -301,20 +268,14 @@ def update(
301268

302269
asyncdefupdate_async(
303270
self,
304-
first_name:Union[str,object]=values.unset,
305-
last_name:Union[str,object]=values.unset,
306271
email:Union[str,object]=values.unset,
307-
friendly_name:Union[str,object]=values.unset,
308272
user_sid:Union[str,object]=values.unset,
309273
locale:Union[str,object]=values.unset,
310274
)->FlexUserInstance:
311275
"""
312276
Asynchronous coroutine to update the FlexUserInstance
313277
314-
:param first_name: First name of the User.
315-
:param last_name: Last name of the User.
316278
:param email: Email of the User.
317-
:param friendly_name: Friendly name of the User.
318279
:param user_sid: The unique SID identifier of the Twilio Unified User.
319280
:param locale: The locale preference of the user.
320281
@@ -323,10 +284,7 @@ async def update_async(
323284

324285
data=values.of(
325286
{
326-
"FirstName":first_name,
327-
"LastName":last_name,
328287
"Email":email,
329-
"FriendlyName":friendly_name,
330288
"UserSid":user_sid,
331289
"Locale":locale,
332290
}

‎twilio/rest/iam/v1/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
fromtwilio.rest.iam.v1.api_keyimportApiKeyList
1919
fromtwilio.rest.iam.v1.get_api_keysimportGetApiKeysList
2020
fromtwilio.rest.iam.v1.new_api_keyimportNewApiKeyList
21+
fromtwilio.rest.iam.v1.tokenimportTokenList
2122

2223

2324
classV1(Version):
@@ -32,6 +33,7 @@ def __init__(self, domain: Domain):
3233
self._api_key:Optional[ApiKeyList]=None
3334
self._get_api_keys:Optional[GetApiKeysList]=None
3435
self._new_api_key:Optional[NewApiKeyList]=None
36+
self._token:Optional[TokenList]=None
3537

3638
@property
3739
defapi_key(self)->ApiKeyList:
@@ -51,6 +53,12 @@ def new_api_key(self) -> NewApiKeyList:
5153
self._new_api_key=NewApiKeyList(self)
5254
returnself._new_api_key
5355

56+
@property
57+
deftoken(self)->TokenList:
58+
ifself._tokenisNone:
59+
self._token=TokenList(self)
60+
returnself._token
61+
5462
def__repr__(self)->str:
5563
"""
5664
Provide a friendly representation

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp