8000 [Librarian] Regenerated @ 437c39e3f150e78058f5afb3ef0672e89fc59ec0 · Siris4/twilio-python@45bf092 · GitHub
[go: up one dir, main page]

Skip to content

Commit 45bf092

Browse files
committed
[Librarian] Regenerated @ 437c39e3f150e78058f5afb3ef0672e89fc59ec0
1 parent 33363be commit 45bf092

File tree

44 files changed

+269
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+269
-64
lines changed

CHANGES.md

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

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

6+
[2023-12-01] Version 8.10.3
7+
---------------------------
8+
**Verify**
9+
- Add `VerifyEventSubscriptionEnabled` parameter to service create and update endpoints.
10+
11+
612
[2023-11-17] Version 8.10.2
713
---------------------------
814
**Library - Chore**

twilio/rest/accounts/v1/safelist.py

Lines changed: 59 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"""
1414

1515

16-
from typing import Any, Dict, Optional
16+
from typing import Any, Dict, Optional, Union
1717
from twilio.base import values
1818

1919
from twilio.base.instance_resource import InstanceResource
@@ -100,23 +100,77 @@ async def create_async(self, phone_number: str) -> SafelistInstance:
100100

101101
return SafelistInstance(self._version, payload)
102102

103-
def fetch(self) -> SafelistInstance:
103+
def delete(self, phone_number: Union[str, object] = values.unset) -> bool:
104+
"""
105+
Asynchronously delete the SafelistInstance
106+
107+
: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).
108+
:returns: True if delete succeeds, False otherwise
109+
"""
110+
111+
params = values.of(
112+
{
113+
"PhoneNumber": phone_number,
114+
}
115+
)
116+
return self._version.delete(method="DELETE", uri=self._uri, params=params)
117+
118+
async def delete_async(
119+
self, phone_number: Union[str, object] = v 1C6A alues.unset
120+
) -> bool:
121+
"""
122+
Asynchronously delete the SafelistInstance
123+
124+
:param phone_number: The phone number to be re F438 moved from SafeList. Phone numbers must be in [E.164 format](https://www.twilio.com/docs/glossary/what-e164).
125+
:returns: True if delete succeeds, False otherwise
126+
"""
127+
128+
params = values.of(
129+
{
130+
"PhoneNumber": phone_number,
131+
}
132+
)
133+
return await self._version.delete_async(
134+
method="DELETE", uri=self._uri, params=params
135+
)
136+
137+
def fetch(
138+
self, phone_number: Union[str, object] = values.unset
139+
) -> SafelistInstance:
104140
"""
105141
Asynchronously fetch the SafelistInstance
106142
143+
: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).
107144
:returns: The fetched SafelistInstance
108145
"""
109-
payload = self._version.fetch(method="GET", uri=self._uri)
146+
147+
params = values.of(
148+
{
149+
"PhoneNumber": phone_number,
150+
}
151+
)
152+
payload = self._version.fetch(method="GET", uri=self._uri, params=params)
110153

111154
return SafelistInstance(self._version, payload)
112155

113-
async def fetch_async(self) -> SafelistInstance:
156+
async def fetch_async(
157+
self, phone_number: Union[str, object] = values.unset
158+
) -> SafelistInstance:
114159
"""
115160
Asynchronously fetch the SafelistInstance
116161
162+
: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).
117163
:returns: The fetched SafelistInstance
118164
"""
119-
payload = await self._version.fetch_async(method="GET", uri=self._uri)
165+
166+
params = values.of(
167+
{
168+
"PhoneNumber": phone_number,
169+
}
170+
)
171+
payload = await self._version.fetch_async(
172+
method="GET", uri=self._uri, params=params
173+
)
120174

121175
return SafelistInstance(self._version, payload)
122176

twilio/rest/api/v2010/account/balance.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ def fetch(self) -> BalanceInstance:
7070
"""
7171
Asynchronously fetch the BalanceInstance
7272
73+
7374
:returns: The fetched BalanceInstance
7475
"""
76+
7577
payload = self._version.fetch(method="GET", uri=self._uri)
7678

7779
return BalanceInstance(
@@ -82,8 +84,10 @@ async def fetch_async(self) -> BalanceInstance:
8284
"""
8385
Asynchronously fetch the BalanceInstance
8486
87+
8588
:returns: The fetched BalanceInstance
8689
"""
90+
8791
payload = await self._version.fetch_async(method="GET", uri=self._uri)
8892

8993
return BalanceInstance(

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

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

twilio/rest/chat/v2/service/channel/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,7 @@ def create(
620620
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
621621
}
622622
)
623+
623624
payload = self._version.create(
624625
method="POST", uri=self._uri, data=data, headers=headers
625626
)
@@ -671,6 +672,7 @@ async def create_async(
671672
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
672673
}
673674
)
675+
674676
payload = await self._version.create_async(
675677
method="POST", uri=self._uri, data=data, headers=headers
676678
)

twilio/rest/chat/v2/service/channel/member.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ def create(
549549
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
550550
}
551551
)
552+
552553
payload = self._version.create(
553554
method="POST", uri=self._uri, data=data, headers=headers
554555
)
@@ -605,6 +606,7 @@ async def create_async(
605606
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
606607
}
607608
)
609+
608610
payload = await self._version.create_async(
609611
method="POST", uri=self._uri, data=data, headers=headers
610612
)

twilio/rest/chat/v2/service/channel/message.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ def create(
551551
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
552552
}
553553
)
554+
554555
payload = self._version.create(
555556
method="POST", uri=self._uri, data=data, headers=headers
556557
)
@@ -605,6 +606,7 @@ async def create_async(
605606
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
606607
}
607608
)
609+
608610
payload = await self._version.create_async(
609611
method="POST", uri=self._uri, data=data, headers=headers
610612
)

twilio/rest/chat/v2/service/user/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ def create(
489489
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
490490
}
491491
)
492+
492493
payload = self._version.create(
493494
method="POST", uri=self._uri, data=data, headers=headers
494495
)
@@ -531,6 +532,7 @@ async def create_async(
531532
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
532533
}
533534
)
535+
534536
payload = await self._version.create_async(
535537
method="POST", uri=self._uri, data=data, headers=headers
536538
)

twilio/rest/content/v1/content/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class ContentInstance(InstanceResource):
3434
:ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient.
3535
:ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
3636
:ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}.
37-
:ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
37+
:ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
3838
:ivar url: The URL of the resource, relative to `https://content.twilio.com`.
3939
:ivar links: A list of links related to the Content resource, such as approval_fetch and approval_create
4040
"""

