-
Notifications
You must be signed in to change notification settings - Fork 775
chore: add domain detail #739
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
r""" | ||
This code was generated by | ||
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
|
||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
from typing import Optional | ||
|
||
from twilio.base.domain import Domain | ||
from twilio.rest import Client | ||
from twilio.rest.preview_messaging.v1 import V1 | ||
|
||
|
||
class PreviewMessagingBase(Domain): | ||
def __init__(self, twilio: Client): | ||
""" | ||
Initialize the Preview Messaging Domain | ||
|
||
:returns: Domain for Accounts | ||
manisha1997 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
""" | ||
super().__init__(twilio, "https://preview.messaging.twilio.com") | ||
self._v1: Optional[V1] = None | ||
|
||
@property | ||
def v1(self) -> V1: | ||
""" | ||
:returns: Versions v1 of Preview Messaging | ||
""" | ||
if self._v1 is None: | ||
self._v1 = V1(self) | ||
return self._v1 | ||
|
||
def __repr__(self) -> str: | ||
""" | ||
Provide a friendly representation | ||
:returns: Machine friendly representation | ||
""" | ||
return "<Twilio.PreviewMessaging>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from twilio.rest.preview_messaging.PreviewMessagingBase import PreviewMessagingBase | ||
from twilio.rest.preview_messaging.v1.broadcast import BroadcastList | ||
from twilio.rest.preview_messaging.v1.message import MessageList | ||
|
||
|
||
class PreviewMessaging(PreviewMessagingBase): | ||
@property | ||
def broadcast(self) -> BroadcastList: | ||
return self.v1.broadcasts | ||
|
||
@property | ||
def messages(self) -> MessageList: | ||
return self.v1.messages |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
r""" | ||
This code was generated by | ||
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
|
||
Bulk Messaging and Broadcast | ||
Bulk Sending is a public Twilio REST API for 1:Many Message creation up to 100 recipients. Broadcast is a public Twilio REST API for 1:Many Message creation up to 10,000 recipients via file upload. | ||
|
||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
from typing import Optional | ||
from twilio.base.version import Version | ||
from twilio.base.domain import Domain | ||
from twilio.rest.preview_messaging.v1.broadcast import BroadcastList | ||
from twilio.rest.preview_messaging.v1.message import MessageList | ||
|
||
|
||
class V1(Version): | ||
def __init__(self, domain: Domain): | ||
""" | ||
Initialize the V1 version of PreviewMessaging | ||
|
||
:param domain: The Twilio.preview_messaging domain | ||
""" | ||
super().__init__(domain, "v1") | ||
self._broadcasts: Optional[BroadcastList] = None | ||
self._messages: Optional[MessageList] = None | ||
|
||
@property | ||
def broadcasts(self) -> BroadcastList: | ||
if self._broadcasts is None: | ||
self._broadcasts = BroadcastList(self) | ||
return self._broadcasts | ||
|
||
@property | ||
def messages(self) -> MessageList: | ||
if self._messages is None: | ||
self._messages = MessageList(self) | ||
return self._messages | ||
|
||
def __repr__(self) -> str: | ||
""" | ||
Provide a friendly representation | ||
:returns: Machine friendly representation | ||
""" | ||
return "<Twilio.PreviewMessaging.V1>" |
8000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
r""" | ||
This code was generated by | ||
___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __ | ||
| | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/ | ||
| |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \ | ||
|
||
Bulk Messaging and Broadcast | ||
Bulk Sending is a public Twilio REST API for 1:Many Message creation up to 100 recipients. Broadcast is a public Twilio REST API for 1:Many Message creation up to 10,000 recipients via file upload. | ||
|
||
NOTE: This class is auto generated by OpenAPI Generator. | ||
https://openapi-generator.tech | ||
Do not edit the class manually. | ||
""" | ||
|
||
|
||
from datetime import datetime | ||
from typing import Any, Dict, Optional, Union | ||
from twilio.base import deserialize, values | ||
|
||
from twilio.base.instance_resource import InstanceResource | ||
from twilio.base.list_resource import ListResource | ||
from twilio.base.version import Version | ||
|
||
|
||
class BroadcastInstance(InstanceResource): | ||
|
||
""" | ||
:ivar broadcast_sid: Numeric ID indentifying individual Broadcast requests | ||
:ivar created_date: Timestamp of when the Broadcast was created | ||
:ivar updated_date: Timestamp of when the Broadcast was last updated | ||
:ivar broadcast_status: Status of the Broadcast request. Valid values are None, Pending-Upload, Uploaded, Queued, Executing, Execution-Failure, Execution-Completed, Cancelation-Requested, and Canceled | ||
:ivar execution_details: | ||
:ivar results_file: Path to a file detailing successful requests and errors from Broadcast execution | ||
""" | ||
|
||
def __init__(self, version: Version, payload: Dict[str, Any]): | ||
super().__init__(version) | ||
|
||
self.broadcast_sid: Optional[str] = payload.get("broadcast_sid") | ||
self.created_date: Optional[datetime] = deserialize.iso8601_datetime( | ||
payload.get("created_date") | ||
) | ||
self.updated_date: Optional[datetime] = deserialize.iso8601_datetime( | ||
payload.get("updated_date") | ||
) | ||
self.broadcast_status: Optional[str] = payload.get("broadcast_status") | ||
self.execution_details: Optional[str] = payload.get("execution_details") | ||
self.results_file: Optional[str] = payload.get("results_file") | ||
|
||
def __repr__(self) -> str: | ||
""" | ||
Provide a friendly representation | ||
|
||
:returns: Machine friendly representation | ||
""" | ||
|
||
return "<Twilio.PreviewMessaging.V1.BroadcastInstance>" | ||
|
||
|
||
class BroadcastList(ListResource): | ||
def __init__(self, version: Version): | ||
""" | ||
Initialize the BroadcastList | ||
|
||
:param version: Version that contains the resource | ||
|
||
""" | ||
super().__init__(version) | ||
|
||
self._uri = "/Broadcasts" | ||
|
||
def create( | ||
self, x_twilio_request_key: Union[str, object] = values.unset | ||
) -> BroadcastInstance: | ||
""" | ||
Create the BroadcastInstance | ||
|
||
:param x_twilio_request_key: Idempotency key provided by the client | ||
|
||
:returns: The created BroadcastInstance | ||
""" | ||
|
||
data = values.of({}) | ||
headers = values.of( | ||
{ | ||
"X-Twilio-Request-Key": x_twilio_request_key, | ||
} | ||
) | ||
|
||
payload = self._version.create( | ||
method="POST", uri=self._uri, data=data, headers=headers | ||
) | ||
|
||
return BroadcastInstance(self._version, payload) | ||
|
||
async def create_async( | ||
self, x_twilio_request_key: Union[str, object] = values.unset | ||
) -> BroadcastInstance: | ||
""" | ||
Asynchronously create the BroadcastInstance | ||
|
||
:param x_twilio_request_key: Idempotency key provided by the client | ||
|
||
:returns: The created BroadcastInstance | ||
""" | ||
|
||
data = values.of({}) | ||
headers = values.of( | ||
{ | ||
"X-Twilio-Request-Key": x_twilio_request_key, | ||
} | ||
) | ||
|
||
payload = await self._version.create_async( | ||
method="POST", uri=self._uri, data=data, headers=headers | ||
) | ||
|
||
return BroadcastInstance(self._version, payload) | ||
|
||
def __repr__(self) -> str: | ||
""" | ||
Provide a friendly representation | ||
|
||
:returns: Machine friendly representation | ||
""" | ||
return "<Twilio.PreviewMessaging.V1.BroadcastList>" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.