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,600 | twilio/twilio-python | twilio/rest/authy/v1/service/entity/factor/__init__.py | FactorList.create | def create(self, binding, friendly_name, factor_type):
"""
Create a new FactorInstance
:param unicode binding: A unique binding for this Factor
:param unicode friendly_name: The friendly name of this Factor
:param FactorInstance.FactorTypes factor_type: The Type of this Factor
:returns: Newly created FactorInstance
:rtype: twilio.rest.authy.v1.service.entity.factor.FactorInstance
"""
data = values.of({'Binding': binding, 'FriendlyName': friendly_name, 'FactorType': factor_type, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FactorInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
) | python | def create(self, binding, friendly_name, factor_type):
data = values.of({'Binding': binding, 'FriendlyName': friendly_name, 'FactorType': factor_type, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FactorInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
) | [
"def",
"create",
"(",
"self",
",",
"binding",
",",
"friendly_name",
",",
"factor_type",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Binding'",
":",
"binding",
",",
"'FriendlyName'",
":",
"friendly_name",
",",
"'FactorType'",
":",
"factor_type",
... | Create a new FactorInstance
:param unicode binding: A unique binding for this Factor
:param unicode friendly_name: The friendly name of this Factor
:param FactorInstance.FactorTypes factor_type: The Type of this Factor
:returns: Newly created FactorInstance
:rtype: twilio.rest.authy.v1.service.entity.factor.FactorInstance | [
"Create",
"a",
"new",
"FactorInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/authy/v1/service/entity/factor/__init__.py#L40-L64 |
225,601 | twilio/twilio-python | twilio/rest/authy/v1/service/entity/factor/__init__.py | FactorList.get | def get(self, sid):
"""
Constructs a FactorContext
:param sid: A string that uniquely identifies this Factor.
:returns: twilio.rest.authy.v1.service.entity.factor.FactorContext
:rtype: twilio.rest.authy.v1.service.entity.factor.FactorContext
"""
return FactorContext(
self._version,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
sid=sid,
) | python | def get(self, sid):
return FactorContext(
self._version,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"FactorContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"identity",
"=",
"self",
".",
"_solution",
"[",
"'identity'",
"]"... | Constructs a FactorContext
:param sid: A string that uniquely identifies this Factor.
:returns: twilio.rest.authy.v1.service.entity.factor.FactorContext
:rtype: twilio.rest.authy.v1.service.entity.factor.FactorContext | [
"Constructs",
"a",
"FactorContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/authy/v1/service/entity/factor/__init__.py#L147-L161 |
225,602 | twilio/twilio-python | twilio/rest/authy/v1/service/entity/factor/__init__.py | FactorPage.get_instance | def get_instance(self, payload):
"""
Build an instance of FactorInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.authy.v1.service.entity.factor.FactorInstance
:rtype: twilio.rest.authy.v1.service.entity.factor.FactorInstance
"""
return FactorInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
) | python | def get_instance(self, payload):
return FactorInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"FactorInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"identity",
"=",
"self",
".",
"_solut... | Build an instance of FactorInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.authy.v1.service.entity.factor.FactorInstance
:rtype: twilio.rest.authy.v1.service.entity.factor.FactorInstance | [
"Build",
"an",
"instance",
"of",
"FactorInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/authy/v1/service/entity/factor/__init__.py#L211-L225 |
225,603 | twilio/twilio-python | twilio/rest/authy/v1/service/entity/factor/__init__.py | FactorContext.challenges | def challenges(self):
"""
Access the challenges
:returns: twilio.rest.authy.v1.service.entity.factor.challenge.ChallengeList
:rtype: twilio.rest.authy.v1.service.entity.factor.challenge.ChallengeList
"""
if self._challenges is None:
self._challenges = ChallengeList(
self._version,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
factor_sid=self._solution['sid'],
)
return self._challenges | python | def challenges(self):
if self._challenges is None:
self._challenges = ChallengeList(
self._version,
service_sid=self._solution['service_sid'],
identity=self._solution['identity'],
factor_sid=self._solution['sid'],
)
return self._challenges | [
"def",
"challenges",
"(",
"self",
")",
":",
"if",
"self",
".",
"_challenges",
"is",
"None",
":",
"self",
".",
"_challenges",
"=",
"ChallengeList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
... | Access the challenges
:returns: twilio.rest.authy.v1.service.entity.factor.challenge.ChallengeList
:rtype: twilio.rest.authy.v1.service.entity.factor.challenge.ChallengeList | [
"Access",
"the",
"challenges"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/authy/v1/service/entity/factor/__init__.py#L321-L335 |
225,604 | twilio/twilio-python | twilio/rest/preview/wireless/command.py | CommandList.stream | def stream(self, device=values.unset, sim=values.unset, status=values.unset,
direction=values.unset, limit=None, page_size=None):
"""
Streams CommandInstance 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 device: The device
:param unicode sim: The sim
:param unicode status: The status
:param unicode direction: The direction
: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.preview.wireless.command.CommandInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
device=device,
sim=sim,
status=status,
direction=direction,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, device=values.unset, sim=values.unset, status=values.unset,
direction=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
device=device,
sim=sim,
status=status,
direction=direction,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"device",
"=",
"values",
".",
"unset",
",",
"sim",
"=",
"values",
".",
"unset",
",",
"status",
"=",
"values",
".",
"unset",
",",
"direction",
"=",
"values",
".",
"unset",
",",
"limit",
"=",
"None",
",",
"page_size",... | Streams CommandInstance 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 device: The device
:param unicode sim: The sim
:param unicode status: The status
:param unicode direction: The direction
: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.preview.wireless.command.CommandInstance] | [
"Streams",
"CommandInstance",
"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/preview/wireless/command.py#L37-L69 |
225,605 | twilio/twilio-python | twilio/rest/__init__.py | Client.request | def request(self, method, uri, params=None, data=None, headers=None, auth=None,
timeout=None, allow_redirects=False):
"""
Makes a request to the Twilio API using the configured http client
Authentication information is automatically added if none is provided
:param str method: HTTP Method
:param str uri: Fully qualified url
:param dict[str, str] params: Query string parameters
:param dict[str, str] data: POST body data
:param dict[str, str] headers: HTTP Headers
:param tuple(str, str) auth: Authentication
:param int timeout: Timeout in seconds
:param bool allow_redirects: Should the client follow redirects
:returns: Response from the Twilio API
:rtype: twilio.http.response.Response
"""
auth = auth or self.auth
headers = headers or {}
headers['User-Agent'] = 'twilio-python/{} (Python {})'.format(
__version__,
platform.python_version(),
)
headers['X-Twilio-Client'] = 'python-{}'.format(__version__)
headers['Accept-Charset'] = 'utf-8'
if method == 'POST' and 'Content-Type' not in headers:
headers['Content-Type'] = 'application/x-www-form-urlencoded'
if 'Accept' not in headers:
headers['Accept'] = 'application/json'
if self.region:
head, tail = uri.split('.', 1)
if not tail.startswith(self.region):
uri = '.'.join([head, self.region, tail])
return self.http_client.request(
method,
uri,
params=params,
data=data,
headers=headers,
auth=auth,
timeout=timeout,
allow_redirects=allow_redirects
) | python | def request(self, method, uri, params=None, data=None, headers=None, auth=None,
timeout=None, allow_redirects=False):
auth = auth or self.auth
headers = headers or {}
headers['User-Agent'] = 'twilio-python/{} (Python {})'.format(
__version__,
platform.python_version(),
)
headers['X-Twilio-Client'] = 'python-{}'.format(__version__)
headers['Accept-Charset'] = 'utf-8'
if method == 'POST' and 'Content-Type' not in headers:
headers['Content-Type'] = 'application/x-www-form-urlencoded'
if 'Accept' not in headers:
headers['Accept'] = 'application/json'
if self.region:
head, tail = uri.split('.', 1)
if not tail.startswith(self.region):
uri = '.'.join([head, self.region, tail])
return self.http_client.request(
method,
uri,
params=params,
data=data,
headers=headers,
auth=auth,
timeout=timeout,
allow_redirects=allow_redirects
) | [
"def",
"request",
"(",
"self",
",",
"method",
",",
"uri",
",",
"params",
"=",
"None",
",",
"data",
"=",
"None",
",",
"headers",
"=",
"None",
",",
"auth",
"=",
"None",
",",
"timeout",
"=",
"None",
",",
"allow_redirects",
"=",
"False",
")",
":",
"aut... | Makes a request to the Twilio API using the configured http client
Authentication information is automatically added if none is provided
:param str method: HTTP Method
:param str uri: Fully qualified url
:param dict[str, str] params: Query string parameters
:param dict[str, str] data: POST body data
:param dict[str, str] headers: HTTP Headers
:param tuple(str, str) auth: Authentication
:param int timeout: Timeout in seconds
:param bool allow_redirects: Should the client follow redirects
:returns: Response from the Twilio API
:rtype: twilio.http.response.Response | [
"Makes",
"a",
"request",
"to",
"the",
"Twilio",
"API",
"using",
"the",
"configured",
"http",
"client",
"Authentication",
"information",
"is",
"automatically",
"added",
"if",
"none",
"is",
"provided"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L81-L130 |
225,606 | twilio/twilio-python | twilio/rest/__init__.py | Client.accounts | def accounts(self):
"""
Access the Accounts Twilio Domain
:returns: Accounts Twilio Domain
:rtype: twilio.rest.accounts.Accounts
"""
if self._accounts is None:
from twilio.rest.accounts import Accounts
self._accounts = Accounts(self)
return self._accounts | python | def accounts(self):
if self._accounts is None:
from twilio.rest.accounts import Accounts
self._accounts = Accounts(self)
return self._accounts | [
"def",
"accounts",
"(",
"self",
")",
":",
"if",
"self",
".",
"_accounts",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"accounts",
"import",
"Accounts",
"self",
".",
"_accounts",
"=",
"Accounts",
"(",
"self",
")",
"return",
"self",
".",
"_acc... | Access the Accounts Twilio Domain
:returns: Accounts Twilio Domain
:rtype: twilio.rest.accounts.Accounts | [
"Access",
"the",
"Accounts",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L133-L143 |
225,607 | twilio/twilio-python | twilio/rest/__init__.py | Client.api | def api(self):
"""
Access the Api Twilio Domain
:returns: Api Twilio Domain
:rtype: twilio.rest.api.Api
"""
if self._api is None:
from twilio.rest.api import Api
self._api = Api(self)
return self._api | python | def api(self):
if self._api is None:
from twilio.rest.api import Api
self._api = Api(self)
return self._api | [
"def",
"api",
"(",
"self",
")",
":",
"if",
"self",
".",
"_api",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"api",
"import",
"Api",
"self",
".",
"_api",
"=",
"Api",
"(",
"self",
")",
"return",
"self",
".",
"_api"
] | Access the Api Twilio Domain
:returns: Api Twilio Domain
:rtype: twilio.rest.api.Api | [
"Access",
"the",
"Api",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L146-L156 |
225,608 | twilio/twilio-python | twilio/rest/__init__.py | Client.authy | def authy(self):
"""
Access the Authy Twilio Domain
:returns: Authy Twilio Domain
:rtype: twilio.rest.authy.Authy
"""
if self._authy is None:
from twilio.rest.authy import Authy
self._authy = Authy(self)
return self._authy | python | def authy(self):
if self._authy is None:
from twilio.rest.authy import Authy
self._authy = Authy(self)
return self._authy | [
"def",
"authy",
"(",
"self",
")",
":",
"if",
"self",
".",
"_authy",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"authy",
"import",
"Authy",
"self",
".",
"_authy",
"=",
"Authy",
"(",
"self",
")",
"return",
"self",
".",
"_authy"
] | Access the Authy Twilio Domain
:returns: Authy Twilio Domain
:rtype: twilio.rest.authy.Authy | [
"Access",
"the",
"Authy",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L159-L169 |
225,609 | twilio/twilio-python | twilio/rest/__init__.py | Client.autopilot | def autopilot(self):
"""
Access the Autopilot Twilio Domain
:returns: Autopilot Twilio Domain
:rtype: twilio.rest.autopilot.Autopilot
"""
if self._autopilot is None:
from twilio.rest.autopilot import Autopilot
self._autopilot = Autopilot(self)
return self._autopilot | python | def autopilot(self):
if self._autopilot is None:
from twilio.rest.autopilot import Autopilot
self._autopilot = Autopilot(self)
return self._autopilot | [
"def",
"autopilot",
"(",
"self",
")",
":",
"if",
"self",
".",
"_autopilot",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"autopilot",
"import",
"Autopilot",
"self",
".",
"_autopilot",
"=",
"Autopilot",
"(",
"self",
")",
"return",
"self",
".",
... | Access the Autopilot Twilio Domain
:returns: Autopilot Twilio Domain
:rtype: twilio.rest.autopilot.Autopilot | [
"Access",
"the",
"Autopilot",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L172-L182 |
225,610 | twilio/twilio-python | twilio/rest/__init__.py | Client.chat | def chat(self):
"""
Access the Chat Twilio Domain
:returns: Chat Twilio Domain
:rtype: twilio.rest.chat.Chat
"""
if self._chat is None:
from twilio.rest.chat import Chat
self._chat = Chat(self)
return self._chat | python | def chat(self):
if self._chat is None:
from twilio.rest.chat import Chat
self._chat = Chat(self)
return self._chat | [
"def",
"chat",
"(",
"self",
")",
":",
"if",
"self",
".",
"_chat",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"chat",
"import",
"Chat",
"self",
".",
"_chat",
"=",
"Chat",
"(",
"self",
")",
"return",
"self",
".",
"_chat"
] | Access the Chat Twilio Domain
:returns: Chat Twilio Domain
:rtype: twilio.rest.chat.Chat | [
"Access",
"the",
"Chat",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L185-L195 |
225,611 | twilio/twilio-python | twilio/rest/__init__.py | Client.fax | def fax(self):
"""
Access the Fax Twilio Domain
:returns: Fax Twilio Domain
:rtype: twilio.rest.fax.Fax
"""
if self._fax is None:
from twilio.rest.fax import Fax
self._fax = Fax(self)
return self._fax | python | def fax(self):
if self._fax is None:
from twilio.rest.fax import Fax
self._fax = Fax(self)
return self._fax | [
"def",
"fax",
"(",
"self",
")",
":",
"if",
"self",
".",
"_fax",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"fax",
"import",
"Fax",
"self",
".",
"_fax",
"=",
"Fax",
"(",
"self",
")",
"return",
"self",
".",
"_fax"
] | Access the Fax Twilio Domain
:returns: Fax Twilio Domain
:rtype: twilio.rest.fax.Fax | [
"Access",
"the",
"Fax",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L198-L208 |
225,612 | twilio/twilio-python | twilio/rest/__init__.py | Client.flex_api | def flex_api(self):
"""
Access the FlexApi Twilio Domain
:returns: FlexApi Twilio Domain
:rtype: twilio.rest.flex_api.FlexApi
"""
if self._flex_api is None:
from twilio.rest.flex_api import FlexApi
self._flex_api = FlexApi(self)
return self._flex_api | python | def flex_api(self):
if self._flex_api is None:
from twilio.rest.flex_api import FlexApi
self._flex_api = FlexApi(self)
return self._flex_api | [
"def",
"flex_api",
"(",
"self",
")",
":",
"if",
"self",
".",
"_flex_api",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"flex_api",
"import",
"FlexApi",
"self",
".",
"_flex_api",
"=",
"FlexApi",
"(",
"self",
")",
"return",
"self",
".",
"_flex_... | Access the FlexApi Twilio Domain
:returns: FlexApi Twilio Domain
:rtype: twilio.rest.flex_api.FlexApi | [
"Access",
"the",
"FlexApi",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L211-L221 |
225,613 | twilio/twilio-python | twilio/rest/__init__.py | Client.insights | def insights(self):
"""
Access the Insights Twilio Domain
:returns: Insights Twilio Domain
:rtype: twilio.rest.insights.Insights
"""
if self._insights is None:
from twilio.rest.insights import Insights
self._insights = Insights(self)
return self._insights | python | def insights(self):
if self._insights is None:
from twilio.rest.insights import Insights
self._insights = Insights(self)
return self._insights | [
"def",
"insights",
"(",
"self",
")",
":",
"if",
"self",
".",
"_insights",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"insights",
"import",
"Insights",
"self",
".",
"_insights",
"=",
"Insights",
"(",
"self",
")",
"return",
"self",
".",
"_ins... | Access the Insights Twilio Domain
:returns: Insights Twilio Domain
:rtype: twilio.rest.insights.Insights | [
"Access",
"the",
"Insights",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L224-L234 |
225,614 | twilio/twilio-python | twilio/rest/__init__.py | Client.ip_messaging | def ip_messaging(self):
"""
Access the IpMessaging Twilio Domain
:returns: IpMessaging Twilio Domain
:rtype: twilio.rest.ip_messaging.IpMessaging
"""
if self._ip_messaging is None:
from twilio.rest.ip_messaging import IpMessaging
self._ip_messaging = IpMessaging(self)
return self._ip_messaging | python | def ip_messaging(self):
if self._ip_messaging is None:
from twilio.rest.ip_messaging import IpMessaging
self._ip_messaging = IpMessaging(self)
return self._ip_messaging | [
"def",
"ip_messaging",
"(",
"self",
")",
":",
"if",
"self",
".",
"_ip_messaging",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"ip_messaging",
"import",
"IpMessaging",
"self",
".",
"_ip_messaging",
"=",
"IpMessaging",
"(",
"self",
")",
"return",
... | Access the IpMessaging Twilio Domain
:returns: IpMessaging Twilio Domain
:rtype: twilio.rest.ip_messaging.IpMessaging | [
"Access",
"the",
"IpMessaging",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L237-L247 |
225,615 | twilio/twilio-python | twilio/rest/__init__.py | Client.lookups | def lookups(self):
"""
Access the Lookups Twilio Domain
:returns: Lookups Twilio Domain
:rtype: twilio.rest.lookups.Lookups
"""
if self._lookups is None:
from twilio.rest.lookups import Lookups
self._lookups = Lookups(self)
return self._lookups | python | def lookups(self):
if self._lookups is None:
from twilio.rest.lookups import Lookups
self._lookups = Lookups(self)
return self._lookups | [
"def",
"lookups",
"(",
"self",
")",
":",
"if",
"self",
".",
"_lookups",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"lookups",
"import",
"Lookups",
"self",
".",
"_lookups",
"=",
"Lookups",
"(",
"self",
")",
"return",
"self",
".",
"_lookups"
... | Access the Lookups Twilio Domain
:returns: Lookups Twilio Domain
:rtype: twilio.rest.lookups.Lookups | [
"Access",
"the",
"Lookups",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L250-L260 |
225,616 | twilio/twilio-python | twilio/rest/__init__.py | Client.messaging | def messaging(self):
"""
Access the Messaging Twilio Domain
:returns: Messaging Twilio Domain
:rtype: twilio.rest.messaging.Messaging
"""
if self._messaging is None:
from twilio.rest.messaging import Messaging
self._messaging = Messaging(self)
return self._messaging | python | def messaging(self):
if self._messaging is None:
from twilio.rest.messaging import Messaging
self._messaging = Messaging(self)
return self._messaging | [
"def",
"messaging",
"(",
"self",
")",
":",
"if",
"self",
".",
"_messaging",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"messaging",
"import",
"Messaging",
"self",
".",
"_messaging",
"=",
"Messaging",
"(",
"self",
")",
"return",
"self",
".",
... | Access the Messaging Twilio Domain
:returns: Messaging Twilio Domain
:rtype: twilio.rest.messaging.Messaging | [
"Access",
"the",
"Messaging",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L263-L273 |
225,617 | twilio/twilio-python | twilio/rest/__init__.py | Client.monitor | def monitor(self):
"""
Access the Monitor Twilio Domain
:returns: Monitor Twilio Domain
:rtype: twilio.rest.monitor.Monitor
"""
if self._monitor is None:
from twilio.rest.monitor import Monitor
self._monitor = Monitor(self)
return self._monitor | python | def monitor(self):
if self._monitor is None:
from twilio.rest.monitor import Monitor
self._monitor = Monitor(self)
return self._monitor | [
"def",
"monitor",
"(",
"self",
")",
":",
"if",
"self",
".",
"_monitor",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"monitor",
"import",
"Monitor",
"self",
".",
"_monitor",
"=",
"Monitor",
"(",
"self",
")",
"return",
"self",
".",
"_monitor"
... | Access the Monitor Twilio Domain
:returns: Monitor Twilio Domain
:rtype: twilio.rest.monitor.Monitor | [
"Access",
"the",
"Monitor",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L276-L286 |
225,618 | twilio/twilio-python | twilio/rest/__init__.py | Client.notify | def notify(self):
"""
Access the Notify Twilio Domain
:returns: Notify Twilio Domain
:rtype: twilio.rest.notify.Notify
"""
if self._notify is None:
from twilio.rest.notify import Notify
self._notify = Notify(self)
return self._notify | python | def notify(self):
if self._notify is None:
from twilio.rest.notify import Notify
self._notify = Notify(self)
return self._notify | [
"def",
"notify",
"(",
"self",
")",
":",
"if",
"self",
".",
"_notify",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"notify",
"import",
"Notify",
"self",
".",
"_notify",
"=",
"Notify",
"(",
"self",
")",
"return",
"self",
".",
"_notify"
] | Access the Notify Twilio Domain
:returns: Notify Twilio Domain
:rtype: twilio.rest.notify.Notify | [
"Access",
"the",
"Notify",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L289-L299 |
225,619 | twilio/twilio-python | twilio/rest/__init__.py | Client.preview | def preview(self):
"""
Access the Preview Twilio Domain
:returns: Preview Twilio Domain
:rtype: twilio.rest.preview.Preview
"""
if self._preview is None:
from twilio.rest.preview import Preview
self._preview = Preview(self)
return self._preview | python | def preview(self):
if self._preview is None:
from twilio.rest.preview import Preview
self._preview = Preview(self)
return self._preview | [
"def",
"preview",
"(",
"self",
")",
":",
"if",
"self",
".",
"_preview",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"preview",
"import",
"Preview",
"self",
".",
"_preview",
"=",
"Preview",
"(",
"self",
")",
"return",
"self",
".",
"_preview"
... | Access the Preview Twilio Domain
:returns: Preview Twilio Domain
:rtype: twilio.rest.preview.Preview | [
"Access",
"the",
"Preview",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L302-L312 |
225,620 | twilio/twilio-python | twilio/rest/__init__.py | Client.pricing | def pricing(self):
"""
Access the Pricing Twilio Domain
:returns: Pricing Twilio Domain
:rtype: twilio.rest.pricing.Pricing
"""
if self._pricing is None:
from twilio.rest.pricing import Pricing
self._pricing = Pricing(self)
return self._pricing | python | def pricing(self):
if self._pricing is None:
from twilio.rest.pricing import Pricing
self._pricing = Pricing(self)
return self._pricing | [
"def",
"pricing",
"(",
"self",
")",
":",
"if",
"self",
".",
"_pricing",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"pricing",
"import",
"Pricing",
"self",
".",
"_pricing",
"=",
"Pricing",
"(",
"self",
")",
"return",
"self",
".",
"_pricing"
... | Access the Pricing Twilio Domain
:returns: Pricing Twilio Domain
:rtype: twilio.rest.pricing.Pricing | [
"Access",
"the",
"Pricing",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L315-L325 |
225,621 | twilio/twilio-python | twilio/rest/__init__.py | Client.proxy | def proxy(self):
"""
Access the Proxy Twilio Domain
:returns: Proxy Twilio Domain
:rtype: twilio.rest.proxy.Proxy
"""
if self._proxy is None:
from twilio.rest.proxy import Proxy
self._proxy = Proxy(self)
return self._proxy | python | def proxy(self):
if self._proxy is None:
from twilio.rest.proxy import Proxy
self._proxy = Proxy(self)
return self._proxy | [
"def",
"proxy",
"(",
"self",
")",
":",
"if",
"self",
".",
"_proxy",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"proxy",
"import",
"Proxy",
"self",
".",
"_proxy",
"=",
"Proxy",
"(",
"self",
")",
"return",
"self",
".",
"_proxy"
] | Access the Proxy Twilio Domain
:returns: Proxy Twilio Domain
:rtype: twilio.rest.proxy.Proxy | [
"Access",
"the",
"Proxy",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L328-L338 |
225,622 | twilio/twilio-python | twilio/rest/__init__.py | Client.serverless | def serverless(self):
"""
Access the Serverless Twilio Domain
:returns: Serverless Twilio Domain
:rtype: twilio.rest.serverless.Serverless
"""
if self._serverless is None:
from twilio.rest.serverless import Serverless
self._serverless = Serverless(self)
return self._serverless | python | def serverless(self):
if self._serverless is None:
from twilio.rest.serverless import Serverless
self._serverless = Serverless(self)
return self._serverless | [
"def",
"serverless",
"(",
"self",
")",
":",
"if",
"self",
".",
"_serverless",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"serverless",
"import",
"Serverless",
"self",
".",
"_serverless",
"=",
"Serverless",
"(",
"self",
")",
"return",
"self",
... | Access the Serverless Twilio Domain
:returns: Serverless Twilio Domain
:rtype: twilio.rest.serverless.Serverless | [
"Access",
"the",
"Serverless",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L341-L351 |
225,623 | twilio/twilio-python | twilio/rest/__init__.py | Client.studio | def studio(self):
"""
Access the Studio Twilio Domain
:returns: Studio Twilio Domain
:rtype: twilio.rest.studio.Studio
"""
if self._studio is None:
from twilio.rest.studio import Studio
self._studio = Studio(self)
return self._studio | python | def studio(self):
if self._studio is None:
from twilio.rest.studio import Studio
self._studio = Studio(self)
return self._studio | [
"def",
"studio",
"(",
"self",
")",
":",
"if",
"self",
".",
"_studio",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"studio",
"import",
"Studio",
"self",
".",
"_studio",
"=",
"Studio",
"(",
"self",
")",
"return",
"self",
".",
"_studio"
] | Access the Studio Twilio Domain
:returns: Studio Twilio Domain
:rtype: twilio.rest.studio.Studio | [
"Access",
"the",
"Studio",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L354-L364 |
225,624 | twilio/twilio-python | twilio/rest/__init__.py | Client.sync | def sync(self):
"""
Access the Sync Twilio Domain
:returns: Sync Twilio Domain
:rtype: twilio.rest.sync.Sync
"""
if self._sync is None:
from twilio.rest.sync import Sync
self._sync = Sync(self)
return self._sync | python | def sync(self):
if self._sync is None:
from twilio.rest.sync import Sync
self._sync = Sync(self)
return self._sync | [
"def",
"sync",
"(",
"self",
")",
":",
"if",
"self",
".",
"_sync",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"sync",
"import",
"Sync",
"self",
".",
"_sync",
"=",
"Sync",
"(",
"self",
")",
"return",
"self",
".",
"_sync"
] | Access the Sync Twilio Domain
:returns: Sync Twilio Domain
:rtype: twilio.rest.sync.Sync | [
"Access",
"the",
"Sync",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L367-L377 |
225,625 | twilio/twilio-python | twilio/rest/__init__.py | Client.taskrouter | def taskrouter(self):
"""
Access the Taskrouter Twilio Domain
:returns: Taskrouter Twilio Domain
:rtype: twilio.rest.taskrouter.Taskrouter
"""
if self._taskrouter is None:
from twilio.rest.taskrouter import Taskrouter
self._taskrouter = Taskrouter(self)
return self._taskrouter | python | def taskrouter(self):
if self._taskrouter is None:
from twilio.rest.taskrouter import Taskrouter
self._taskrouter = Taskrouter(self)
return self._taskrouter | [
"def",
"taskrouter",
"(",
"self",
")",
":",
"if",
"self",
".",
"_taskrouter",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"taskrouter",
"import",
"Taskrouter",
"self",
".",
"_taskrouter",
"=",
"Taskrouter",
"(",
"self",
")",
"return",
"self",
... | Access the Taskrouter Twilio Domain
:returns: Taskrouter Twilio Domain
:rtype: twilio.rest.taskrouter.Taskrouter | [
"Access",
"the",
"Taskrouter",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L380-L390 |
225,626 | twilio/twilio-python | twilio/rest/__init__.py | Client.trunking | def trunking(self):
"""
Access the Trunking Twilio Domain
:returns: Trunking Twilio Domain
:rtype: twilio.rest.trunking.Trunking
"""
if self._trunking is None:
from twilio.rest.trunking import Trunking
self._trunking = Trunking(self)
return self._trunking | python | def trunking(self):
if self._trunking is None:
from twilio.rest.trunking import Trunking
self._trunking = Trunking(self)
return self._trunking | [
"def",
"trunking",
"(",
"self",
")",
":",
"if",
"self",
".",
"_trunking",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"trunking",
"import",
"Trunking",
"self",
".",
"_trunking",
"=",
"Trunking",
"(",
"self",
")",
"return",
"self",
".",
"_tru... | Access the Trunking Twilio Domain
:returns: Trunking Twilio Domain
:rtype: twilio.rest.trunking.Trunking | [
"Access",
"the",
"Trunking",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L393-L403 |
225,627 | twilio/twilio-python | twilio/rest/__init__.py | Client.verify | def verify(self):
"""
Access the Verify Twilio Domain
:returns: Verify Twilio Domain
:rtype: twilio.rest.verify.Verify
"""
if self._verify is None:
from twilio.rest.verify import Verify
self._verify = Verify(self)
return self._verify | python | def verify(self):
if self._verify is None:
from twilio.rest.verify import Verify
self._verify = Verify(self)
return self._verify | [
"def",
"verify",
"(",
"self",
")",
":",
"if",
"self",
".",
"_verify",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"verify",
"import",
"Verify",
"self",
".",
"_verify",
"=",
"Verify",
"(",
"self",
")",
"return",
"self",
".",
"_verify"
] | Access the Verify Twilio Domain
:returns: Verify Twilio Domain
:rtype: twilio.rest.verify.Verify | [
"Access",
"the",
"Verify",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L406-L416 |
225,628 | twilio/twilio-python | twilio/rest/__init__.py | Client.video | def video(self):
"""
Access the Video Twilio Domain
:returns: Video Twilio Domain
:rtype: twilio.rest.video.Video
"""
if self._video is None:
from twilio.rest.video import Video
self._video = Video(self)
return self._video | python | def video(self):
if self._video is None:
from twilio.rest.video import Video
self._video = Video(self)
return self._video | [
"def",
"video",
"(",
"self",
")",
":",
"if",
"self",
".",
"_video",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"video",
"import",
"Video",
"self",
".",
"_video",
"=",
"Video",
"(",
"self",
")",
"return",
"self",
".",
"_video"
] | Access the Video Twilio Domain
:returns: Video Twilio Domain
:rtype: twilio.rest.video.Video | [
"Access",
"the",
"Video",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L419-L429 |
225,629 | twilio/twilio-python | twilio/rest/__init__.py | Client.voice | def voice(self):
"""
Access the Voice Twilio Domain
:returns: Voice Twilio Domain
:rtype: twilio.rest.voice.Voice
"""
if self._voice is None:
from twilio.rest.voice import Voice
self._voice = Voice(self)
return self._voice | python | def voice(self):
if self._voice is None:
from twilio.rest.voice import Voice
self._voice = Voice(self)
return self._voice | [
"def",
"voice",
"(",
"self",
")",
":",
"if",
"self",
".",
"_voice",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"voice",
"import",
"Voice",
"self",
".",
"_voice",
"=",
"Voice",
"(",
"self",
")",
"return",
"self",
".",
"_voice"
] | Access the Voice Twilio Domain
:returns: Voice Twilio Domain
:rtype: twilio.rest.voice.Voice | [
"Access",
"the",
"Voice",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L432-L442 |
225,630 | twilio/twilio-python | twilio/rest/__init__.py | Client.wireless | def wireless(self):
"""
Access the Wireless Twilio Domain
:returns: Wireless Twilio Domain
:rtype: twilio.rest.wireless.Wireless
"""
if self._wireless is None:
from twilio.rest.wireless import Wireless
self._wireless = Wireless(self)
return self._wireless | python | def wireless(self):
if self._wireless is None:
from twilio.rest.wireless import Wireless
self._wireless = Wireless(self)
return self._wireless | [
"def",
"wireless",
"(",
"self",
")",
":",
"if",
"self",
".",
"_wireless",
"is",
"None",
":",
"from",
"twilio",
".",
"rest",
".",
"wireless",
"import",
"Wireless",
"self",
".",
"_wireless",
"=",
"Wireless",
"(",
"self",
")",
"return",
"self",
".",
"_wir... | Access the Wireless Twilio Domain
:returns: Wireless Twilio Domain
:rtype: twilio.rest.wireless.Wireless | [
"Access",
"the",
"Wireless",
"Twilio",
"Domain"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/__init__.py#L445-L455 |
225,631 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/__init__.py | AuthTypeRegistrationsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AuthTypeRegistrationsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsInstance
"""
return AuthTypeRegistrationsInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | def get_instance(self, payload):
return AuthTypeRegistrationsInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AuthTypeRegistrationsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
"=",
"self",... | Build an instance of AuthTypeRegistrationsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_registrations_mapping.AuthTypeRegistrationsInstance | [
"Build",
"an",
"instance",
"of",
"AuthTypeRegistrationsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_registrations_mapping/__init__.py#L83-L97 |
225,632 | twilio/twilio-python | twilio/rest/messaging/v1/service/__init__.py | ServiceContext.alpha_senders | def alpha_senders(self):
"""
Access the alpha_senders
:returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
"""
if self._alpha_senders is None:
self._alpha_senders = AlphaSenderList(self._version, service_sid=self._solution['sid'], )
return self._alpha_senders | python | def alpha_senders(self):
if self._alpha_senders is None:
self._alpha_senders = AlphaSenderList(self._version, service_sid=self._solution['sid'], )
return self._alpha_senders | [
"def",
"alpha_senders",
"(",
"self",
")",
":",
"if",
"self",
".",
"_alpha_senders",
"is",
"None",
":",
"self",
".",
"_alpha_senders",
"=",
"AlphaSenderList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]"... | Access the alpha_senders
:returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderList | [
"Access",
"the",
"alpha_senders"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/messaging/v1/service/__init__.py#L374-L383 |
225,633 | twilio/twilio-python | twilio/rest/api/v2010/account/new_key.py | NewKeyPage.get_instance | def get_instance(self, payload):
"""
Build an instance of NewKeyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.new_key.NewKeyInstance
:rtype: twilio.rest.api.v2010.account.new_key.NewKeyInstance
"""
return NewKeyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return NewKeyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"NewKeyInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of NewKeyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.new_key.NewKeyInstance
:rtype: twilio.rest.api.v2010.account.new_key.NewKeyInstance | [
"Build",
"an",
"instance",
"of",
"NewKeyInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/new_key.py#L83-L92 |
225,634 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/field.py | FieldList.create | def create(self, field_type, unique_name):
"""
Create a new FieldInstance
:param unicode field_type: The Field Type of this field
:param unicode unique_name: An application-defined string that uniquely identifies the new resource
:returns: Newly created FieldInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance
"""
data = values.of({'FieldType': field_type, 'UniqueName': unique_name, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FieldInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | python | def create(self, field_type, unique_name):
data = values.of({'FieldType': field_type, 'UniqueName': unique_name, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FieldInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"field_type",
",",
"unique_name",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'FieldType'",
":",
"field_type",
",",
"'UniqueName'",
":",
"unique_name",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
... | Create a new FieldInstance
:param unicode field_type: The Field Type of this field
:param unicode unique_name: An application-defined string that uniquely identifies the new resource
:returns: Newly created FieldInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance | [
"Create",
"a",
"new",
"FieldInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/field.py#L120-L143 |
225,635 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/field.py | FieldList.get | def get(self, sid):
"""
Constructs a FieldContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.task.field.FieldContext
:rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldContext
"""
return FieldContext(
self._version,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
sid=sid,
) | python | def get(self, sid):
return FieldContext(
self._version,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"FieldContext",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"task_sid",
"=",
"self",
".",
"_solution",
"[",
"'task_sid'",
... | Constructs a FieldContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.task.field.FieldContext
:rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldContext | [
"Constructs",
"a",
"FieldContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/field.py#L145-L159 |
225,636 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/field.py | FieldPage.get_instance | def get_instance(self, payload):
"""
Build an instance of FieldInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance
"""
return FieldInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | python | def get_instance(self, payload):
return FieldInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"FieldInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"task_sid",
"=",
"self",
".",
"_so... | Build an instance of FieldInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldInstance | [
"Build",
"an",
"instance",
"of",
"FieldInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/field.py#L209-L223 |
225,637 | twilio/twilio-python | twilio/rest/api/v2010/account/available_phone_number/machine_to_machine.py | MachineToMachinePage.get_instance | def get_instance(self, payload):
"""
Build an instance of MachineToMachineInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance
:rtype: twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance
"""
return MachineToMachineInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
country_code=self._solution['country_code'],
) | python | def get_instance(self, payload):
return MachineToMachineInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
country_code=self._solution['country_code'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"MachineToMachineInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"country_code",
"=",
"self",
... | Build an instance of MachineToMachineInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance
:rtype: twilio.rest.api.v2010.account.available_phone_number.machine_to_machine.MachineToMachineInstance | [
"Build",
"an",
"instance",
"of",
"MachineToMachineInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/available_phone_number/machine_to_machine.py#L292-L306 |
225,638 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/record/yearly.py | YearlyPage.get_instance | def get_instance(self, payload):
"""
Build an instance of YearlyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.yearly.YearlyInstance
:rtype: twilio.rest.api.v2010.account.usage.record.yearly.YearlyInstance
"""
return YearlyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return YearlyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"YearlyInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of YearlyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.yearly.YearlyInstance
:rtype: twilio.rest.api.v2010.account.usage.record.yearly.YearlyInstance | [
"Build",
"an",
"instance",
"of",
"YearlyInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/record/yearly.py#L185-L194 |
225,639 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/function_version.py | FunctionVersionList.create | def create(self, path, visibility):
"""
Create a new FunctionVersionInstance
:param unicode path: The path
:param FunctionVersionInstance.Visibility visibility: The visibility
:returns: Newly created FunctionVersionInstance
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance
"""
data = values.of({'Path': path, 'Visibility': visibility, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FunctionVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
) | python | def create(self, path, visibility):
data = values.of({'Path': path, 'Visibility': visibility, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FunctionVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"path",
",",
"visibility",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Path'",
":",
"path",
",",
"'Visibility'",
":",
"visibility",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
... | Create a new FunctionVersionInstance
:param unicode path: The path
:param FunctionVersionInstance.Visibility visibility: The visibility
:returns: Newly created FunctionVersionInstance
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance | [
"Create",
"a",
"new",
"FunctionVersionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/function_version.py#L120-L143 |
225,640 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/function_version.py | FunctionVersionList.get | def get(self, sid):
"""
Constructs a FunctionVersionContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionContext
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionContext
"""
return FunctionVersionContext(
self._version,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
sid=sid,
) | python | def get(self, sid):
return FunctionVersionContext(
self._version,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"FunctionVersionContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"function_sid",
"=",
"self",
".",
"_solution",
"[",
"'func... | Constructs a FunctionVersionContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionContext
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionContext | [
"Constructs",
"a",
"FunctionVersionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/function_version.py#L145-L159 |
225,641 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/function_version.py | FunctionVersionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of FunctionVersionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance
"""
return FunctionVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
) | python | def get_instance(self, payload):
return FunctionVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"FunctionVersionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"function_sid",
"=",
"self",
"... | Build an instance of FunctionVersionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance | [
"Build",
"an",
"instance",
"of",
"FunctionVersionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/function_version.py#L209-L223 |
225,642 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/function_version.py | FunctionVersionContext.fetch | def fetch(self):
"""
Fetch a FunctionVersionInstance
:returns: Fetched FunctionVersionInstance
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return FunctionVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return FunctionVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
function_sid=self._solution['function_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Funct... | Fetch a FunctionVersionInstance
:returns: Fetched FunctionVersionInstance
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionInstance | [
"Fetch",
"a",
"FunctionVersionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/function_version.py#L258-L279 |
225,643 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/activity.py | ActivityList.create | def create(self, friendly_name, available=values.unset):
"""
Create a new ActivityInstance
:param unicode friendly_name: A human-readable name for the Activity, such as 'On Call', 'Break', 'Email', etc.
:param bool available: Boolean value indicating whether the worker should be eligible to receive a Task when they occupy this Activity.
:returns: Newly created ActivityInstance
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
"""
data = values.of({'FriendlyName': friendly_name, 'Available': available, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ActivityInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def create(self, friendly_name, available=values.unset):
data = values.of({'FriendlyName': friendly_name, 'Available': available, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ActivityInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
",",
"available",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'FriendlyName'",
":",
"friendly_name",
",",
"'Available'",
":",
"available",
",",
"}",
")",
"payload... | Create a new ActivityInstance
:param unicode friendly_name: A human-readable name for the Activity, such as 'On Call', 'Break', 'Email', etc.
:param bool available: Boolean value indicating whether the worker should be eligible to receive a Task when they occupy this Activity.
:returns: Newly created ActivityInstance
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance | [
"Create",
"a",
"new",
"ActivityInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/activity.py#L137-L155 |
225,644 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/activity.py | ActivityList.get | def get(self, sid):
"""
Constructs a ActivityContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext
"""
return ActivityContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | python | def get(self, sid):
return ActivityContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"ActivityContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a ActivityContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityContext | [
"Constructs",
"a",
"ActivityContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/activity.py#L157-L166 |
225,645 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/activity.py | ActivityPage.get_instance | def get_instance(self, payload):
"""
Build an instance of ActivityInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
"""
return ActivityInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def get_instance(self, payload):
return ActivityInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"ActivityInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
")"
] | Build an instance of ActivityInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityInstance | [
"Build",
"an",
"instance",
"of",
"ActivityInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/activity.py#L208-L217 |
225,646 | twilio/twilio-python | twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py | InstalledAddOnExtensionList.get | def get(self, sid):
"""
Constructs a InstalledAddOnExtensionContext
:param sid: The unique Extension Sid
:returns: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionContext
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionContext
"""
return InstalledAddOnExtensionContext(
self._version,
installed_add_on_sid=self._solution['installed_add_on_sid'],
sid=sid,
) | python | def get(self, sid):
return InstalledAddOnExtensionContext(
self._version,
installed_add_on_sid=self._solution['installed_add_on_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"InstalledAddOnExtensionContext",
"(",
"self",
".",
"_version",
",",
"installed_add_on_sid",
"=",
"self",
".",
"_solution",
"[",
"'installed_add_on_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a InstalledAddOnExtensionContext
:param sid: The unique Extension Sid
:returns: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionContext
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionContext | [
"Constructs",
"a",
"InstalledAddOnExtensionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py#L118-L131 |
225,647 | twilio/twilio-python | twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py | InstalledAddOnExtensionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of InstalledAddOnExtensionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance
"""
return InstalledAddOnExtensionInstance(
self._version,
payload,
installed_add_on_sid=self._solution['installed_add_on_sid'],
) | python | def get_instance(self, payload):
return InstalledAddOnExtensionInstance(
self._version,
payload,
installed_add_on_sid=self._solution['installed_add_on_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"InstalledAddOnExtensionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"installed_add_on_sid",
"=",
"self",
".",
"_solution",
"[",
"'installed_add_on_sid'",
"]",
",",
")"
] | Build an instance of InstalledAddOnExtensionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance | [
"Build",
"an",
"instance",
"of",
"InstalledAddOnExtensionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py#L179-L192 |
225,648 | twilio/twilio-python | twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py | InstalledAddOnExtensionContext.fetch | def fetch(self):
"""
Fetch a InstalledAddOnExtensionInstance
:returns: Fetched InstalledAddOnExtensionInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return InstalledAddOnExtensionInstance(
self._version,
payload,
installed_add_on_sid=self._solution['installed_add_on_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return InstalledAddOnExtensionInstance(
self._version,
payload,
installed_add_on_sid=self._solution['installed_add_on_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Insta... | Fetch a InstalledAddOnExtensionInstance
:returns: Fetched InstalledAddOnExtensionInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance | [
"Fetch",
"a",
"InstalledAddOnExtensionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py#L226-L246 |
225,649 | twilio/twilio-python | twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py | InstalledAddOnExtensionContext.update | def update(self, enabled):
"""
Update the InstalledAddOnExtensionInstance
:param bool enabled: A Boolean indicating if the Extension will be invoked
:returns: Updated InstalledAddOnExtensionInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance
"""
data = values.of({'Enabled': enabled, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return InstalledAddOnExtensionInstance(
self._version,
payload,
installed_add_on_sid=self._solution['installed_add_on_sid'],
sid=self._solution['sid'],
) | python | def update(self, enabled):
data = values.of({'Enabled': enabled, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return InstalledAddOnExtensionInstance(
self._version,
payload,
installed_add_on_sid=self._solution['installed_add_on_sid'],
sid=self._solution['sid'],
) | [
"def",
"update",
"(",
"self",
",",
"enabled",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Enabled'",
":",
"enabled",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"update",
"(",
"'POST'",
",",
"self",
".",
"_uri",
",",
... | Update the InstalledAddOnExtensionInstance
:param bool enabled: A Boolean indicating if the Extension will be invoked
:returns: Updated InstalledAddOnExtensionInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.installed_add_on_extension.InstalledAddOnExtensionInstance | [
"Update",
"the",
"InstalledAddOnExtensionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/marketplace/installed_add_on/installed_add_on_extension.py#L248-L270 |
225,650 | twilio/twilio-python | twilio/rest/api/v2010/account/address/__init__.py | AddressList.create | def create(self, customer_name, street, city, region, postal_code, iso_country,
friendly_name=values.unset, emergency_enabled=values.unset,
auto_correct_address=values.unset):
"""
Create a new AddressInstance
:param unicode customer_name: The name to associate with the new address
:param unicode street: The number and street address of the new address
:param unicode city: The city of the new address
:param unicode region: The state or region of the new address
:param unicode postal_code: The postal code of the new address
:param unicode iso_country: The ISO country code of the new address
:param unicode friendly_name: A string to describe the new resource
:param bool emergency_enabled: Whether to enable emergency calling on the new address
:param bool auto_correct_address: Whether we should automatically correct the address
:returns: Newly created AddressInstance
:rtype: twilio.rest.api.v2010.account.address.AddressInstance
"""
data = values.of({
'CustomerName': customer_name,
'Street': street,
'City': city,
'Region': region,
'PostalCode': postal_code,
'IsoCountry': iso_country,
'FriendlyName': friendly_name,
'EmergencyEnabled': emergency_enabled,
'AutoCorrectAddress': auto_correct_address,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AddressInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def create(self, customer_name, street, city, region, postal_code, iso_country,
friendly_name=values.unset, emergency_enabled=values.unset,
auto_correct_address=values.unset):
data = values.of({
'CustomerName': customer_name,
'Street': street,
'City': city,
'Region': region,
'PostalCode': postal_code,
'IsoCountry': iso_country,
'FriendlyName': friendly_name,
'EmergencyEnabled': emergency_enabled,
'AutoCorrectAddress': auto_correct_address,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AddressInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"customer_name",
",",
"street",
",",
"city",
",",
"region",
",",
"postal_code",
",",
"iso_country",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"emergency_enabled",
"=",
"values",
".",
"unset",
",",
"auto_correc... | Create a new AddressInstance
:param unicode customer_name: The name to associate with the new address
:param unicode street: The number and street address of the new address
:param unicode city: The city of the new address
:param unicode region: The state or region of the new address
:param unicode postal_code: The postal code of the new address
:param unicode iso_country: The ISO country code of the new address
:param unicode friendly_name: A string to describe the new resource
:param bool emergency_enabled: Whether to enable emergency calling on the new address
:param bool auto_correct_address: Whether we should automatically correct the address
:returns: Newly created AddressInstance
:rtype: twilio.rest.api.v2010.account.address.AddressInstance | [
"Create",
"a",
"new",
"AddressInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/address/__init__.py#L37-L74 |
225,651 | twilio/twilio-python | twilio/rest/api/v2010/account/address/__init__.py | AddressList.page | def page(self, customer_name=values.unset, friendly_name=values.unset,
iso_country=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of AddressInstance records from the API.
Request is executed immediately
:param unicode customer_name: The `customer_name` of the Address resources to read
:param unicode friendly_name: The string that identifies the Address resources to read
:param unicode iso_country: The ISO country code of the Address resources 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 AddressInstance
:rtype: twilio.rest.api.v2010.account.address.AddressPage
"""
params = values.of({
'CustomerName': customer_name,
'FriendlyName': friendly_name,
'IsoCountry': iso_country,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return AddressPage(self._version, response, self._solution) | python | def page(self, customer_name=values.unset, friendly_name=values.unset,
iso_country=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'CustomerName': customer_name,
'FriendlyName': friendly_name,
'IsoCountry': iso_country,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return AddressPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"customer_name",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"iso_country",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
"values",
".",
"unset",
",",
"page_number",
"=",
"v... | Retrieve a single page of AddressInstance records from the API.
Request is executed immediately
:param unicode customer_name: The `customer_name` of the Address resources to read
:param unicode friendly_name: The string that identifies the Address resources to read
:param unicode iso_country: The ISO country code of the Address resources 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 AddressInstance
:rtype: twilio.rest.api.v2010.account.address.AddressPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"AddressInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/address/__init__.py#L136-L168 |
225,652 | twilio/twilio-python | twilio/rest/api/v2010/account/address/__init__.py | AddressList.get | def get(self, sid):
"""
Constructs a AddressContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.address.AddressContext
:rtype: twilio.rest.api.v2010.account.address.AddressContext
"""
return AddressContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return AddressContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"AddressContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a AddressContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.address.AddressContext
:rtype: twilio.rest.api.v2010.account.address.AddressContext | [
"Constructs",
"a",
"AddressContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/address/__init__.py#L187-L196 |
225,653 | twilio/twilio-python | twilio/rest/api/v2010/account/address/__init__.py | AddressPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AddressInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.address.AddressInstance
:rtype: twilio.rest.api.v2010.account.address.AddressInstance
"""
return AddressInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return AddressInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AddressInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of AddressInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.address.AddressInstance
:rtype: twilio.rest.api.v2010.account.address.AddressInstance | [
"Build",
"an",
"instance",
"of",
"AddressInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/address/__init__.py#L238-L247 |
225,654 | twilio/twilio-python | twilio/rest/api/v2010/account/address/__init__.py | AddressContext.dependent_phone_numbers | def dependent_phone_numbers(self):
"""
Access the dependent_phone_numbers
:returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList
:rtype: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList
"""
if self._dependent_phone_numbers is None:
self._dependent_phone_numbers = DependentPhoneNumberList(
self._version,
account_sid=self._solution['account_sid'],
address_sid=self._solution['sid'],
)
return self._dependent_phone_numbers | python | def dependent_phone_numbers(self):
if self._dependent_phone_numbers is None:
self._dependent_phone_numbers = DependentPhoneNumberList(
self._version,
account_sid=self._solution['account_sid'],
address_sid=self._solution['sid'],
)
return self._dependent_phone_numbers | [
"def",
"dependent_phone_numbers",
"(",
"self",
")",
":",
"if",
"self",
".",
"_dependent_phone_numbers",
"is",
"None",
":",
"self",
".",
"_dependent_phone_numbers",
"=",
"DependentPhoneNumberList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",... | Access the dependent_phone_numbers
:returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList
:rtype: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberList | [
"Access",
"the",
"dependent_phone_numbers"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/address/__init__.py#L357-L370 |
225,655 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/workflow_statistics.py | WorkflowStatisticsList.get | def get(self):
"""
Constructs a WorkflowStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext
"""
return WorkflowStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | python | def get(self):
return WorkflowStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | [
"def",
"get",
"(",
"self",
")",
":",
"return",
"WorkflowStatisticsContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"workflow_sid",
"=",
"self",
".",
"_solution",
"[",
"'workflow_sid'... | Constructs a WorkflowStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsContext | [
"Constructs",
"a",
"WorkflowStatisticsContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/workflow_statistics.py#L36-L47 |
225,656 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/workflow_statistics.py | WorkflowStatisticsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of WorkflowStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance
"""
return WorkflowStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | python | def get_instance(self, payload):
return WorkflowStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"WorkflowStatisticsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"workflow_sid",
"=",
"sel... | Build an instance of WorkflowStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_statistics.WorkflowStatisticsInstance | [
"Build",
"an",
"instance",
"of",
"WorkflowStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/workflow_statistics.py#L92-L106 |
225,657 | twilio/twilio-python | twilio/rest/sync/v1/service/document/document_permission.py | DocumentPermissionList.get | def get(self, identity):
"""
Constructs a DocumentPermissionContext
:param identity: Identity of the user to whom the Sync Document Permission applies.
:returns: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionContext
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionContext
"""
return DocumentPermissionContext(
self._version,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
identity=identity,
) | python | def get(self, identity):
return DocumentPermissionContext(
self._version,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
identity=identity,
) | [
"def",
"get",
"(",
"self",
",",
"identity",
")",
":",
"return",
"DocumentPermissionContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"document_sid",
"=",
"self",
".",
"_solution",
"[",
... | Constructs a DocumentPermissionContext
:param identity: Identity of the user to whom the Sync Document Permission applies.
:returns: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionContext
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionContext | [
"Constructs",
"a",
"DocumentPermissionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/document/document_permission.py#L118-L132 |
225,658 | twilio/twilio-python | twilio/rest/sync/v1/service/document/document_permission.py | DocumentPermissionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DocumentPermissionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance
"""
return DocumentPermissionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
) | python | def get_instance(self, payload):
return DocumentPermissionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DocumentPermissionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"document_sid",
"=",
"self",
... | Build an instance of DocumentPermissionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance | [
"Build",
"an",
"instance",
"of",
"DocumentPermissionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/document/document_permission.py#L181-L195 |
225,659 | twilio/twilio-python | twilio/rest/sync/v1/service/document/document_permission.py | DocumentPermissionContext.fetch | def fetch(self):
"""
Fetch a DocumentPermissionInstance
:returns: Fetched DocumentPermissionInstance
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return DocumentPermissionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
identity=self._solution['identity'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return DocumentPermissionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
identity=self._solution['identity'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Docum... | Fetch a DocumentPermissionInstance
:returns: Fetched DocumentPermissionInstance
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance | [
"Fetch",
"a",
"DocumentPermissionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/document/document_permission.py#L229-L250 |
225,660 | twilio/twilio-python | twilio/rest/sync/v1/service/document/document_permission.py | DocumentPermissionContext.update | def update(self, read, write, manage):
"""
Update the DocumentPermissionInstance
:param bool read: Read access.
:param bool write: Write access.
:param bool manage: Manage access.
:returns: Updated DocumentPermissionInstance
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance
"""
data = values.of({'Read': read, 'Write': write, 'Manage': manage, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return DocumentPermissionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
identity=self._solution['identity'],
) | python | def update(self, read, write, manage):
data = values.of({'Read': read, 'Write': write, 'Manage': manage, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return DocumentPermissionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
document_sid=self._solution['document_sid'],
identity=self._solution['identity'],
) | [
"def",
"update",
"(",
"self",
",",
"read",
",",
"write",
",",
"manage",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Read'",
":",
"read",
",",
"'Write'",
":",
"write",
",",
"'Manage'",
":",
"manage",
",",
"}",
")",
"payload",
"=",
"sel... | Update the DocumentPermissionInstance
:param bool read: Read access.
:param bool write: Write access.
:param bool manage: Manage access.
:returns: Updated DocumentPermissionInstance
:rtype: twilio.rest.sync.v1.service.document.document_permission.DocumentPermissionInstance | [
"Update",
"the",
"DocumentPermissionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/document/document_permission.py#L261-L286 |
225,661 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_stream/__init__.py | SyncStreamList.get | def get(self, sid):
"""
Constructs a SyncStreamContext
:param sid: Stream SID or unique name.
:returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamContext
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamContext
"""
return SyncStreamContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return SyncStreamContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"SyncStreamContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a SyncStreamContext
:param sid: Stream SID or unique name.
:returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamContext
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamContext | [
"Constructs",
"a",
"SyncStreamContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_stream/__init__.py#L139-L148 |
225,662 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_stream/__init__.py | SyncStreamPage.get_instance | def get_instance(self, payload):
"""
Build an instance of SyncStreamInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
"""
return SyncStreamInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return SyncStreamInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"SyncStreamInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of SyncStreamInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance | [
"Build",
"an",
"instance",
"of",
"SyncStreamInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_stream/__init__.py#L191-L200 |
225,663 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_stream/__init__.py | SyncStreamContext.stream_messages | def stream_messages(self):
"""
Access the stream_messages
:returns: twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
:rtype: twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
"""
if self._stream_messages is None:
self._stream_messages = StreamMessageList(
self._version,
service_sid=self._solution['service_sid'],
stream_sid=self._solution['sid'],
)
return self._stream_messages | python | def stream_messages(self):
if self._stream_messages is None:
self._stream_messages = StreamMessageList(
self._version,
service_sid=self._solution['service_sid'],
stream_sid=self._solution['sid'],
)
return self._stream_messages | [
"def",
"stream_messages",
"(",
"self",
")",
":",
"if",
"self",
".",
"_stream_messages",
"is",
"None",
":",
"self",
".",
"_stream_messages",
"=",
"StreamMessageList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'serv... | Access the stream_messages
:returns: twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList
:rtype: twilio.rest.sync.v1.service.sync_stream.stream_message.StreamMessageList | [
"Access",
"the",
"stream_messages"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_stream/__init__.py#L292-L305 |
225,664 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_stream/__init__.py | SyncStreamInstance.update | def update(self, ttl=values.unset):
"""
Update the SyncStreamInstance
:param unicode ttl: Stream TTL.
:returns: Updated SyncStreamInstance
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance
"""
return self._proxy.update(ttl=ttl, ) | python | def update(self, ttl=values.unset):
return self._proxy.update(ttl=ttl, ) | [
"def",
"update",
"(",
"self",
",",
"ttl",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"ttl",
"=",
"ttl",
",",
")"
] | Update the SyncStreamInstance
:param unicode ttl: Stream TTL.
:returns: Updated SyncStreamInstance
:rtype: twilio.rest.sync.v1.service.sync_stream.SyncStreamInstance | [
"Update",
"the",
"SyncStreamInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_stream/__init__.py#L464-L473 |
225,665 | twilio/twilio-python | twilio/base/obsolete.py | obsolete_client | def obsolete_client(func):
"""This is a decorator which can be used to mark Client classes as
obsolete. It will result in an error being emitted when the class is
instantiated."""
@functools.wraps(func)
def new_func(*args, **kwargs):
raise ObsoleteException(
"{} has been removed from this version of the library. "
"Please refer to current documentation for guidance."
.format(func.__name__)
)
return new_func | python | def obsolete_client(func):
@functools.wraps(func)
def new_func(*args, **kwargs):
raise ObsoleteException(
"{} has been removed from this version of the library. "
"Please refer to current documentation for guidance."
.format(func.__name__)
)
return new_func | [
"def",
"obsolete_client",
"(",
"func",
")",
":",
"@",
"functools",
".",
"wraps",
"(",
"func",
")",
"def",
"new_func",
"(",
"*",
"args",
",",
"*",
"*",
"kwargs",
")",
":",
"raise",
"ObsoleteException",
"(",
"\"{} has been removed from this version of the library.... | This is a decorator which can be used to mark Client classes as
obsolete. It will result in an error being emitted when the class is
instantiated. | [
"This",
"is",
"a",
"decorator",
"which",
"can",
"be",
"used",
"to",
"mark",
"Client",
"classes",
"as",
"obsolete",
".",
"It",
"will",
"result",
"in",
"an",
"error",
"being",
"emitted",
"when",
"the",
"class",
"is",
"instantiated",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/obsolete.py#L10-L23 |
225,666 | twilio/twilio-python | twilio/http/validation_client.py | ValidationClient.request | def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
"""
Make a signed HTTP Request
:param str method: The HTTP method to use
:param str url: The URL to request
:param dict params: Query parameters to append to the URL
:param dict data: Parameters to go in the body of the HTTP request
:param dict headers: HTTP Headers to send with the request
:param tuple auth: Basic Auth arguments
:param float timeout: Socket/Read timeout for the request
:param boolean allow_redirects: Whether or not to allow redirects
See the requests documentation for explanation of all these parameters
:return: An http response
:rtype: A :class:`Response <twilio.rest.http.response.Response>` object
"""
session = self.session or Session()
request = Request(method.upper(), url, params=params, data=data, headers=headers, auth=auth)
prepared_request = session.prepare_request(request)
if 'Host' not in prepared_request.headers and 'host' not in prepared_request.headers:
prepared_request.headers['Host'] = self._get_host(prepared_request)
validation_payload = self._build_validation_payload(prepared_request)
jwt = ClientValidationJwt(self.account_sid, self.api_key_sid, self.credential_sid,
self.private_key, validation_payload)
prepared_request.headers['Twilio-Client-Validation'] = jwt.to_jwt()
response = session.send(
prepared_request,
allow_redirects=allow_redirects,
timeout=timeout,
)
return Response(int(response.status_code), response.text) | python | def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
session = self.session or Session()
request = Request(method.upper(), url, params=params, data=data, headers=headers, auth=auth)
prepared_request = session.prepare_request(request)
if 'Host' not in prepared_request.headers and 'host' not in prepared_request.headers:
prepared_request.headers['Host'] = self._get_host(prepared_request)
validation_payload = self._build_validation_payload(prepared_request)
jwt = ClientValidationJwt(self.account_sid, self.api_key_sid, self.credential_sid,
self.private_key, validation_payload)
prepared_request.headers['Twilio-Client-Validation'] = jwt.to_jwt()
response = session.send(
prepared_request,
allow_redirects=allow_redirects,
timeout=timeout,
)
return Response(int(response.status_code), response.text) | [
"def",
"request",
"(",
"self",
",",
"method",
",",
"url",
",",
"params",
"=",
"None",
",",
"data",
"=",
"None",
",",
"headers",
"=",
"None",
",",
"auth",
"=",
"None",
",",
"timeout",
"=",
"None",
",",
"allow_redirects",
"=",
"False",
")",
":",
"ses... | Make a signed HTTP Request
:param str method: The HTTP method to use
:param str url: The URL to request
:param dict params: Query parameters to append to the URL
:param dict data: Parameters to go in the body of the HTTP request
:param dict headers: HTTP Headers to send with the request
:param tuple auth: Basic Auth arguments
:param float timeout: Socket/Read timeout for the request
:param boolean allow_redirects: Whether or not to allow redirects
See the requests documentation for explanation of all these parameters
:return: An http response
:rtype: A :class:`Response <twilio.rest.http.response.Response>` object | [
"Make",
"a",
"signed",
"HTTP",
"Request"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/http/validation_client.py#L36-L72 |
225,667 | twilio/twilio-python | twilio/rest/api/v2010/account/call/__init__.py | CallList.create | def create(self, to, from_, method=values.unset, fallback_url=values.unset,
fallback_method=values.unset, status_callback=values.unset,
status_callback_event=values.unset,
status_callback_method=values.unset, send_digits=values.unset,
timeout=values.unset, record=values.unset,
recording_channels=values.unset,
recording_status_callback=values.unset,
recording_status_callback_method=values.unset,
sip_auth_username=values.unset, sip_auth_password=values.unset,
machine_detection=values.unset,
machine_detection_timeout=values.unset,
recording_status_callback_event=values.unset, trim=values.unset,
caller_id=values.unset,
machine_detection_speech_threshold=values.unset,
machine_detection_speech_end_threshold=values.unset,
machine_detection_silence_timeout=values.unset, url=values.unset,
application_sid=values.unset):
"""
Create a new CallInstance
:param unicode to: Phone number, SIP address, or client identifier to call
:param unicode from_: Twilio number from which to originate the call
:param unicode method: HTTP method to use to fetch TwiML
:param unicode fallback_url: Fallback URL in case of error
:param unicode fallback_method: HTTP Method to use with fallback_url
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_event: The call progress events that we send to the `status_callback` URL.
:param unicode status_callback_method: HTTP Method to use with status_callback
:param unicode send_digits: The digits to dial after connecting to the number
:param unicode timeout: Number of seconds to wait for an answer
:param bool record: Whether or not to record the call
:param unicode recording_channels: The number of channels in the final recording
:param unicode recording_status_callback: The URL that we call when the recording is available to be accessed
:param unicode recording_status_callback_method: The HTTP method we should use when calling the `recording_status_callback` URL
:param unicode sip_auth_username: The username used to authenticate the caller making a SIP call
:param unicode sip_auth_password: The password required to authenticate the user account specified in `sip_auth_username`.
:param unicode machine_detection: Enable machine detection or end of greeting detection
:param unicode machine_detection_timeout: Number of seconds to wait for machine detection
:param unicode recording_status_callback_event: The recording status events that will trigger calls to the URL specified in `recording_status_callback`
:param unicode trim: Set this parameter to control trimming of silence on the recording.
:param unicode caller_id: The phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
:param unicode machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity
:param unicode machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity
:param unicode machine_detection_silence_timeout: Number of milliseconds of initial silence
:param unicode url: The absolute URL that returns TwiML for this call
:param unicode application_sid: The SID of the Application resource that will handle the call
:returns: Newly created CallInstance
:rtype: twilio.rest.api.v2010.account.call.CallInstance
"""
data = values.of({
'To': to,
'From': from_,
'Url': url,
'ApplicationSid': application_sid,
'Method': method,
'FallbackUrl': fallback_url,
'FallbackMethod': fallback_method,
'StatusCallback': status_callback,
'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e),
'StatusCallbackMethod': status_callback_method,
'SendDigits': send_digits,
'Timeout': timeout,
'Record': record,
'RecordingChannels': recording_channels,
'RecordingStatusCallback': recording_status_callback,
'RecordingStatusCallbackMethod': recording_status_callback_method,
'SipAuthUsername': sip_auth_username,
'SipAuthPassword': sip_auth_password,
'MachineDetection': machine_detection,
'MachineDetectionTimeout': machine_detection_timeout,
'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e),
'Trim': trim,
'CallerId': caller_id,
'MachineDetectionSpeechThreshold': machine_detection_speech_threshold,
'MachineDetectionSpeechEndThreshold': machine_detection_speech_end_threshold,
'MachineDetectionSilenceTimeout': machine_detection_silence_timeout,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return CallInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def create(self, to, from_, method=values.unset, fallback_url=values.unset,
fallback_method=values.unset, status_callback=values.unset,
status_callback_event=values.unset,
status_callback_method=values.unset, send_digits=values.unset,
timeout=values.unset, record=values.unset,
recording_channels=values.unset,
recording_status_callback=values.unset,
recording_status_callback_method=values.unset,
sip_auth_username=values.unset, sip_auth_password=values.unset,
machine_detection=values.unset,
machine_detection_timeout=values.unset,
recording_status_callback_event=values.unset, trim=values.unset,
caller_id=values.unset,
machine_detection_speech_threshold=values.unset,
machine_detection_speech_end_threshold=values.unset,
machine_detection_silence_timeout=values.unset, url=values.unset,
application_sid=values.unset):
data = values.of({
'To': to,
'From': from_,
'Url': url,
'ApplicationSid': application_sid,
'Method': method,
'FallbackUrl': fallback_url,
'FallbackMethod': fallback_method,
'StatusCallback': status_callback,
'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e),
'StatusCallbackMethod': status_callback_method,
'SendDigits': send_digits,
'Timeout': timeout,
'Record': record,
'RecordingChannels': recording_channels,
'RecordingStatusCallback': recording_status_callback,
'RecordingStatusCallbackMethod': recording_status_callback_method,
'SipAuthUsername': sip_auth_username,
'SipAuthPassword': sip_auth_password,
'MachineDetection': machine_detection,
'MachineDetectionTimeout': machine_detection_timeout,
'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e),
'Trim': trim,
'CallerId': caller_id,
'MachineDetectionSpeechThreshold': machine_detection_speech_threshold,
'MachineDetectionSpeechEndThreshold': machine_detection_speech_end_threshold,
'MachineDetectionSilenceTimeout': machine_detection_silence_timeout,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return CallInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"to",
",",
"from_",
",",
"method",
"=",
"values",
".",
"unset",
",",
"fallback_url",
"=",
"values",
".",
"unset",
",",
"fallback_method",
"=",
"values",
".",
"unset",
",",
"status_callback",
"=",
"values",
".",
"unset",... | Create a new CallInstance
:param unicode to: Phone number, SIP address, or client identifier to call
:param unicode from_: Twilio number from which to originate the call
:param unicode method: HTTP method to use to fetch TwiML
:param unicode fallback_url: Fallback URL in case of error
:param unicode fallback_method: HTTP Method to use with fallback_url
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_event: The call progress events that we send to the `status_callback` URL.
:param unicode status_callback_method: HTTP Method to use with status_callback
:param unicode send_digits: The digits to dial after connecting to the number
:param unicode timeout: Number of seconds to wait for an answer
:param bool record: Whether or not to record the call
:param unicode recording_channels: The number of channels in the final recording
:param unicode recording_status_callback: The URL that we call when the recording is available to be accessed
:param unicode recording_status_callback_method: The HTTP method we should use when calling the `recording_status_callback` URL
:param unicode sip_auth_username: The username used to authenticate the caller making a SIP call
:param unicode sip_auth_password: The password required to authenticate the user account specified in `sip_auth_username`.
:param unicode machine_detection: Enable machine detection or end of greeting detection
:param unicode machine_detection_timeout: Number of seconds to wait for machine detection
:param unicode recording_status_callback_event: The recording status events that will trigger calls to the URL specified in `recording_status_callback`
:param unicode trim: Set this parameter to control trimming of silence on the recording.
:param unicode caller_id: The phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `name@company.com`.
:param unicode machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity
:param unicode machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity
:param unicode machine_detection_silence_timeout: Number of milliseconds of initial silence
:param unicode url: The absolute URL that returns TwiML for this call
:param unicode application_sid: The SID of the Application resource that will handle the call
:returns: Newly created CallInstance
:rtype: twilio.rest.api.v2010.account.call.CallInstance | [
"Create",
"a",
"new",
"CallInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/__init__.py#L44-L129 |
225,668 | twilio/twilio-python | twilio/rest/api/v2010/account/call/__init__.py | CallList.stream | def stream(self, to=values.unset, from_=values.unset,
parent_call_sid=values.unset, status=values.unset,
start_time_before=values.unset, start_time=values.unset,
start_time_after=values.unset, end_time_before=values.unset,
end_time=values.unset, end_time_after=values.unset, limit=None,
page_size=None):
"""
Streams CallInstance 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 to: Phone number or Client identifier of calls to include
:param unicode from_: Phone number or Client identifier to filter `from` on
:param unicode parent_call_sid: Parent call SID to filter on
:param CallInstance.Status status: The status of the resources to read
:param datetime start_time_before: Only include calls that started on or after this date
:param datetime start_time: Only include calls that started on or after this date
:param datetime start_time_after: Only include calls that started on or after this date
:param datetime end_time_before: Only include usage that occurred on or before this date
:param datetime end_time: Only include usage that occurred on or before this date
:param datetime end_time_after: Only include usage that occurred on or before this 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.CallInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
to=to,
from_=from_,
parent_call_sid=parent_call_sid,
status=status,
start_time_before=start_time_before,
start_time=start_time,
start_time_after=start_time_after,
end_time_before=end_time_before,
end_time=end_time,
end_time_after=end_time_after,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, to=values.unset, from_=values.unset,
parent_call_sid=values.unset, status=values.unset,
start_time_before=values.unset, start_time=values.unset,
start_time_after=values.unset, end_time_before=values.unset,
end_time=values.unset, end_time_after=values.unset, limit=None,
page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
to=to,
from_=from_,
parent_call_sid=parent_call_sid,
status=status,
start_time_before=start_time_before,
start_time=start_time,
start_time_after=start_time_after,
end_time_before=end_time_before,
end_time=end_time,
end_time_after=end_time_after,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"to",
"=",
"values",
".",
"unset",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"parent_call_sid",
"=",
"values",
".",
"unset",
",",
"status",
"=",
"values",
".",
"unset",
",",
"start_time_before",
"=",
"values",
"... | Streams CallInstance 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 to: Phone number or Client identifier of calls to include
:param unicode from_: Phone number or Client identifier to filter `from` on
:param unicode parent_call_sid: Parent call SID to filter on
:param CallInstance.Status status: The status of the resources to read
:param datetime start_time_before: Only include calls that started on or after this date
:param datetime start_time: Only include calls that started on or after this date
:param datetime start_time_after: Only include calls that started on or after this date
:param datetime end_time_before: Only include usage that occurred on or before this date
:param datetime end_time: Only include usage that occurred on or before this date
:param datetime end_time_after: Only include usage that occurred on or before this 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.CallInstance] | [
"Streams",
"CallInstance",
"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",... | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/__init__.py#L131-L179 |
225,669 | twilio/twilio-python | twilio/rest/api/v2010/account/call/__init__.py | CallList.page | def page(self, to=values.unset, from_=values.unset,
parent_call_sid=values.unset, status=values.unset,
start_time_before=values.unset, start_time=values.unset,
start_time_after=values.unset, end_time_before=values.unset,
end_time=values.unset, end_time_after=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of CallInstance records from the API.
Request is executed immediately
:param unicode to: Phone number or Client identifier of calls to include
:param unicode from_: Phone number or Client identifier to filter `from` on
:param unicode parent_call_sid: Parent call SID to filter on
:param CallInstance.Status status: The status of the resources to read
:param datetime start_time_before: Only include calls that started on or after this date
:param datetime start_time: Only include calls that started on or after this date
:param datetime start_time_after: Only include calls that started on or after this date
:param datetime end_time_before: Only include usage that occurred on or before this date
:param datetime end_time: Only include usage that occurred on or before this date
:param datetime end_time_after: Only include usage that occurred on or before this 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 CallInstance
:rtype: twilio.rest.api.v2010.account.call.CallPage
"""
params = values.of({
'To': to,
'From': from_,
'ParentCallSid': parent_call_sid,
'Status': status,
'StartTime<': serialize.iso8601_datetime(start_time_before),
'StartTime': serialize.iso8601_datetime(start_time),
'StartTime>': serialize.iso8601_datetime(start_time_after),
'EndTime<': serialize.iso8601_datetime(end_time_before),
'EndTime': serialize.iso8601_datetime(end_time),
'EndTime>': serialize.iso8601_datetime(end_time_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CallPage(self._version, response, self._solution) | python | def page(self, to=values.unset, from_=values.unset,
parent_call_sid=values.unset, status=values.unset,
start_time_before=values.unset, start_time=values.unset,
start_time_after=values.unset, end_time_before=values.unset,
end_time=values.unset, end_time_after=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'To': to,
'From': from_,
'ParentCallSid': parent_call_sid,
'Status': status,
'StartTime<': serialize.iso8601_datetime(start_time_before),
'StartTime': serialize.iso8601_datetime(start_time),
'StartTime>': serialize.iso8601_datetime(start_time_after),
'EndTime<': serialize.iso8601_datetime(end_time_before),
'EndTime': serialize.iso8601_datetime(end_time),
'EndTime>': serialize.iso8601_datetime(end_time_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CallPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"to",
"=",
"values",
".",
"unset",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"parent_call_sid",
"=",
"values",
".",
"unset",
",",
"status",
"=",
"values",
".",
"unset",
",",
"start_time_before",
"=",
"values",
"."... | Retrieve a single page of CallInstance records from the API.
Request is executed immediately
:param unicode to: Phone number or Client identifier of calls to include
:param unicode from_: Phone number or Client identifier to filter `from` on
:param unicode parent_call_sid: Parent call SID to filter on
:param CallInstance.Status status: The status of the resources to read
:param datetime start_time_before: Only include calls that started on or after this date
:param datetime start_time: Only include calls that started on or after this date
:param datetime start_time_after: Only include calls that started on or after this date
:param datetime end_time_before: Only include usage that occurred on or before this date
:param datetime end_time: Only include usage that occurred on or before this date
:param datetime end_time_after: Only include usage that occurred on or before this 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 CallInstance
:rtype: twilio.rest.api.v2010.account.call.CallPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"CallInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/__init__.py#L227-L277 |
225,670 | twilio/twilio-python | twilio/rest/api/v2010/account/call/__init__.py | CallList.feedback_summaries | def feedback_summaries(self):
"""
Access the feedback_summaries
:returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList
"""
if self._feedback_summaries is None:
self._feedback_summaries = FeedbackSummaryList(
self._version,
account_sid=self._solution['account_sid'],
)
return self._feedback_summaries | python | def feedback_summaries(self):
if self._feedback_summaries is None:
self._feedback_summaries = FeedbackSummaryList(
self._version,
account_sid=self._solution['account_sid'],
)
return self._feedback_summaries | [
"def",
"feedback_summaries",
"(",
"self",
")",
":",
"if",
"self",
".",
"_feedback_summaries",
"is",
"None",
":",
"self",
".",
"_feedback_summaries",
"=",
"FeedbackSummaryList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[... | Access the feedback_summaries
:returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryList | [
"Access",
"the",
"feedback_summaries"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/__init__.py#L297-L309 |
225,671 | twilio/twilio-python | twilio/rest/api/v2010/account/call/__init__.py | CallList.get | def get(self, sid):
"""
Constructs a CallContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.call.CallContext
:rtype: twilio.rest.api.v2010.account.call.CallContext
"""
return CallContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return CallContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"CallContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a CallContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.call.CallContext
:rtype: twilio.rest.api.v2010.account.call.CallContext | [
"Constructs",
"a",
"CallContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/__init__.py#L311-L320 |
225,672 | twilio/twilio-python | twilio/rest/api/v2010/account/call/__init__.py | CallPage.get_instance | def get_instance(self, payload):
"""
Build an instance of CallInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.call.CallInstance
:rtype: twilio.rest.api.v2010.account.call.CallInstance
"""
return CallInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return CallInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"CallInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of CallInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.call.CallInstance
:rtype: twilio.rest.api.v2010.account.call.CallInstance | [
"Build",
"an",
"instance",
"of",
"CallInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/__init__.py#L362-L371 |
225,673 | twilio/twilio-python | twilio/rest/serverless/v1/service/asset/asset_version.py | AssetVersionList.create | def create(self, path, visibility):
"""
Create a new AssetVersionInstance
:param unicode path: The path
:param AssetVersionInstance.Visibility visibility: The visibility
:returns: Newly created AssetVersionInstance
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance
"""
data = values.of({'Path': path, 'Visibility': visibility, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AssetVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
) | python | def create(self, path, visibility):
data = values.of({'Path': path, 'Visibility': visibility, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AssetVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"path",
",",
"visibility",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Path'",
":",
"path",
",",
"'Visibility'",
":",
"visibility",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
... | Create a new AssetVersionInstance
:param unicode path: The path
:param AssetVersionInstance.Visibility visibility: The visibility
:returns: Newly created AssetVersionInstance
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance | [
"Create",
"a",
"new",
"AssetVersionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/asset/asset_version.py#L120-L143 |
225,674 | twilio/twilio-python | twilio/rest/serverless/v1/service/asset/asset_version.py | AssetVersionList.get | def get(self, sid):
"""
Constructs a AssetVersionContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionContext
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionContext
"""
return AssetVersionContext(
self._version,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
sid=sid,
) | python | def get(self, sid):
return AssetVersionContext(
self._version,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"AssetVersionContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"asset_sid",
"=",
"self",
".",
"_solution",
"[",
"'asset_sid'... | Constructs a AssetVersionContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionContext
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionContext | [
"Constructs",
"a",
"AssetVersionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/asset/asset_version.py#L145-L159 |
225,675 | twilio/twilio-python | twilio/rest/serverless/v1/service/asset/asset_version.py | AssetVersionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AssetVersionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance
"""
return AssetVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
) | python | def get_instance(self, payload):
return AssetVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AssetVersionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"asset_sid",
"=",
"self",
".",
... | Build an instance of AssetVersionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance | [
"Build",
"an",
"instance",
"of",
"AssetVersionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/asset/asset_version.py#L209-L223 |
225,676 | twilio/twilio-python | twilio/rest/serverless/v1/service/asset/asset_version.py | AssetVersionContext.fetch | def fetch(self):
"""
Fetch a AssetVersionInstance
:returns: Fetched AssetVersionInstance
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return AssetVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return AssetVersionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
asset_sid=self._solution['asset_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Asset... | Fetch a AssetVersionInstance
:returns: Fetched AssetVersionInstance
:rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionInstance | [
"Fetch",
"a",
"AssetVersionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/asset/asset_version.py#L258-L279 |
225,677 | twilio/twilio-python | twilio/rest/accounts/v1/credential/__init__.py | CredentialList.public_key | def public_key(self):
"""
Access the public_key
:returns: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
"""
if self._public_key is None:
self._public_key = PublicKeyList(self._version, )
return self._public_key | python | def public_key(self):
if self._public_key is None:
self._public_key = PublicKeyList(self._version, )
return self._public_key | [
"def",
"public_key",
"(",
"self",
")",
":",
"if",
"self",
".",
"_public_key",
"is",
"None",
":",
"self",
".",
"_public_key",
"=",
"PublicKeyList",
"(",
"self",
".",
"_version",
",",
")",
"return",
"self",
".",
"_public_key"
] | Access the public_key
:returns: twilio.rest.accounts.v1.credential.public_key.PublicKeyList
:rtype: twilio.rest.accounts.v1.credential.public_key.PublicKeyList | [
"Access",
"the",
"public_key"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/accounts/v1/credential/__init__.py#L38-L47 |
225,678 | twilio/twilio-python | twilio/rest/accounts/v1/credential/__init__.py | CredentialList.aws | def aws(self):
"""
Access the aws
:returns: twilio.rest.accounts.v1.credential.aws.AwsList
:rtype: twilio.rest.accounts.v1.credential.aws.AwsList
"""
if self._aws is None:
self._aws = AwsList(self._version, )
return self._aws | python | def aws(self):
if self._aws is None:
self._aws = AwsList(self._version, )
return self._aws | [
"def",
"aws",
"(",
"self",
")",
":",
"if",
"self",
".",
"_aws",
"is",
"None",
":",
"self",
".",
"_aws",
"=",
"AwsList",
"(",
"self",
".",
"_version",
",",
")",
"return",
"self",
".",
"_aws"
] | Access the aws
:returns: twilio.rest.accounts.v1.credential.aws.AwsList
:rtype: twilio.rest.accounts.v1.credential.aws.AwsList | [
"Access",
"the",
"aws"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/accounts/v1/credential/__init__.py#L50-L59 |
225,679 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/task_statistics.py | TaskStatisticsList.get | def get(self):
"""
Constructs a TaskStatisticsContext
:returns: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsContext
:rtype: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsContext
"""
return TaskStatisticsContext(
self._version,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | python | def get(self):
return TaskStatisticsContext(
self._version,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | [
"def",
"get",
"(",
"self",
")",
":",
"return",
"TaskStatisticsContext",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"task_sid",
"=",
"self",
".",
"_solution",
"[",
"'task_sid'",
"]",
... | Constructs a TaskStatisticsContext
:returns: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsContext
:rtype: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsContext | [
"Constructs",
"a",
"TaskStatisticsContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/task_statistics.py#L38-L49 |
225,680 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/task_statistics.py | TaskStatisticsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of TaskStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsInstance
"""
return TaskStatisticsInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | python | def get_instance(self, payload):
return TaskStatisticsInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"TaskStatisticsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"task_sid",
"=",
"self",
".... | Build an instance of TaskStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.task_statistics.TaskStatisticsInstance | [
"Build",
"an",
"instance",
"of",
"TaskStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/task_statistics.py#L96-L110 |
225,681 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_map/__init__.py | SyncMapList.get | def get(self, sid):
"""
Constructs a SyncMapContext
:param sid: The sid
:returns: twilio.rest.sync.v1.service.sync_map.SyncMapContext
:rtype: twilio.rest.sync.v1.service.sync_map.SyncMapContext
"""
return SyncMapContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return SyncMapContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"SyncMapContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a SyncMapContext
:param sid: The sid
:returns: twilio.rest.sync.v1.service.sync_map.SyncMapContext
:rtype: twilio.rest.sync.v1.service.sync_map.SyncMapContext | [
"Constructs",
"a",
"SyncMapContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_map/__init__.py#L142-L151 |
225,682 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_map/__init__.py | SyncMapPage.get_instance | def get_instance(self, payload):
"""
Build an instance of SyncMapInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.sync_map.SyncMapInstance
:rtype: twilio.rest.sync.v1.service.sync_map.SyncMapInstance
"""
return SyncMapInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return SyncMapInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"SyncMapInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of SyncMapInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.sync.v1.service.sync_map.SyncMapInstance
:rtype: twilio.rest.sync.v1.service.sync_map.SyncMapInstance | [
"Build",
"an",
"instance",
"of",
"SyncMapInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_map/__init__.py#L194-L203 |
225,683 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_map/__init__.py | SyncMapContext.sync_map_items | def sync_map_items(self):
"""
Access the sync_map_items
:returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList
:rtype: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList
"""
if self._sync_map_items is None:
self._sync_map_items = SyncMapItemList(
self._version,
service_sid=self._solution['service_sid'],
map_sid=self._solution['sid'],
)
return self._sync_map_items | python | def sync_map_items(self):
if self._sync_map_items is None:
self._sync_map_items = SyncMapItemList(
self._version,
service_sid=self._solution['service_sid'],
map_sid=self._solution['sid'],
)
return self._sync_map_items | [
"def",
"sync_map_items",
"(",
"self",
")",
":",
"if",
"self",
".",
"_sync_map_items",
"is",
"None",
":",
"self",
".",
"_sync_map_items",
"=",
"SyncMapItemList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_s... | Access the sync_map_items
:returns: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList
:rtype: twilio.rest.sync.v1.service.sync_map.sync_map_item.SyncMapItemList | [
"Access",
"the",
"sync_map_items"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_map/__init__.py#L297-L310 |
225,684 | twilio/twilio-python | twilio/rest/sync/v1/service/sync_map/__init__.py | SyncMapContext.sync_map_permissions | def sync_map_permissions(self):
"""
Access the sync_map_permissions
:returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList
:rtype: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList
"""
if self._sync_map_permissions is None:
self._sync_map_permissions = SyncMapPermissionList(
self._version,
service_sid=self._solution['service_sid'],
map_sid=self._solution['sid'],
)
return self._sync_map_permissions | python | def sync_map_permissions(self):
if self._sync_map_permissions is None:
self._sync_map_permissions = SyncMapPermissionList(
self._version,
service_sid=self._solution['service_sid'],
map_sid=self._solution['sid'],
)
return self._sync_map_permissions | [
"def",
"sync_map_permissions",
"(",
"self",
")",
":",
"if",
"self",
".",
"_sync_map_permissions",
"is",
"None",
":",
"self",
".",
"_sync_map_permissions",
"=",
"SyncMapPermissionList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solutio... | Access the sync_map_permissions
:returns: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList
:rtype: twilio.rest.sync.v1.service.sync_map.sync_map_permission.SyncMapPermissionList | [
"Access",
"the",
"sync_map_permissions"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/sync/v1/service/sync_map/__init__.py#L313-L326 |
225,685 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | WorkflowList.create | def create(self, friendly_name, configuration,
assignment_callback_url=values.unset,
fallback_assignment_callback_url=values.unset,
task_reservation_timeout=values.unset):
"""
Create a new WorkflowInstance
:param unicode friendly_name: A string representing a human readable name for this Workflow.
:param unicode configuration: JSON document configuring the rules for this Workflow.
:param unicode assignment_callback_url: A valid URL for the application that will process task assignment events.
:param unicode fallback_assignment_callback_url: If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
:param unicode task_reservation_timeout: An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker.
:returns: Newly created WorkflowInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
"""
data = values.of({
'FriendlyName': friendly_name,
'Configuration': configuration,
'AssignmentCallbackUrl': assignment_callback_url,
'FallbackAssignmentCallbackUrl': fallback_assignment_callback_url,
'TaskReservationTimeout': task_reservation_timeout,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return WorkflowInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def create(self, friendly_name, configuration,
assignment_callback_url=values.unset,
fallback_assignment_callback_url=values.unset,
task_reservation_timeout=values.unset):
data = values.of({
'FriendlyName': friendly_name,
'Configuration': configuration,
'AssignmentCallbackUrl': assignment_callback_url,
'FallbackAssignmentCallbackUrl': fallback_assignment_callback_url,
'TaskReservationTimeout': task_reservation_timeout,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return WorkflowInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
",",
"configuration",
",",
"assignment_callback_url",
"=",
"values",
".",
"unset",
",",
"fallback_assignment_callback_url",
"=",
"values",
".",
"unset",
",",
"task_reservation_timeout",
"=",
"values",
".",
"unset",... | Create a new WorkflowInstance
:param unicode friendly_name: A string representing a human readable name for this Workflow.
:param unicode configuration: JSON document configuring the rules for this Workflow.
:param unicode assignment_callback_url: A valid URL for the application that will process task assignment events.
:param unicode fallback_assignment_callback_url: If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
:param unicode task_reservation_timeout: An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker.
:returns: Newly created WorkflowInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance | [
"Create",
"a",
"new",
"WorkflowInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py#L128-L158 |
225,686 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | WorkflowList.get | def get(self, sid):
"""
Constructs a WorkflowContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext
"""
return WorkflowContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | python | def get(self, sid):
return WorkflowContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"WorkflowContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a WorkflowContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowContext | [
"Constructs",
"a",
"WorkflowContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py#L160-L169 |
225,687 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | WorkflowPage.get_instance | def get_instance(self, payload):
"""
Build an instance of WorkflowInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
"""
return WorkflowInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def get_instance(self, payload):
return WorkflowInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"WorkflowInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
")"
] | Build an instance of WorkflowInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance | [
"Build",
"an",
"instance",
"of",
"WorkflowInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py#L211-L220 |
225,688 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/__init__.py | WorkflowInstance.update | def update(self, friendly_name=values.unset,
assignment_callback_url=values.unset,
fallback_assignment_callback_url=values.unset,
configuration=values.unset, task_reservation_timeout=values.unset):
"""
Update the WorkflowInstance
:param unicode friendly_name: A string representing a human readable name for this Workflow.
:param unicode assignment_callback_url: A valid URL for the application that will process task assignment events.
:param unicode fallback_assignment_callback_url: If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
:param unicode configuration: JSON document configuring the rules for this Workflow.
:param unicode task_reservation_timeout: An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker.
:returns: Updated WorkflowInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance
"""
return self._proxy.update(
friendly_name=friendly_name,
assignment_callback_url=assignment_callback_url,
fallback_assignment_callback_url=fallback_assignment_callback_url,
configuration=configuration,
task_reservation_timeout=task_reservation_timeout,
) | python | def update(self, friendly_name=values.unset,
assignment_callback_url=values.unset,
fallback_assignment_callback_url=values.unset,
configuration=values.unset, task_reservation_timeout=values.unset):
return self._proxy.update(
friendly_name=friendly_name,
assignment_callback_url=assignment_callback_url,
fallback_assignment_callback_url=fallback_assignment_callback_url,
configuration=configuration,
task_reservation_timeout=task_reservation_timeout,
) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"assignment_callback_url",
"=",
"values",
".",
"unset",
",",
"fallback_assignment_callback_url",
"=",
"values",
".",
"unset",
",",
"configuration",
"=",
"values",
".",
"unset",... | Update the WorkflowInstance
:param unicode friendly_name: A string representing a human readable name for this Workflow.
:param unicode assignment_callback_url: A valid URL for the application that will process task assignment events.
:param unicode fallback_assignment_callback_url: If the request to the AssignmentCallbackUrl fails, the assignment callback will be made to this URL.
:param unicode configuration: JSON document configuring the rules for this Workflow.
:param unicode task_reservation_timeout: An integer value controlling how long in seconds TaskRouter will wait for a confirmation response from your application after assigning a Task to a worker.
:returns: Updated WorkflowInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowInstance | [
"Update",
"the",
"WorkflowInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/__init__.py#L547-L569 |
225,689 | twilio/twilio-python | twilio/rest/serverless/v1/service/build.py | BuildList.create | def create(self, asset_versions=values.unset, function_versions=values.unset,
dependencies=values.unset):
"""
Create a new BuildInstance
:param unicode asset_versions: The asset_versions
:param unicode function_versions: The function_versions
:param unicode dependencies: The dependencies
:returns: Newly created BuildInstance
:rtype: twilio.rest.serverless.v1.service.build.BuildInstance
"""
data = values.of({
'AssetVersions': serialize.map(asset_versions, lambda e: e),
'FunctionVersions': serialize.map(function_versions, lambda e: e),
'Dependencies': dependencies,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def create(self, asset_versions=values.unset, function_versions=values.unset,
dependencies=values.unset):
data = values.of({
'AssetVersions': serialize.map(asset_versions, lambda e: e),
'FunctionVersions': serialize.map(function_versions, lambda e: e),
'Dependencies': dependencies,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"asset_versions",
"=",
"values",
".",
"unset",
",",
"function_versions",
"=",
"values",
".",
"unset",
",",
"dependencies",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'AssetVersio... | Create a new BuildInstance
:param unicode asset_versions: The asset_versions
:param unicode function_versions: The function_versions
:param unicode dependencies: The dependencies
:returns: Newly created BuildInstance
:rtype: twilio.rest.serverless.v1.service.build.BuildInstance | [
"Create",
"a",
"new",
"BuildInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/build.py#L120-L144 |
225,690 | twilio/twilio-python | twilio/rest/serverless/v1/service/build.py | BuildList.get | def get(self, sid):
"""
Constructs a BuildContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.build.BuildContext
:rtype: twilio.rest.serverless.v1.service.build.BuildContext
"""
return BuildContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return BuildContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"BuildContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a BuildContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.build.BuildContext
:rtype: twilio.rest.serverless.v1.service.build.BuildContext | [
"Constructs",
"a",
"BuildContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/build.py#L146-L155 |
225,691 | twilio/twilio-python | twilio/rest/serverless/v1/service/build.py | BuildPage.get_instance | def get_instance(self, payload):
"""
Build an instance of BuildInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.build.BuildInstance
:rtype: twilio.rest.serverless.v1.service.build.BuildInstance
"""
return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return BuildInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"BuildInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of BuildInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.build.BuildInstance
:rtype: twilio.rest.serverless.v1.service.build.BuildInstance | [
"Build",
"an",
"instance",
"of",
"BuildInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/build.py#L199-L208 |
225,692 | twilio/twilio-python | twilio/rest/notify/v1/service/binding.py | BindingList.create | def create(self, identity, binding_type, address, tag=values.unset,
notification_protocol_version=values.unset,
credential_sid=values.unset, endpoint=values.unset):
"""
Create a new BindingInstance
:param unicode identity: The `identity` value that identifies the new resource's User
:param BindingInstance.BindingType binding_type: The type of the Binding
:param unicode address: The channel-specific address
:param unicode tag: A tag that can be used to select the Bindings to notify
:param unicode notification_protocol_version: The protocol version to use to send the notification
:param unicode credential_sid: The SID of the Credential resource to be used to send notifications to this Binding
:param unicode endpoint: Deprecated
:returns: Newly created BindingInstance
:rtype: twilio.rest.notify.v1.service.binding.BindingInstance
"""
data = values.of({
'Identity': identity,
'BindingType': binding_type,
'Address': address,
'Tag': serialize.map(tag, lambda e: e),
'NotificationProtocolVersion': notification_protocol_version,
'CredentialSid': credential_sid,
'Endpoint': endpoint,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def create(self, identity, binding_type, address, tag=values.unset,
notification_protocol_version=values.unset,
credential_sid=values.unset, endpoint=values.unset):
data = values.of({
'Identity': identity,
'BindingType': binding_type,
'Address': address,
'Tag': serialize.map(tag, lambda e: e),
'NotificationProtocolVersion': notification_protocol_version,
'CredentialSid': credential_sid,
'Endpoint': endpoint,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"identity",
",",
"binding_type",
",",
"address",
",",
"tag",
"=",
"values",
".",
"unset",
",",
"notification_protocol_version",
"=",
"values",
".",
"unset",
",",
"credential_sid",
"=",
"values",
".",
"unset",
",",
"endpoint... | Create a new BindingInstance
:param unicode identity: The `identity` value that identifies the new resource's User
:param BindingInstance.BindingType binding_type: The type of the Binding
:param unicode address: The channel-specific address
:param unicode tag: A tag that can be used to select the Bindings to notify
:param unicode notification_protocol_version: The protocol version to use to send the notification
:param unicode credential_sid: The SID of the Credential resource to be used to send notifications to this Binding
:param unicode endpoint: Deprecated
:returns: Newly created BindingInstance
:rtype: twilio.rest.notify.v1.service.binding.BindingInstance | [
"Create",
"a",
"new",
"BindingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/notify/v1/service/binding.py#L38-L71 |
225,693 | twilio/twilio-python | twilio/rest/notify/v1/service/binding.py | BindingList.stream | def stream(self, start_date=values.unset, end_date=values.unset,
identity=values.unset, tag=values.unset, limit=None, page_size=None):
"""
Streams BindingInstance 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 date start_date: Only include usage that has occurred on or after this date
:param date end_date: Only include usage that occurred on or before this date
:param unicode identity: The `identity` value of the resources to read
:param unicode tag: Only list Bindings that have all of the specified Tags
: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.notify.v1.service.binding.BindingInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
start_date=start_date,
end_date=end_date,
identity=identity,
tag=tag,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, start_date=values.unset, end_date=values.unset,
identity=values.unset, tag=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
start_date=start_date,
end_date=end_date,
identity=identity,
tag=tag,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"start_date",
"=",
"values",
".",
"unset",
",",
"end_date",
"=",
"values",
".",
"unset",
",",
"identity",
"=",
"values",
".",
"unset",
",",
"tag",
"=",
"values",
".",
"unset",
",",
"limit",
"=",
"None",
",",
"page_s... | Streams BindingInstance 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 date start_date: Only include usage that has occurred on or after this date
:param date end_date: Only include usage that occurred on or before this date
:param unicode identity: The `identity` value of the resources to read
:param unicode tag: Only list Bindings that have all of the specified Tags
: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.notify.v1.service.binding.BindingInstance] | [
"Streams",
"BindingInstance",
"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/notify/v1/service/binding.py#L73-L105 |
225,694 | twilio/twilio-python | twilio/rest/notify/v1/service/binding.py | BindingList.page | def page(self, start_date=values.unset, end_date=values.unset,
identity=values.unset, tag=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of BindingInstance records from the API.
Request is executed immediately
:param date start_date: Only include usage that has occurred on or after this date
:param date end_date: Only include usage that occurred on or before this date
:param unicode identity: The `identity` value of the resources to read
:param unicode tag: Only list Bindings that have all of the specified Tags
: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 BindingInstance
:rtype: twilio.rest.notify.v1.service.binding.BindingPage
"""
params = values.of({
'StartDate': serialize.iso8601_date(start_date),
'EndDate': serialize.iso8601_date(end_date),
'Identity': serialize.map(identity, lambda e: e),
'Tag': serialize.map(tag, lambda e: e),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return BindingPage(self._version, response, self._solution) | python | def page(self, start_date=values.unset, end_date=values.unset,
identity=values.unset, tag=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'StartDate': serialize.iso8601_date(start_date),
'EndDate': serialize.iso8601_date(end_date),
'Identity': serialize.map(identity, lambda e: e),
'Tag': serialize.map(tag, lambda e: e),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return BindingPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"start_date",
"=",
"values",
".",
"unset",
",",
"end_date",
"=",
"values",
".",
"unset",
",",
"identity",
"=",
"values",
".",
"unset",
",",
"tag",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
"values",
".",
"u... | Retrieve a single page of BindingInstance records from the API.
Request is executed immediately
:param date start_date: Only include usage that has occurred on or after this date
:param date end_date: Only include usage that occurred on or before this date
:param unicode identity: The `identity` value of the resources to read
:param unicode tag: Only list Bindings that have all of the specified Tags
: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 BindingInstance
:rtype: twilio.rest.notify.v1.service.binding.BindingPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"BindingInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/notify/v1/service/binding.py#L137-L171 |
225,695 | twilio/twilio-python | twilio/rest/notify/v1/service/binding.py | BindingList.get | def get(self, sid):
"""
Constructs a BindingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.notify.v1.service.binding.BindingContext
:rtype: twilio.rest.notify.v1.service.binding.BindingContext
"""
return BindingContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return BindingContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"BindingContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a BindingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.notify.v1.service.binding.BindingContext
:rtype: twilio.rest.notify.v1.service.binding.BindingContext | [
"Constructs",
"a",
"BindingContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/notify/v1/service/binding.py#L190-L199 |
225,696 | twilio/twilio-python | twilio/rest/notify/v1/service/binding.py | BindingPage.get_instance | def get_instance(self, payload):
"""
Build an instance of BindingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.notify.v1.service.binding.BindingInstance
:rtype: twilio.rest.notify.v1.service.binding.BindingInstance
"""
return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return BindingInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"BindingInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of BindingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.notify.v1.service.binding.BindingInstance
:rtype: twilio.rest.notify.v1.service.binding.BindingInstance | [
"Build",
"an",
"instance",
"of",
"BindingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/notify/v1/service/binding.py#L242-L251 |
225,697 | twilio/twilio-python | twilio/rest/preview/marketplace/installed_add_on/__init__.py | InstalledAddOnList.create | def create(self, available_add_on_sid, accept_terms_of_service,
configuration=values.unset, unique_name=values.unset):
"""
Create a new InstalledAddOnInstance
:param unicode available_add_on_sid: A string that uniquely identifies the Add-on to install
:param bool accept_terms_of_service: A boolean reflecting your acceptance of the Terms of Service
:param dict configuration: The JSON object representing the configuration
:param unicode unique_name: The string that uniquely identifies this Add-on installation
:returns: Newly created InstalledAddOnInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.InstalledAddOnInstance
"""
data = values.of({
'AvailableAddOnSid': available_add_on_sid,
'AcceptTermsOfService': accept_terms_of_service,
'Configuration': serialize.object(configuration),
'UniqueName': unique_name,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return InstalledAddOnInstance(self._version, payload, ) | python | def create(self, available_add_on_sid, accept_terms_of_service,
configuration=values.unset, unique_name=values.unset):
data = values.of({
'AvailableAddOnSid': available_add_on_sid,
'AcceptTermsOfService': accept_terms_of_service,
'Configuration': serialize.object(configuration),
'UniqueName': unique_name,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return InstalledAddOnInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"available_add_on_sid",
",",
"accept_terms_of_service",
",",
"configuration",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'AvailableAd... | Create a new InstalledAddOnInstance
:param unicode available_add_on_sid: A string that uniquely identifies the Add-on to install
:param bool accept_terms_of_service: A boolean reflecting your acceptance of the Terms of Service
:param dict configuration: The JSON object representing the configuration
:param unicode unique_name: The string that uniquely identifies this Add-on installation
:returns: Newly created InstalledAddOnInstance
:rtype: twilio.rest.preview.marketplace.installed_add_on.InstalledAddOnInstance | [
"Create",
"a",
"new",
"InstalledAddOnInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/marketplace/installed_add_on/__init__.py#L39-L65 |
225,698 | twilio/twilio-python | twilio/rest/video/v1/room/__init__.py | RoomList.create | def create(self, enable_turn=values.unset, type=values.unset,
unique_name=values.unset, status_callback=values.unset,
status_callback_method=values.unset, max_participants=values.unset,
record_participants_on_connect=values.unset,
video_codecs=values.unset, media_region=values.unset):
"""
Create a new RoomInstance
:param bool enable_turn: Use Twilio Network Traversal for TURN service.
:param RoomInstance.RoomType type: Type of room, either peer-to-peer, group-small or group.
:param unicode unique_name: Name of the Room.
:param unicode status_callback: A URL that Twilio sends asynchronous webhook requests to on every room event.
:param unicode status_callback_method: HTTP method Twilio should use when requesting the above URL.
:param unicode max_participants: Maximum number of Participants in the Room.
:param bool record_participants_on_connect: Start Participant recording when connected.
:param RoomInstance.VideoCodec video_codecs: An array of video codecs supported when publishing a Track in the Room.
:param unicode media_region: Region for the media server in Group Rooms.
:returns: Newly created RoomInstance
:rtype: twilio.rest.video.v1.room.RoomInstance
"""
data = values.of({
'EnableTurn': enable_turn,
'Type': type,
'UniqueName': unique_name,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
'MaxParticipants': max_participants,
'RecordParticipantsOnConnect': record_participants_on_connect,
'VideoCodecs': serialize.map(video_codecs, lambda e: e),
'MediaRegion': media_region,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return RoomInstance(self._version, payload, ) | python | def create(self, enable_turn=values.unset, type=values.unset,
unique_name=values.unset, status_callback=values.unset,
status_callback_method=values.unset, max_participants=values.unset,
record_participants_on_connect=values.unset,
video_codecs=values.unset, media_region=values.unset):
data = values.of({
'EnableTurn': enable_turn,
'Type': type,
'UniqueName': unique_name,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
'MaxParticipants': max_participants,
'RecordParticipantsOnConnect': record_participants_on_connect,
'VideoCodecs': serialize.map(video_codecs, lambda e: e),
'MediaRegion': media_region,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return RoomInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"enable_turn",
"=",
"values",
".",
"unset",
",",
"type",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
",",
"status_callback",
"=",
"values",
".",
"unset",
",",
"status_callback_method",
"=... | Create a new RoomInstance
:param bool enable_turn: Use Twilio Network Traversal for TURN service.
:param RoomInstance.RoomType type: Type of room, either peer-to-peer, group-small or group.
:param unicode unique_name: Name of the Room.
:param unicode status_callback: A URL that Twilio sends asynchronous webhook requests to on every room event.
:param unicode status_callback_method: HTTP method Twilio should use when requesting the above URL.
:param unicode max_participants: Maximum number of Participants in the Room.
:param bool record_participants_on_connect: Start Participant recording when connected.
:param RoomInstance.VideoCodec video_codecs: An array of video codecs supported when publishing a Track in the Room.
:param unicode media_region: Region for the media server in Group Rooms.
:returns: Newly created RoomInstance
:rtype: twilio.rest.video.v1.room.RoomInstance | [
"Create",
"a",
"new",
"RoomInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/__init__.py#L38-L77 |
225,699 | twilio/twilio-python | twilio/rest/video/v1/room/__init__.py | RoomList.stream | def stream(self, status=values.unset, unique_name=values.unset,
date_created_after=values.unset, date_created_before=values.unset,
limit=None, page_size=None):
"""
Streams RoomInstance 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 RoomInstance.RoomStatus status: Only show Rooms with the given status.
:param unicode unique_name: Only show Rooms with the provided Name.
:param datetime date_created_after: Only show Rooms that started on or after this date, given as YYYY-MM-DD.
:param datetime date_created_before: Only show Rooms that started before this date, given as YYYY-MM-DD.
: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.video.v1.room.RoomInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
status=status,
unique_name=unique_name,
date_created_after=date_created_after,
date_created_before=date_created_before,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, status=values.unset, unique_name=values.unset,
date_created_after=values.unset, date_created_before=values.unset,
limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
status=status,
unique_name=unique_name,
date_created_after=date_created_after,
date_created_before=date_created_before,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"status",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"date_created_before",
"=",
"values",
".",
"unset",
",",
"limit",
"=",
... | Streams RoomInstance 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 RoomInstance.RoomStatus status: Only show Rooms with the given status.
:param unicode unique_name: Only show Rooms with the provided Name.
:param datetime date_created_after: Only show Rooms that started on or after this date, given as YYYY-MM-DD.
:param datetime date_created_before: Only show Rooms that started before this date, given as YYYY-MM-DD.
: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.video.v1.room.RoomInstance] | [
"Streams",
"RoomInstance",
"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",... | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/__init__.py#L79-L112 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.