twilio/rest/content/v1/content_and_approvals.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class ContentAndApprovalsInstance(InstanceResource):
3333
:ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient.
3434
:ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
3535
:ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}.
36-
:ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
36+
:ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
3737
:ivar approval_requests: The submitted information and approval request status of the Content resource.
3838
"""
3939

twilio/rest/content/v1/legacy_content.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class LegacyContentInstance(InstanceResource):
3333
:ivar friendly_name: A string name used to describe the Content resource. Not visible to the end recipient.
3434
:ivar language: Two-letter (ISO 639-1) language code (e.g., en) identifying the language the Content resource is in.
3535
:ivar variables: Defines the default placeholder values for variables included in the Content resource. e.g. {\"1\": \"Customer_Name\"}.
36-
:ivar types: The [Content types](https://www.twilio.com/docs/content-api/content-types-overview) (e.g. twilio/text) for this Content resource.
36+
:ivar types: The [Content types](https://www.twilio.com/docs/content/content-types-overview) (e.g. twilio/text) for this Content resource.
3737
:ivar legacy_template_name: The string name of the legacy content template associated with this Content resource, unique across all template names for its account. Only lowercase letters, numbers and underscores are allowed
3838
:ivar legacy_body: The string body field of the legacy content template associated with this Content resource
3939
:ivar url: The URL of the resource, relative to `https://content.twilio.com`.

twilio/rest/conversations/v1/conversation/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ def create(
637637
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
638638
}
639639
)
640+
640641
payload = self._version.create(
641642
method="POST", uri=self._uri, data=data, headers=headers
642643
)
@@ -698,6 +699,7 @@ async def create_async(
698699
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
699700
}
700701
)
702+
701703
payload = await self._version.create_async(
702704
method="POST", uri=self._uri, data=data, headers=headers
703705
)

twilio/rest/conversations/v1/conversation/message/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class WebhookEnabledType(object):
5050
:ivar url: An absolute API resource API URL for this message.
5151
:ivar delivery: An object that contains the summary of delivery statuses for the message to non-chat participants.
5252
:ivar links: Contains an absolute API resource URL to access the delivery & read receipts of this message.
53-
:ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
53+
:ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
5454
"""
5555

