id
int32
0
252k
repo
stringlengths
7
55
path
stringlengths
4
127
func_name
stringlengths
1
88
original_string
stringlengths
75
19.8k
language
stringclasses
1 value
code
stringlengths
51
19.8k
code_tokens
list
docstring
stringlengths
3
17.3k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
87
242
225,700
twilio/twilio-python
twilio/rest/video/v1/room/__init__.py
RoomContext.update
def update(self, status): """ Update the RoomInstance :param RoomInstance.RoomStatus status: Set to completed to end the Room. :returns: Updated RoomInstance :rtype: twilio.rest.video.v1.room.RoomInstance """ data = values.of({'Status': status, }) payload = self._version.update( 'POST', self._uri, data=data, ) return RoomInstance(self._version, payload, sid=self._solution['sid'], )
python
def update(self, status): data = values.of({'Status': status, }) payload = self._version.update( 'POST', self._uri, data=data, ) return RoomInstance(self._version, payload, sid=self._solution['sid'], )
[ "def", "update", "(", "self", ",", "status", ")", ":", "data", "=", "values", ".", "of", "(", "{", "'Status'", ":", "status", ",", "}", ")", "payload", "=", "self", ".", "_version", ".", "update", "(", "'POST'", ",", "self", ".", "_uri", ",", "da...
Update the RoomInstance :param RoomInstance.RoomStatus status: Set to completed to end the Room. :returns: Updated RoomInstance :rtype: twilio.rest.video.v1.room.RoomInstance
[ "Update", "the", "RoomInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/__init__.py#L310-L327
225,701
twilio/twilio-python
twilio/base/values.py
of
def of(d): """ Remove unset values from a dict. :param dict d: A dict to strip. :return dict: A dict with unset values removed. """ return {k: v for k, v in iteritems(d) if v != unset}
python
def of(d): return {k: v for k, v in iteritems(d) if v != unset}
[ "def", "of", "(", "d", ")", ":", "return", "{", "k", ":", "v", "for", "k", ",", "v", "in", "iteritems", "(", "d", ")", "if", "v", "!=", "unset", "}" ]
Remove unset values from a dict. :param dict d: A dict to strip. :return dict: A dict with unset values removed.
[ "Remove", "unset", "values", "from", "a", "dict", "." ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/values.py#L5-L12
225,702
twilio/twilio-python
twilio/rest/api/v2010/account/authorized_connect_app.py
AuthorizedConnectAppList.get
def get(self, connect_app_sid): """ Constructs a AuthorizedConnectAppContext :param connect_app_sid: The SID of the Connect App to fetch :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppContext :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppContext """ return AuthorizedConnectAppContext( self._version, account_sid=self._solution['account_sid'], connect_app_sid=connect_app_sid, )
python
def get(self, connect_app_sid): return AuthorizedConnectAppContext( self._version, account_sid=self._solution['account_sid'], connect_app_sid=connect_app_sid, )
[ "def", "get", "(", "self", ",", "connect_app_sid", ")", ":", "return", "AuthorizedConnectAppContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "connect_app_sid", "=", "connect_app_sid", ",",...
Constructs a AuthorizedConnectAppContext :param connect_app_sid: The SID of the Connect App to fetch :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppContext :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppContext
[ "Constructs", "a", "AuthorizedConnectAppContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/authorized_connect_app.py#L117-L130
225,703
twilio/twilio-python
twilio/rest/api/v2010/account/authorized_connect_app.py
AuthorizedConnectAppPage.get_instance
def get_instance(self, payload): """ Build an instance of AuthorizedConnectAppInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance """ return AuthorizedConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], )
python
def get_instance(self, payload): return AuthorizedConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "AuthorizedConnectAppInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", ")" ]
Build an instance of AuthorizedConnectAppInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance
[ "Build", "an", "instance", "of", "AuthorizedConnectAppInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/authorized_connect_app.py#L176-L189
225,704
twilio/twilio-python
twilio/rest/api/v2010/account/authorized_connect_app.py
AuthorizedConnectAppContext.fetch
def fetch(self): """ Fetch a AuthorizedConnectAppInstance :returns: Fetched AuthorizedConnectAppInstance :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return AuthorizedConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], connect_app_sid=self._solution['connect_app_sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return AuthorizedConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], connect_app_sid=self._solution['connect_app_sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Autho...
Fetch a AuthorizedConnectAppInstance :returns: Fetched AuthorizedConnectAppInstance :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppInstance
[ "Fetch", "a", "AuthorizedConnectAppInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/authorized_connect_app.py#L221-L241
225,705
twilio/twilio-python
twilio/rest/autopilot/v1/assistant/task/task_actions.py
TaskActionsList.get
def get(self): """ Constructs a TaskActionsContext :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsContext :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsContext """ return TaskActionsContext( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
def get(self): return TaskActionsContext( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
[ "def", "get", "(", "self", ")", ":", "return", "TaskActionsContext", "(", "self", ".", "_version", ",", "assistant_sid", "=", "self", ".", "_solution", "[", "'assistant_sid'", "]", ",", "task_sid", "=", "self", ".", "_solution", "[", "'task_sid'", "]", ","...
Constructs a TaskActionsContext :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsContext :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsContext
[ "Constructs", "a", "TaskActionsContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/task_actions.py#L38-L49
225,706
twilio/twilio-python
twilio/rest/autopilot/v1/assistant/task/task_actions.py
TaskActionsPage.get_instance
def get_instance(self, payload): """ Build an instance of TaskActionsInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance """ return TaskActionsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
def get_instance(self, payload): return TaskActionsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "TaskActionsInstance", "(", "self", ".", "_version", ",", "payload", ",", "assistant_sid", "=", "self", ".", "_solution", "[", "'assistant_sid'", "]", ",", "task_sid", "=", "self", ".", ...
Build an instance of TaskActionsInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance
[ "Build", "an", "instance", "of", "TaskActionsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/task_actions.py#L96-L110
225,707
twilio/twilio-python
twilio/rest/autopilot/v1/assistant/task/task_actions.py
TaskActionsContext.fetch
def fetch(self): """ Fetch a TaskActionsInstance :returns: Fetched TaskActionsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return TaskActionsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return TaskActionsInstance( self._version, payload, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['task_sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "TaskA...
Fetch a TaskActionsInstance :returns: Fetched TaskActionsInstance :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsInstance
[ "Fetch", "a", "TaskActionsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/task_actions.py#L144-L164
225,708
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/worker/worker_channel.py
WorkerChannelList.get
def get(self, sid): """ Constructs a WorkerChannelContext :param sid: The sid :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelContext :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelContext """ return WorkerChannelContext( self._version, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], sid=sid, )
python
def get(self, sid): return WorkerChannelContext( self._version, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "WorkerChannelContext", "(", "self", ".", "_version", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", "worker_sid", "=", "self", ".", "_solution", "[", "'work...
Constructs a WorkerChannelContext :param sid: The sid :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelContext :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelContext
[ "Constructs", "a", "WorkerChannelContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/worker_channel.py#L118-L132
225,709
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/worker/worker_channel.py
WorkerChannelPage.get_instance
def get_instance(self, payload): """ Build an instance of WorkerChannelInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance """ return WorkerChannelInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], )
python
def get_instance(self, payload): return WorkerChannelInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "WorkerChannelInstance", "(", "self", ".", "_version", ",", "payload", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", "worker_sid", "=", "self", "...
Build an instance of WorkerChannelInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance :rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelInstance
[ "Build", "an", "instance", "of", "WorkerChannelInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/worker_channel.py#L180-L194
225,710
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountList.create
def create(self, friendly_name=values.unset): """ Create a new AccountInstance :param unicode friendly_name: A human readable description of the account :returns: Newly created AccountInstance :rtype: twilio.rest.api.v2010.account.AccountInstance """ data = values.of({'FriendlyName': friendly_name, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AccountInstance(self._version, payload, )
python
def create(self, friendly_name=values.unset): data = values.of({'FriendlyName': friendly_name, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AccountInstance(self._version, payload, )
[ "def", "create", "(", "self", ",", "friendly_name", "=", "values", ".", "unset", ")", ":", "data", "=", "values", ".", "of", "(", "{", "'FriendlyName'", ":", "friendly_name", ",", "}", ")", "payload", "=", "self", ".", "_version", ".", "create", "(", ...
Create a new AccountInstance :param unicode friendly_name: A human readable description of the account :returns: Newly created AccountInstance :rtype: twilio.rest.api.v2010.account.AccountInstance
[ "Create", "a", "new", "AccountInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L59-L76
225,711
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.addresses
def addresses(self): """ Access the addresses :returns: twilio.rest.api.v2010.account.address.AddressList :rtype: twilio.rest.api.v2010.account.address.AddressList """ if self._addresses is None: self._addresses = AddressList(self._version, account_sid=self._solution['sid'], ) return self._addresses
python
def addresses(self): if self._addresses is None: self._addresses = AddressList(self._version, account_sid=self._solution['sid'], ) return self._addresses
[ "def", "addresses", "(", "self", ")", ":", "if", "self", ".", "_addresses", "is", "None", ":", "self", ".", "_addresses", "=", "AddressList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")", ...
Access the addresses :returns: twilio.rest.api.v2010.account.address.AddressList :rtype: twilio.rest.api.v2010.account.address.AddressList
[ "Access", "the", "addresses" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L333-L342
225,712
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.applications
def applications(self): """ Access the applications :returns: twilio.rest.api.v2010.account.application.ApplicationList :rtype: twilio.rest.api.v2010.account.application.ApplicationList """ if self._applications is None: self._applications = ApplicationList(self._version, account_sid=self._solution['sid'], ) return self._applications
python
def applications(self): if self._applications is None: self._applications = ApplicationList(self._version, account_sid=self._solution['sid'], ) return self._applications
[ "def", "applications", "(", "self", ")", ":", "if", "self", ".", "_applications", "is", "None", ":", "self", ".", "_applications", "=", "ApplicationList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ...
Access the applications :returns: twilio.rest.api.v2010.account.application.ApplicationList :rtype: twilio.rest.api.v2010.account.application.ApplicationList
[ "Access", "the", "applications" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L345-L354
225,713
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.authorized_connect_apps
def authorized_connect_apps(self): """ Access the authorized_connect_apps :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList """ if self._authorized_connect_apps is None: self._authorized_connect_apps = AuthorizedConnectAppList( self._version, account_sid=self._solution['sid'], ) return self._authorized_connect_apps
python
def authorized_connect_apps(self): if self._authorized_connect_apps is None: self._authorized_connect_apps = AuthorizedConnectAppList( self._version, account_sid=self._solution['sid'], ) return self._authorized_connect_apps
[ "def", "authorized_connect_apps", "(", "self", ")", ":", "if", "self", ".", "_authorized_connect_apps", "is", "None", ":", "self", ".", "_authorized_connect_apps", "=", "AuthorizedConnectAppList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".",...
Access the authorized_connect_apps :returns: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList :rtype: twilio.rest.api.v2010.account.authorized_connect_app.AuthorizedConnectAppList
[ "Access", "the", "authorized_connect_apps" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L357-L369
225,714
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.available_phone_numbers
def available_phone_numbers(self): """ Access the available_phone_numbers :returns: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList :rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList """ if self._available_phone_numbers is None: self._available_phone_numbers = AvailablePhoneNumberCountryList( self._version, account_sid=self._solution['sid'], ) return self._available_phone_numbers
python
def available_phone_numbers(self): if self._available_phone_numbers is None: self._available_phone_numbers = AvailablePhoneNumberCountryList( self._version, account_sid=self._solution['sid'], ) return self._available_phone_numbers
[ "def", "available_phone_numbers", "(", "self", ")", ":", "if", "self", ".", "_available_phone_numbers", "is", "None", ":", "self", ".", "_available_phone_numbers", "=", "AvailablePhoneNumberCountryList", "(", "self", ".", "_version", ",", "account_sid", "=", "self",...
Access the available_phone_numbers :returns: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList :rtype: twilio.rest.api.v2010.account.available_phone_number.AvailablePhoneNumberCountryList
[ "Access", "the", "available_phone_numbers" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L372-L384
225,715
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.balance
def balance(self): """ Access the balance :returns: twilio.rest.api.v2010.account.balance.BalanceList :rtype: twilio.rest.api.v2010.account.balance.BalanceList """ if self._balance is None: self._balance = BalanceList(self._version, account_sid=self._solution['sid'], ) return self._balance
python
def balance(self): if self._balance is None: self._balance = BalanceList(self._version, account_sid=self._solution['sid'], ) return self._balance
[ "def", "balance", "(", "self", ")", ":", "if", "self", ".", "_balance", "is", "None", ":", "self", ".", "_balance", "=", "BalanceList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")", "ret...
Access the balance :returns: twilio.rest.api.v2010.account.balance.BalanceList :rtype: twilio.rest.api.v2010.account.balance.BalanceList
[ "Access", "the", "balance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L387-L396
225,716
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.conferences
def conferences(self): """ Access the conferences :returns: twilio.rest.api.v2010.account.conference.ConferenceList :rtype: twilio.rest.api.v2010.account.conference.ConferenceList """ if self._conferences is None: self._conferences = ConferenceList(self._version, account_sid=self._solution['sid'], ) return self._conferences
python
def conferences(self): if self._conferences is None: self._conferences = ConferenceList(self._version, account_sid=self._solution['sid'], ) return self._conferences
[ "def", "conferences", "(", "self", ")", ":", "if", "self", ".", "_conferences", "is", "None", ":", "self", ".", "_conferences", "=", "ConferenceList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ","...
Access the conferences :returns: twilio.rest.api.v2010.account.conference.ConferenceList :rtype: twilio.rest.api.v2010.account.conference.ConferenceList
[ "Access", "the", "conferences" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L411-L420
225,717
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.connect_apps
def connect_apps(self): """ Access the connect_apps :returns: twilio.rest.api.v2010.account.connect_app.ConnectAppList :rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppList """ if self._connect_apps is None: self._connect_apps = ConnectAppList(self._version, account_sid=self._solution['sid'], ) return self._connect_apps
python
def connect_apps(self): if self._connect_apps is None: self._connect_apps = ConnectAppList(self._version, account_sid=self._solution['sid'], ) return self._connect_apps
[ "def", "connect_apps", "(", "self", ")", ":", "if", "self", ".", "_connect_apps", "is", "None", ":", "self", ".", "_connect_apps", "=", "ConnectAppList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ...
Access the connect_apps :returns: twilio.rest.api.v2010.account.connect_app.ConnectAppList :rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppList
[ "Access", "the", "connect_apps" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L423-L432
225,718
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.incoming_phone_numbers
def incoming_phone_numbers(self): """ Access the incoming_phone_numbers :returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList :rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList """ if self._incoming_phone_numbers is None: self._incoming_phone_numbers = IncomingPhoneNumberList( self._version, account_sid=self._solution['sid'], ) return self._incoming_phone_numbers
python
def incoming_phone_numbers(self): if self._incoming_phone_numbers is None: self._incoming_phone_numbers = IncomingPhoneNumberList( self._version, account_sid=self._solution['sid'], ) return self._incoming_phone_numbers
[ "def", "incoming_phone_numbers", "(", "self", ")", ":", "if", "self", ".", "_incoming_phone_numbers", "is", "None", ":", "self", ".", "_incoming_phone_numbers", "=", "IncomingPhoneNumberList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "...
Access the incoming_phone_numbers :returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList :rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberList
[ "Access", "the", "incoming_phone_numbers" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L435-L447
225,719
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.new_keys
def new_keys(self): """ Access the new_keys :returns: twilio.rest.api.v2010.account.new_key.NewKeyList :rtype: twilio.rest.api.v2010.account.new_key.NewKeyList """ if self._new_keys is None: self._new_keys = NewKeyList(self._version, account_sid=self._solution['sid'], ) return self._new_keys
python
def new_keys(self): if self._new_keys is None: self._new_keys = NewKeyList(self._version, account_sid=self._solution['sid'], ) return self._new_keys
[ "def", "new_keys", "(", "self", ")", ":", "if", "self", ".", "_new_keys", "is", "None", ":", "self", ".", "_new_keys", "=", "NewKeyList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")", "r...
Access the new_keys :returns: twilio.rest.api.v2010.account.new_key.NewKeyList :rtype: twilio.rest.api.v2010.account.new_key.NewKeyList
[ "Access", "the", "new_keys" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L474-L483
225,720
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.new_signing_keys
def new_signing_keys(self): """ Access the new_signing_keys :returns: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList :rtype: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList """ if self._new_signing_keys is None: self._new_signing_keys = NewSigningKeyList(self._version, account_sid=self._solution['sid'], ) return self._new_signing_keys
python
def new_signing_keys(self): if self._new_signing_keys is None: self._new_signing_keys = NewSigningKeyList(self._version, account_sid=self._solution['sid'], ) return self._new_signing_keys
[ "def", "new_signing_keys", "(", "self", ")", ":", "if", "self", ".", "_new_signing_keys", "is", "None", ":", "self", ".", "_new_signing_keys", "=", "NewSigningKeyList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'s...
Access the new_signing_keys :returns: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList :rtype: twilio.rest.api.v2010.account.new_signing_key.NewSigningKeyList
[ "Access", "the", "new_signing_keys" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L486-L495
225,721
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.outgoing_caller_ids
def outgoing_caller_ids(self): """ Access the outgoing_caller_ids :returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList :rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList """ if self._outgoing_caller_ids is None: self._outgoing_caller_ids = OutgoingCallerIdList(self._version, account_sid=self._solution['sid'], ) return self._outgoing_caller_ids
python
def outgoing_caller_ids(self): if self._outgoing_caller_ids is None: self._outgoing_caller_ids = OutgoingCallerIdList(self._version, account_sid=self._solution['sid'], ) return self._outgoing_caller_ids
[ "def", "outgoing_caller_ids", "(", "self", ")", ":", "if", "self", ".", "_outgoing_caller_ids", "is", "None", ":", "self", ".", "_outgoing_caller_ids", "=", "OutgoingCallerIdList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", ...
Access the outgoing_caller_ids :returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList :rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdList
[ "Access", "the", "outgoing_caller_ids" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L510-L519
225,722
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.queues
def queues(self): """ Access the queues :returns: twilio.rest.api.v2010.account.queue.QueueList :rtype: twilio.rest.api.v2010.account.queue.QueueList """ if self._queues is None: self._queues = QueueList(self._version, account_sid=self._solution['sid'], ) return self._queues
python
def queues(self): if self._queues is None: self._queues = QueueList(self._version, account_sid=self._solution['sid'], ) return self._queues
[ "def", "queues", "(", "self", ")", ":", "if", "self", ".", "_queues", "is", "None", ":", "self", ".", "_queues", "=", "QueueList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")", "return",...
Access the queues :returns: twilio.rest.api.v2010.account.queue.QueueList :rtype: twilio.rest.api.v2010.account.queue.QueueList
[ "Access", "the", "queues" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L522-L531
225,723
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.signing_keys
def signing_keys(self): """ Access the signing_keys :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyList :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList """ if self._signing_keys is None: self._signing_keys = SigningKeyList(self._version, account_sid=self._solution['sid'], ) return self._signing_keys
python
def signing_keys(self): if self._signing_keys is None: self._signing_keys = SigningKeyList(self._version, account_sid=self._solution['sid'], ) return self._signing_keys
[ "def", "signing_keys", "(", "self", ")", ":", "if", "self", ".", "_signing_keys", "is", "None", ":", "self", ".", "_signing_keys", "=", "SigningKeyList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ...
Access the signing_keys :returns: twilio.rest.api.v2010.account.signing_key.SigningKeyList :rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyList
[ "Access", "the", "signing_keys" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L546-L555
225,724
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.sip
def sip(self): """ Access the sip :returns: twilio.rest.api.v2010.account.sip.SipList :rtype: twilio.rest.api.v2010.account.sip.SipList """ if self._sip is None: self._sip = SipList(self._version, account_sid=self._solution['sid'], ) return self._sip
python
def sip(self): if self._sip is None: self._sip = SipList(self._version, account_sid=self._solution['sid'], ) return self._sip
[ "def", "sip", "(", "self", ")", ":", "if", "self", ".", "_sip", "is", "None", ":", "self", ".", "_sip", "=", "SipList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")", "return", "self", ...
Access the sip :returns: twilio.rest.api.v2010.account.sip.SipList :rtype: twilio.rest.api.v2010.account.sip.SipList
[ "Access", "the", "sip" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L558-L567
225,725
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.tokens
def tokens(self): """ Access the tokens :returns: twilio.rest.api.v2010.account.token.TokenList :rtype: twilio.rest.api.v2010.account.token.TokenList """ if self._tokens is None: self._tokens = TokenList(self._version, account_sid=self._solution['sid'], ) return self._tokens
python
def tokens(self): if self._tokens is None: self._tokens = TokenList(self._version, account_sid=self._solution['sid'], ) return self._tokens
[ "def", "tokens", "(", "self", ")", ":", "if", "self", ".", "_tokens", "is", "None", ":", "self", ".", "_tokens", "=", "TokenList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")", "return",...
Access the tokens :returns: twilio.rest.api.v2010.account.token.TokenList :rtype: twilio.rest.api.v2010.account.token.TokenList
[ "Access", "the", "tokens" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L582-L591
225,726
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.transcriptions
def transcriptions(self): """ Access the transcriptions :returns: twilio.rest.api.v2010.account.transcription.TranscriptionList :rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList """ if self._transcriptions is None: self._transcriptions = TranscriptionList(self._version, account_sid=self._solution['sid'], ) return self._transcriptions
python
def transcriptions(self): if self._transcriptions is None: self._transcriptions = TranscriptionList(self._version, account_sid=self._solution['sid'], ) return self._transcriptions
[ "def", "transcriptions", "(", "self", ")", ":", "if", "self", ".", "_transcriptions", "is", "None", ":", "self", ".", "_transcriptions", "=", "TranscriptionList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'sid'", ...
Access the transcriptions :returns: twilio.rest.api.v2010.account.transcription.TranscriptionList :rtype: twilio.rest.api.v2010.account.transcription.TranscriptionList
[ "Access", "the", "transcriptions" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L594-L603
225,727
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountContext.validation_requests
def validation_requests(self): """ Access the validation_requests :returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestList :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestList """ if self._validation_requests is None: self._validation_requests = ValidationRequestList(self._version, account_sid=self._solution['sid'], ) return self._validation_requests
python
def validation_requests(self): if self._validation_requests is None: self._validation_requests = ValidationRequestList(self._version, account_sid=self._solution['sid'], ) return self._validation_requests
[ "def", "validation_requests", "(", "self", ")", ":", "if", "self", ".", "_validation_requests", "is", "None", ":", "self", ".", "_validation_requests", "=", "ValidationRequestList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution",...
Access the validation_requests :returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestList :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestList
[ "Access", "the", "validation_requests" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L618-L627
225,728
twilio/twilio-python
twilio/rest/api/v2010/account/__init__.py
AccountInstance.update
def update(self, friendly_name=values.unset, status=values.unset): """ Update the AccountInstance :param unicode friendly_name: FriendlyName to update :param AccountInstance.Status status: Status to update the Account with :returns: Updated AccountInstance :rtype: twilio.rest.api.v2010.account.AccountInstance """ return self._proxy.update(friendly_name=friendly_name, status=status, )
python
def update(self, friendly_name=values.unset, status=values.unset): return self._proxy.update(friendly_name=friendly_name, status=status, )
[ "def", "update", "(", "self", ",", "friendly_name", "=", "values", ".", "unset", ",", "status", "=", "values", ".", "unset", ")", ":", "return", "self", ".", "_proxy", ".", "update", "(", "friendly_name", "=", "friendly_name", ",", "status", "=", "status...
Update the AccountInstance :param unicode friendly_name: FriendlyName to update :param AccountInstance.Status status: Status to update the Account with :returns: Updated AccountInstance :rtype: twilio.rest.api.v2010.account.AccountInstance
[ "Update", "the", "AccountInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/__init__.py#L781-L791
225,729
twilio/twilio-python
twilio/rest/api/v2010/account/validation_request.py
ValidationRequestList.create
def create(self, phone_number, friendly_name=values.unset, call_delay=values.unset, extension=values.unset, status_callback=values.unset, status_callback_method=values.unset): """ Create a new ValidationRequestInstance :param unicode phone_number: The phone number to verify in E.164 format :param unicode friendly_name: A string to describe the resource :param unicode call_delay: The number of seconds to delay before initiating the verification call :param unicode extension: The digits to dial after connecting the verification call :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_method: The HTTP method we should use to call status_callback :returns: Newly created ValidationRequestInstance :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance """ data = values.of({ 'PhoneNumber': phone_number, 'FriendlyName': friendly_name, 'CallDelay': call_delay, 'Extension': extension, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, }) payload = self._version.create( 'POST', self._uri, data=data, ) return ValidationRequestInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
def create(self, phone_number, friendly_name=values.unset, call_delay=values.unset, extension=values.unset, status_callback=values.unset, status_callback_method=values.unset): data = values.of({ 'PhoneNumber': phone_number, 'FriendlyName': friendly_name, 'CallDelay': call_delay, 'Extension': extension, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, }) payload = self._version.create( 'POST', self._uri, data=data, ) return ValidationRequestInstance(self._version, payload, account_sid=self._solution['account_sid'], )
[ "def", "create", "(", "self", ",", "phone_number", ",", "friendly_name", "=", "values", ".", "unset", ",", "call_delay", "=", "values", ".", "unset", ",", "extension", "=", "values", ".", "unset", ",", "status_callback", "=", "values", ".", "unset", ",", ...
Create a new ValidationRequestInstance :param unicode phone_number: The phone number to verify in E.164 format :param unicode friendly_name: A string to describe the resource :param unicode call_delay: The number of seconds to delay before initiating the verification call :param unicode extension: The digits to dial after connecting the verification call :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_method: The HTTP method we should use to call status_callback :returns: Newly created ValidationRequestInstance :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
[ "Create", "a", "new", "ValidationRequestInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/validation_request.py#L35-L66
225,730
twilio/twilio-python
twilio/rest/api/v2010/account/validation_request.py
ValidationRequestPage.get_instance
def get_instance(self, payload): """ Build an instance of ValidationRequestInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance """ return ValidationRequestInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
def get_instance(self, payload): return ValidationRequestInstance(self._version, payload, account_sid=self._solution['account_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "ValidationRequestInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", ")" ]
Build an instance of ValidationRequestInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance :rtype: twilio.rest.api.v2010.account.validation_request.ValidationRequestInstance
[ "Build", "an", "instance", "of", "ValidationRequestInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/validation_request.py#L97-L106
225,731
twilio/twilio-python
twilio/rest/studio/v1/flow/execution/execution_step/__init__.py
ExecutionStepList.get
def get(self, sid): """ Constructs a ExecutionStepContext :param sid: Step Sid. :returns: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepContext :rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepContext """ return ExecutionStepContext( self._version, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], sid=sid, )
python
def get(self, sid): return ExecutionStepContext( self._version, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "ExecutionStepContext", "(", "self", ".", "_version", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'flow_sid'", "]", ",", "execution_sid", "=", "self", ".", "_solution", "[", "'execution_s...
Constructs a ExecutionStepContext :param sid: Step Sid. :returns: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepContext :rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepContext
[ "Constructs", "a", "ExecutionStepContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/execution/execution_step/__init__.py#L119-L133
225,732
twilio/twilio-python
twilio/rest/studio/v1/flow/execution/execution_step/__init__.py
ExecutionStepPage.get_instance
def get_instance(self, payload): """ Build an instance of ExecutionStepInstance :param dict payload: Payload response from the API :returns: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance """ return ExecutionStepInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], )
python
def get_instance(self, payload): return ExecutionStepInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "ExecutionStepInstance", "(", "self", ".", "_version", ",", "payload", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'flow_sid'", "]", ",", "execution_sid", "=", "self", ".", "...
Build an instance of ExecutionStepInstance :param dict payload: Payload response from the API :returns: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance
[ "Build", "an", "instance", "of", "ExecutionStepInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/execution/execution_step/__init__.py#L181-L195
225,733
twilio/twilio-python
twilio/rest/studio/v1/flow/execution/execution_step/__init__.py
ExecutionStepContext.fetch
def fetch(self): """ Fetch a ExecutionStepInstance :returns: Fetched ExecutionStepInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return ExecutionStepInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], sid=self._solution['sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return ExecutionStepInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], sid=self._solution['sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Execu...
Fetch a ExecutionStepInstance :returns: Fetched ExecutionStepInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.ExecutionStepInstance
[ "Fetch", "a", "ExecutionStepInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/execution/execution_step/__init__.py#L231-L252
225,734
twilio/twilio-python
twilio/rest/autopilot/v1/assistant/style_sheet.py
StyleSheetPage.get_instance
def get_instance(self, payload): """ Build an instance of StyleSheetInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance :rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance """ return StyleSheetInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
python
def get_instance(self, payload): return StyleSheetInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "StyleSheetInstance", "(", "self", ".", "_version", ",", "payload", ",", "assistant_sid", "=", "self", ".", "_solution", "[", "'assistant_sid'", "]", ",", ")" ]
Build an instance of StyleSheetInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance :rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance
[ "Build", "an", "instance", "of", "StyleSheetInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/style_sheet.py#L86-L95
225,735
twilio/twilio-python
twilio/rest/autopilot/v1/assistant/style_sheet.py
StyleSheetContext.fetch
def fetch(self): """ Fetch a StyleSheetInstance :returns: Fetched StyleSheetInstance :rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return StyleSheetInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return StyleSheetInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Style...
Fetch a StyleSheetInstance :returns: Fetched StyleSheetInstance :rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetInstance
[ "Fetch", "a", "StyleSheetInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/style_sheet.py#L128-L143
225,736
twilio/twilio-python
twilio/rest/sync/v1/service/sync_map/sync_map_item.py
SyncMapItemList.create
def create(self, key, data, ttl=values.unset, item_ttl=values.unset, collection_ttl=values.unset): """ Create a new SyncMapItemInstance :param unicode key: The unique user-defined key of this Map Item. :param dict data: Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a JSON object, up to 16KB. :param unicode ttl: Alias for item_ttl :param unicode item_ttl: Time-to-live of this item in seconds, defaults to no expiration. :param unicode collection_ttl: Time-to-live of this item's parent Map in seconds, defaults to no expiration. :returns: Newly created SyncMapItemInstance :rtype: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance """ data = values.of({ 'Key': key, 'Data': serialize.object(data), 'Ttl': ttl, 'ItemTtl': item_ttl, 'CollectionTtl': collection_ttl, }) payload = self._version.create( 'POST', self._uri, data=data, ) return SyncMapItemInstance( self._version, payload, service_sid=self._solution['service_sid'], map_sid=self._solution['map_sid'], )
python
def create(self, key, data, ttl=values.unset, item_ttl=values.unset, collection_ttl=values.unset): data = values.of({ 'Key': key, 'Data': serialize.object(data), 'Ttl': ttl, 'ItemTtl': item_ttl, 'CollectionTtl': collection_ttl, }) payload = self._version.create( 'POST', self._uri, data=data, ) return SyncMapItemInstance( self._version, payload, service_sid=self._solution['service_sid'], map_sid=self._solution['map_sid'], )
[ "def", "create", "(", "self", ",", "key", ",", "data", ",", "ttl", "=", "values", ".", "unset", ",", "item_ttl", "=", "values", ".", "unset", ",", "collection_ttl", "=", "values", ".", "unset", ")", ":", "data", "=", "values", ".", "of", "(", "{", ...
Create a new SyncMapItemInstance :param unicode key: The unique user-defined key of this Map Item. :param dict data: Contains arbitrary user-defined, schema-less data that this Map Item stores, represented by a JSON object, up to 16KB. :param unicode ttl: Alias for item_ttl :param unicode item_ttl: Time-to-live of this item in seconds, defaults to no expiration. :param unicode collection_ttl: Time-to-live of this item's parent Map in seconds, defaults to no expiration. :returns: Newly created SyncMapItemInstance :rtype: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemInstance
[ "Create", "a", "new", "SyncMapItemInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_map/sync_map_item.py#L39-L72
225,737
twilio/twilio-python
twilio/rest/api/v2010/account/available_phone_number/national.py
NationalPage.get_instance
def get_instance(self, payload): """ Build an instance of NationalInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance """ return NationalInstance( self._version, payload, account_sid=self._solution['account_sid'], country_code=self._solution['country_code'], )
python
def get_instance(self, payload): return NationalInstance( self._version, payload, account_sid=self._solution['account_sid'], country_code=self._solution['country_code'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "NationalInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "country_code", "=", "self", ".", "...
Build an instance of NationalInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.national.NationalInstance
[ "Build", "an", "instance", "of", "NationalInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/available_phone_number/national.py#L292-L306
225,738
twilio/twilio-python
twilio/rest/api/v2010/account/usage/trigger.py
TriggerList.create
def create(self, callback_url, trigger_value, usage_category, callback_method=values.unset, friendly_name=values.unset, recurring=values.unset, trigger_by=values.unset): """ Create a new TriggerInstance :param unicode callback_url: The URL we call when the trigger fires :param unicode trigger_value: The usage value at which the trigger should fire :param TriggerInstance.UsageCategory usage_category: The usage category the trigger watches :param unicode callback_method: The HTTP method to use to call callback_url :param unicode friendly_name: A string to describe the resource :param TriggerInstance.Recurring recurring: The frequency of a recurring UsageTrigger :param TriggerInstance.TriggerField trigger_by: The field in the UsageRecord resource that fires the trigger :returns: Newly created TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance """ data = values.of({ 'CallbackUrl': callback_url, 'TriggerValue': trigger_value, 'UsageCategory': usage_category, 'CallbackMethod': callback_method, 'FriendlyName': friendly_name, 'Recurring': recurring, 'TriggerBy': trigger_by, }) payload = self._version.create( 'POST', self._uri, data=data, ) return TriggerInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
def create(self, callback_url, trigger_value, usage_category, callback_method=values.unset, friendly_name=values.unset, recurring=values.unset, trigger_by=values.unset): data = values.of({ 'CallbackUrl': callback_url, 'TriggerValue': trigger_value, 'UsageCategory': usage_category, 'CallbackMethod': callback_method, 'FriendlyName': friendly_name, 'Recurring': recurring, 'TriggerBy': trigger_by, }) payload = self._version.create( 'POST', self._uri, data=data, ) return TriggerInstance(self._version, payload, account_sid=self._solution['account_sid'], )
[ "def", "create", "(", "self", ",", "callback_url", ",", "trigger_value", ",", "usage_category", ",", "callback_method", "=", "values", ".", "unset", ",", "friendly_name", "=", "values", ".", "unset", ",", "recurring", "=", "values", ".", "unset", ",", "trigg...
Create a new TriggerInstance :param unicode callback_url: The URL we call when the trigger fires :param unicode trigger_value: The usage value at which the trigger should fire :param TriggerInstance.UsageCategory usage_category: The usage category the trigger watches :param unicode callback_method: The HTTP method to use to call callback_url :param unicode friendly_name: A string to describe the resource :param TriggerInstance.Recurring recurring: The frequency of a recurring UsageTrigger :param TriggerInstance.TriggerField trigger_by: The field in the UsageRecord resource that fires the trigger :returns: Newly created TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
[ "Create", "a", "new", "TriggerInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/trigger.py#L36-L69
225,739
twilio/twilio-python
twilio/rest/api/v2010/account/usage/trigger.py
TriggerList.stream
def stream(self, recurring=values.unset, trigger_by=values.unset, usage_category=values.unset, limit=None, page_size=None): """ Streams TriggerInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.api.v2010.account.usage.trigger.TriggerInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( recurring=recurring, trigger_by=trigger_by, usage_category=usage_category, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
def stream(self, recurring=values.unset, trigger_by=values.unset, usage_category=values.unset, limit=None, page_size=None): limits = self._version.read_limits(limit, page_size) page = self.page( recurring=recurring, trigger_by=trigger_by, usage_category=usage_category, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
[ "def", "stream", "(", "self", ",", "recurring", "=", "values", ".", "unset", ",", "trigger_by", "=", "values", ".", "unset", ",", "usage_category", "=", "values", ".", "unset", ",", "limit", "=", "None", ",", "page_size", "=", "None", ")", ":", "limits...
Streams TriggerInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.api.v2010.account.usage.trigger.TriggerInstance]
[ "Streams", "TriggerInstance", "records", "from", "the", "API", "as", "a", "generator", "stream", ".", "This", "operation", "lazily", "loads", "records", "as", "efficiently", "as", "possible", "until", "the", "limit", "is", "reached", ".", "The", "results", "ar...
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/trigger.py#L71-L101
225,740
twilio/twilio-python
twilio/rest/api/v2010/account/usage/trigger.py
TriggerList.page
def page(self, recurring=values.unset, trigger_by=values.unset, usage_category=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of TriggerInstance records from the API. Request is executed immediately :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage """ params = values.of({ 'Recurring': recurring, 'TriggerBy': trigger_by, 'UsageCategory': usage_category, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TriggerPage(self._version, response, self._solution)
python
def page(self, recurring=values.unset, trigger_by=values.unset, usage_category=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): params = values.of({ 'Recurring': recurring, 'TriggerBy': trigger_by, 'UsageCategory': usage_category, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TriggerPage(self._version, response, self._solution)
[ "def", "page", "(", "self", ",", "recurring", "=", "values", ".", "unset", ",", "trigger_by", "=", "values", ".", "unset", ",", "usage_category", "=", "values", ".", "unset", ",", "page_token", "=", "values", ".", "unset", ",", "page_number", "=", "value...
Retrieve a single page of TriggerInstance records from the API. Request is executed immediately :param TriggerInstance.Recurring recurring: The frequency of recurring UsageTriggers to read :param TriggerInstance.TriggerField trigger_by: The trigger field of the UsageTriggers to read :param TriggerInstance.UsageCategory usage_category: The usage category of the UsageTriggers to read :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage
[ "Retrieve", "a", "single", "page", "of", "TriggerInstance", "records", "from", "the", "API", ".", "Request", "is", "executed", "immediately" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/trigger.py#L131-L163
225,741
twilio/twilio-python
twilio/rest/api/v2010/account/usage/trigger.py
TriggerList.get
def get(self, sid): """ Constructs a TriggerContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerContext :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext """ return TriggerContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
python
def get(self, sid): return TriggerContext(self._version, account_sid=self._solution['account_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "TriggerContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "sid", "=", "sid", ",", ")" ]
Constructs a TriggerContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerContext :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerContext
[ "Constructs", "a", "TriggerContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/trigger.py#L182-L191
225,742
twilio/twilio-python
twilio/rest/api/v2010/account/usage/trigger.py
TriggerPage.get_instance
def get_instance(self, payload): """ Build an instance of TriggerInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance """ return TriggerInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
def get_instance(self, payload): return TriggerInstance(self._version, payload, account_sid=self._solution['account_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "TriggerInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", ")" ]
Build an instance of TriggerInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance
[ "Build", "an", "instance", "of", "TriggerInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/trigger.py#L233-L242
225,743
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.py
WorkspaceCumulativeStatisticsPage.get_instance
def get_instance(self, payload): """ Build an instance of WorkspaceCumulativeStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance """ return WorkspaceCumulativeStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], )
python
def get_instance(self, payload): return WorkspaceCumulativeStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "WorkspaceCumulativeStatisticsInstance", "(", "self", ".", "_version", ",", "payload", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", ")" ]
Build an instance of WorkspaceCumulativeStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance
[ "Build", "an", "instance", "of", "WorkspaceCumulativeStatisticsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workspace_cumulative_statistics.py#L89-L102
225,744
twilio/twilio-python
twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.py
AssignedAddOnExtensionList.get
def get(self, sid): """ Constructs a AssignedAddOnExtensionContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionContext :rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionContext """ return AssignedAddOnExtensionContext( self._version, account_sid=self._solution['account_sid'], resource_sid=self._solution['resource_sid'], assigned_add_on_sid=self._solution['assigned_add_on_sid'], sid=sid, )
python
def get(self, sid): return AssignedAddOnExtensionContext( self._version, account_sid=self._solution['account_sid'], resource_sid=self._solution['resource_sid'], assigned_add_on_sid=self._solution['assigned_add_on_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "AssignedAddOnExtensionContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "resource_sid", "=", "self", ".", "_solution", "[", ...
Constructs a AssignedAddOnExtensionContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionContext :rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionContext
[ "Constructs", "a", "AssignedAddOnExtensionContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.py#L123-L138
225,745
twilio/twilio-python
twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.py
AssignedAddOnExtensionPage.get_instance
def get_instance(self, payload): """ Build an instance of AssignedAddOnExtensionInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionInstance :rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionInstance """ return AssignedAddOnExtensionInstance( self._version, payload, account_sid=self._solution['account_sid'], resource_sid=self._solution['resource_sid'], assigned_add_on_sid=self._solution['assigned_add_on_sid'], )
python
def get_instance(self, payload): return AssignedAddOnExtensionInstance( self._version, payload, account_sid=self._solution['account_sid'], resource_sid=self._solution['resource_sid'], assigned_add_on_sid=self._solution['assigned_add_on_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "AssignedAddOnExtensionInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "resource_sid", "=", "sel...
Build an instance of AssignedAddOnExtensionInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionInstance :rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.assigned_add_on_extension.AssignedAddOnExtensionInstance
[ "Build", "an", "instance", "of", "AssignedAddOnExtensionInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/assigned_add_on_extension.py#L189-L204
225,746
twilio/twilio-python
twilio/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.py
HighriskSpecialPrefixPage.get_instance
def get_instance(self, payload): """ Build an instance of HighriskSpecialPrefixInstance :param dict payload: Payload response from the API :returns: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixInstance :rtype: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixInstance """ return HighriskSpecialPrefixInstance(self._version, payload, iso_code=self._solution['iso_code'], )
python
def get_instance(self, payload): return HighriskSpecialPrefixInstance(self._version, payload, iso_code=self._solution['iso_code'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "HighriskSpecialPrefixInstance", "(", "self", ".", "_version", ",", "payload", ",", "iso_code", "=", "self", ".", "_solution", "[", "'iso_code'", "]", ",", ")" ]
Build an instance of HighriskSpecialPrefixInstance :param dict payload: Payload response from the API :returns: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixInstance :rtype: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixInstance
[ "Build", "an", "instance", "of", "HighriskSpecialPrefixInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/country/highrisk_special_prefix.py#L148-L157
225,747
twilio/twilio-python
twilio/rest/api/v2010/account/sip/__init__.py
SipList.domains
def domains(self): """ Access the domains :returns: twilio.rest.api.v2010.account.sip.domain.DomainList :rtype: twilio.rest.api.v2010.account.sip.domain.DomainList """ if self._domains is None: self._domains = DomainList(self._version, account_sid=self._solution['account_sid'], ) return self._domains
python
def domains(self): if self._domains is None: self._domains = DomainList(self._version, account_sid=self._solution['account_sid'], ) return self._domains
[ "def", "domains", "(", "self", ")", ":", "if", "self", ".", "_domains", "is", "None", ":", "self", ".", "_domains", "=", "DomainList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", ")",...
Access the domains :returns: twilio.rest.api.v2010.account.sip.domain.DomainList :rtype: twilio.rest.api.v2010.account.sip.domain.DomainList
[ "Access", "the", "domains" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/__init__.py#L42-L51
225,748
twilio/twilio-python
twilio/rest/api/v2010/account/sip/__init__.py
SipList.credential_lists
def credential_lists(self): """ Access the credential_lists :returns: twilio.rest.api.v2010.account.sip.credential_list.CredentialListList :rtype: twilio.rest.api.v2010.account.sip.credential_list.CredentialListList """ if self._credential_lists is None: self._credential_lists = CredentialListList( self._version, account_sid=self._solution['account_sid'], ) return self._credential_lists
python
def credential_lists(self): if self._credential_lists is None: self._credential_lists = CredentialListList( self._version, account_sid=self._solution['account_sid'], ) return self._credential_lists
[ "def", "credential_lists", "(", "self", ")", ":", "if", "self", ".", "_credential_lists", "is", "None", ":", "self", ".", "_credential_lists", "=", "CredentialListList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'...
Access the credential_lists :returns: twilio.rest.api.v2010.account.sip.credential_list.CredentialListList :rtype: twilio.rest.api.v2010.account.sip.credential_list.CredentialListList
[ "Access", "the", "credential_lists" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/__init__.py#L69-L81
225,749
twilio/twilio-python
twilio/rest/api/v2010/account/sip/__init__.py
SipPage.get_instance
def get_instance(self, payload): """ Build an instance of SipInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.SipInstance :rtype: twilio.rest.api.v2010.account.sip.SipInstance """ return SipInstance(self._version, payload, account_sid=self._solution['account_sid'], )
python
def get_instance(self, payload): return SipInstance(self._version, payload, account_sid=self._solution['account_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "SipInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", ")" ]
Build an instance of SipInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.SipInstance :rtype: twilio.rest.api.v2010.account.sip.SipInstance
[ "Build", "an", "instance", "of", "SipInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/__init__.py#L112-L121
225,750
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.py
TaskQueuesStatisticsList.stream
def stream(self, end_date=values.unset, friendly_name=values.unset, minutes=values.unset, start_date=values.unset, task_channel=values.unset, split_by_wait_time=values.unset, limit=None, page_size=None): """ Streams TaskQueuesStatisticsInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param datetime end_date: Filter cumulative statistics by an end date. :param unicode friendly_name: Filter the TaskQueue stats based on a TaskQueue's name :param unicode minutes: Filter cumulative statistics by up to 'x' minutes in the past. :param datetime start_date: Filter cumulative statistics by a start date. :param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel. :param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds. :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( end_date=end_date, friendly_name=friendly_name, minutes=minutes, start_date=start_date, task_channel=task_channel, split_by_wait_time=split_by_wait_time, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
def stream(self, end_date=values.unset, friendly_name=values.unset, minutes=values.unset, start_date=values.unset, task_channel=values.unset, split_by_wait_time=values.unset, limit=None, page_size=None): limits = self._version.read_limits(limit, page_size) page = self.page( end_date=end_date, friendly_name=friendly_name, minutes=minutes, start_date=start_date, task_channel=task_channel, split_by_wait_time=split_by_wait_time, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
[ "def", "stream", "(", "self", ",", "end_date", "=", "values", ".", "unset", ",", "friendly_name", "=", "values", ".", "unset", ",", "minutes", "=", "values", ".", "unset", ",", "start_date", "=", "values", ".", "unset", ",", "task_channel", "=", "values"...
Streams TaskQueuesStatisticsInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param datetime end_date: Filter cumulative statistics by an end date. :param unicode friendly_name: Filter the TaskQueue stats based on a TaskQueue's name :param unicode minutes: Filter cumulative statistics by up to 'x' minutes in the past. :param datetime start_date: Filter cumulative statistics by a start date. :param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel. :param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds. :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance]
[ "Streams", "TaskQueuesStatisticsInstance", "records", "from", "the", "API", "as", "a", "generator", "stream", ".", "This", "operation", "lazily", "loads", "records", "as", "efficiently", "as", "possible", "until", "the", "limit", "is", "reached", ".", "The", "re...
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.py#L35-L73
225,751
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.py
TaskQueuesStatisticsList.page
def page(self, end_date=values.unset, friendly_name=values.unset, minutes=values.unset, start_date=values.unset, task_channel=values.unset, split_by_wait_time=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of TaskQueuesStatisticsInstance records from the API. Request is executed immediately :param datetime end_date: Filter cumulative statistics by an end date. :param unicode friendly_name: Filter the TaskQueue stats based on a TaskQueue's name :param unicode minutes: Filter cumulative statistics by up to 'x' minutes in the past. :param datetime start_date: Filter cumulative statistics by a start date. :param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel. :param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds. :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of TaskQueuesStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsPage """ params = values.of({ 'EndDate': serialize.iso8601_datetime(end_date), 'FriendlyName': friendly_name, 'Minutes': minutes, 'StartDate': serialize.iso8601_datetime(start_date), 'TaskChannel': task_channel, 'SplitByWaitTime': split_by_wait_time, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TaskQueuesStatisticsPage(self._version, response, self._solution)
python
def page(self, end_date=values.unset, friendly_name=values.unset, minutes=values.unset, start_date=values.unset, task_channel=values.unset, split_by_wait_time=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): params = values.of({ 'EndDate': serialize.iso8601_datetime(end_date), 'FriendlyName': friendly_name, 'Minutes': minutes, 'StartDate': serialize.iso8601_datetime(start_date), 'TaskChannel': task_channel, 'SplitByWaitTime': split_by_wait_time, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TaskQueuesStatisticsPage(self._version, response, self._solution)
[ "def", "page", "(", "self", ",", "end_date", "=", "values", ".", "unset", ",", "friendly_name", "=", "values", ".", "unset", ",", "minutes", "=", "values", ".", "unset", ",", "start_date", "=", "values", ".", "unset", ",", "task_channel", "=", "values", ...
Retrieve a single page of TaskQueuesStatisticsInstance records from the API. Request is executed immediately :param datetime end_date: Filter cumulative statistics by an end date. :param unicode friendly_name: Filter the TaskQueue stats based on a TaskQueue's name :param unicode minutes: Filter cumulative statistics by up to 'x' minutes in the past. :param datetime start_date: Filter cumulative statistics by a start date. :param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel. :param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds. :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of TaskQueuesStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsPage
[ "Retrieve", "a", "single", "page", "of", "TaskQueuesStatisticsInstance", "records", "from", "the", "API", ".", "Request", "is", "executed", "immediately" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.py#L111-L151
225,752
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.py
TaskQueuesStatisticsPage.get_instance
def get_instance(self, payload): """ Build an instance of TaskQueuesStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance """ return TaskQueuesStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], )
python
def get_instance(self, payload): return TaskQueuesStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "TaskQueuesStatisticsInstance", "(", "self", ".", "_version", ",", "payload", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", ")" ]
Build an instance of TaskQueuesStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queues_statistics.TaskQueuesStatisticsInstance
[ "Build", "an", "instance", "of", "TaskQueuesStatisticsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queues_statistics.py#L199-L212
225,753
twilio/twilio-python
twilio/rest/studio/v1/flow/engagement/engagement_context.py
EngagementContextList.get
def get(self): """ Constructs a EngagementContextContext :returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext :rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext """ return EngagementContextContext( self._version, flow_sid=self._solution['flow_sid'], engagement_sid=self._solution['engagement_sid'], )
python
def get(self): return EngagementContextContext( self._version, flow_sid=self._solution['flow_sid'], engagement_sid=self._solution['engagement_sid'], )
[ "def", "get", "(", "self", ")", ":", "return", "EngagementContextContext", "(", "self", ".", "_version", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'flow_sid'", "]", ",", "engagement_sid", "=", "self", ".", "_solution", "[", "'engagement_sid'", "]...
Constructs a EngagementContextContext :returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext :rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextContext
[ "Constructs", "a", "EngagementContextContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/engagement_context.py#L35-L46
225,754
twilio/twilio-python
twilio/rest/studio/v1/flow/engagement/engagement_context.py
EngagementContextPage.get_instance
def get_instance(self, payload): """ Build an instance of EngagementContextInstance :param dict payload: Payload response from the API :returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance :rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance """ return EngagementContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], engagement_sid=self._solution['engagement_sid'], )
python
def get_instance(self, payload): return EngagementContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], engagement_sid=self._solution['engagement_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "EngagementContextInstance", "(", "self", ".", "_version", ",", "payload", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'flow_sid'", "]", ",", "engagement_sid", "=", "self", "."...
Build an instance of EngagementContextInstance :param dict payload: Payload response from the API :returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance :rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
[ "Build", "an", "instance", "of", "EngagementContextInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/engagement_context.py#L91-L105
225,755
twilio/twilio-python
twilio/rest/studio/v1/flow/engagement/engagement_context.py
EngagementContextContext.fetch
def fetch(self): """ Fetch a EngagementContextInstance :returns: Fetched EngagementContextInstance :rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return EngagementContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], engagement_sid=self._solution['engagement_sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return EngagementContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], engagement_sid=self._solution['engagement_sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Engag...
Fetch a EngagementContextInstance :returns: Fetched EngagementContextInstance :rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextInstance
[ "Fetch", "a", "EngagementContextInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/engagement_context.py#L137-L157
225,756
twilio/twilio-python
twilio/rest/studio/v1/flow/execution/execution_step/execution_step_context.py
ExecutionStepContextList.get
def get(self): """ Constructs a ExecutionStepContextContext :returns: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextContext :rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextContext """ return ExecutionStepContextContext( self._version, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], step_sid=self._solution['step_sid'], )
python
def get(self): return ExecutionStepContextContext( self._version, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], step_sid=self._solution['step_sid'], )
[ "def", "get", "(", "self", ")", ":", "return", "ExecutionStepContextContext", "(", "self", ".", "_version", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'flow_sid'", "]", ",", "execution_sid", "=", "self", ".", "_solution", "[", "'execution_sid'", "...
Constructs a ExecutionStepContextContext :returns: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextContext :rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextContext
[ "Constructs", "a", "ExecutionStepContextContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/execution/execution_step/execution_step_context.py#L36-L48
225,757
twilio/twilio-python
twilio/rest/studio/v1/flow/execution/execution_step/execution_step_context.py
ExecutionStepContextPage.get_instance
def get_instance(self, payload): """ Build an instance of ExecutionStepContextInstance :param dict payload: Payload response from the API :returns: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance """ return ExecutionStepContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], step_sid=self._solution['step_sid'], )
python
def get_instance(self, payload): return ExecutionStepContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], step_sid=self._solution['step_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "ExecutionStepContextInstance", "(", "self", ".", "_version", ",", "payload", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'flow_sid'", "]", ",", "execution_sid", "=", "self", "...
Build an instance of ExecutionStepContextInstance :param dict payload: Payload response from the API :returns: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance
[ "Build", "an", "instance", "of", "ExecutionStepContextInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/execution/execution_step/execution_step_context.py#L95-L110
225,758
twilio/twilio-python
twilio/rest/studio/v1/flow/execution/execution_step/execution_step_context.py
ExecutionStepContextContext.fetch
def fetch(self): """ Fetch a ExecutionStepContextInstance :returns: Fetched ExecutionStepContextInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return ExecutionStepContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], step_sid=self._solution['step_sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return ExecutionStepContextInstance( self._version, payload, flow_sid=self._solution['flow_sid'], execution_sid=self._solution['execution_sid'], step_sid=self._solution['step_sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Execu...
Fetch a ExecutionStepContextInstance :returns: Fetched ExecutionStepContextInstance :rtype: twilio.rest.studio.v1.flow.execution.execution_step.execution_step_context.ExecutionStepContextInstance
[ "Fetch", "a", "ExecutionStepContextInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/execution/execution_step/execution_step_context.py#L143-L164
225,759
twilio/twilio-python
twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py
PayloadList.get
def get(self, sid): """ Constructs a PayloadContext :param sid: The unique string that identifies the resource to fetch :returns: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadContext :rtype: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadContext """ return PayloadContext( self._version, account_sid=self._solution['account_sid'], reference_sid=self._solution['reference_sid'], add_on_result_sid=self._solution['add_on_result_sid'], sid=sid, )
python
def get(self, sid): return PayloadContext( self._version, account_sid=self._solution['account_sid'], reference_sid=self._solution['reference_sid'], add_on_result_sid=self._solution['add_on_result_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "PayloadContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "reference_sid", "=", "self", ".", "_solution", "[", "'reference_s...
Constructs a PayloadContext :param sid: The unique string that identifies the resource to fetch :returns: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadContext :rtype: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadContext
[ "Constructs", "a", "PayloadContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py#L123-L138
225,760
twilio/twilio-python
twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py
PayloadPage.get_instance
def get_instance(self, payload): """ Build an instance of PayloadInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadInstance :rtype: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadInstance """ return PayloadInstance( self._version, payload, account_sid=self._solution['account_sid'], reference_sid=self._solution['reference_sid'], add_on_result_sid=self._solution['add_on_result_sid'], )
python
def get_instance(self, payload): return PayloadInstance( self._version, payload, account_sid=self._solution['account_sid'], reference_sid=self._solution['reference_sid'], add_on_result_sid=self._solution['add_on_result_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "PayloadInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "reference_sid", "=", "self", ".", "...
Build an instance of PayloadInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadInstance :rtype: twilio.rest.api.v2010.account.recording.add_on_result.payload.PayloadInstance
[ "Build", "an", "instance", "of", "PayloadInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/recording/add_on_result/payload/__init__.py#L188-L203
225,761
twilio/twilio-python
twilio/rest/studio/v1/flow/__init__.py
FlowContext.engagements
def engagements(self): """ Access the engagements :returns: twilio.rest.studio.v1.flow.engagement.EngagementList :rtype: twilio.rest.studio.v1.flow.engagement.EngagementList """ if self._engagements is None: self._engagements = EngagementList(self._version, flow_sid=self._solution['sid'], ) return self._engagements
python
def engagements(self): if self._engagements is None: self._engagements = EngagementList(self._version, flow_sid=self._solution['sid'], ) return self._engagements
[ "def", "engagements", "(", "self", ")", ":", "if", "self", ".", "_engagements", "is", "None", ":", "self", ".", "_engagements", "=", "EngagementList", "(", "self", ".", "_version", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ...
Access the engagements :returns: twilio.rest.studio.v1.flow.engagement.EngagementList :rtype: twilio.rest.studio.v1.flow.engagement.EngagementList
[ "Access", "the", "engagements" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/__init__.py#L239-L248
225,762
twilio/twilio-python
twilio/rest/studio/v1/flow/__init__.py
FlowContext.executions
def executions(self): """ Access the executions :returns: twilio.rest.studio.v1.flow.execution.ExecutionList :rtype: twilio.rest.studio.v1.flow.execution.ExecutionList """ if self._executions is None: self._executions = ExecutionList(self._version, flow_sid=self._solution['sid'], ) return self._executions
python
def executions(self): if self._executions is None: self._executions = ExecutionList(self._version, flow_sid=self._solution['sid'], ) return self._executions
[ "def", "executions", "(", "self", ")", ":", "if", "self", ".", "_executions", "is", "None", ":", "self", ".", "_executions", "=", "ExecutionList", "(", "self", ".", "_version", ",", "flow_sid", "=", "self", ".", "_solution", "[", "'sid'", "]", ",", ")"...
Access the executions :returns: twilio.rest.studio.v1.flow.execution.ExecutionList :rtype: twilio.rest.studio.v1.flow.execution.ExecutionList
[ "Access", "the", "executions" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/__init__.py#L251-L260
225,763
twilio/twilio-python
twilio/rest/preview/understand/assistant/query.py
QueryList.create
def create(self, language, query, tasks=values.unset, model_build=values.unset, field=values.unset): """ Create a new QueryInstance :param unicode language: An ISO language-country string of the sample. :param unicode query: A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. :param unicode tasks: Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated task-unique-name-1, task-unique-name-2 :param unicode model_build: The Model Build Sid or unique name of the Model Build to be queried. :param unicode field: Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format task-unique-name-1:field-unique-name :returns: Newly created QueryInstance :rtype: twilio.rest.preview.understand.assistant.query.QueryInstance """ data = values.of({ 'Language': language, 'Query': query, 'Tasks': tasks, 'ModelBuild': model_build, 'Field': field, }) payload = self._version.create( 'POST', self._uri, data=data, ) return QueryInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
python
def create(self, language, query, tasks=values.unset, model_build=values.unset, field=values.unset): data = values.of({ 'Language': language, 'Query': query, 'Tasks': tasks, 'ModelBuild': model_build, 'Field': field, }) payload = self._version.create( 'POST', self._uri, data=data, ) return QueryInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
[ "def", "create", "(", "self", ",", "language", ",", "query", ",", "tasks", "=", "values", ".", "unset", ",", "model_build", "=", "values", ".", "unset", ",", "field", "=", "values", ".", "unset", ")", ":", "data", "=", "values", ".", "of", "(", "{"...
Create a new QueryInstance :param unicode language: An ISO language-country string of the sample. :param unicode query: A user-provided string that uniquely identifies this resource as an alternative to the sid. It can be up to 2048 characters long. :param unicode tasks: Constraints the query to a set of tasks. Useful when you need to constrain the paths the user can take. Tasks should be comma separated task-unique-name-1, task-unique-name-2 :param unicode model_build: The Model Build Sid or unique name of the Model Build to be queried. :param unicode field: Constraints the query to a given Field with an task. Useful when you know the Field you are expecting. It accepts one field in the format task-unique-name-1:field-unique-name :returns: Newly created QueryInstance :rtype: twilio.rest.preview.understand.assistant.query.QueryInstance
[ "Create", "a", "new", "QueryInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/understand/assistant/query.py#L149-L177
225,764
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py
TaskQueueRealTimeStatisticsList.get
def get(self): """ Constructs a TaskQueueRealTimeStatisticsContext :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext """ return TaskQueueRealTimeStatisticsContext( self._version, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
python
def get(self): return TaskQueueRealTimeStatisticsContext( self._version, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
[ "def", "get", "(", "self", ")", ":", "return", "TaskQueueRealTimeStatisticsContext", "(", "self", ".", "_version", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", "task_queue_sid", "=", "self", ".", "_solution", "[", "'ta...
Constructs a TaskQueueRealTimeStatisticsContext :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsContext
[ "Constructs", "a", "TaskQueueRealTimeStatisticsContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py#L36-L47
225,765
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py
TaskQueueRealTimeStatisticsPage.get_instance
def get_instance(self, payload): """ Build an instance of TaskQueueRealTimeStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance """ return TaskQueueRealTimeStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
python
def get_instance(self, payload): return TaskQueueRealTimeStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "TaskQueueRealTimeStatisticsInstance", "(", "self", ".", "_version", ",", "payload", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", "task_queue_sid", ...
Build an instance of TaskQueueRealTimeStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_real_time_statistics.TaskQueueRealTimeStatisticsInstance
[ "Build", "an", "instance", "of", "TaskQueueRealTimeStatisticsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_real_time_statistics.py#L92-L106
225,766
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py
CredentialListMappingList.get
def get(self, sid): """ Constructs a CredentialListMappingContext :param sid: A string that identifies the resource to fetch :returns: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingContext :rtype: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingContext """ return CredentialListMappingContext( self._version, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], sid=sid, )
python
def get(self, sid): return CredentialListMappingContext( self._version, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "CredentialListMappingContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "domain_sid", "=", "self", ".", "_solution", "[", "'...
Constructs a CredentialListMappingContext :param sid: A string that identifies the resource to fetch :returns: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingContext :rtype: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingContext
[ "Constructs", "a", "CredentialListMappingContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py#L142-L156
225,767
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py
CredentialListMappingPage.get_instance
def get_instance(self, payload): """ Build an instance of CredentialListMappingInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingInstance :rtype: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingInstance """ return CredentialListMappingInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
python
def get_instance(self, payload): return CredentialListMappingInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "CredentialListMappingInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "domain_sid", "=", "self",...
Build an instance of CredentialListMappingInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingInstance :rtype: twilio.rest.api.v2010.account.sip.domain.credential_list_mapping.CredentialListMappingInstance
[ "Build", "an", "instance", "of", "CredentialListMappingInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/credential_list_mapping.py#L204-L218
225,768
twilio/twilio-python
twilio/rest/api/v2010/account/call/notification.py
NotificationList.stream
def stream(self, log=values.unset, message_date_before=values.unset, message_date=values.unset, message_date_after=values.unset, limit=None, page_size=None): """ Streams NotificationInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param unicode log: Filter by log level :param date message_date_before: Filter by date :param date message_date: Filter by date :param date message_date_after: Filter by date :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.api.v2010.account.call.notification.NotificationInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( log=log, message_date_before=message_date_before, message_date=message_date, message_date_after=message_date_after, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
def stream(self, log=values.unset, message_date_before=values.unset, message_date=values.unset, message_date_after=values.unset, limit=None, page_size=None): limits = self._version.read_limits(limit, page_size) page = self.page( log=log, message_date_before=message_date_before, message_date=message_date, message_date_after=message_date_after, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
[ "def", "stream", "(", "self", ",", "log", "=", "values", ".", "unset", ",", "message_date_before", "=", "values", ".", "unset", ",", "message_date", "=", "values", ".", "unset", ",", "message_date_after", "=", "values", ".", "unset", ",", "limit", "=", "...
Streams NotificationInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param unicode log: Filter by log level :param date message_date_before: Filter by date :param date message_date: Filter by date :param date message_date_after: Filter by date :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.api.v2010.account.call.notification.NotificationInstance]
[ "Streams", "NotificationInstance", "records", "from", "the", "API", "as", "a", "generator", "stream", ".", "This", "operation", "lazily", "loads", "records", "as", "efficiently", "as", "possible", "until", "the", "limit", "is", "reached", ".", "The", "results", ...
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/notification.py#L38-L71
225,769
twilio/twilio-python
twilio/rest/api/v2010/account/call/notification.py
NotificationList.page
def page(self, log=values.unset, message_date_before=values.unset, message_date=values.unset, message_date_after=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of NotificationInstance records from the API. Request is executed immediately :param unicode log: Filter by log level :param date message_date_before: Filter by date :param date message_date: Filter by date :param date message_date_after: Filter by date :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of NotificationInstance :rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage """ params = values.of({ 'Log': log, 'MessageDate<': serialize.iso8601_date(message_date_before), 'MessageDate': serialize.iso8601_date(message_date), 'MessageDate>': serialize.iso8601_date(message_date_after), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return NotificationPage(self._version, response, self._solution)
python
def page(self, log=values.unset, message_date_before=values.unset, message_date=values.unset, message_date_after=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): params = values.of({ 'Log': log, 'MessageDate<': serialize.iso8601_date(message_date_before), 'MessageDate': serialize.iso8601_date(message_date), 'MessageDate>': serialize.iso8601_date(message_date_after), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return NotificationPage(self._version, response, self._solution)
[ "def", "page", "(", "self", ",", "log", "=", "values", ".", "unset", ",", "message_date_before", "=", "values", ".", "unset", ",", "message_date", "=", "values", ".", "unset", ",", "message_date_after", "=", "values", ".", "unset", ",", "page_token", "=", ...
Retrieve a single page of NotificationInstance records from the API. Request is executed immediately :param unicode log: Filter by log level :param date message_date_before: Filter by date :param date message_date: Filter by date :param date message_date_after: Filter by date :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of NotificationInstance :rtype: twilio.rest.api.v2010.account.call.notification.NotificationPage
[ "Retrieve", "a", "single", "page", "of", "NotificationInstance", "records", "from", "the", "API", ".", "Request", "is", "executed", "immediately" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/notification.py#L104-L139
225,770
twilio/twilio-python
twilio/rest/api/v2010/account/call/notification.py
NotificationList.get
def get(self, sid): """ Constructs a NotificationContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.call.notification.NotificationContext :rtype: twilio.rest.api.v2010.account.call.notification.NotificationContext """ return NotificationContext( self._version, account_sid=self._solution['account_sid'], call_sid=self._solution['call_sid'], sid=sid, )
python
def get(self, sid): return NotificationContext( self._version, account_sid=self._solution['account_sid'], call_sid=self._solution['call_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "NotificationContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "call_sid", "=", "self", ".", "_solution", "[", "'call_sid'",...
Constructs a NotificationContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.call.notification.NotificationContext :rtype: twilio.rest.api.v2010.account.call.notification.NotificationContext
[ "Constructs", "a", "NotificationContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/notification.py#L158-L172
225,771
twilio/twilio-python
twilio/rest/voice/v1/dialing_permissions/country/__init__.py
CountryList.stream
def stream(self, iso_code=values.unset, continent=values.unset, country_code=values.unset, low_risk_numbers_enabled=values.unset, high_risk_special_numbers_enabled=values.unset, high_risk_tollfraud_numbers_enabled=values.unset, limit=None, page_size=None): """ Streams CountryInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param unicode iso_code: Filter to retrieve the country permissions by specifying the ISO country code :param unicode continent: Filter to retrieve the country permissions by specifying the continent :param unicode country_code: Country code filter :param bool low_risk_numbers_enabled: Filter to retrieve the country permissions with dialing to low-risk numbers enabled :param bool high_risk_special_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled :param bool high_risk_tollfraud_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.voice.v1.dialing_permissions.country.CountryInstance] """ limits = self._version.read_limits(limit, page_size) page = self.page( iso_code=iso_code, continent=continent, country_code=country_code, low_risk_numbers_enabled=low_risk_numbers_enabled, high_risk_special_numbers_enabled=high_risk_special_numbers_enabled, high_risk_tollfraud_numbers_enabled=high_risk_tollfraud_numbers_enabled, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
python
def stream(self, iso_code=values.unset, continent=values.unset, country_code=values.unset, low_risk_numbers_enabled=values.unset, high_risk_special_numbers_enabled=values.unset, high_risk_tollfraud_numbers_enabled=values.unset, limit=None, page_size=None): limits = self._version.read_limits(limit, page_size) page = self.page( iso_code=iso_code, continent=continent, country_code=country_code, low_risk_numbers_enabled=low_risk_numbers_enabled, high_risk_special_numbers_enabled=high_risk_special_numbers_enabled, high_risk_tollfraud_numbers_enabled=high_risk_tollfraud_numbers_enabled, page_size=limits['page_size'], ) return self._version.stream(page, limits['limit'], limits['page_limit'])
[ "def", "stream", "(", "self", ",", "iso_code", "=", "values", ".", "unset", ",", "continent", "=", "values", ".", "unset", ",", "country_code", "=", "values", ".", "unset", ",", "low_risk_numbers_enabled", "=", "values", ".", "unset", ",", "high_risk_special...
Streams CountryInstance records from the API as a generator stream. This operation lazily loads records as efficiently as possible until the limit is reached. The results are returned as a generator, so this operation is memory efficient. :param unicode iso_code: Filter to retrieve the country permissions by specifying the ISO country code :param unicode continent: Filter to retrieve the country permissions by specifying the continent :param unicode country_code: Country code filter :param bool low_risk_numbers_enabled: Filter to retrieve the country permissions with dialing to low-risk numbers enabled :param bool high_risk_special_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled :param bool high_risk_tollfraud_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled :param int limit: Upper limit for the number of records to return. stream() guarantees to never return more than limit. Default is no limit :param int page_size: Number of records to fetch per request, when not set will use the default value of 50 records. If no page_size is defined but a limit is defined, stream() will attempt to read the limit with the most efficient page size, i.e. min(limit, 1000) :returns: Generator that will yield up to limit results :rtype: list[twilio.rest.voice.v1.dialing_permissions.country.CountryInstance]
[ "Streams", "CountryInstance", "records", "from", "the", "API", "as", "a", "generator", "stream", ".", "This", "operation", "lazily", "loads", "records", "as", "efficiently", "as", "possible", "until", "the", "limit", "is", "reached", ".", "The", "results", "ar...
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/country/__init__.py#L37-L76
225,772
twilio/twilio-python
twilio/rest/voice/v1/dialing_permissions/country/__init__.py
CountryList.page
def page(self, iso_code=values.unset, continent=values.unset, country_code=values.unset, low_risk_numbers_enabled=values.unset, high_risk_special_numbers_enabled=values.unset, high_risk_tollfraud_numbers_enabled=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of CountryInstance records from the API. Request is executed immediately :param unicode iso_code: Filter to retrieve the country permissions by specifying the ISO country code :param unicode continent: Filter to retrieve the country permissions by specifying the continent :param unicode country_code: Country code filter :param bool low_risk_numbers_enabled: Filter to retrieve the country permissions with dialing to low-risk numbers enabled :param bool high_risk_special_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled :param bool high_risk_tollfraud_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of CountryInstance :rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryPage """ params = values.of({ 'IsoCode': iso_code, 'Continent': continent, 'CountryCode': country_code, 'LowRiskNumbersEnabled': low_risk_numbers_enabled, 'HighRiskSpecialNumbersEnabled': high_risk_special_numbers_enabled, 'HighRiskTollfraudNumbersEnabled': high_risk_tollfraud_numbers_enabled, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return CountryPage(self._version, response, self._solution)
python
def page(self, iso_code=values.unset, continent=values.unset, country_code=values.unset, low_risk_numbers_enabled=values.unset, high_risk_special_numbers_enabled=values.unset, high_risk_tollfraud_numbers_enabled=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): params = values.of({ 'IsoCode': iso_code, 'Continent': continent, 'CountryCode': country_code, 'LowRiskNumbersEnabled': low_risk_numbers_enabled, 'HighRiskSpecialNumbersEnabled': high_risk_special_numbers_enabled, 'HighRiskTollfraudNumbersEnabled': high_risk_tollfraud_numbers_enabled, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return CountryPage(self._version, response, self._solution)
[ "def", "page", "(", "self", ",", "iso_code", "=", "values", ".", "unset", ",", "continent", "=", "values", ".", "unset", ",", "country_code", "=", "values", ".", "unset", ",", "low_risk_numbers_enabled", "=", "values", ".", "unset", ",", "high_risk_special_n...
Retrieve a single page of CountryInstance records from the API. Request is executed immediately :param unicode iso_code: Filter to retrieve the country permissions by specifying the ISO country code :param unicode continent: Filter to retrieve the country permissions by specifying the continent :param unicode country_code: Country code filter :param bool low_risk_numbers_enabled: Filter to retrieve the country permissions with dialing to low-risk numbers enabled :param bool high_risk_special_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk special service numbers enabled :param bool high_risk_tollfraud_numbers_enabled: Filter to retrieve the country permissions with dialing to high-risk toll fraud numbers enabled :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of CountryInstance :rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryPage
[ "Retrieve", "a", "single", "page", "of", "CountryInstance", "records", "from", "the", "API", ".", "Request", "is", "executed", "immediately" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/country/__init__.py#L115-L156
225,773
twilio/twilio-python
twilio/rest/voice/v1/dialing_permissions/country/__init__.py
CountryContext.fetch
def fetch(self): """ Fetch a CountryInstance :returns: Fetched CountryInstance :rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return CountryInstance(self._version, payload, iso_code=self._solution['iso_code'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return CountryInstance(self._version, payload, iso_code=self._solution['iso_code'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Count...
Fetch a CountryInstance :returns: Fetched CountryInstance :rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryInstance
[ "Fetch", "a", "CountryInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/country/__init__.py#L272-L287
225,774
twilio/twilio-python
twilio/rest/voice/v1/dialing_permissions/country/__init__.py
CountryContext.highrisk_special_prefixes
def highrisk_special_prefixes(self): """ Access the highrisk_special_prefixes :returns: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixList :rtype: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixList """ if self._highrisk_special_prefixes is None: self._highrisk_special_prefixes = HighriskSpecialPrefixList( self._version, iso_code=self._solution['iso_code'], ) return self._highrisk_special_prefixes
python
def highrisk_special_prefixes(self): if self._highrisk_special_prefixes is None: self._highrisk_special_prefixes = HighriskSpecialPrefixList( self._version, iso_code=self._solution['iso_code'], ) return self._highrisk_special_prefixes
[ "def", "highrisk_special_prefixes", "(", "self", ")", ":", "if", "self", ".", "_highrisk_special_prefixes", "is", "None", ":", "self", ".", "_highrisk_special_prefixes", "=", "HighriskSpecialPrefixList", "(", "self", ".", "_version", ",", "iso_code", "=", "self", ...
Access the highrisk_special_prefixes :returns: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixList :rtype: twilio.rest.voice.v1.dialing_permissions.country.highrisk_special_prefix.HighriskSpecialPrefixList
[ "Access", "the", "highrisk_special_prefixes" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/country/__init__.py#L290-L302
225,775
twilio/twilio-python
twilio/rest/video/v1/composition_settings.py
CompositionSettingsContext.fetch
def fetch(self): """ Fetch a CompositionSettingsInstance :returns: Fetched CompositionSettingsInstance :rtype: twilio.rest.video.v1.composition_settings.CompositionSettingsInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return CompositionSettingsInstance(self._version, payload, )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return CompositionSettingsInstance(self._version, payload, )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "Compo...
Fetch a CompositionSettingsInstance :returns: Fetched CompositionSettingsInstance :rtype: twilio.rest.video.v1.composition_settings.CompositionSettingsInstance
[ "Fetch", "a", "CompositionSettingsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/composition_settings.py#L124-L139
225,776
twilio/twilio-python
twilio/request_validator.py
compare
def compare(string1, string2): """Compare two strings while protecting against timing attacks :param str string1: the first string :param str string2: the second string :returns: True if the strings are equal, False if not :rtype: :obj:`bool` """ if len(string1) != len(string2): return False result = True for c1, c2 in izip(string1, string2): result &= c1 == c2 return result
python
def compare(string1, string2): if len(string1) != len(string2): return False result = True for c1, c2 in izip(string1, string2): result &= c1 == c2 return result
[ "def", "compare", "(", "string1", ",", "string2", ")", ":", "if", "len", "(", "string1", ")", "!=", "len", "(", "string2", ")", ":", "return", "False", "result", "=", "True", "for", "c1", ",", "c2", "in", "izip", "(", "string1", ",", "string2", ")"...
Compare two strings while protecting against timing attacks :param str string1: the first string :param str string2: the second string :returns: True if the strings are equal, False if not :rtype: :obj:`bool`
[ "Compare", "two", "strings", "while", "protecting", "against", "timing", "attacks" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/request_validator.py#L10-L24
225,777
twilio/twilio-python
twilio/request_validator.py
remove_port
def remove_port(uri): """Remove the port number from a URI :param uri: full URI that Twilio requested on your server :returns: full URI without a port number :rtype: str """ new_netloc = uri.netloc.split(':')[0] new_uri = uri._replace(netloc=new_netloc) return new_uri.geturl()
python
def remove_port(uri): new_netloc = uri.netloc.split(':')[0] new_uri = uri._replace(netloc=new_netloc) return new_uri.geturl()
[ "def", "remove_port", "(", "uri", ")", ":", "new_netloc", "=", "uri", ".", "netloc", ".", "split", "(", "':'", ")", "[", "0", "]", "new_uri", "=", "uri", ".", "_replace", "(", "netloc", "=", "new_netloc", ")", "return", "new_uri", ".", "geturl", "(",...
Remove the port number from a URI :param uri: full URI that Twilio requested on your server :returns: full URI without a port number :rtype: str
[ "Remove", "the", "port", "number", "from", "a", "URI" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/request_validator.py#L27-L37
225,778
twilio/twilio-python
twilio/request_validator.py
RequestValidator.compute_signature
def compute_signature(self, uri, params, utf=PY3): """Compute the signature for a given request :param uri: full URI that Twilio requested on your server :param params: post vars that Twilio sent with the request :param utf: whether return should be bytestring or unicode (python3) :returns: The computed signature """ s = uri if len(params) > 0: for k, v in sorted(params.items()): s += k + v # compute signature and compare signatures mac = hmac.new(self.token, s.encode("utf-8"), sha1) computed = base64.b64encode(mac.digest()) if utf: computed = computed.decode('utf-8') return computed.strip()
python
def compute_signature(self, uri, params, utf=PY3): s = uri if len(params) > 0: for k, v in sorted(params.items()): s += k + v # compute signature and compare signatures mac = hmac.new(self.token, s.encode("utf-8"), sha1) computed = base64.b64encode(mac.digest()) if utf: computed = computed.decode('utf-8') return computed.strip()
[ "def", "compute_signature", "(", "self", ",", "uri", ",", "params", ",", "utf", "=", "PY3", ")", ":", "s", "=", "uri", "if", "len", "(", "params", ")", ">", "0", ":", "for", "k", ",", "v", "in", "sorted", "(", "params", ".", "items", "(", ")", ...
Compute the signature for a given request :param uri: full URI that Twilio requested on your server :param params: post vars that Twilio sent with the request :param utf: whether return should be bytestring or unicode (python3) :returns: The computed signature
[ "Compute", "the", "signature", "for", "a", "given", "request" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/request_validator.py#L45-L65
225,779
twilio/twilio-python
twilio/request_validator.py
RequestValidator.validate
def validate(self, uri, params, signature): """Validate a request from Twilio :param uri: full URI that Twilio requested on your server :param params: dictionary of POST variables or string of POST body for JSON requests :param signature: expected signature in HTTP X-Twilio-Signature header :returns: True if the request passes validation, False if not """ if params is None: params = {} parsed_uri = urlparse(uri) if parsed_uri.scheme == "https" and parsed_uri.port: uri = remove_port(parsed_uri) valid_signature = False # Default fail valid_body_hash = True # May not receive body hash, so default succeed query = parse_qs(parsed_uri.query) if "bodySHA256" in query and isinstance(params, string_types): valid_body_hash = compare(self.compute_hash(params), query["bodySHA256"][0]) valid_signature = compare(self.compute_signature(uri, {}), signature) else: valid_signature = compare(self.compute_signature(uri, params), signature) return valid_signature and valid_body_hash
python
def validate(self, uri, params, signature): if params is None: params = {} parsed_uri = urlparse(uri) if parsed_uri.scheme == "https" and parsed_uri.port: uri = remove_port(parsed_uri) valid_signature = False # Default fail valid_body_hash = True # May not receive body hash, so default succeed query = parse_qs(parsed_uri.query) if "bodySHA256" in query and isinstance(params, string_types): valid_body_hash = compare(self.compute_hash(params), query["bodySHA256"][0]) valid_signature = compare(self.compute_signature(uri, {}), signature) else: valid_signature = compare(self.compute_signature(uri, params), signature) return valid_signature and valid_body_hash
[ "def", "validate", "(", "self", ",", "uri", ",", "params", ",", "signature", ")", ":", "if", "params", "is", "None", ":", "params", "=", "{", "}", "parsed_uri", "=", "urlparse", "(", "uri", ")", "if", "parsed_uri", ".", "scheme", "==", "\"https\"", "...
Validate a request from Twilio :param uri: full URI that Twilio requested on your server :param params: dictionary of POST variables or string of POST body for JSON requests :param signature: expected signature in HTTP X-Twilio-Signature header :returns: True if the request passes validation, False if not
[ "Validate", "a", "request", "from", "Twilio" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/request_validator.py#L72-L98
225,780
twilio/twilio-python
twilio/rest/autopilot/v1/assistant/defaults.py
DefaultsPage.get_instance
def get_instance(self, payload): """ Build an instance of DefaultsInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance """ return DefaultsInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
python
def get_instance(self, payload): return DefaultsInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "DefaultsInstance", "(", "self", ".", "_version", ",", "payload", ",", "assistant_sid", "=", "self", ".", "_solution", "[", "'assistant_sid'", "]", ",", ")" ]
Build an instance of DefaultsInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance :rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsInstance
[ "Build", "an", "instance", "of", "DefaultsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/defaults.py#L86-L95
225,781
twilio/twilio-python
twilio/base/page.py
Page.process_response
def process_response(self, response): """ Load a JSON response. :param Response response: The HTTP response. :return dict: The JSON-loaded content. """ if response.status_code != 200: raise TwilioException('Unable to fetch page', response) return json.loads(response.text)
python
def process_response(self, response): if response.status_code != 200: raise TwilioException('Unable to fetch page', response) return json.loads(response.text)
[ "def", "process_response", "(", "self", ",", "response", ")", ":", "if", "response", ".", "status_code", "!=", "200", ":", "raise", "TwilioException", "(", "'Unable to fetch page'", ",", "response", ")", "return", "json", ".", "loads", "(", "response", ".", ...
Load a JSON response. :param Response response: The HTTP response. :return dict: The JSON-loaded content.
[ "Load", "a", "JSON", "response", "." ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/page.py#L51-L61
225,782
twilio/twilio-python
twilio/base/page.py
Page.load_page
def load_page(self, payload): """ Parses the collection of records out of a list payload. :param dict payload: The JSON-loaded content. :return list: The list of records. """ if 'meta' in payload and 'key' in payload['meta']: return payload[payload['meta']['key']] else: keys = set(payload.keys()) key = keys - self.META_KEYS if len(key) == 1: return payload[key.pop()] raise TwilioException('Page Records can not be deserialized')
python
def load_page(self, payload): if 'meta' in payload and 'key' in payload['meta']: return payload[payload['meta']['key']] else: keys = set(payload.keys()) key = keys - self.META_KEYS if len(key) == 1: return payload[key.pop()] raise TwilioException('Page Records can not be deserialized')
[ "def", "load_page", "(", "self", ",", "payload", ")", ":", "if", "'meta'", "in", "payload", "and", "'key'", "in", "payload", "[", "'meta'", "]", ":", "return", "payload", "[", "payload", "[", "'meta'", "]", "[", "'key'", "]", "]", "else", ":", "keys"...
Parses the collection of records out of a list payload. :param dict payload: The JSON-loaded content. :return list: The list of records.
[ "Parses", "the", "collection", "of", "records", "out", "of", "a", "list", "payload", "." ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/page.py#L63-L78
225,783
twilio/twilio-python
twilio/rest/ip_messaging/v2/service/user/user_binding.py
UserBindingList.get
def get(self, sid): """ Constructs a UserBindingContext :param sid: The unique string that identifies the resource :returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingContext :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingContext """ return UserBindingContext( self._version, service_sid=self._solution['service_sid'], user_sid=self._solution['user_sid'], sid=sid, )
python
def get(self, sid): return UserBindingContext( self._version, service_sid=self._solution['service_sid'], user_sid=self._solution['user_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "UserBindingContext", "(", "self", ".", "_version", ",", "service_sid", "=", "self", ".", "_solution", "[", "'service_sid'", "]", ",", "user_sid", "=", "self", ".", "_solution", "[", "'user_sid'", ...
Constructs a UserBindingContext :param sid: The unique string that identifies the resource :returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingContext :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingContext
[ "Constructs", "a", "UserBindingContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/user/user_binding.py#L127-L141
225,784
twilio/twilio-python
twilio/rest/ip_messaging/v2/service/user/user_binding.py
UserBindingPage.get_instance
def get_instance(self, payload): """ Build an instance of UserBindingInstance :param dict payload: Payload response from the API :returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance """ return UserBindingInstance( self._version, payload, service_sid=self._solution['service_sid'], user_sid=self._solution['user_sid'], )
python
def get_instance(self, payload): return UserBindingInstance( self._version, payload, service_sid=self._solution['service_sid'], user_sid=self._solution['user_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "UserBindingInstance", "(", "self", ".", "_version", ",", "payload", ",", "service_sid", "=", "self", ".", "_solution", "[", "'service_sid'", "]", ",", "user_sid", "=", "self", ".", "_...
Build an instance of UserBindingInstance :param dict payload: Payload response from the API :returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance
[ "Build", "an", "instance", "of", "UserBindingInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/user/user_binding.py#L189-L203
225,785
twilio/twilio-python
twilio/rest/ip_messaging/v2/service/user/user_binding.py
UserBindingContext.fetch
def fetch(self): """ Fetch a UserBindingInstance :returns: Fetched UserBindingInstance :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return UserBindingInstance( self._version, payload, service_sid=self._solution['service_sid'], user_sid=self._solution['user_sid'], sid=self._solution['sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return UserBindingInstance( self._version, payload, service_sid=self._solution['service_sid'], user_sid=self._solution['user_sid'], sid=self._solution['sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "UserB...
Fetch a UserBindingInstance :returns: Fetched UserBindingInstance :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingInstance
[ "Fetch", "a", "UserBindingInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/user/user_binding.py#L236-L257
225,786
twilio/twilio-python
twilio/jwt/client/__init__.py
ClientCapabilityToken.allow_client_outgoing
def allow_client_outgoing(self, application_sid, **kwargs): """ Allow the user of this token to make outgoing connections. Keyword arguments are passed to the application. :param str application_sid: Application to contact """ scope = ScopeURI('client', 'outgoing', {'appSid': application_sid}) if kwargs: scope.add_param('appParams', urlencode(kwargs, doseq=True)) self.capabilities['outgoing'] = scope
python
def allow_client_outgoing(self, application_sid, **kwargs): scope = ScopeURI('client', 'outgoing', {'appSid': application_sid}) if kwargs: scope.add_param('appParams', urlencode(kwargs, doseq=True)) self.capabilities['outgoing'] = scope
[ "def", "allow_client_outgoing", "(", "self", ",", "application_sid", ",", "*", "*", "kwargs", ")", ":", "scope", "=", "ScopeURI", "(", "'client'", ",", "'outgoing'", ",", "{", "'appSid'", ":", "application_sid", "}", ")", "if", "kwargs", ":", "scope", ".",...
Allow the user of this token to make outgoing connections. Keyword arguments are passed to the application. :param str application_sid: Application to contact
[ "Allow", "the", "user", "of", "this", "token", "to", "make", "outgoing", "connections", ".", "Keyword", "arguments", "are", "passed", "to", "the", "application", "." ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/jwt/client/__init__.py#L44-L55
225,787
twilio/twilio-python
twilio/jwt/client/__init__.py
ClientCapabilityToken.allow_client_incoming
def allow_client_incoming(self, client_name): """ Allow the user of this token to accept incoming connections. :param str client_name: Client name to accept calls from """ self.client_name = client_name self.capabilities['incoming'] = ScopeURI('client', 'incoming', {'clientName': client_name})
python
def allow_client_incoming(self, client_name): self.client_name = client_name self.capabilities['incoming'] = ScopeURI('client', 'incoming', {'clientName': client_name})
[ "def", "allow_client_incoming", "(", "self", ",", "client_name", ")", ":", "self", ".", "client_name", "=", "client_name", "self", ".", "capabilities", "[", "'incoming'", "]", "=", "ScopeURI", "(", "'client'", ",", "'incoming'", ",", "{", "'clientName'", ":", ...
Allow the user of this token to accept incoming connections. :param str client_name: Client name to accept calls from
[ "Allow", "the", "user", "of", "this", "token", "to", "accept", "incoming", "connections", "." ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/jwt/client/__init__.py#L57-L64
225,788
twilio/twilio-python
twilio/jwt/client/__init__.py
ClientCapabilityToken.allow_event_stream
def allow_event_stream(self, **kwargs): """ Allow the user of this token to access their event stream. """ scope = ScopeURI('stream', 'subscribe', {'path': '/2010-04-01/Events'}) if kwargs: scope.add_param('params', urlencode(kwargs, doseq=True)) self.capabilities["events"] = scope
python
def allow_event_stream(self, **kwargs): scope = ScopeURI('stream', 'subscribe', {'path': '/2010-04-01/Events'}) if kwargs: scope.add_param('params', urlencode(kwargs, doseq=True)) self.capabilities["events"] = scope
[ "def", "allow_event_stream", "(", "self", ",", "*", "*", "kwargs", ")", ":", "scope", "=", "ScopeURI", "(", "'stream'", ",", "'subscribe'", ",", "{", "'path'", ":", "'/2010-04-01/Events'", "}", ")", "if", "kwargs", ":", "scope", ".", "add_param", "(", "'...
Allow the user of this token to access their event stream.
[ "Allow", "the", "user", "of", "this", "token", "to", "access", "their", "event", "stream", "." ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/jwt/client/__init__.py#L66-L74
225,789
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/auth_types/__init__.py
AuthTypesList.registrations
def registrations(self): """ Access the registrations :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsList :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsList """ if self._registrations is None: self._registrations = AuthTypeRegistrationsList( self._version, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], ) return self._registrations
python
def registrations(self): if self._registrations is None: self._registrations = AuthTypeRegistrationsList( self._version, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], ) return self._registrations
[ "def", "registrations", "(", "self", ")", ":", "if", "self", ".", "_registrations", "is", "None", ":", "self", ".", "_registrations", "=", "AuthTypeRegistrationsList", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'ac...
Access the registrations :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsList :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsList
[ "Access", "the", "registrations" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/__init__.py#L56-L69
225,790
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/auth_types/__init__.py
AuthTypesPage.get_instance
def get_instance(self, payload): """ Build an instance of AuthTypesInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesInstance """ return AuthTypesInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
python
def get_instance(self, payload): return AuthTypesInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "AuthTypesInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "domain_sid", "=", "self", ".", "_...
Build an instance of AuthTypesInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesInstance
[ "Build", "an", "instance", "of", "AuthTypesInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/__init__.py#L101-L115
225,791
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.py
AuthRegistrationsCredentialListMappingList.get
def get(self, sid): """ Constructs a AuthRegistrationsCredentialListMappingContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingContext :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingContext """ return AuthRegistrationsCredentialListMappingContext( self._version, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], sid=sid, )
python
def get(self, sid): return AuthRegistrationsCredentialListMappingContext( self._version, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "AuthRegistrationsCredentialListMappingContext", "(", "self", ".", "_version", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "domain_sid", "=", "self", ".", "_solut...
Constructs a AuthRegistrationsCredentialListMappingContext :param sid: The unique string that identifies the resource :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingContext :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingContext
[ "Constructs", "a", "AuthRegistrationsCredentialListMappingContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.py#L142-L156
225,792
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.py
AuthRegistrationsCredentialListMappingPage.get_instance
def get_instance(self, payload): """ Build an instance of AuthRegistrationsCredentialListMappingInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance """ return AuthRegistrationsCredentialListMappingInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
python
def get_instance(self, payload): return AuthRegistrationsCredentialListMappingInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "AuthRegistrationsCredentialListMappingInstance", "(", "self", ".", "_version", ",", "payload", ",", "account_sid", "=", "self", ".", "_solution", "[", "'account_sid'", "]", ",", "domain_sid",...
Build an instance of AuthRegistrationsCredentialListMappingInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance
[ "Build", "an", "instance", "of", "AuthRegistrationsCredentialListMappingInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.py#L204-L218
225,793
twilio/twilio-python
twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.py
AuthRegistrationsCredentialListMappingContext.fetch
def fetch(self): """ Fetch a AuthRegistrationsCredentialListMappingInstance :returns: Fetched AuthRegistrationsCredentialListMappingInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return AuthRegistrationsCredentialListMappingInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], sid=self._solution['sid'], )
python
def fetch(self): params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return AuthRegistrationsCredentialListMappingInstance( self._version, payload, account_sid=self._solution['account_sid'], domain_sid=self._solution['domain_sid'], sid=self._solution['sid'], )
[ "def", "fetch", "(", "self", ")", ":", "params", "=", "values", ".", "of", "(", "{", "}", ")", "payload", "=", "self", ".", "_version", ".", "fetch", "(", "'GET'", ",", "self", ".", "_uri", ",", "params", "=", "params", ",", ")", "return", "AuthR...
Fetch a AuthRegistrationsCredentialListMappingInstance :returns: Fetched AuthRegistrationsCredentialListMappingInstance :rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.auth_registrations_credential_list_mapping.AuthRegistrationsCredentialListMappingInstance
[ "Fetch", "a", "AuthRegistrationsCredentialListMappingInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/auth_registrations_credential_list_mapping.py#L251-L272
225,794
twilio/twilio-python
twilio/rest/wireless/v1/command.py
CommandList.page
def page(self, sim=values.unset, status=values.unset, direction=values.unset, transport=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of CommandInstance records from the API. Request is executed immediately :param unicode sim: Only return Commands to or from this SIM. :param CommandInstance.Status status: Only return Commands with this status value. :param CommandInstance.Direction direction: Only return Commands with this direction value. :param CommandInstance.Transport transport: Only return Commands with this transport value. :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of CommandInstance :rtype: twilio.rest.wireless.v1.command.CommandPage """ params = values.of({ 'Sim': sim, 'Status': status, 'Direction': direction, 'Transport': transport, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return CommandPage(self._version, response, self._solution)
python
def page(self, sim=values.unset, status=values.unset, direction=values.unset, transport=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): params = values.of({ 'Sim': sim, 'Status': status, 'Direction': direction, 'Transport': transport, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return CommandPage(self._version, response, self._solution)
[ "def", "page", "(", "self", ",", "sim", "=", "values", ".", "unset", ",", "status", "=", "values", ".", "unset", ",", "direction", "=", "values", ".", "unset", ",", "transport", "=", "values", ".", "unset", ",", "page_token", "=", "values", ".", "uns...
Retrieve a single page of CommandInstance records from the API. Request is executed immediately :param unicode sim: Only return Commands to or from this SIM. :param CommandInstance.Status status: Only return Commands with this status value. :param CommandInstance.Direction direction: Only return Commands with this direction value. :param CommandInstance.Transport transport: Only return Commands with this transport value. :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of CommandInstance :rtype: twilio.rest.wireless.v1.command.CommandPage
[ "Retrieve", "a", "single", "page", "of", "CommandInstance", "records", "from", "the", "API", ".", "Request", "is", "executed", "immediately" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/wireless/v1/command.py#L99-L133
225,795
twilio/twilio-python
twilio/rest/wireless/v1/command.py
CommandList.create
def create(self, command, sim=values.unset, callback_method=values.unset, callback_url=values.unset, command_mode=values.unset, include_sid=values.unset, delivery_receipt_requested=values.unset): """ Create a new CommandInstance :param unicode command: The message body of the Command or a Base64 encoded byte string in binary mode. :param unicode sim: The Sid or UniqueName of the SIM to send the Command to. :param unicode callback_method: The HTTP method Twilio will use when making a request to the callback URL. :param unicode callback_url: Twilio will make a request to this URL when the Command has finished sending. :param CommandInstance.CommandMode command_mode: A string representing which mode to send the SMS message using. :param unicode include_sid: When sending a Command to a SIM in text mode, Twilio can automatically include the Sid of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. :param bool delivery_receipt_requested: A boolean representing whether to request delivery receipt from the recipient. :returns: Newly created CommandInstance :rtype: twilio.rest.wireless.v1.command.CommandInstance """ data = values.of({ 'Command': command, 'Sim': sim, 'CallbackMethod': callback_method, 'CallbackUrl': callback_url, 'CommandMode': command_mode, 'IncludeSid': include_sid, 'DeliveryReceiptRequested': delivery_receipt_requested, }) payload = self._version.create( 'POST', self._uri, data=data, ) return CommandInstance(self._version, payload, )
python
def create(self, command, sim=values.unset, callback_method=values.unset, callback_url=values.unset, command_mode=values.unset, include_sid=values.unset, delivery_receipt_requested=values.unset): data = values.of({ 'Command': command, 'Sim': sim, 'CallbackMethod': callback_method, 'CallbackUrl': callback_url, 'CommandMode': command_mode, 'IncludeSid': include_sid, 'DeliveryReceiptRequested': delivery_receipt_requested, }) payload = self._version.create( 'POST', self._uri, data=data, ) return CommandInstance(self._version, payload, )
[ "def", "create", "(", "self", ",", "command", ",", "sim", "=", "values", ".", "unset", ",", "callback_method", "=", "values", ".", "unset", ",", "callback_url", "=", "values", ".", "unset", ",", "command_mode", "=", "values", ".", "unset", ",", "include_...
Create a new CommandInstance :param unicode command: The message body of the Command or a Base64 encoded byte string in binary mode. :param unicode sim: The Sid or UniqueName of the SIM to send the Command to. :param unicode callback_method: The HTTP method Twilio will use when making a request to the callback URL. :param unicode callback_url: Twilio will make a request to this URL when the Command has finished sending. :param CommandInstance.CommandMode command_mode: A string representing which mode to send the SMS message using. :param unicode include_sid: When sending a Command to a SIM in text mode, Twilio can automatically include the Sid of the Command in the message body, which could be used to ensure that the device does not process the same Command more than once. :param bool delivery_receipt_requested: A boolean representing whether to request delivery receipt from the recipient. :returns: Newly created CommandInstance :rtype: twilio.rest.wireless.v1.command.CommandInstance
[ "Create", "a", "new", "CommandInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/wireless/v1/command.py#L152-L185
225,796
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.py
TaskQueueStatisticsList.get
def get(self): """ Constructs a TaskQueueStatisticsContext :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext """ return TaskQueueStatisticsContext( self._version, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
python
def get(self): return TaskQueueStatisticsContext( self._version, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
[ "def", "get", "(", "self", ")", ":", "return", "TaskQueueStatisticsContext", "(", "self", ".", "_version", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", "task_queue_sid", "=", "self", ".", "_solution", "[", "'task_queue...
Constructs a TaskQueueStatisticsContext :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsContext
[ "Constructs", "a", "TaskQueueStatisticsContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.py#L36-L47
225,797
twilio/twilio-python
twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.py
TaskQueueStatisticsPage.get_instance
def get_instance(self, payload): """ Build an instance of TaskQueueStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance """ return TaskQueueStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
python
def get_instance(self, payload): return TaskQueueStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], task_queue_sid=self._solution['task_queue_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "TaskQueueStatisticsInstance", "(", "self", ".", "_version", ",", "payload", ",", "workspace_sid", "=", "self", ".", "_solution", "[", "'workspace_sid'", "]", ",", "task_queue_sid", "=", "...
Build an instance of TaskQueueStatisticsInstance :param dict payload: Payload response from the API :returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_statistics.TaskQueueStatisticsInstance
[ "Build", "an", "instance", "of", "TaskQueueStatisticsInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_statistics.py#L92-L106
225,798
twilio/twilio-python
twilio/rest/proxy/v1/service/session/__init__.py
SessionList.get
def get(self, sid): """ Constructs a SessionContext :param sid: The unique string that identifies the resource :returns: twilio.rest.proxy.v1.service.session.SessionContext :rtype: twilio.rest.proxy.v1.service.session.SessionContext """ return SessionContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
def get(self, sid): return SessionContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
[ "def", "get", "(", "self", ",", "sid", ")", ":", "return", "SessionContext", "(", "self", ".", "_version", ",", "service_sid", "=", "self", ".", "_solution", "[", "'service_sid'", "]", ",", "sid", "=", "sid", ",", ")" ]
Constructs a SessionContext :param sid: The unique string that identifies the resource :returns: twilio.rest.proxy.v1.service.session.SessionContext :rtype: twilio.rest.proxy.v1.service.session.SessionContext
[ "Constructs", "a", "SessionContext" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/proxy/v1/service/session/__init__.py#L154-L163
225,799
twilio/twilio-python
twilio/rest/proxy/v1/service/session/__init__.py
SessionPage.get_instance
def get_instance(self, payload): """ Build an instance of SessionInstance :param dict payload: Payload response from the API :returns: twilio.rest.proxy.v1.service.session.SessionInstance :rtype: twilio.rest.proxy.v1.service.session.SessionInstance """ return SessionInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
def get_instance(self, payload): return SessionInstance(self._version, payload, service_sid=self._solution['service_sid'], )
[ "def", "get_instance", "(", "self", ",", "payload", ")", ":", "return", "SessionInstance", "(", "self", ".", "_version", ",", "payload", ",", "service_sid", "=", "self", ".", "_solution", "[", "'service_sid'", "]", ",", ")" ]
Build an instance of SessionInstance :param dict payload: Payload response from the API :returns: twilio.rest.proxy.v1.service.session.SessionInstance :rtype: twilio.rest.proxy.v1.service.session.SessionInstance
[ "Build", "an", "instance", "of", "SessionInstance" ]
c867895f55dcc29f522e6e8b8868d0d18483132f
https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/proxy/v1/service/session/__init__.py#L206-L215