5656
def __init__(
@@ -540,7 +540,7 @@ def create(
540540
:param date_updated: The date that this resource was last updated. `null` if the message has not been edited.
541541
:param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
542542
:param media_sid: The Media SID to be attached to the new Message.
543-
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
543+
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
544544
:param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables.
545545
:param subject: The subject of the message, can be up to 256 characters long.
546546
@@ -564,6 +564,7 @@ def create(
564564
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
565565
}
566566
)
567+
567568
payload = self._version.create(
568569
method="POST", uri=self._uri, data=data, headers=headers
569570
)
@@ -597,7 +598,7 @@ async def create_async(
597598
:param date_updated: The date that this resource was last updated. `null` if the message has not been edited.
598599
:param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
599600
:param media_sid: The Media SID to be attached to the new Message.
600-
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
601+
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
601602
:param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables.
602603
:param subject: The subject of the message, can be up to 256 characters long.
603604
@@ -621,6 +622,7 @@ async def create_async(
621622
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
622623
}
623624
)
625+
624626
payload = await self._version.create_async(
625627
method="POST", uri=self._uri, data=data, headers=headers
626628
)

twilio/rest/conversations/v1/conversation/participant.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,7 @@ def create(
566566
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
567567
}
568568
)
569+
569570
payload = self._version.create(
570571
method="POST", uri=self._uri, data=data, headers=headers
571572
)
@@ -620,6 +621,7 @@ async def create_async(
620621
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
621622
}
622623
)
624+
623625
payload = await self._version.create_async(
624626
method="POST", uri=self._uri, data=data, headers=headers
625627
)

twilio/rest/conversations/v1/service/conversation/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -673,6 +673,7 @@ def create(
673673
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
674674
}
675675
)
676+
676677
payload = self._version.create(
677678
method="POST", uri=self._uri, data=data, headers=headers
678679
)
@@ -736,6 +737,7 @@ async def create_async(
736737
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
737738
}
738739
)
740+
739741
payload = await self._version.create_async(
740742
method="POST", uri=self._uri, data=data, headers=headers
741743
)

twilio/rest/conversations/v1/service/conversation/message/__init__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class WebhookEnabledType(object):
5151
:ivar delivery: An object that contains the summary of delivery statuses for the message to non-chat participants.
5252
:ivar url: An absolute API resource URL for this message.
5353
:ivar links: Contains an absolute API resource URL to access the delivery & read receipts of this message.
54-
:ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template.
54+
:ivar content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template.
5555
"""
5656

5757
def __init__(
@@ -559,7 +559,7 @@ def create(
559559
:param date_updated: The date that this resource was last updated. `null` if the message has not been edited.
560560
:param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
561561
:param media_sid: The Media SID to be attached to the new Message.
562-
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
562+
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
563563
:param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables.
564564
:param subject: The subject of the message, can be up to 256 characters long.
565565
@@ -583,6 +583,7 @@ def create(
583583
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
584584
}
585585
)
586+
586587
payload = self._version.create(
587588
method="POST", uri=self._uri, data=data, headers=headers
588589
)
@@ -619,7 +620,7 @@ async def create_async(
619620
:param date_updated: The date that this resource was last updated. `null` if the message has not been edited.
620621
:param attributes: A string metadata field you can use to store any data you wish. The string value must contain structurally valid JSON if specified. **Note** that if the attributes are not set \\\"{}\\\" will be returned.
621622
:param media_sid: The Media SID to be attached to the new Message.
622-
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content-api) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
623+
:param content_sid: The unique ID of the multi-channel [Rich Content](https://www.twilio.com/docs/content) template, required for template-generated messages. **Note** that if this field is set, `Body` and `MediaSid` parameters are ignored.
623624
:param content_variables: A structurally valid JSON string that contains values to resolve Rich Content template variables.
624625
:param subject: The subject of the message, can be up to 256 characters long.
625626
@@ -643,6 +644,7 @@ async def create_async(
643644
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
644645
}
645646
)
647+
646648
payload = await self._version.create_async(
647649
method="POST", uri=self._uri, data=data, headers=headers
648650
)

twilio/rest/conversations/v1/service/conversation/participant.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,7 @@ def create(
584584
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
585585
}
586586
)
587+
587588
payload = self._version.create(
588589
method="POST", uri=self._uri, data=data, headers=headers
589590
)
@@ -641,6 +642,7 @@ async def create_async(
641642
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
642643
}
643644
)
645+
644646
payload = await self._version.create_async(
645647
method="POST", uri=self._uri, data=data, headers=headers
646648
)

twilio/rest/conversations/v1/service/user/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,7 @@ def create(
501501
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
502502
}
503503
)
504+
504505
payload = self._version.create(
505506
method="POST", uri=self._uri, data=data, headers=headers
506507
)
@@ -543,6 +544,7 @@ async def create_async(
543544
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
544545
}
545546
)
547+
546548
payload = await self._version.create_async(
547549
method="POST", uri=self._uri, data=data, headers=headers
548550
)

twilio/rest/conversations/v1/user/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -471,6 +471,7 @@ def create(
471471
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
472472
}
473473
)
474+
474475
payload = self._version.create(
475476
method="POST", uri=self._uri, data=data, headers=headers
476477
)
@@ -511,6 +512,7 @@ async def create_async(
511512
"X-Twilio-Webhook-Enabled": x_twilio_webhook_enabled,
512513
}
513514
)
515+
514516
payload = await self._version.create_async(
515517
method="POST", uri=self._uri, data=data, headers=headers
516518
)

0 commit comments

Comments
 (0)
0