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,500 | twilio/twilio-python | twilio/rest/preview/wireless/sim/__init__.py | SimList.page | def page(self, status=values.unset, iccid=values.unset, rate_plan=values.unset,
e_id=values.unset, sim_registration_code=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of SimInstance records from the API.
Request is executed immediately
:param unicode status: The status
:param unicode iccid: The iccid
:param unicode rate_plan: The rate_plan
:param unicode e_id: The e_id
:param unicode sim_registration_code: The sim_registration_code
: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 SimInstance
:rtype: twilio.rest.preview.wireless.sim.SimPage
"""
params = values.of({
'Status': status,
'Iccid': iccid,
'RatePlan': rate_plan,
'EId': e_id,
'SimRegistrationCode': sim_registration_code,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SimPage(self._version, response, self._solution) | python | def page(self, status=values.unset, iccid=values.unset, rate_plan=values.unset,
e_id=values.unset, sim_registration_code=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'Status': status,
'Iccid': iccid,
'RatePlan': rate_plan,
'EId': e_id,
'SimRegistrationCode': sim_registration_code,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SimPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"status",
"=",
"values",
".",
"unset",
",",
"iccid",
"=",
"values",
".",
"unset",
",",
"rate_plan",
"=",
"values",
".",
"unset",
",",
"e_id",
"=",
"values",
".",
"unset",
",",
"sim_registration_code",
"=",
"values",
"."... | Retrieve a single page of SimInstance records from the API.
Request is executed immediately
:param unicode status: The status
:param unicode iccid: The iccid
:param unicode rate_plan: The rate_plan
:param unicode e_id: The e_id
:param unicode sim_registration_code: The sim_registration_code
: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 SimInstance
:rtype: twilio.rest.preview.wireless.sim.SimPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"SimInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/wireless/sim/__init__.py#L108-L145 |
225,501 | twilio/twilio-python | twilio/rest/ip_messaging/v2/service/role.py | RoleList.create | def create(self, friendly_name, type, permission):
"""
Create a new RoleInstance
:param unicode friendly_name: A string to describe the new resource
:param RoleInstance.RoleType type: The type of role
:param unicode permission: A permission the role should have
:returns: Newly created RoleInstance
:rtype: twilio.rest.chat.v2.service.role.RoleInstance
"""
data = values.of({
'FriendlyName': friendly_name,
'Type': type,
'Permission': serialize.map(permission, lambda e: e),
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return RoleInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def create(self, friendly_name, type, permission):
data = values.of({
'FriendlyName': friendly_name,
'Type': type,
'Permission': serialize.map(permission, lambda e: e),
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return RoleInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
",",
"type",
",",
"permission",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'FriendlyName'",
":",
"friendly_name",
",",
"'Type'",
":",
"type",
",",
"'Permission'",
":",
"serialize",
".",
"map... | Create a new RoleInstance
:param unicode friendly_name: A string to describe the new resource
:param RoleInstance.RoleType type: The type of role
:param unicode permission: A permission the role should have
:returns: Newly created RoleInstance
:rtype: twilio.rest.chat.v2.service.role.RoleInstance | [
"Create",
"a",
"new",
"RoleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/role.py#L37-L60 |
225,502 | twilio/twilio-python | twilio/rest/ip_messaging/v2/service/role.py | RoleList.get | def get(self, sid):
"""
Constructs a RoleContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.chat.v2.service.role.RoleContext
:rtype: twilio.rest.chat.v2.service.role.RoleContext
"""
return RoleContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return RoleContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"RoleContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a RoleContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.chat.v2.service.role.RoleContext
:rtype: twilio.rest.chat.v2.service.role.RoleContext | [
"Constructs",
"a",
"RoleContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/role.py#L143-L152 |
225,503 | twilio/twilio-python | twilio/rest/ip_messaging/v2/service/role.py | RolePage.get_instance | def get_instance(self, payload):
"""
Build an instance of RoleInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.chat.v2.service.role.RoleInstance
:rtype: twilio.rest.chat.v2.service.role.RoleInstance
"""
return RoleInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return RoleInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"RoleInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of RoleInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.chat.v2.service.role.RoleInstance
:rtype: twilio.rest.chat.v2.service.role.RoleInstance | [
"Build",
"an",
"instance",
"of",
"RoleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/role.py#L194-L203 |
225,504 | twilio/twilio-python | twilio/rest/ip_messaging/v2/service/role.py | RoleContext.update | def update(self, permission):
"""
Update the RoleInstance
:param unicode permission: A permission the role should have
:returns: Updated RoleInstance
:rtype: twilio.rest.chat.v2.service.role.RoleInstance
"""
data = values.of({'Permission': serialize.map(permission, lambda e: e), })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return RoleInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
sid=self._solution['sid'],
) | python | def update(self, permission):
data = values.of({'Permission': serialize.map(permission, lambda e: e), })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return RoleInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
sid=self._solution['sid'],
) | [
"def",
"update",
"(",
"self",
",",
"permission",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Permission'",
":",
"serialize",
".",
"map",
"(",
"permission",
",",
"lambda",
"e",
":",
"e",
")",
",",
"}",
")",
"payload",
"=",
"self",
".",
... | Update the RoleInstance
:param unicode permission: A permission the role should have
:returns: Updated RoleInstance
:rtype: twilio.rest.chat.v2.service.role.RoleInstance | [
"Update",
"the",
"RoleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/role.py#L266-L288 |
225,505 | twilio/twilio-python | twilio/rest/studio/v1/flow/engagement/step/__init__.py | StepList.get | def get(self, sid):
"""
Constructs a StepContext
:param sid: Step Sid.
:returns: twilio.rest.studio.v1.flow.engagement.step.StepContext
:rtype: twilio.rest.studio.v1.flow.engagement.step.StepContext
"""
return StepContext(
self._version,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
sid=sid,
) | python | def get(self, sid):
return StepContext(
self._version,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"StepContext",
"(",
"self",
".",
"_version",
",",
"flow_sid",
"=",
"self",
".",
"_solution",
"[",
"'flow_sid'",
"]",
",",
"engagement_sid",
"=",
"self",
".",
"_solution",
"[",
"'engagement_sid'",
... | Constructs a StepContext
:param sid: Step Sid.
:returns: twilio.rest.studio.v1.flow.engagement.step.StepContext
:rtype: twilio.rest.studio.v1.flow.engagement.step.StepContext | [
"Constructs",
"a",
"StepContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/step/__init__.py#L119-L133 |
225,506 | twilio/twilio-python | twilio/rest/studio/v1/flow/engagement/step/__init__.py | StepPage.get_instance | def get_instance(self, payload):
"""
Build an instance of StepInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.engagement.step.StepInstance
:rtype: twilio.rest.studio.v1.flow.engagement.step.StepInstance
"""
return StepInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
) | python | def get_instance(self, payload):
return StepInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"StepInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"flow_sid",
"=",
"self",
".",
"_solution",
"[",
"'flow_sid'",
"]",
",",
"engagement_sid",
"=",
"self",
".",
"_solutio... | Build an instance of StepInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.engagement.step.StepInstance
:rtype: twilio.rest.studio.v1.flow.engagement.step.StepInstance | [
"Build",
"an",
"instance",
"of",
"StepInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/step/__init__.py#L181-L195 |
225,507 | twilio/twilio-python | twilio/rest/studio/v1/flow/engagement/step/__init__.py | StepContext.fetch | def fetch(self):
"""
Fetch a StepInstance
:returns: Fetched StepInstance
:rtype: twilio.rest.studio.v1.flow.engagement.step.StepInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return StepInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return StepInstance(
self._version,
payload,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['engagement_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"StepI... | Fetch a StepInstance
:returns: Fetched StepInstance
:rtype: twilio.rest.studio.v1.flow.engagement.step.StepInstance | [
"Fetch",
"a",
"StepInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/step/__init__.py#L231-L252 |
225,508 | twilio/twilio-python | examples/basic_usage.py | example | def example():
"""
Some example usage of different twilio resources.
"""
client = Client(ACCOUNT_SID, AUTH_TOKEN)
# Get all messages
all_messages = client.messages.list()
print('There are {} messages in your account.'.format(len(all_messages)))
# Get only last 10 messages...
some_messages = client.messages.list(limit=10)
print('Here are the last 10 messages in your account:')
for m in some_messages:
print(m)
# Get messages in smaller pages...
all_messages = client.messages.list(page_size=10)
print('There are {} messages in your account.'.format(len(all_messages)))
print('Sending a message...')
new_message = client.messages.create(to='XXXX', from_='YYYY', body='Twilio rocks!')
print('Making a call...')
new_call = client.calls.create(to='XXXX', from_='YYYY', method='GET')
print('Serving TwiML')
twiml_response = VoiceResponse()
twiml_response.say('Hello!')
twiml_response.hangup()
twiml_xml = twiml_response.to_xml()
print('Generated twiml: {}'.format(twiml_xml)) | python | def example():
client = Client(ACCOUNT_SID, AUTH_TOKEN)
# Get all messages
all_messages = client.messages.list()
print('There are {} messages in your account.'.format(len(all_messages)))
# Get only last 10 messages...
some_messages = client.messages.list(limit=10)
print('Here are the last 10 messages in your account:')
for m in some_messages:
print(m)
# Get messages in smaller pages...
all_messages = client.messages.list(page_size=10)
print('There are {} messages in your account.'.format(len(all_messages)))
print('Sending a message...')
new_message = client.messages.create(to='XXXX', from_='YYYY', body='Twilio rocks!')
print('Making a call...')
new_call = client.calls.create(to='XXXX', from_='YYYY', method='GET')
print('Serving TwiML')
twiml_response = VoiceResponse()
twiml_response.say('Hello!')
twiml_response.hangup()
twiml_xml = twiml_response.to_xml()
print('Generated twiml: {}'.format(twiml_xml)) | [
"def",
"example",
"(",
")",
":",
"client",
"=",
"Client",
"(",
"ACCOUNT_SID",
",",
"AUTH_TOKEN",
")",
"# Get all messages",
"all_messages",
"=",
"client",
".",
"messages",
".",
"list",
"(",
")",
"print",
"(",
"'There are {} messages in your account.'",
".",
"for... | Some example usage of different twilio resources. | [
"Some",
"example",
"usage",
"of",
"different",
"twilio",
"resources",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/examples/basic_usage.py#L10-L41 |
225,509 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.py | WorkflowRealTimeStatisticsList.get | def get(self):
"""
Constructs a WorkflowRealTimeStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsContext
"""
return WorkflowRealTimeStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | python | def get(self):
return WorkflowRealTimeStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | [
"def",
"get",
"(",
"self",
")",
":",
"return",
"WorkflowRealTimeStatisticsContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"workflow_sid",
"=",
"self",
".",
"_solution",
"[",
"'workf... | Constructs a WorkflowRealTimeStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsContext | [
"Constructs",
"a",
"WorkflowRealTimeStatisticsContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.py#L36-L47 |
225,510 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.py | WorkflowRealTimeStatisticsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of WorkflowRealTimeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance
"""
return WorkflowRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | python | def get_instance(self, payload):
return WorkflowRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
workflow_sid=self._solution['workflow_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"WorkflowRealTimeStatisticsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"workflow_sid",
"="... | Build an instance of WorkflowRealTimeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.workflow_real_time_statistics.WorkflowRealTimeStatisticsInstance | [
"Build",
"an",
"instance",
"of",
"WorkflowRealTimeStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workflow/workflow_real_time_statistics.py#L92-L106 |
225,511 | twilio/twilio-python | twilio/rest/serverless/v1/service/__init__.py | ServiceContext.environments | def environments(self):
"""
Access the environments
:returns: twilio.rest.serverless.v1.service.environment.EnvironmentList
:rtype: twilio.rest.serverless.v1.service.environment.EnvironmentList
"""
if self._environments is None:
self._environments = EnvironmentList(self._version, service_sid=self._solution['sid'], )
return self._environments | python | def environments(self):
if self._environments is None:
self._environments = EnvironmentList(self._version, service_sid=self._solution['sid'], )
return self._environments | [
"def",
"environments",
"(",
"self",
")",
":",
"if",
"self",
".",
"_environments",
"is",
"None",
":",
"self",
".",
"_environments",
"=",
"EnvironmentList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
... | Access the environments
:returns: twilio.rest.serverless.v1.service.environment.EnvironmentList
:rtype: twilio.rest.serverless.v1.service.environment.EnvironmentList | [
"Access",
"the",
"environments"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/__init__.py#L285-L294 |
225,512 | twilio/twilio-python | twilio/rest/serverless/v1/service/__init__.py | ServiceContext.functions | def functions(self):
"""
Access the functions
:returns: twilio.rest.serverless.v1.service.function.FunctionList
:rtype: twilio.rest.serverless.v1.service.function.FunctionList
"""
if self._functions is None:
self._functions = FunctionList(self._version, service_sid=self._solution['sid'], )
return self._functions | python | def functions(self):
if self._functions is None:
self._functions = FunctionList(self._version, service_sid=self._solution['sid'], )
return self._functions | [
"def",
"functions",
"(",
"self",
")",
":",
"if",
"self",
".",
"_functions",
"is",
"None",
":",
"self",
".",
"_functions",
"=",
"FunctionList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",... | Access the functions
:returns: twilio.rest.serverless.v1.service.function.FunctionList
:rtype: twilio.rest.serverless.v1.service.function.FunctionList | [
"Access",
"the",
"functions"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/__init__.py#L297-L306 |
225,513 | twilio/twilio-python | twilio/rest/serverless/v1/service/__init__.py | ServiceContext.assets | def assets(self):
"""
Access the assets
:returns: twilio.rest.serverless.v1.service.asset.AssetList
:rtype: twilio.rest.serverless.v1.service.asset.AssetList
"""
if self._assets is None:
self._assets = AssetList(self._version, service_sid=self._solution['sid'], )
return self._assets | python | def assets(self):
if self._assets is None:
self._assets = AssetList(self._version, service_sid=self._solution['sid'], )
return self._assets | [
"def",
"assets",
"(",
"self",
")",
":",
"if",
"self",
".",
"_assets",
"is",
"None",
":",
"self",
".",
"_assets",
"=",
"AssetList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"return",... | Access the assets
:returns: twilio.rest.serverless.v1.service.asset.AssetList
:rtype: twilio.rest.serverless.v1.service.asset.AssetList | [
"Access",
"the",
"assets"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/__init__.py#L309-L318 |
225,514 | twilio/twilio-python | twilio/rest/serverless/v1/service/__init__.py | ServiceContext.builds | def builds(self):
"""
Access the builds
:returns: twilio.rest.serverless.v1.service.build.BuildList
:rtype: twilio.rest.serverless.v1.service.build.BuildList
"""
if self._builds is None:
self._builds = BuildList(self._version, service_sid=self._solution['sid'], )
return self._builds | python | def builds(self):
if self._builds is None:
self._builds = BuildList(self._version, service_sid=self._solution['sid'], )
return self._builds | [
"def",
"builds",
"(",
"self",
")",
":",
"if",
"self",
".",
"_builds",
"is",
"None",
":",
"self",
".",
"_builds",
"=",
"BuildList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"return",... | Access the builds
:returns: twilio.rest.serverless.v1.service.build.BuildList
:rtype: twilio.rest.serverless.v1.service.build.BuildList | [
"Access",
"the",
"builds"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/__init__.py#L321-L330 |
225,515 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.py | AuthCallsCredentialListMappingList.create | def create(self, credential_list_sid):
"""
Create a new AuthCallsCredentialListMappingInstance
:param unicode credential_list_sid: The SID of the CredentialList resource to map to the SIP domain
:returns: Newly created AuthCallsCredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingInstance
"""
data = values.of({'CredentialListSid': credential_list_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AuthCallsCredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | def create(self, credential_list_sid):
data = values.of({'CredentialListSid': credential_list_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AuthCallsCredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"credential_list_sid",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'CredentialListSid'",
":",
"credential_list_sid",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
"'POST'",
",",
... | Create a new AuthCallsCredentialListMappingInstance
:param unicode credential_list_sid: The SID of the CredentialList resource to map to the SIP domain
:returns: Newly created AuthCallsCredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingInstance | [
"Create",
"a",
"new",
"AuthCallsCredentialListMappingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.py#L37-L59 |
225,516 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.py | AuthCallsCredentialListMappingList.get | def get(self, sid):
"""
Constructs a AuthCallsCredentialListMappingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingContext
"""
return AuthCallsCredentialListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | python | def get(self, sid):
return AuthCallsCredentialListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"AuthCallsCredentialListMappingContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
"=",
"self",
".",
"_solution",
... | Constructs a AuthCallsCredentialListMappingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingContext | [
"Constructs",
"a",
"AuthCallsCredentialListMappingContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.py#L142-L156 |
225,517 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.py | AuthCallsCredentialListMappingPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AuthCallsCredentialListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingInstance
"""
return AuthCallsCredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | def get_instance(self, payload):
return AuthCallsCredentialListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AuthCallsCredentialListMappingInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
"=",
... | Build an instance of AuthCallsCredentialListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_credential_list_mapping.AuthCallsCredentialListMappingInstance | [
"Build",
"an",
"instance",
"of",
"AuthCallsCredentialListMappingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_credential_list_mapping.py#L204-L218 |
225,518 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.py | TaskQueueCumulativeStatisticsList.get | def get(self):
"""
Constructs a TaskQueueCumulativeStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsContext
"""
return TaskQueueCumulativeStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | python | def get(self):
return TaskQueueCumulativeStatisticsContext(
self._version,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | [
"def",
"get",
"(",
"self",
")",
":",
"return",
"TaskQueueCumulativeStatisticsContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"task_queue_sid",
"=",
"self",
".",
"_solution",
"[",
"'... | Constructs a TaskQueueCumulativeStatisticsContext
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsContext
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsContext | [
"Constructs",
"a",
"TaskQueueCumulativeStatisticsContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.py#L37-L48 |
225,519 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.py | TaskQueueCumulativeStatisticsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of TaskQueueCumulativeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsInstance
"""
return TaskQueueCumulativeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | python | def get_instance(self, payload):
return TaskQueueCumulativeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
task_queue_sid=self._solution['task_queue_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"TaskQueueCumulativeStatisticsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"task_queue_sid",
... | Build an instance of TaskQueueCumulativeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.task_queue_cumulative_statistics.TaskQueueCumulativeStatisticsInstance | [
"Build",
"an",
"instance",
"of",
"TaskQueueCumulativeStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/task_queue/task_queue_cumulative_statistics.py#L93-L107 |
225,520 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/field_type/__init__.py | FieldTypeList.get | def get(self, sid):
"""
Constructs a FieldTypeContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeContext
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeContext
"""
return FieldTypeContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, ) | python | def get(self, sid):
return FieldTypeContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"FieldTypeContext",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a FieldTypeContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeContext
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeContext | [
"Constructs",
"a",
"FieldTypeContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/field_type/__init__.py#L140-L149 |
225,521 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/field_type/__init__.py | FieldTypePage.get_instance | def get_instance(self, payload):
"""
Build an instance of FieldTypeInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeInstance
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeInstance
"""
return FieldTypeInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | def get_instance(self, payload):
return FieldTypeInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"FieldTypeInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
")"
] | Build an instance of FieldTypeInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeInstance
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeInstance | [
"Build",
"an",
"instance",
"of",
"FieldTypeInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/field_type/__init__.py#L193-L202 |
225,522 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/field_type/__init__.py | FieldTypeContext.field_values | def field_values(self):
"""
Access the field_values
:returns: twilio.rest.autopilot.v1.assistant.field_type.field_value.FieldValueList
:rtype: twilio.rest.autopilot.v1.assistant.field_type.field_value.FieldValueList
"""
if self._field_values is None:
self._field_values = FieldValueList(
self._version,
assistant_sid=self._solution['assistant_sid'],
field_type_sid=self._solution['sid'],
)
return self._field_values | python | def field_values(self):
if self._field_values is None:
self._field_values = FieldValueList(
self._version,
assistant_sid=self._solution['assistant_sid'],
field_type_sid=self._solution['sid'],
)
return self._field_values | [
"def",
"field_values",
"(",
"self",
")",
":",
"if",
"self",
".",
"_field_values",
"is",
"None",
":",
"self",
".",
"_field_values",
"=",
"FieldValueList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'... | Access the field_values
:returns: twilio.rest.autopilot.v1.assistant.field_type.field_value.FieldValueList
:rtype: twilio.rest.autopilot.v1.assistant.field_type.field_value.FieldValueList | [
"Access",
"the",
"field_values"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/field_type/__init__.py#L296-L309 |
225,523 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/field_type/__init__.py | FieldTypeInstance.update | def update(self, friendly_name=values.unset, unique_name=values.unset):
"""
Update the FieldTypeInstance
:param unicode friendly_name: A string to describe the resource
:param unicode unique_name: An application-defined string that uniquely identifies the resource
:returns: Updated FieldTypeInstance
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeInstance
"""
return self._proxy.update(friendly_name=friendly_name, unique_name=unique_name, ) | python | def update(self, friendly_name=values.unset, unique_name=values.unset):
return self._proxy.update(friendly_name=friendly_name, unique_name=unique_name, ) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"friendly_name",
"=",
"friendly_name",
",",
"unique_name",
"=",... | Update the FieldTypeInstance
:param unicode friendly_name: A string to describe the resource
:param unicode unique_name: An application-defined string that uniquely identifies the resource
:returns: Updated FieldTypeInstance
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeInstance | [
"Update",
"the",
"FieldTypeInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/field_type/__init__.py#L451-L461 |
225,524 | twilio/twilio-python | twilio/rest/api/v2010/account/message/__init__.py | MessageList.stream | def stream(self, to=values.unset, from_=values.unset,
date_sent_before=values.unset, date_sent=values.unset,
date_sent_after=values.unset, limit=None, page_size=None):
"""
Streams MessageInstance 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: Filter by messages sent to this number
:param unicode from_: Filter by from number
:param datetime date_sent_before: Filter by date sent
:param datetime date_sent: Filter by date sent
:param datetime date_sent_after: Filter by date sent
: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.message.MessageInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
to=to,
from_=from_,
date_sent_before=date_sent_before,
date_sent=date_sent,
date_sent_after=date_sent_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,
date_sent_before=values.unset, date_sent=values.unset,
date_sent_after=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
to=to,
from_=from_,
date_sent_before=date_sent_before,
date_sent=date_sent,
date_sent_after=date_sent_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",
",",
"date_sent_before",
"=",
"values",
".",
"unset",
",",
"date_sent",
"=",
"values",
".",
"unset",
",",
"date_sent_after",
"=",
"values",
... | Streams MessageInstance 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: Filter by messages sent to this number
:param unicode from_: Filter by from number
:param datetime date_sent_before: Filter by date sent
:param datetime date_sent: Filter by date sent
:param datetime date_sent_after: Filter by date sent
: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.message.MessageInstance] | [
"Streams",
"MessageInstance",
"records",
"from",
"the",
"API",
"as",
"a",
"generator",
"stream",
".",
"This",
"operation",
"lazily",
"loads",
"records",
"as",
"efficiently",
"as",
"possible",
"until",
"the",
"limit",
"is",
"reached",
".",
"The",
"results",
"ar... | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/message/__init__.py#L92-L127 |
225,525 | twilio/twilio-python | twilio/rest/api/v2010/account/message/__init__.py | MessageList.page | def page(self, to=values.unset, from_=values.unset,
date_sent_before=values.unset, date_sent=values.unset,
date_sent_after=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of MessageInstance records from the API.
Request is executed immediately
:param unicode to: Filter by messages sent to this number
:param unicode from_: Filter by from number
:param datetime date_sent_before: Filter by date sent
:param datetime date_sent: Filter by date sent
:param datetime date_sent_after: Filter by date sent
: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 MessageInstance
:rtype: twilio.rest.api.v2010.account.message.MessagePage
"""
params = values.of({
'To': to,
'From': from_,
'DateSent<': serialize.iso8601_datetime(date_sent_before),
'DateSent': serialize.iso8601_datetime(date_sent),
'DateSent>': serialize.iso8601_datetime(date_sent_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return MessagePage(self._version, response, self._solution) | python | def page(self, to=values.unset, from_=values.unset,
date_sent_before=values.unset, date_sent=values.unset,
date_sent_after=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'To': to,
'From': from_,
'DateSent<': serialize.iso8601_datetime(date_sent_before),
'DateSent': serialize.iso8601_datetime(date_sent),
'DateSent>': serialize.iso8601_datetime(date_sent_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return MessagePage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"to",
"=",
"values",
".",
"unset",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"date_sent_before",
"=",
"values",
".",
"unset",
",",
"date_sent",
"=",
"values",
".",
"unset",
",",
"date_sent_after",
"=",
"values",
"... | Retrieve a single page of MessageInstance records from the API.
Request is executed immediately
:param unicode to: Filter by messages sent to this number
:param unicode from_: Filter by from number
:param datetime date_sent_before: Filter by date sent
:param datetime date_sent: Filter by date sent
:param datetime date_sent_after: Filter by date sent
: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 MessageInstance
:rtype: twilio.rest.api.v2010.account.message.MessagePage | [
"Retrieve",
"a",
"single",
"page",
"of",
"MessageInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/message/__init__.py#L162-L199 |
225,526 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py | AssignedAddOnList.create | def create(self, installed_add_on_sid):
"""
Create a new AssignedAddOnInstance
:param unicode installed_add_on_sid: The SID that identifies the Add-on installation
:returns: Newly created AssignedAddOnInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance
"""
data = values.of({'InstalledAddOnSid': installed_add_on_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AssignedAddOnInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
) | python | def create(self, installed_add_on_sid):
data = values.of({'InstalledAddOnSid': installed_add_on_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AssignedAddOnInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"installed_add_on_sid",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'InstalledAddOnSid'",
":",
"installed_add_on_sid",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
"'POST'",
",",
... | Create a new AssignedAddOnInstance
:param unicode installed_add_on_sid: The SID that identifies the Add-on installation
:returns: Newly created AssignedAddOnInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance | [
"Create",
"a",
"new",
"AssignedAddOnInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py#L120-L142 |
225,527 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py | AssignedAddOnList.get | def get(self, sid):
"""
Constructs a AssignedAddOnContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnContext
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnContext
"""
return AssignedAddOnContext(
self._version,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
sid=sid,
) | python | def get(self, sid):
return AssignedAddOnContext(
self._version,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"AssignedAddOnContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"resource_sid",
"=",
"self",
".",
"_solution",
"[",
"'resour... | Constructs a AssignedAddOnContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnContext
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnContext | [
"Constructs",
"a",
"AssignedAddOnContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py#L144-L158 |
225,528 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py | AssignedAddOnPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AssignedAddOnInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance
"""
return AssignedAddOnInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
) | python | def get_instance(self, payload):
return AssignedAddOnInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AssignedAddOnInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"resource_sid",
"=",
"self",
"."... | Build an instance of AssignedAddOnInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance | [
"Build",
"an",
"instance",
"of",
"AssignedAddOnInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py#L207-L221 |
225,529 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py | AssignedAddOnContext.fetch | def fetch(self):
"""
Fetch a AssignedAddOnInstance
:returns: Fetched AssignedAddOnInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return AssignedAddOnInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return AssignedAddOnInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['resource_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Assig... | Fetch a AssignedAddOnInstance
:returns: Fetched AssignedAddOnInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnInstance | [
"Fetch",
"a",
"AssignedAddOnInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/assigned_add_on/__init__.py#L258-L279 |
225,530 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/hosted_number_order.py | HostedNumberOrderList.page | def page(self, status=values.unset, phone_number=values.unset,
incoming_phone_number_sid=values.unset, friendly_name=values.unset,
unique_name=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of HostedNumberOrderInstance records from the API.
Request is executed immediately
:param HostedNumberOrderInstance.Status status: The Status of this HostedNumberOrder.
:param unicode phone_number: An E164 formatted phone number.
:param unicode incoming_phone_number_sid: IncomingPhoneNumber sid.
:param unicode friendly_name: A human readable description of this resource.
:param unicode unique_name: A unique, developer assigned name of this HostedNumberOrder.
: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 HostedNumberOrderInstance
:rtype: twilio.rest.preview.hosted_numbers.hosted_number_order.HostedNumberOrderPage
"""
params = values.of({
'Status': status,
'PhoneNumber': phone_number,
'IncomingPhoneNumberSid': incoming_phone_number_sid,
'FriendlyName': friendly_name,
'UniqueName': unique_name,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return HostedNumberOrderPage(self._version, response, self._solution) | python | def page(self, status=values.unset, phone_number=values.unset,
incoming_phone_number_sid=values.unset, friendly_name=values.unset,
unique_name=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'Status': status,
'PhoneNumber': phone_number,
'IncomingPhoneNumberSid': incoming_phone_number_sid,
'FriendlyName': friendly_name,
'UniqueName': unique_name,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return HostedNumberOrderPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"status",
"=",
"values",
".",
"unset",
",",
"phone_number",
"=",
"values",
".",
"unset",
",",
"incoming_phone_number_sid",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"unique_name",
... | Retrieve a single page of HostedNumberOrderInstance records from the API.
Request is executed immediately
:param HostedNumberOrderInstance.Status status: The Status of this HostedNumberOrder.
:param unicode phone_number: An E164 formatted phone number.
:param unicode incoming_phone_number_sid: IncomingPhoneNumber sid.
:param unicode friendly_name: A human readable description of this resource.
:param unicode unique_name: A unique, developer assigned name of this HostedNumberOrder.
: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 HostedNumberOrderInstance
:rtype: twilio.rest.preview.hosted_numbers.hosted_number_order.HostedNumberOrderPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"HostedNumberOrderInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/hosted_number_order.py#L108-L145 |
225,531 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/hosted_number_order.py | HostedNumberOrderList.create | def create(self, phone_number, sms_capability, account_sid=values.unset,
friendly_name=values.unset, unique_name=values.unset,
cc_emails=values.unset, sms_url=values.unset,
sms_method=values.unset, sms_fallback_url=values.unset,
sms_fallback_method=values.unset, status_callback_url=values.unset,
status_callback_method=values.unset,
sms_application_sid=values.unset, address_sid=values.unset,
email=values.unset, verification_type=values.unset,
verification_document_sid=values.unset):
"""
Create a new HostedNumberOrderInstance
:param unicode phone_number: An E164 formatted phone number.
:param bool sms_capability: Specify SMS capability to host.
:param unicode account_sid: Account Sid.
:param unicode friendly_name: A human readable description of this resource.
:param unicode unique_name: A unique, developer assigned name of this HostedNumberOrder.
:param unicode cc_emails: A list of emails.
:param unicode sms_url: SMS URL.
:param unicode sms_method: SMS Method.
:param unicode sms_fallback_url: SMS Fallback URL.
:param unicode sms_fallback_method: SMS Fallback Method.
:param unicode status_callback_url: Status Callback URL.
:param unicode status_callback_method: Status Callback Method.
:param unicode sms_application_sid: SMS Application Sid.
:param unicode address_sid: Address sid.
:param unicode email: Email.
:param HostedNumberOrderInstance.VerificationType verification_type: Verification Type.
:param unicode verification_document_sid: Verification Document Sid
:returns: Newly created HostedNumberOrderInstance
:rtype: twilio.rest.preview.hosted_numbers.hosted_number_order.HostedNumberOrderInstance
"""
data = values.of({
'PhoneNumber': phone_number,
'SmsCapability': sms_capability,
'AccountSid': account_sid,
'FriendlyName': friendly_name,
'UniqueName': unique_name,
'CcEmails': serialize.map(cc_emails, lambda e: e),
'SmsUrl': sms_url,
'SmsMethod': sms_method,
'SmsFallbackUrl': sms_fallback_url,
'SmsFallbackMethod': sms_fallback_method,
'StatusCallbackUrl': status_callback_url,
'StatusCallbackMethod': status_callback_method,
'SmsApplicationSid': sms_application_sid,
'AddressSid': address_sid,
'Email': email,
'VerificationType': verification_type,
'VerificationDocumentSid': verification_document_sid,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return HostedNumberOrderInstance(self._version, payload, ) | python | def create(self, phone_number, sms_capability, account_sid=values.unset,
friendly_name=values.unset, unique_name=values.unset,
cc_emails=values.unset, sms_url=values.unset,
sms_method=values.unset, sms_fallback_url=values.unset,
sms_fallback_method=values.unset, status_callback_url=values.unset,
status_callback_method=values.unset,
sms_application_sid=values.unset, address_sid=values.unset,
email=values.unset, verification_type=values.unset,
verification_document_sid=values.unset):
data = values.of({
'PhoneNumber': phone_number,
'SmsCapability': sms_capability,
'AccountSid': account_sid,
'FriendlyName': friendly_name,
'UniqueName': unique_name,
'CcEmails': serialize.map(cc_emails, lambda e: e),
'SmsUrl': sms_url,
'SmsMethod': sms_method,
'SmsFallbackUrl': sms_fallback_url,
'SmsFallbackMethod': sms_fallback_method,
'StatusCallbackUrl': status_callback_url,
'StatusCallbackMethod': status_callback_method,
'SmsApplicationSid': sms_application_sid,
'AddressSid': address_sid,
'Email': email,
'VerificationType': verification_type,
'VerificationDocumentSid': verification_document_sid,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return HostedNumberOrderInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"phone_number",
",",
"sms_capability",
",",
"account_sid",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
",",
"cc_emails",
"=",
"values",
... | Create a new HostedNumberOrderInstance
:param unicode phone_number: An E164 formatted phone number.
:param bool sms_capability: Specify SMS capability to host.
:param unicode account_sid: Account Sid.
:param unicode friendly_name: A human readable description of this resource.
:param unicode unique_name: A unique, developer assigned name of this HostedNumberOrder.
:param unicode cc_emails: A list of emails.
:param unicode sms_url: SMS URL.
:param unicode sms_method: SMS Method.
:param unicode sms_fallback_url: SMS Fallback URL.
:param unicode sms_fallback_method: SMS Fallback Method.
:param unicode status_callback_url: Status Callback URL.
:param unicode status_callback_method: Status Callback Method.
:param unicode sms_application_sid: SMS Application Sid.
:param unicode address_sid: Address sid.
:param unicode email: Email.
:param HostedNumberOrderInstance.VerificationType verification_type: Verification Type.
:param unicode verification_document_sid: Verification Document Sid
:returns: Newly created HostedNumberOrderInstance
:rtype: twilio.rest.preview.hosted_numbers.hosted_number_order.HostedNumberOrderInstance | [
"Create",
"a",
"new",
"HostedNumberOrderInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/hosted_number_order.py#L164-L223 |
225,532 | twilio/twilio-python | twilio/rest/authy/v1/service/__init__.py | ServiceContext.entities | def entities(self):
"""
Access the entities
:returns: twilio.rest.authy.v1.service.entity.EntityList
:rtype: twilio.rest.authy.v1.service.entity.EntityList
"""
if self._entities is None:
self._entities = EntityList(self._version, service_sid=self._solution['sid'], )
return self._entities | python | def entities(self):
if self._entities is None:
self._entities = EntityList(self._version, service_sid=self._solution['sid'], )
return self._entities | [
"def",
"entities",
"(",
"self",
")",
":",
"if",
"self",
".",
"_entities",
"is",
"None",
":",
"self",
".",
"_entities",
"=",
"EntityList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"r... | Access the entities
:returns: twilio.rest.authy.v1.service.entity.EntityList
:rtype: twilio.rest.authy.v1.service.entity.EntityList | [
"Access",
"the",
"entities"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/authy/v1/service/__init__.py#L281-L290 |
225,533 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py | WorkersRealTimeStatisticsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of WorkersRealTimeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance
"""
return WorkersRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
) | python | def get_instance(self, payload):
return WorkersRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"WorkersRealTimeStatisticsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
")"
] | Build an instance of WorkersRealTimeStatisticsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance | [
"Build",
"an",
"instance",
"of",
"WorkersRealTimeStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py#L88-L101 |
225,534 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py | WorkersRealTimeStatisticsContext.fetch | def fetch(self, task_channel=values.unset):
"""
Fetch a WorkersRealTimeStatisticsInstance
:param unicode task_channel: Filter cumulative statistics by TaskChannel.
:returns: Fetched WorkersRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance
"""
params = values.of({'TaskChannel': task_channel, })
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return WorkersRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
) | python | def fetch(self, task_channel=values.unset):
params = values.of({'TaskChannel': task_channel, })
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return WorkersRealTimeStatisticsInstance(
self._version,
payload,
workspace_sid=self._solution['workspace_sid'],
) | [
"def",
"fetch",
"(",
"self",
",",
"task_channel",
"=",
"values",
".",
"unset",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"'TaskChannel'",
":",
"task_channel",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'... | Fetch a WorkersRealTimeStatisticsInstance
:param unicode task_channel: Filter cumulative statistics by TaskChannel.
:returns: Fetched WorkersRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.workers_real_time_statistics.WorkersRealTimeStatisticsInstance | [
"Fetch",
"a",
"WorkersRealTimeStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/workers_real_time_statistics.py#L132-L153 |
225,535 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/local.py | LocalList.page | def page(self, beta=values.unset, friendly_name=values.unset,
phone_number=values.unset, origin=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of LocalInstance records from the API.
Request is executed immediately
:param bool beta: Whether to include new phone numbers
:param unicode friendly_name: A string that identifies the resources to read
:param unicode phone_number: The phone numbers of the resources to read
:param unicode origin: Include phone numbers based on their origin. By default, phone numbers of all origin are included.
: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 LocalInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.local.LocalPage
"""
params = values.of({
'Beta': beta,
'FriendlyName': friendly_name,
'PhoneNumber': phone_number,
'Origin': origin,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return LocalPage(self._version, response, self._solution) | python | def page(self, beta=values.unset, friendly_name=values.unset,
phone_number=values.unset, origin=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'Beta': beta,
'FriendlyName': friendly_name,
'PhoneNumber': phone_number,
'Origin': origin,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return LocalPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"beta",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"phone_number",
"=",
"values",
".",
"unset",
",",
"origin",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
"values",
"."... | Retrieve a single page of LocalInstance records from the API.
Request is executed immediately
:param bool beta: Whether to include new phone numbers
:param unicode friendly_name: A string that identifies the resources to read
:param unicode phone_number: The phone numbers of the resources to read
:param unicode origin: Include phone numbers based on their origin. By default, phone numbers of all origin are included.
: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 LocalInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.local.LocalPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"LocalInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/local.py#L101-L136 |
225,536 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/local.py | LocalPage.get_instance | def get_instance(self, payload):
"""
Build an instance of LocalInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.local.LocalInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.local.LocalInstance
"""
return LocalInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return LocalInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"LocalInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of LocalInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.local.LocalInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.local.LocalInstance | [
"Build",
"an",
"instance",
"of",
"LocalInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/local.py#L248-L257 |
225,537 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.py | AuthCallsIpAccessControlListMappingList.get | def get(self, sid):
"""
Constructs a AuthCallsIpAccessControlListMappingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingContext
"""
return AuthCallsIpAccessControlListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | python | def get(self, sid):
return AuthCallsIpAccessControlListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"AuthCallsIpAccessControlListMappingContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
"=",
"self",
".",
"_solution... | Constructs a AuthCallsIpAccessControlListMappingContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingContext | [
"Constructs",
"a",
"AuthCallsIpAccessControlListMappingContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.py#L142-L156 |
225,538 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.py | AuthCallsIpAccessControlListMappingPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AuthCallsIpAccessControlListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingInstance
"""
return AuthCallsIpAccessControlListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | def get_instance(self, payload):
return AuthCallsIpAccessControlListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AuthCallsIpAccessControlListMappingInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
... | Build an instance of AuthCallsIpAccessControlListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.auth_calls_mapping.auth_calls_ip_access_control_list_mapping.AuthCallsIpAccessControlListMappingInstance | [
"Build",
"an",
"instance",
"of",
"AuthCallsIpAccessControlListMappingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/auth_types/auth_calls_mapping/auth_calls_ip_access_control_list_mapping.py#L204-L218 |
225,539 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/ip_access_control_list.py | IpAccessControlListList.create | def create(self, ip_access_control_list_sid):
"""
Create a new IpAccessControlListInstance
:param unicode ip_access_control_list_sid: The SID of the IP Access Control List that you want to associate with the trunk
:returns: Newly created IpAccessControlListInstance
:rtype: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance
"""
data = values.of({'IpAccessControlListSid': ip_access_control_list_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return IpAccessControlListInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | python | def create(self, ip_access_control_list_sid):
data = values.of({'IpAccessControlListSid': ip_access_control_list_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return IpAccessControlListInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"ip_access_control_list_sid",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'IpAccessControlListSid'",
":",
"ip_access_control_list_sid",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
... | Create a new IpAccessControlListInstance
:param unicode ip_access_control_list_sid: The SID of the IP Access Control List that you want to associate with the trunk
:returns: Newly created IpAccessControlListInstance
:rtype: twilio.rest.trunking.v1.trunk.ip_access_control_list.IpAccessControlListInstance | [
"Create",
"a",
"new",
"IpAccessControlListInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/ip_access_control_list.py#L36-L53 |
225,540 | twilio/twilio-python | twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py | SubscribedTrackList.stream | def stream(self, date_created_after=values.unset,
date_created_before=values.unset, track=values.unset,
publisher=values.unset, kind=values.unset, limit=None,
page_size=None):
"""
Streams SubscribedTrackInstance records from the API as a generator stream.
This operation lazily loads records as efficiently as possible until the limit
is reached.
The results are returned as a generator, so this operation is memory efficient.
:param datetime date_created_after: The date_created_after
:param datetime date_created_before: The date_created_before
:param unicode track: The track
:param unicode publisher: The publisher
:param SubscribedTrackInstance.Kind kind: The kind
: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.room_participant.room_participant_subscribed_track.SubscribedTrackInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
date_created_after=date_created_after,
date_created_before=date_created_before,
track=track,
publisher=publisher,
kind=kind,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, date_created_after=values.unset,
date_created_before=values.unset, track=values.unset,
publisher=values.unset, kind=values.unset, limit=None,
page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
date_created_after=date_created_after,
date_created_before=date_created_before,
track=track,
publisher=publisher,
kind=kind,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"date_created_before",
"=",
"values",
".",
"unset",
",",
"track",
"=",
"values",
".",
"unset",
",",
"publisher",
"=",
"values",
".",
"unset",
",",
"kind",
"=",
"va... | Streams SubscribedTrackInstance records from the API as a generator stream.
This operation lazily loads records as efficiently as possible until the limit
is reached.
The results are returned as a generator, so this operation is memory efficient.
:param datetime date_created_after: The date_created_after
:param datetime date_created_before: The date_created_before
:param unicode track: The track
:param unicode publisher: The publisher
:param SubscribedTrackInstance.Kind kind: The kind
: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.room_participant.room_participant_subscribed_track.SubscribedTrackInstance] | [
"Streams",
"SubscribedTrackInstance",
"records",
"from",
"the",
"API",
"as",
"a",
"generator",
"stream",
".",
"This",
"operation",
"lazily",
"loads",
"records",
"as",
"efficiently",
"as",
"possible",
"until",
"the",
"limit",
"is",
"reached",
".",
"The",
"results... | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py#L37-L73 |
225,541 | twilio/twilio-python | twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py | SubscribedTrackList.page | def page(self, date_created_after=values.unset,
date_created_before=values.unset, track=values.unset,
publisher=values.unset, kind=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of SubscribedTrackInstance records from the API.
Request is executed immediately
:param datetime date_created_after: The date_created_after
:param datetime date_created_before: The date_created_before
:param unicode track: The track
:param unicode publisher: The publisher
:param SubscribedTrackInstance.Kind kind: The kind
: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 SubscribedTrackInstance
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackPage
"""
params = values.of({
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'DateCreatedBefore': serialize.iso8601_datetime(date_created_before),
'Track': track,
'Publisher': publisher,
'Kind': kind,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SubscribedTrackPage(self._version, response, self._solution) | python | def page(self, date_created_after=values.unset,
date_created_before=values.unset, track=values.unset,
publisher=values.unset, kind=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'DateCreatedBefore': serialize.iso8601_datetime(date_created_before),
'Track': track,
'Publisher': publisher,
'Kind': kind,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SubscribedTrackPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"date_created_before",
"=",
"values",
".",
"unset",
",",
"track",
"=",
"values",
".",
"unset",
",",
"publisher",
"=",
"values",
".",
"unset",
",",
"kind",
"=",
"valu... | Retrieve a single page of SubscribedTrackInstance records from the API.
Request is executed immediately
:param datetime date_created_after: The date_created_after
:param datetime date_created_before: The date_created_before
:param unicode track: The track
:param unicode publisher: The publisher
:param SubscribedTrackInstance.Kind kind: The kind
: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 SubscribedTrackInstance
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"SubscribedTrackInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py#L108-L145 |
225,542 | twilio/twilio-python | twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py | SubscribedTrackList.update | def update(self, track=values.unset, publisher=values.unset, kind=values.unset,
status=values.unset):
"""
Update the SubscribedTrackInstance
:param unicode track: The track
:param unicode publisher: The publisher
:param SubscribedTrackInstance.Kind kind: The kind
:param SubscribedTrackInstance.Status status: The status
:returns: Updated SubscribedTrackInstance
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
"""
data = values.of({'Track': track, 'Publisher': publisher, 'Kind': kind, 'Status': status, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return SubscribedTrackInstance(
self._version,
payload,
room_sid=self._solution['room_sid'],
subscriber_sid=self._solution['subscriber_sid'],
) | python | def update(self, track=values.unset, publisher=values.unset, kind=values.unset,
status=values.unset):
data = values.of({'Track': track, 'Publisher': publisher, 'Kind': kind, 'Status': status, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return SubscribedTrackInstance(
self._version,
payload,
room_sid=self._solution['room_sid'],
subscriber_sid=self._solution['subscriber_sid'],
) | [
"def",
"update",
"(",
"self",
",",
"track",
"=",
"values",
".",
"unset",
",",
"publisher",
"=",
"values",
".",
"unset",
",",
"kind",
"=",
"values",
".",
"unset",
",",
"status",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of"... | Update the SubscribedTrackInstance
:param unicode track: The track
:param unicode publisher: The publisher
:param SubscribedTrackInstance.Kind kind: The kind
:param SubscribedTrackInstance.Status status: The status
:returns: Updated SubscribedTrackInstance
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance | [
"Update",
"the",
"SubscribedTrackInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py#L164-L190 |
225,543 | twilio/twilio-python | twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py | SubscribedTrackPage.get_instance | def get_instance(self, payload):
"""
Build an instance of SubscribedTrackInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
"""
return SubscribedTrackInstance(
self._version,
payload,
room_sid=self._solution['room_sid'],
subscriber_sid=self._solution['subscriber_sid'],
) | python | def get_instance(self, payload):
return SubscribedTrackInstance(
self._version,
payload,
room_sid=self._solution['room_sid'],
subscriber_sid=self._solution['subscriber_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"SubscribedTrackInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"room_sid",
"=",
"self",
".",
"_solution",
"[",
"'room_sid'",
"]",
",",
"subscriber_sid",
"=",
"self",
".",
... | Build an instance of SubscribedTrackInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackInstance | [
"Build",
"an",
"instance",
"of",
"SubscribedTrackInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/room_participant/room_participant_subscribed_track.py#L222-L236 |
225,544 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/event.py | EventList.get | def get(self, sid):
"""
Constructs a EventContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.event.EventContext
:rtype: twilio.rest.taskrouter.v1.workspace.event.EventContext
"""
return EventContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | python | def get(self, sid):
return EventContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"EventContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a EventContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.event.EventContext
:rtype: twilio.rest.taskrouter.v1.workspace.event.EventContext | [
"Constructs",
"a",
"EventContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/event.py#L208-L217 |
225,545 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/event.py | EventPage.get_instance | def get_instance(self, payload):
"""
Build an instance of EventInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.event.EventInstance
:rtype: twilio.rest.taskrouter.v1.workspace.event.EventInstance
"""
return EventInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def get_instance(self, payload):
return EventInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"EventInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
")"
] | Build an instance of EventInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.event.EventInstance
:rtype: twilio.rest.taskrouter.v1.workspace.event.EventInstance | [
"Build",
"an",
"instance",
"of",
"EventInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/event.py#L259-L268 |
225,546 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/terminating_sip_domain.py | TerminatingSipDomainList.create | def create(self, sip_domain_sid):
"""
Create a new TerminatingSipDomainInstance
:param unicode sip_domain_sid: The SID of the SIP Domain to associate with the trunk
:returns: Newly created TerminatingSipDomainInstance
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainInstance
"""
data = values.of({'SipDomainSid': sip_domain_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TerminatingSipDomainInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | python | def create(self, sip_domain_sid):
data = values.of({'SipDomainSid': sip_domain_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TerminatingSipDomainInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"sip_domain_sid",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'SipDomainSid'",
":",
"sip_domain_sid",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
"'POST'",
",",
"self",
".",
... | Create a new TerminatingSipDomainInstance
:param unicode sip_domain_sid: The SID of the SIP Domain to associate with the trunk
:returns: Newly created TerminatingSipDomainInstance
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainInstance | [
"Create",
"a",
"new",
"TerminatingSipDomainInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/terminating_sip_domain.py#L36-L53 |
225,547 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/terminating_sip_domain.py | TerminatingSipDomainList.get | def get(self, sid):
"""
Constructs a TerminatingSipDomainContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainContext
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainContext
"""
return TerminatingSipDomainContext(self._version, trunk_sid=self._solution['trunk_sid'], sid=sid, ) | python | def get(self, sid):
return TerminatingSipDomainContext(self._version, trunk_sid=self._solution['trunk_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"TerminatingSipDomainContext",
"(",
"self",
".",
"_version",
",",
"trunk_sid",
"=",
"self",
".",
"_solution",
"[",
"'trunk_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a TerminatingSipDomainContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainContext
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainContext | [
"Constructs",
"a",
"TerminatingSipDomainContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/terminating_sip_domain.py#L136-L145 |
225,548 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/terminating_sip_domain.py | TerminatingSipDomainPage.get_instance | def get_instance(self, payload):
"""
Build an instance of TerminatingSipDomainInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainInstance
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainInstance
"""
return TerminatingSipDomainInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | python | def get_instance(self, payload):
return TerminatingSipDomainInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"TerminatingSipDomainInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"trunk_sid",
"=",
"self",
".",
"_solution",
"[",
"'trunk_sid'",
"]",
",",
")"
] | Build an instance of TerminatingSipDomainInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainInstance
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainInstance | [
"Build",
"an",
"instance",
"of",
"TerminatingSipDomainInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/terminating_sip_domain.py#L187-L196 |
225,549 | twilio/twilio-python | twilio/rest/preview/understand/assistant/assistant_initiation_actions.py | AssistantInitiationActionsPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AssistantInitiationActionsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
:rtype: twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
"""
return AssistantInitiationActionsInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
) | python | def get_instance(self, payload):
return AssistantInitiationActionsInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AssistantInitiationActionsInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
")"
] | Build an instance of AssistantInitiationActionsInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance
:rtype: twilio.rest.preview.understand.assistant.assistant_initiation_actions.AssistantInitiationActionsInstance | [
"Build",
"an",
"instance",
"of",
"AssistantInitiationActionsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/understand/assistant/assistant_initiation_actions.py#L92-L105 |
225,550 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberList.create | def create(self, api_version=values.unset, friendly_name=values.unset,
sms_application_sid=values.unset, sms_fallback_method=values.unset,
sms_fallback_url=values.unset, sms_method=values.unset,
sms_url=values.unset, status_callback=values.unset,
status_callback_method=values.unset,
voice_application_sid=values.unset,
voice_caller_id_lookup=values.unset,
voice_fallback_method=values.unset, voice_fallback_url=values.unset,
voice_method=values.unset, voice_url=values.unset,
emergency_status=values.unset, emergency_address_sid=values.unset,
trunk_sid=values.unset, identity_sid=values.unset,
address_sid=values.unset, voice_receive_mode=values.unset,
phone_number=values.unset, area_code=values.unset):
"""
Create a new IncomingPhoneNumberInstance
:param unicode api_version: The API version to use for incoming calls made to the new phone number
:param unicode friendly_name: A string to describe the new phone number
:param unicode sms_application_sid: The SID of the application to handle SMS messages
:param unicode sms_fallback_method: HTTP method used with sms_fallback_url
:param unicode sms_fallback_url: The URL we call when an error occurs while executing TwiML
:param unicode sms_method: The HTTP method to use with sms url
:param unicode sms_url: The URL we should call when the new phone number receives an incoming SMS message
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_method: HTTP method we should use to call status_callback
:param unicode voice_application_sid: The SID of the application to handle the new phone number
:param bool voice_caller_id_lookup: Whether to lookup the caller's name
:param unicode voice_fallback_method: The HTTP method used with voice_fallback_url
:param unicode voice_fallback_url: The URL we will call when an error occurs in TwiML
:param unicode voice_method: The HTTP method used with the voice_url
:param unicode voice_url: The URL we should call when the phone number receives a call
:param IncomingPhoneNumberInstance.EmergencyStatus emergency_status: Status determining whether the new phone number is enabled for emergency calling
:param unicode emergency_address_sid: The emergency address configuration to use for emergency calling
:param unicode trunk_sid: SID of the trunk to handle calls to the new phone number
:param unicode identity_sid: The SID of the Identity resource to associate with the new phone number
:param unicode address_sid: The SID of the Address resource associated with the phone number
:param IncomingPhoneNumberInstance.VoiceReceiveMode voice_receive_mode: Incoming call type: fax or voice
:param unicode phone_number: The phone number to purchase in E.164 format
:param unicode area_code: The desired area code for the new phone number
:returns: Newly created IncomingPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance
"""
data = values.of({
'PhoneNumber': phone_number,
'AreaCode': area_code,
'ApiVersion': api_version,
'FriendlyName': friendly_name,
'SmsApplicationSid': sms_application_sid,
'SmsFallbackMethod': sms_fallback_method,
'SmsFallbackUrl': sms_fallback_url,
'SmsMethod': sms_method,
'SmsUrl': sms_url,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
'VoiceApplicationSid': voice_application_sid,
'VoiceCallerIdLookup': voice_caller_id_lookup,
'VoiceFallbackMethod': voice_fallback_method,
'VoiceFallbackUrl': voice_fallback_url,
'VoiceMethod': voice_method,
'VoiceUrl': voice_url,
'EmergencyStatus': emergency_status,
'EmergencyAddressSid': emergency_address_sid,
'TrunkSid': trunk_sid,
'IdentitySid': identity_sid,
'AddressSid': address_sid,
'VoiceReceiveMode': voice_receive_mode,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return IncomingPhoneNumberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
) | python | def create(self, api_version=values.unset, friendly_name=values.unset,
sms_application_sid=values.unset, sms_fallback_method=values.unset,
sms_fallback_url=values.unset, sms_method=values.unset,
sms_url=values.unset, status_callback=values.unset,
status_callback_method=values.unset,
voice_application_sid=values.unset,
voice_caller_id_lookup=values.unset,
voice_fallback_method=values.unset, voice_fallback_url=values.unset,
voice_method=values.unset, voice_url=values.unset,
emergency_status=values.unset, emergency_address_sid=values.unset,
trunk_sid=values.unset, identity_sid=values.unset,
address_sid=values.unset, voice_receive_mode=values.unset,
phone_number=values.unset, area_code=values.unset):
data = values.of({
'PhoneNumber': phone_number,
'AreaCode': area_code,
'ApiVersion': api_version,
'FriendlyName': friendly_name,
'SmsApplicationSid': sms_application_sid,
'SmsFallbackMethod': sms_fallback_method,
'SmsFallbackUrl': sms_fallback_url,
'SmsMethod': sms_method,
'SmsUrl': sms_url,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
'VoiceApplicationSid': voice_application_sid,
'VoiceCallerIdLookup': voice_caller_id_lookup,
'VoiceFallbackMethod': voice_fallback_method,
'VoiceFallbackUrl': voice_fallback_url,
'VoiceMethod': voice_method,
'VoiceUrl': voice_url,
'EmergencyStatus': emergency_status,
'EmergencyAddressSid': emergency_address_sid,
'TrunkSid': trunk_sid,
'IdentitySid': identity_sid,
'AddressSid': address_sid,
'VoiceReceiveMode': voice_receive_mode,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return IncomingPhoneNumberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"api_version",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"sms_application_sid",
"=",
"values",
".",
"unset",
",",
"sms_fallback_method",
"=",
"values",
".",
"unset",
",",
"sms_fall... | Create a new IncomingPhoneNumberInstance
:param unicode api_version: The API version to use for incoming calls made to the new phone number
:param unicode friendly_name: A string to describe the new phone number
:param unicode sms_application_sid: The SID of the application to handle SMS messages
:param unicode sms_fallback_method: HTTP method used with sms_fallback_url
:param unicode sms_fallback_url: The URL we call when an error occurs while executing TwiML
:param unicode sms_method: The HTTP method to use with sms url
:param unicode sms_url: The URL we should call when the new phone number receives an incoming SMS message
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_method: HTTP method we should use to call status_callback
:param unicode voice_application_sid: The SID of the application to handle the new phone number
:param bool voice_caller_id_lookup: Whether to lookup the caller's name
:param unicode voice_fallback_method: The HTTP method used with voice_fallback_url
:param unicode voice_fallback_url: The URL we will call when an error occurs in TwiML
:param unicode voice_method: The HTTP method used with the voice_url
:param unicode voice_url: The URL we should call when the phone number receives a call
:param IncomingPhoneNumberInstance.EmergencyStatus emergency_status: Status determining whether the new phone number is enabled for emergency calling
:param unicode emergency_address_sid: The emergency address configuration to use for emergency calling
:param unicode trunk_sid: SID of the trunk to handle calls to the new phone number
:param unicode identity_sid: The SID of the Identity resource to associate with the new phone number
:param unicode address_sid: The SID of the Address resource associated with the phone number
:param IncomingPhoneNumberInstance.VoiceReceiveMode voice_receive_mode: Incoming call type: fax or voice
:param unicode phone_number: The phone number to purchase in E.164 format
:param unicode area_code: The desired area code for the new phone number
:returns: Newly created IncomingPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance | [
"Create",
"a",
"new",
"IncomingPhoneNumberInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L165-L244 |
225,551 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberList.mobile | def mobile(self):
"""
Access the mobile
:returns: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileList
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileList
"""
if self._mobile is None:
self._mobile = MobileList(self._version, account_sid=self._solution['account_sid'], )
return self._mobile | python | def mobile(self):
if self._mobile is None:
self._mobile = MobileList(self._version, account_sid=self._solution['account_sid'], )
return self._mobile | [
"def",
"mobile",
"(",
"self",
")",
":",
"if",
"self",
".",
"_mobile",
"is",
"None",
":",
"self",
".",
"_mobile",
"=",
"MobileList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")",
... | Access the mobile
:returns: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileList
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileList | [
"Access",
"the",
"mobile"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L259-L268 |
225,552 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberList.toll_free | def toll_free(self):
"""
Access the toll_free
:returns: twilio.rest.api.v2010.account.incoming_phone_number.toll_free.TollFreeList
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.toll_free.TollFreeList
"""
if self._toll_free is None:
self._toll_free = TollFreeList(self._version, account_sid=self._solution['account_sid'], )
return self._toll_free | python | def toll_free(self):
if self._toll_free is None:
self._toll_free = TollFreeList(self._version, account_sid=self._solution['account_sid'], )
return self._toll_free | [
"def",
"toll_free",
"(",
"self",
")",
":",
"if",
"self",
".",
"_toll_free",
"is",
"None",
":",
"self",
".",
"_toll_free",
"=",
"TollFreeList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
","... | Access the toll_free
:returns: twilio.rest.api.v2010.account.incoming_phone_number.toll_free.TollFreeList
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.toll_free.TollFreeList | [
"Access",
"the",
"toll_free"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L271-L280 |
225,553 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberList.get | def get(self, sid):
"""
Constructs a IncomingPhoneNumberContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberContext
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberContext
"""
return IncomingPhoneNumberContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return IncomingPhoneNumberContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"IncomingPhoneNumberContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a IncomingPhoneNumberContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberContext
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberContext | [
"Constructs",
"a",
"IncomingPhoneNumberContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L282-L291 |
225,554 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberPage.get_instance | def get_instance(self, payload):
"""
Build an instance of IncomingPhoneNumberInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance
"""
return IncomingPhoneNumberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
) | python | def get_instance(self, payload):
return IncomingPhoneNumberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"IncomingPhoneNumberInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of IncomingPhoneNumberInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance | [
"Build",
"an",
"instance",
"of",
"IncomingPhoneNumberInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L333-L346 |
225,555 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberContext.assigned_add_ons | def assigned_add_ons(self):
"""
Access the assigned_add_ons
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnList
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnList
"""
if self._assigned_add_ons is None:
self._assigned_add_ons = AssignedAddOnList(
self._version,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['sid'],
)
return self._assigned_add_ons | python | def assigned_add_ons(self):
if self._assigned_add_ons is None:
self._assigned_add_ons = AssignedAddOnList(
self._version,
account_sid=self._solution['account_sid'],
resource_sid=self._solution['sid'],
)
return self._assigned_add_ons | [
"def",
"assigned_add_ons",
"(",
"self",
")",
":",
"if",
"self",
".",
"_assigned_add_ons",
"is",
"None",
":",
"self",
".",
"_assigned_add_ons",
"=",
"AssignedAddOnList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'a... | Access the assigned_add_ons
:returns: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnList
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.assigned_add_on.AssignedAddOnList | [
"Access",
"the",
"assigned_add_ons"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L492-L505 |
225,556 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/__init__.py | IncomingPhoneNumberInstance.update | def update(self, account_sid=values.unset, api_version=values.unset,
friendly_name=values.unset, sms_application_sid=values.unset,
sms_fallback_method=values.unset, sms_fallback_url=values.unset,
sms_method=values.unset, sms_url=values.unset,
status_callback=values.unset, status_callback_method=values.unset,
voice_application_sid=values.unset,
voice_caller_id_lookup=values.unset,
voice_fallback_method=values.unset, voice_fallback_url=values.unset,
voice_method=values.unset, voice_url=values.unset,
emergency_status=values.unset, emergency_address_sid=values.unset,
trunk_sid=values.unset, voice_receive_mode=values.unset,
identity_sid=values.unset, address_sid=values.unset):
"""
Update the IncomingPhoneNumberInstance
:param unicode account_sid: The SID of the Account that created the resource to update
:param unicode api_version: The API version to use for incoming calls made to the phone number
:param unicode friendly_name: A string to describe the resource
:param unicode sms_application_sid: Unique string that identifies the application
:param unicode sms_fallback_method: HTTP method used with sms_fallback_url
:param unicode sms_fallback_url: The URL we call when an error occurs while executing TwiML
:param unicode sms_method: The HTTP method to use with sms_url
:param unicode sms_url: The URL we should call when the phone number receives an incoming SMS message
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_method: The HTTP method we should use to call status_callback
:param unicode voice_application_sid: The SID of the application to handle the phone number
:param bool voice_caller_id_lookup: Whether to lookup the caller's name
:param unicode voice_fallback_method: The HTTP method used with fallback_url
:param unicode voice_fallback_url: The URL we will call when an error occurs in TwiML
:param unicode voice_method: The HTTP method used with the voice_url
:param unicode voice_url: The URL we should call when the phone number receives a call
:param IncomingPhoneNumberInstance.EmergencyStatus emergency_status: Whether the phone number is enabled for emergency calling
:param unicode emergency_address_sid: The emergency address configuration to use for emergency calling
:param unicode trunk_sid: SID of the trunk to handle phone calls to the phone number
:param IncomingPhoneNumberInstance.VoiceReceiveMode voice_receive_mode: Incoming call type: fax or voice
:param unicode identity_sid: Unique string that identifies the identity associated with number
:param unicode address_sid: The SID of the Address resource associated with the phone number
:returns: Updated IncomingPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance
"""
return self._proxy.update(
account_sid=account_sid,
api_version=api_version,
friendly_name=friendly_name,
sms_application_sid=sms_application_sid,
sms_fallback_method=sms_fallback_method,
sms_fallback_url=sms_fallback_url,
sms_method=sms_method,
sms_url=sms_url,
status_callback=status_callback,
status_callback_method=status_callback_method,
voice_application_sid=voice_application_sid,
voice_caller_id_lookup=voice_caller_id_lookup,
voice_fallback_method=voice_fallback_method,
voice_fallback_url=voice_fallback_url,
voice_method=voice_method,
voice_url=voice_url,
emergency_status=emergency_status,
emergency_address_sid=emergency_address_sid,
trunk_sid=trunk_sid,
voice_receive_mode=voice_receive_mode,
identity_sid=identity_sid,
address_sid=address_sid,
) | python | def update(self, account_sid=values.unset, api_version=values.unset,
friendly_name=values.unset, sms_application_sid=values.unset,
sms_fallback_method=values.unset, sms_fallback_url=values.unset,
sms_method=values.unset, sms_url=values.unset,
status_callback=values.unset, status_callback_method=values.unset,
voice_application_sid=values.unset,
voice_caller_id_lookup=values.unset,
voice_fallback_method=values.unset, voice_fallback_url=values.unset,
voice_method=values.unset, voice_url=values.unset,
emergency_status=values.unset, emergency_address_sid=values.unset,
trunk_sid=values.unset, voice_receive_mode=values.unset,
identity_sid=values.unset, address_sid=values.unset):
return self._proxy.update(
account_sid=account_sid,
api_version=api_version,
friendly_name=friendly_name,
sms_application_sid=sms_application_sid,
sms_fallback_method=sms_fallback_method,
sms_fallback_url=sms_fallback_url,
sms_method=sms_method,
sms_url=sms_url,
status_callback=status_callback,
status_callback_method=status_callback_method,
voice_application_sid=voice_application_sid,
voice_caller_id_lookup=voice_caller_id_lookup,
voice_fallback_method=voice_fallback_method,
voice_fallback_url=voice_fallback_url,
voice_method=voice_method,
voice_url=voice_url,
emergency_status=emergency_status,
emergency_address_sid=emergency_address_sid,
trunk_sid=trunk_sid,
voice_receive_mode=voice_receive_mode,
identity_sid=identity_sid,
address_sid=address_sid,
) | [
"def",
"update",
"(",
"self",
",",
"account_sid",
"=",
"values",
".",
"unset",
",",
"api_version",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"sms_application_sid",
"=",
"values",
".",
"unset",
",",
"sms_fallback_met... | Update the IncomingPhoneNumberInstance
:param unicode account_sid: The SID of the Account that created the resource to update
:param unicode api_version: The API version to use for incoming calls made to the phone number
:param unicode friendly_name: A string to describe the resource
:param unicode sms_application_sid: Unique string that identifies the application
:param unicode sms_fallback_method: HTTP method used with sms_fallback_url
:param unicode sms_fallback_url: The URL we call when an error occurs while executing TwiML
:param unicode sms_method: The HTTP method to use with sms_url
:param unicode sms_url: The URL we should call when the phone number receives an incoming SMS message
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode status_callback_method: The HTTP method we should use to call status_callback
:param unicode voice_application_sid: The SID of the application to handle the phone number
:param bool voice_caller_id_lookup: Whether to lookup the caller's name
:param unicode voice_fallback_method: The HTTP method used with fallback_url
:param unicode voice_fallback_url: The URL we will call when an error occurs in TwiML
:param unicode voice_method: The HTTP method used with the voice_url
:param unicode voice_url: The URL we should call when the phone number receives a call
:param IncomingPhoneNumberInstance.EmergencyStatus emergency_status: Whether the phone number is enabled for emergency calling
:param unicode emergency_address_sid: The emergency address configuration to use for emergency calling
:param unicode trunk_sid: SID of the trunk to handle phone calls to the phone number
:param IncomingPhoneNumberInstance.VoiceReceiveMode voice_receive_mode: Incoming call type: fax or voice
:param unicode identity_sid: Unique string that identifies the identity associated with number
:param unicode address_sid: The SID of the Address resource associated with the phone number
:returns: Updated IncomingPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance | [
"Update",
"the",
"IncomingPhoneNumberInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/__init__.py#L839-L903 |
225,557 | twilio/twilio-python | twilio/rest/messaging/v1/service/alpha_sender.py | AlphaSenderList.create | def create(self, alpha_sender):
"""
Create a new AlphaSenderInstance
:param unicode alpha_sender: An Alphanumeric Sender ID string, up to 11 characters.
:returns: Newly created AlphaSenderInstance
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
"""
data = values.of({'AlphaSender': alpha_sender, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AlphaSenderInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def create(self, alpha_sender):
data = values.of({'AlphaSender': alpha_sender, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AlphaSenderInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"alpha_sender",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'AlphaSender'",
":",
"alpha_sender",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
"'POST'",
",",
"self",
".",
"_u... | Create a new AlphaSenderInstance
:param unicode alpha_sender: An Alphanumeric Sender ID string, up to 11 characters.
:returns: Newly created AlphaSenderInstance
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance | [
"Create",
"a",
"new",
"AlphaSenderInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/messaging/v1/service/alpha_sender.py#L37-L54 |
225,558 | twilio/twilio-python | twilio/rest/messaging/v1/service/alpha_sender.py | AlphaSenderList.get | def get(self, sid):
"""
Constructs a AlphaSenderContext
:param sid: The sid
:returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
"""
return AlphaSenderContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return AlphaSenderContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"AlphaSenderContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a AlphaSenderContext
:param sid: The sid
:returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderContext | [
"Constructs",
"a",
"AlphaSenderContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/messaging/v1/service/alpha_sender.py#L137-L146 |
225,559 | twilio/twilio-python | twilio/rest/messaging/v1/service/alpha_sender.py | AlphaSenderPage.get_instance | def get_instance(self, payload):
"""
Build an instance of AlphaSenderInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
"""
return AlphaSenderInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return AlphaSenderInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"AlphaSenderInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of AlphaSenderInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance
:rtype: twilio.rest.messaging.v1.service.alpha_sender.AlphaSenderInstance | [
"Build",
"an",
"instance",
"of",
"AlphaSenderInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/messaging/v1/service/alpha_sender.py#L189-L198 |
225,560 | twilio/twilio-python | twilio/rest/fax/v1/fax/__init__.py | FaxList.stream | def stream(self, from_=values.unset, to=values.unset,
date_created_on_or_before=values.unset,
date_created_after=values.unset, limit=None, page_size=None):
"""
Streams FaxInstance 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 from_: Retrieve only those faxes sent from this phone number
:param unicode to: Retrieve only those faxes sent to this phone number
:param datetime date_created_on_or_before: Retrieve only faxes created on or before this date
:param datetime date_created_after: Retrieve only faxes created after 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.fax.v1.fax.FaxInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
from_=from_,
to=to,
date_created_on_or_before=date_created_on_or_before,
date_created_after=date_created_after,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, from_=values.unset, to=values.unset,
date_created_on_or_before=values.unset,
date_created_after=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
from_=from_,
to=to,
date_created_on_or_before=date_created_on_or_before,
date_created_after=date_created_after,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"to",
"=",
"values",
".",
"unset",
",",
"date_created_on_or_before",
"=",
"values",
".",
"unset",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"limit",
"=",
"No... | Streams FaxInstance 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 from_: Retrieve only those faxes sent from this phone number
:param unicode to: Retrieve only those faxes sent to this phone number
:param datetime date_created_on_or_before: Retrieve only faxes created on or before this date
:param datetime date_created_after: Retrieve only faxes created after 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.fax.v1.fax.FaxInstance] | [
"Streams",
"FaxInstance",
"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/fax/v1/fax/__init__.py#L38-L71 |
225,561 | twilio/twilio-python | twilio/rest/fax/v1/fax/__init__.py | FaxList.page | def page(self, from_=values.unset, to=values.unset,
date_created_on_or_before=values.unset,
date_created_after=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of FaxInstance records from the API.
Request is executed immediately
:param unicode from_: Retrieve only those faxes sent from this phone number
:param unicode to: Retrieve only those faxes sent to this phone number
:param datetime date_created_on_or_before: Retrieve only faxes created on or before this date
:param datetime date_created_after: Retrieve only faxes created after 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 FaxInstance
:rtype: twilio.rest.fax.v1.fax.FaxPage
"""
params = values.of({
'From': from_,
'To': to,
'DateCreatedOnOrBefore': serialize.iso8601_datetime(date_created_on_or_before),
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return FaxPage(self._version, response, self._solution) | python | def page(self, from_=values.unset, to=values.unset,
date_created_on_or_before=values.unset,
date_created_after=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'From': from_,
'To': to,
'DateCreatedOnOrBefore': serialize.iso8601_datetime(date_created_on_or_before),
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return FaxPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"to",
"=",
"values",
".",
"unset",
",",
"date_created_on_or_before",
"=",
"values",
".",
"unset",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
... | Retrieve a single page of FaxInstance records from the API.
Request is executed immediately
:param unicode from_: Retrieve only those faxes sent from this phone number
:param unicode to: Retrieve only those faxes sent to this phone number
:param datetime date_created_on_or_before: Retrieve only faxes created on or before this date
:param datetime date_created_after: Retrieve only faxes created after 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 FaxInstance
:rtype: twilio.rest.fax.v1.fax.FaxPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"FaxInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/fax/v1/fax/__init__.py#L104-L139 |
225,562 | twilio/twilio-python | twilio/rest/fax/v1/fax/__init__.py | FaxList.create | def create(self, to, media_url, quality=values.unset,
status_callback=values.unset, from_=values.unset,
sip_auth_username=values.unset, sip_auth_password=values.unset,
store_media=values.unset, ttl=values.unset):
"""
Create a new FaxInstance
:param unicode to: The phone number to receive the fax
:param unicode media_url: The Twilio-hosted URL of the PDF that contains the fax
:param FaxInstance.Quality quality: The quality of this fax
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode from_: The number the fax was sent from
:param unicode sip_auth_username: The username for SIP authentication
:param unicode sip_auth_password: The password for SIP authentication
:param bool store_media: Whether to store a copy of the sent media
:param unicode ttl: How long in minutes to try to send the fax
:returns: Newly created FaxInstance
:rtype: twilio.rest.fax.v1.fax.FaxInstance
"""
data = values.of({
'To': to,
'MediaUrl': media_url,
'Quality': quality,
'StatusCallback': status_callback,
'From': from_,
'SipAuthUsername': sip_auth_username,
'SipAuthPassword': sip_auth_password,
'StoreMedia': store_media,
'Ttl': ttl,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FaxInstance(self._version, payload, ) | python | def create(self, to, media_url, quality=values.unset,
status_callback=values.unset, from_=values.unset,
sip_auth_username=values.unset, sip_auth_password=values.unset,
store_media=values.unset, ttl=values.unset):
data = values.of({
'To': to,
'MediaUrl': media_url,
'Quality': quality,
'StatusCallback': status_callback,
'From': from_,
'SipAuthUsername': sip_auth_username,
'SipAuthPassword': sip_auth_password,
'StoreMedia': store_media,
'Ttl': ttl,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FaxInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"to",
",",
"media_url",
",",
"quality",
"=",
"values",
".",
"unset",
",",
"status_callback",
"=",
"values",
".",
"unset",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"sip_auth_username",
"=",
"values",
".",
"unset",... | Create a new FaxInstance
:param unicode to: The phone number to receive the fax
:param unicode media_url: The Twilio-hosted URL of the PDF that contains the fax
:param FaxInstance.Quality quality: The quality of this fax
:param unicode status_callback: The URL we should call to send status information to your application
:param unicode from_: The number the fax was sent from
:param unicode sip_auth_username: The username for SIP authentication
:param unicode sip_auth_password: The password for SIP authentication
:param bool store_media: Whether to store a copy of the sent media
:param unicode ttl: How long in minutes to try to send the fax
:returns: Newly created FaxInstance
:rtype: twilio.rest.fax.v1.fax.FaxInstance | [
"Create",
"a",
"new",
"FaxInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/fax/v1/fax/__init__.py#L158-L196 |
225,563 | twilio/twilio-python | twilio/rest/fax/v1/fax/__init__.py | FaxInstance.update | def update(self, status=values.unset):
"""
Update the FaxInstance
:param FaxInstance.UpdateStatus status: The new status of the resource
:returns: Updated FaxInstance
:rtype: twilio.rest.fax.v1.fax.FaxInstance
"""
return self._proxy.update(status=status, ) | python | def update(self, status=values.unset):
return self._proxy.update(status=status, ) | [
"def",
"update",
"(",
"self",
",",
"status",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"status",
"=",
"status",
",",
")"
] | Update the FaxInstance
:param FaxInstance.UpdateStatus status: The new status of the resource
:returns: Updated FaxInstance
:rtype: twilio.rest.fax.v1.fax.FaxInstance | [
"Update",
"the",
"FaxInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/fax/v1/fax/__init__.py#L590-L599 |
225,564 | twilio/twilio-python | twilio/rest/proxy/v1/service/session/participant/__init__.py | ParticipantContext.message_interactions | def message_interactions(self):
"""
Access the message_interactions
:returns: twilio.rest.proxy.v1.service.session.participant.message_interaction.MessageInteractionList
:rtype: twilio.rest.proxy.v1.service.session.participant.message_interaction.MessageInteractionList
"""
if self._message_interactions is None:
self._message_interactions = MessageInteractionList(
self._version,
service_sid=self._solution['service_sid'],
session_sid=self._solution['session_sid'],
participant_sid=self._solution['sid'],
)
return self._message_interactions | python | def message_interactions(self):
if self._message_interactions is None:
self._message_interactions = MessageInteractionList(
self._version,
service_sid=self._solution['service_sid'],
session_sid=self._solution['session_sid'],
participant_sid=self._solution['sid'],
)
return self._message_interactions | [
"def",
"message_interactions",
"(",
"self",
")",
":",
"if",
"self",
".",
"_message_interactions",
"is",
"None",
":",
"self",
".",
"_message_interactions",
"=",
"MessageInteractionList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_soluti... | Access the message_interactions
:returns: twilio.rest.proxy.v1.service.session.participant.message_interaction.MessageInteractionList
:rtype: twilio.rest.proxy.v1.service.session.participant.message_interaction.MessageInteractionList | [
"Access",
"the",
"message_interactions"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/proxy/v1/service/session/participant/__init__.py#L300-L314 |
225,565 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/credential_list/__init__.py | CredentialListContext.credentials | def credentials(self):
"""
Access the credentials
:returns: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialList
:rtype: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialList
"""
if self._credentials is None:
self._credentials = CredentialList(
self._version,
account_sid=self._solution['account_sid'],
credential_list_sid=self._solution['sid'],
)
return self._credentials | python | def credentials(self):
if self._credentials is None:
self._credentials = CredentialList(
self._version,
account_sid=self._solution['account_sid'],
credential_list_sid=self._solution['sid'],
)
return self._credentials | [
"def",
"credentials",
"(",
"self",
")",
":",
"if",
"self",
".",
"_credentials",
"is",
"None",
":",
"self",
".",
"_credentials",
"=",
"CredentialList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]... | Access the credentials
:returns: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialList
:rtype: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialList | [
"Access",
"the",
"credentials"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/credential_list/__init__.py#L288-L301 |
225,566 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/record/yesterday.py | YesterdayPage.get_instance | def get_instance(self, payload):
"""
Build an instance of YesterdayInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.yesterday.YesterdayInstance
:rtype: twilio.rest.api.v2010.account.usage.record.yesterday.YesterdayInstance
"""
return YesterdayInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return YesterdayInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"YesterdayInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of YesterdayInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.yesterday.YesterdayInstance
:rtype: twilio.rest.api.v2010.account.usage.record.yesterday.YesterdayInstance | [
"Build",
"an",
"instance",
"of",
"YesterdayInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/record/yesterday.py#L185-L194 |
225,567 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/__init__.py | TrunkList.create | def create(self, friendly_name=values.unset, domain_name=values.unset,
disaster_recovery_url=values.unset,
disaster_recovery_method=values.unset, recording=values.unset,
secure=values.unset, cnam_lookup_enabled=values.unset):
"""
Create a new TrunkInstance
:param unicode friendly_name: A string to describe the resource
:param unicode domain_name: The unique address you reserve on Twilio to which you route your SIP traffic
:param unicode disaster_recovery_url: The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
:param unicode disaster_recovery_method: The HTTP method we should use to call the disaster_recovery_url
:param TrunkInstance.RecordingSetting recording: The recording settings for the trunk
:param bool secure: Whether Secure Trunking is enabled for the trunk
:param bool cnam_lookup_enabled: Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
:returns: Newly created TrunkInstance
:rtype: twilio.rest.trunking.v1.trunk.TrunkInstance
"""
data = values.of({
'FriendlyName': friendly_name,
'DomainName': domain_name,
'DisasterRecoveryUrl': disaster_recovery_url,
'DisasterRecoveryMethod': disaster_recovery_method,
'Recording': recording,
'Secure': secure,
'CnamLookupEnabled': cnam_lookup_enabled,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TrunkInstance(self._version, payload, ) | python | def create(self, friendly_name=values.unset, domain_name=values.unset,
disaster_recovery_url=values.unset,
disaster_recovery_method=values.unset, recording=values.unset,
secure=values.unset, cnam_lookup_enabled=values.unset):
data = values.of({
'FriendlyName': friendly_name,
'DomainName': domain_name,
'DisasterRecoveryUrl': disaster_recovery_url,
'DisasterRecoveryMethod': disaster_recovery_method,
'Recording': recording,
'Secure': secure,
'CnamLookupEnabled': cnam_lookup_enabled,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TrunkInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"domain_name",
"=",
"values",
".",
"unset",
",",
"disaster_recovery_url",
"=",
"values",
".",
"unset",
",",
"disaster_recovery_method",
"=",
"values",
".",
"unset",
",",
"r... | Create a new TrunkInstance
:param unicode friendly_name: A string to describe the resource
:param unicode domain_name: The unique address you reserve on Twilio to which you route your SIP traffic
:param unicode disaster_recovery_url: The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
:param unicode disaster_recovery_method: The HTTP method we should use to call the disaster_recovery_url
:param TrunkInstance.RecordingSetting recording: The recording settings for the trunk
:param bool secure: Whether Secure Trunking is enabled for the trunk
:param bool cnam_lookup_enabled: Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
:returns: Newly created TrunkInstance
:rtype: twilio.rest.trunking.v1.trunk.TrunkInstance | [
"Create",
"a",
"new",
"TrunkInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/__init__.py#L40-L74 |
225,568 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/__init__.py | TrunkContext.origination_urls | def origination_urls(self):
"""
Access the origination_urls
:returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList
"""
if self._origination_urls is None:
self._origination_urls = OriginationUrlList(self._version, trunk_sid=self._solution['sid'], )
return self._origination_urls | python | def origination_urls(self):
if self._origination_urls is None:
self._origination_urls = OriginationUrlList(self._version, trunk_sid=self._solution['sid'], )
return self._origination_urls | [
"def",
"origination_urls",
"(",
"self",
")",
":",
"if",
"self",
".",
"_origination_urls",
"is",
"None",
":",
"self",
".",
"_origination_urls",
"=",
"OriginationUrlList",
"(",
"self",
".",
"_version",
",",
"trunk_sid",
"=",
"self",
".",
"_solution",
"[",
"'si... | Access the origination_urls
:returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlList | [
"Access",
"the",
"origination_urls"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/__init__.py#L317-L326 |
225,569 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/__init__.py | TrunkContext.credentials_lists | def credentials_lists(self):
"""
Access the credentials_lists
:returns: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList
:rtype: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList
"""
if self._credentials_lists is None:
self._credentials_lists = CredentialListList(self._version, trunk_sid=self._solution['sid'], )
return self._credentials_lists | python | def credentials_lists(self):
if self._credentials_lists is None:
self._credentials_lists = CredentialListList(self._version, trunk_sid=self._solution['sid'], )
return self._credentials_lists | [
"def",
"credentials_lists",
"(",
"self",
")",
":",
"if",
"self",
".",
"_credentials_lists",
"is",
"None",
":",
"self",
".",
"_credentials_lists",
"=",
"CredentialListList",
"(",
"self",
".",
"_version",
",",
"trunk_sid",
"=",
"self",
".",
"_solution",
"[",
"... | Access the credentials_lists
:returns: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList
:rtype: twilio.rest.trunking.v1.trunk.credential_list.CredentialListList | [
"Access",
"the",
"credentials_lists"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/__init__.py#L329-L338 |
225,570 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/__init__.py | TrunkContext.terminating_sip_domains | def terminating_sip_domains(self):
"""
Access the terminating_sip_domains
:returns: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainList
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainList
"""
if self._terminating_sip_domains is None:
self._terminating_sip_domains = TerminatingSipDomainList(
self._version,
trunk_sid=self._solution['sid'],
)
return self._terminating_sip_domains | python | def terminating_sip_domains(self):
if self._terminating_sip_domains is None:
self._terminating_sip_domains = TerminatingSipDomainList(
self._version,
trunk_sid=self._solution['sid'],
)
return self._terminating_sip_domains | [
"def",
"terminating_sip_domains",
"(",
"self",
")",
":",
"if",
"self",
".",
"_terminating_sip_domains",
"is",
"None",
":",
"self",
".",
"_terminating_sip_domains",
"=",
"TerminatingSipDomainList",
"(",
"self",
".",
"_version",
",",
"trunk_sid",
"=",
"self",
".",
... | Access the terminating_sip_domains
:returns: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainList
:rtype: twilio.rest.trunking.v1.trunk.terminating_sip_domain.TerminatingSipDomainList | [
"Access",
"the",
"terminating_sip_domains"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/__init__.py#L368-L380 |
225,571 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/__init__.py | TrunkInstance.update | def update(self, friendly_name=values.unset, domain_name=values.unset,
disaster_recovery_url=values.unset,
disaster_recovery_method=values.unset, recording=values.unset,
secure=values.unset, cnam_lookup_enabled=values.unset):
"""
Update the TrunkInstance
:param unicode friendly_name: A string to describe the resource
:param unicode domain_name: The unique address you reserve on Twilio to which you route your SIP traffic
:param unicode disaster_recovery_url: The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
:param unicode disaster_recovery_method: The HTTP method we should use to call the disaster_recovery_url
:param TrunkInstance.RecordingSetting recording: The recording settings for the trunk
:param bool secure: Whether Secure Trunking is enabled for the trunk
:param bool cnam_lookup_enabled: Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
:returns: Updated TrunkInstance
:rtype: twilio.rest.trunking.v1.trunk.TrunkInstance
"""
return self._proxy.update(
friendly_name=friendly_name,
domain_name=domain_name,
disaster_recovery_url=disaster_recovery_url,
disaster_recovery_method=disaster_recovery_method,
recording=recording,
secure=secure,
cnam_lookup_enabled=cnam_lookup_enabled,
) | python | def update(self, friendly_name=values.unset, domain_name=values.unset,
disaster_recovery_url=values.unset,
disaster_recovery_method=values.unset, recording=values.unset,
secure=values.unset, cnam_lookup_enabled=values.unset):
return self._proxy.update(
friendly_name=friendly_name,
domain_name=domain_name,
disaster_recovery_url=disaster_recovery_url,
disaster_recovery_method=disaster_recovery_method,
recording=recording,
secure=secure,
cnam_lookup_enabled=cnam_lookup_enabled,
) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"domain_name",
"=",
"values",
".",
"unset",
",",
"disaster_recovery_url",
"=",
"values",
".",
"unset",
",",
"disaster_recovery_method",
"=",
"values",
".",
"unset",
",",
"r... | Update the TrunkInstance
:param unicode friendly_name: A string to describe the resource
:param unicode domain_name: The unique address you reserve on Twilio to which you route your SIP traffic
:param unicode disaster_recovery_url: The HTTP URL that we should call if an error occurs while sending SIP traffic towards your configured Origination URL
:param unicode disaster_recovery_method: The HTTP method we should use to call the disaster_recovery_url
:param TrunkInstance.RecordingSetting recording: The recording settings for the trunk
:param bool secure: Whether Secure Trunking is enabled for the trunk
:param bool cnam_lookup_enabled: Whether Caller ID Name (CNAM) lookup should be enabled for the trunk
:returns: Updated TrunkInstance
:rtype: twilio.rest.trunking.v1.trunk.TrunkInstance | [
"Update",
"the",
"TrunkInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/__init__.py#L584-L610 |
225,572 | twilio/twilio-python | twilio/rest/accounts/v1/credential/aws.py | AwsList.create | def create(self, credentials, friendly_name=values.unset,
account_sid=values.unset):
"""
Create a new AwsInstance
:param unicode credentials: A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
:param unicode friendly_name: A string to describe the resource
:param unicode account_sid: The Subaccount this Credential should be associated with.
:returns: Newly created AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance
"""
data = values.of({
'Credentials': credentials,
'FriendlyName': friendly_name,
'AccountSid': account_sid,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AwsInstance(self._version, payload, ) | python | def create(self, credentials, friendly_name=values.unset,
account_sid=values.unset):
data = values.of({
'Credentials': credentials,
'FriendlyName': friendly_name,
'AccountSid': account_sid,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AwsInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"credentials",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"account_sid",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Credentials'",
":",
"credentials",
",",
"'Friend... | Create a new AwsInstance
:param unicode credentials: A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY>
:param unicode friendly_name: A string to describe the resource
:param unicode account_sid: The Subaccount this Credential should be associated with.
:returns: Newly created AwsInstance
:rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance | [
"Create",
"a",
"new",
"AwsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/accounts/v1/credential/aws.py#L116-L140 |
225,573 | twilio/twilio-python | twilio/rest/api/v2010/account/available_phone_number/voip.py | VoipList.stream | def stream(self, area_code=values.unset, contains=values.unset,
sms_enabled=values.unset, mms_enabled=values.unset,
voice_enabled=values.unset,
exclude_all_address_required=values.unset,
exclude_local_address_required=values.unset,
exclude_foreign_address_required=values.unset, beta=values.unset,
near_number=values.unset, near_lat_long=values.unset,
distance=values.unset, in_postal_code=values.unset,
in_region=values.unset, in_rate_center=values.unset,
in_lata=values.unset, in_locality=values.unset,
fax_enabled=values.unset, limit=None, page_size=None):
"""
Streams VoipInstance 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 area_code: The area code of the phone numbers to read
:param unicode contains: The pattern on which to match phone numbers
:param bool sms_enabled: Whether the phone numbers can receive text messages
:param bool mms_enabled: Whether the phone numbers can receive MMS messages
:param bool voice_enabled: Whether the phone numbers can receive calls.
:param bool exclude_all_address_required: Whether to exclude phone numbers that require an Address
:param bool exclude_local_address_required: Whether to exclude phone numbers that require a local address
:param bool exclude_foreign_address_required: Whether to exclude phone numbers that require a foreign address
:param bool beta: Whether to read phone numbers new to the Twilio platform
:param unicode near_number: Given a phone number, find a geographically close number within distance miles. (US/Canada only)
:param unicode near_lat_long: Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
:param unicode distance: The search radius, in miles, for a near_ query. (US/Canada only)
:param unicode in_postal_code: Limit results to a particular postal code. (US/Canada only)
:param unicode in_region: Limit results to a particular region. (US/Canada only)
:param unicode in_rate_center: Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
:param unicode in_lata: Limit results to a specific local access and transport area. (US/Canada only)
:param unicode in_locality: Limit results to a particular locality
:param bool fax_enabled: Whether the phone numbers can receive faxes
: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.available_phone_number.voip.VoipInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
area_code=area_code,
contains=contains,
sms_enabled=sms_enabled,
mms_enabled=mms_enabled,
voice_enabled=voice_enabled,
exclude_all_address_required=exclude_all_address_required,
exclude_local_address_required=exclude_local_address_required,
exclude_foreign_address_required=exclude_foreign_address_required,
beta=beta,
near_number=near_number,
near_lat_long=near_lat_long,
distance=distance,
in_postal_code=in_postal_code,
in_region=in_region,
in_rate_center=in_rate_center,
in_lata=in_lata,
in_locality=in_locality,
fax_enabled=fax_enabled,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, area_code=values.unset, contains=values.unset,
sms_enabled=values.unset, mms_enabled=values.unset,
voice_enabled=values.unset,
exclude_all_address_required=values.unset,
exclude_local_address_required=values.unset,
exclude_foreign_address_required=values.unset, beta=values.unset,
near_number=values.unset, near_lat_long=values.unset,
distance=values.unset, in_postal_code=values.unset,
in_region=values.unset, in_rate_center=values.unset,
in_lata=values.unset, in_locality=values.unset,
fax_enabled=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
area_code=area_code,
contains=contains,
sms_enabled=sms_enabled,
mms_enabled=mms_enabled,
voice_enabled=voice_enabled,
exclude_all_address_required=exclude_all_address_required,
exclude_local_address_required=exclude_local_address_required,
exclude_foreign_address_required=exclude_foreign_address_required,
beta=beta,
near_number=near_number,
near_lat_long=near_lat_long,
distance=distance,
in_postal_code=in_postal_code,
in_region=in_region,
in_rate_center=in_rate_center,
in_lata=in_lata,
in_locality=in_locality,
fax_enabled=fax_enabled,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"area_code",
"=",
"values",
".",
"unset",
",",
"contains",
"=",
"values",
".",
"unset",
",",
"sms_enabled",
"=",
"values",
".",
"unset",
",",
"mms_enabled",
"=",
"values",
".",
"unset",
",",
"voice_enabled",
"=",
"value... | Streams VoipInstance 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 area_code: The area code of the phone numbers to read
:param unicode contains: The pattern on which to match phone numbers
:param bool sms_enabled: Whether the phone numbers can receive text messages
:param bool mms_enabled: Whether the phone numbers can receive MMS messages
:param bool voice_enabled: Whether the phone numbers can receive calls.
:param bool exclude_all_address_required: Whether to exclude phone numbers that require an Address
:param bool exclude_local_address_required: Whether to exclude phone numbers that require a local address
:param bool exclude_foreign_address_required: Whether to exclude phone numbers that require a foreign address
:param bool beta: Whether to read phone numbers new to the Twilio platform
:param unicode near_number: Given a phone number, find a geographically close number within distance miles. (US/Canada only)
:param unicode near_lat_long: Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only)
:param unicode distance: The search radius, in miles, for a near_ query. (US/Canada only)
:param unicode in_postal_code: Limit results to a particular postal code. (US/Canada only)
:param unicode in_region: Limit results to a particular region. (US/Canada only)
:param unicode in_rate_center: Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only)
:param unicode in_lata: Limit results to a specific local access and transport area. (US/Canada only)
:param unicode in_locality: Limit results to a particular locality
:param bool fax_enabled: Whether the phone numbers can receive faxes
: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.available_phone_number.voip.VoipInstance] | [
"Streams",
"VoipInstance",
"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/available_phone_number/voip.py#L36-L105 |
225,574 | twilio/twilio-python | twilio/rest/api/v2010/account/available_phone_number/voip.py | VoipPage.get_instance | def get_instance(self, payload):
"""
Build an instance of VoipInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance
:rtype: twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance
"""
return VoipInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
country_code=self._solution['country_code'],
) | python | def get_instance(self, payload):
return VoipInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
country_code=self._solution['country_code'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"VoipInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"country_code",
"=",
"self",
".",
"_sol... | Build an instance of VoipInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance
:rtype: twilio.rest.api.v2010.account.available_phone_number.voip.VoipInstance | [
"Build",
"an",
"instance",
"of",
"VoipInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/available_phone_number/voip.py#L292-L306 |
225,575 | twilio/twilio-python | twilio/rest/api/v2010/account/transcription.py | TranscriptionList.get | def get(self, sid):
"""
Constructs a TranscriptionContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.transcription.TranscriptionContext
:rtype: twilio.rest.api.v2010.account.transcription.TranscriptionContext
"""
return TranscriptionContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return TranscriptionContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"TranscriptionContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a TranscriptionContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.transcription.TranscriptionContext
:rtype: twilio.rest.api.v2010.account.transcription.TranscriptionContext | [
"Constructs",
"a",
"TranscriptionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/transcription.py#L117-L126 |
225,576 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/sample.py | SampleList.create | def create(self, language, tagged_text, source_channel=values.unset):
"""
Create a new SampleInstance
:param unicode language: The ISO language-country string that specifies the language used for the new sample
:param unicode tagged_text: The text example of how end users might express the task
:param unicode source_channel: The communication channel from which the new sample was captured
:returns: Newly created SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance
"""
data = values.of({'Language': language, 'TaggedText': tagged_text, 'SourceChannel': source_channel, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return SampleInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | python | def create(self, language, tagged_text, source_channel=values.unset):
data = values.of({'Language': language, 'TaggedText': tagged_text, 'SourceChannel': source_channel, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return SampleInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"language",
",",
"tagged_text",
",",
"source_channel",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Language'",
":",
"language",
",",
"'TaggedText'",
":",
"tagged_text",
",",
"'So... | Create a new SampleInstance
:param unicode language: The ISO language-country string that specifies the language used for the new sample
:param unicode tagged_text: The text example of how end users might express the task
:param unicode source_channel: The communication channel from which the new sample was captured
:returns: Newly created SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance | [
"Create",
"a",
"new",
"SampleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/sample.py#L128-L152 |
225,577 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/sample.py | SampleList.get | def get(self, sid):
"""
Constructs a SampleContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.task.sample.SampleContext
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleContext
"""
return SampleContext(
self._version,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
sid=sid,
) | python | def get(self, sid):
return SampleContext(
self._version,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"SampleContext",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"task_sid",
"=",
"self",
".",
"_solution",
"[",
"'task_sid'",
... | Constructs a SampleContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.task.sample.SampleContext
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleContext | [
"Constructs",
"a",
"SampleContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/sample.py#L154-L168 |
225,578 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/sample.py | SamplePage.get_instance | def get_instance(self, payload):
"""
Build an instance of SampleInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance
"""
return SampleInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | python | def get_instance(self, payload):
return SampleInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"SampleInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"task_sid",
"=",
"self",
".",
"_s... | Build an instance of SampleInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance | [
"Build",
"an",
"instance",
"of",
"SampleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/sample.py#L218-L232 |
225,579 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/sample.py | SampleContext.fetch | def fetch(self):
"""
Fetch a SampleInstance
:returns: Fetched SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return SampleInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return SampleInstance(
self._version,
payload,
assistant_sid=self._solution['assistant_sid'],
task_sid=self._solution['task_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Sampl... | Fetch a SampleInstance
:returns: Fetched SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance | [
"Fetch",
"a",
"SampleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/sample.py#L267-L288 |
225,580 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/task/sample.py | SampleInstance.update | def update(self, language=values.unset, tagged_text=values.unset,
source_channel=values.unset):
"""
Update the SampleInstance
:param unicode language: The ISO language-country string that specifies the language used for the sample
:param unicode tagged_text: The text example of how end users might express the task
:param unicode source_channel: The communication channel from which the sample was captured
:returns: Updated SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance
"""
return self._proxy.update(language=language, tagged_text=tagged_text, source_channel=source_channel, ) | python | def update(self, language=values.unset, tagged_text=values.unset,
source_channel=values.unset):
return self._proxy.update(language=language, tagged_text=tagged_text, source_channel=source_channel, ) | [
"def",
"update",
"(",
"self",
",",
"language",
"=",
"values",
".",
"unset",
",",
"tagged_text",
"=",
"values",
".",
"unset",
",",
"source_channel",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"language",
... | Update the SampleInstance
:param unicode language: The ISO language-country string that specifies the language used for the sample
:param unicode tagged_text: The text example of how end users might express the task
:param unicode source_channel: The communication channel from which the sample was captured
:returns: Updated SampleInstance
:rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleInstance | [
"Update",
"the",
"SampleInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/task/sample.py#L481-L493 |
225,581 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/__init__.py | UsageList.records | def records(self):
"""
Access the records
:returns: twilio.rest.api.v2010.account.usage.record.RecordList
:rtype: twilio.rest.api.v2010.account.usage.record.RecordList
"""
if self._records is None:
self._records = RecordList(self._version, account_sid=self._solution['account_sid'], )
return self._records | python | def records(self):
if self._records is None:
self._records = RecordList(self._version, account_sid=self._solution['account_sid'], )
return self._records | [
"def",
"records",
"(",
"self",
")",
":",
"if",
"self",
".",
"_records",
"is",
"None",
":",
"self",
".",
"_records",
"=",
"RecordList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")",... | Access the records
:returns: twilio.rest.api.v2010.account.usage.record.RecordList
:rtype: twilio.rest.api.v2010.account.usage.record.RecordList | [
"Access",
"the",
"records"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/__init__.py#L39-L48 |
225,582 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/__init__.py | UsageList.triggers | def triggers(self):
"""
Access the triggers
:returns: twilio.rest.api.v2010.account.usage.trigger.TriggerList
:rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerList
"""
if self._triggers is None:
self._triggers = TriggerList(self._version, account_sid=self._solution['account_sid'], )
return self._triggers | python | def triggers(self):
if self._triggers is None:
self._triggers = TriggerList(self._version, account_sid=self._solution['account_sid'], )
return self._triggers | [
"def",
"triggers",
"(",
"self",
")",
":",
"if",
"self",
".",
"_triggers",
"is",
"None",
":",
"self",
".",
"_triggers",
"=",
"TriggerList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
... | Access the triggers
:returns: twilio.rest.api.v2010.account.usage.trigger.TriggerList
:rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerList | [
"Access",
"the",
"triggers"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/__init__.py#L51-L60 |
225,583 | twilio/twilio-python | twilio/base/version.py | Version.exception | def exception(cls, method, uri, response, message):
"""
Wraps an exceptional response in a `TwilioRestException`.
"""
# noinspection PyBroadException
try:
error_payload = json.loads(response.text)
if 'message' in error_payload:
message = '{}: {}'.format(message, error_payload['message'])
code = error_payload.get('code', response.status_code)
return TwilioRestException(response.status_code, uri, message, code, method)
except Exception:
return TwilioRestException(response.status_code, uri, message, response.status_code, method) | python | def exception(cls, method, uri, response, message):
# noinspection PyBroadException
try:
error_payload = json.loads(response.text)
if 'message' in error_payload:
message = '{}: {}'.format(message, error_payload['message'])
code = error_payload.get('code', response.status_code)
return TwilioRestException(response.status_code, uri, message, code, method)
except Exception:
return TwilioRestException(response.status_code, uri, message, response.status_code, method) | [
"def",
"exception",
"(",
"cls",
",",
"method",
",",
"uri",
",",
"response",
",",
"message",
")",
":",
"# noinspection PyBroadException",
"try",
":",
"error_payload",
"=",
"json",
".",
"loads",
"(",
"response",
".",
"text",
")",
"if",
"'message'",
"in",
"er... | Wraps an exceptional response in a `TwilioRestException`. | [
"Wraps",
"an",
"exceptional",
"response",
"in",
"a",
"TwilioRestException",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/version.py#L51-L63 |
225,584 | twilio/twilio-python | twilio/base/version.py | Version.read_limits | def read_limits(self, limit=None, page_size=None):
"""
Takes a limit on the max number of records to read and a max page_size
and calculates the max number of pages to read.
:param int limit: Max number of records to read.
:param int page_size: Max page size.
:return dict: A dictionary of paging limits.
"""
page_limit = values.unset
if limit is not None:
if page_size is None:
page_size = limit
page_limit = int(ceil(limit / float(page_size)))
return {
'limit': limit or values.unset,
'page_size': page_size or values.unset,
'page_limit': page_limit,
} | python | def read_limits(self, limit=None, page_size=None):
page_limit = values.unset
if limit is not None:
if page_size is None:
page_size = limit
page_limit = int(ceil(limit / float(page_size)))
return {
'limit': limit or values.unset,
'page_size': page_size or values.unset,
'page_limit': page_limit,
} | [
"def",
"read_limits",
"(",
"self",
",",
"limit",
"=",
"None",
",",
"page_size",
"=",
"None",
")",
":",
"page_limit",
"=",
"values",
".",
"unset",
"if",
"limit",
"is",
"not",
"None",
":",
"if",
"page_size",
"is",
"None",
":",
"page_size",
"=",
"limit",
... | Takes a limit on the max number of records to read and a max page_size
and calculates the max number of pages to read.
:param int limit: Max number of records to read.
:param int page_size: Max page size.
:return dict: A dictionary of paging limits. | [
"Takes",
"a",
"limit",
"on",
"the",
"max",
"number",
"of",
"records",
"to",
"read",
"and",
"a",
"max",
"page_size",
"and",
"calculates",
"the",
"max",
"number",
"of",
"pages",
"to",
"read",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/version.py#L128-L150 |
225,585 | twilio/twilio-python | twilio/base/version.py | Version.stream | def stream(self, page, limit=None, page_limit=None):
"""
Generates records one a time from a page, stopping at prescribed limits.
:param Page page: The page to stream.
:param int limit: The max number of records to read.
:param int page_imit: The max number of pages to read.
"""
current_record = 1
current_page = 1
while page is not None:
for record in page:
yield record
current_record += 1
if limit and limit is not values.unset and limit < current_record:
return
if page_limit and page_limit is not values.unset and page_limit < current_page:
return
page = page.next_page()
current_page += 1 | python | def stream(self, page, limit=None, page_limit=None):
current_record = 1
current_page = 1
while page is not None:
for record in page:
yield record
current_record += 1
if limit and limit is not values.unset and limit < current_record:
return
if page_limit and page_limit is not values.unset and page_limit < current_page:
return
page = page.next_page()
current_page += 1 | [
"def",
"stream",
"(",
"self",
",",
"page",
",",
"limit",
"=",
"None",
",",
"page_limit",
"=",
"None",
")",
":",
"current_record",
"=",
"1",
"current_page",
"=",
"1",
"while",
"page",
"is",
"not",
"None",
":",
"for",
"record",
"in",
"page",
":",
"yiel... | Generates records one a time from a page, stopping at prescribed limits.
:param Page page: The page to stream.
:param int limit: The max number of records to read.
:param int page_imit: The max number of pages to read. | [
"Generates",
"records",
"one",
"a",
"time",
"from",
"a",
"page",
"stopping",
"at",
"prescribed",
"limits",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/version.py#L168-L190 |
225,586 | twilio/twilio-python | twilio/base/version.py | Version.create | def create(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
"""
Create a resource instance.
"""
response = self.request(
method,
uri,
params=params,
data=data,
headers=headers,
auth=auth,
timeout=timeout,
allow_redirects=allow_redirects,
)
if response.status_code < 200 or response.status_code >= 300:
raise self.exception(method, uri, response, 'Unable to create record')
return json.loads(response.text) | python | def create(self, method, uri, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
response = self.request(
method,
uri,
params=params,
data=data,
headers=headers,
auth=auth,
timeout=timeout,
allow_redirects=allow_redirects,
)
if response.status_code < 200 or response.status_code >= 300:
raise self.exception(method, uri, response, 'Unable to create record')
return json.loads(response.text) | [
"def",
"create",
"(",
"self",
",",
"method",
",",
"uri",
",",
"params",
"=",
"None",
",",
"data",
"=",
"None",
",",
"headers",
"=",
"None",
",",
"auth",
"=",
"None",
",",
"timeout",
"=",
"None",
",",
"allow_redirects",
"=",
"False",
")",
":",
"resp... | Create a resource instance. | [
"Create",
"a",
"resource",
"instance",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/base/version.py#L192-L211 |
225,587 | twilio/twilio-python | twilio/rest/api/v2010/account/conference/__init__.py | ConferenceList.stream | def stream(self, date_created_before=values.unset, date_created=values.unset,
date_created_after=values.unset, date_updated_before=values.unset,
date_updated=values.unset, date_updated_after=values.unset,
friendly_name=values.unset, status=values.unset, limit=None,
page_size=None):
"""
Streams ConferenceInstance 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 date_created_before: The `YYYY-MM-DD` value of the resources to read
:param date date_created: The `YYYY-MM-DD` value of the resources to read
:param date date_created_after: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_before: The `YYYY-MM-DD` value of the resources to read
:param date date_updated: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_after: The `YYYY-MM-DD` value of the resources to read
:param unicode friendly_name: The string that identifies the Conference resources to read
:param ConferenceInstance.Status status: The status of the resources to read
:param int limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param int page_size: Number of records to fetch per request, when not set will use
the default value of 50 records. If no page_size is defined
but a limit is defined, stream() will attempt to read the
limit with the most efficient page size, i.e. min(limit, 1000)
:returns: Generator that will yield up to limit results
:rtype: list[twilio.rest.api.v2010.account.conference.ConferenceInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
date_created_before=date_created_before,
date_created=date_created,
date_created_after=date_created_after,
date_updated_before=date_updated_before,
date_updated=date_updated,
date_updated_after=date_updated_after,
friendly_name=friendly_name,
status=status,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, date_created_before=values.unset, date_created=values.unset,
date_created_after=values.unset, date_updated_before=values.unset,
date_updated=values.unset, date_updated_after=values.unset,
friendly_name=values.unset, status=values.unset, limit=None,
page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
date_created_before=date_created_before,
date_created=date_created,
date_created_after=date_created_after,
date_updated_before=date_updated_before,
date_updated=date_updated,
date_updated_after=date_updated_after,
friendly_name=friendly_name,
status=status,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"date_created_before",
"=",
"values",
".",
"unset",
",",
"date_created",
"=",
"values",
".",
"unset",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"date_updated_before",
"=",
"values",
".",
"unset",
",",
"da... | Streams ConferenceInstance 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 date_created_before: The `YYYY-MM-DD` value of the resources to read
:param date date_created: The `YYYY-MM-DD` value of the resources to read
:param date date_created_after: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_before: The `YYYY-MM-DD` value of the resources to read
:param date date_updated: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_after: The `YYYY-MM-DD` value of the resources to read
:param unicode friendly_name: The string that identifies the Conference resources to read
:param ConferenceInstance.Status status: The status of the resources to read
:param int limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param int page_size: Number of records to fetch per request, when not set will use
the default value of 50 records. If no page_size is defined
but a limit is defined, stream() will attempt to read the
limit with the most efficient page size, i.e. min(limit, 1000)
:returns: Generator that will yield up to limit results
:rtype: list[twilio.rest.api.v2010.account.conference.ConferenceInstance] | [
"Streams",
"ConferenceInstance",
"records",
"from",
"the",
"API",
"as",
"a",
"generator",
"stream",
".",
"This",
"operation",
"lazily",
"loads",
"records",
"as",
"efficiently",
"as",
"possible",
"until",
"the",
"limit",
"is",
"reached",
".",
"The",
"results",
... | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/conference/__init__.py#L39-L82 |
225,588 | twilio/twilio-python | twilio/rest/api/v2010/account/conference/__init__.py | ConferenceList.page | def page(self, date_created_before=values.unset, date_created=values.unset,
date_created_after=values.unset, date_updated_before=values.unset,
date_updated=values.unset, date_updated_after=values.unset,
friendly_name=values.unset, status=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of ConferenceInstance records from the API.
Request is executed immediately
:param date date_created_before: The `YYYY-MM-DD` value of the resources to read
:param date date_created: The `YYYY-MM-DD` value of the resources to read
:param date date_created_after: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_before: The `YYYY-MM-DD` value of the resources to read
:param date date_updated: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_after: The `YYYY-MM-DD` value of the resources to read
:param unicode friendly_name: The string that identifies the Conference resources to read
:param ConferenceInstance.Status status: The status of the 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 ConferenceInstance
:rtype: twilio.rest.api.v2010.account.conference.ConferencePage
"""
params = values.of({
'DateCreated<': serialize.iso8601_date(date_created_before),
'DateCreated': serialize.iso8601_date(date_created),
'DateCreated>': serialize.iso8601_date(date_created_after),
'DateUpdated<': serialize.iso8601_date(date_updated_before),
'DateUpdated': serialize.iso8601_date(date_updated),
'DateUpdated>': serialize.iso8601_date(date_updated_after),
'FriendlyName': friendly_name,
'Status': status,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return ConferencePage(self._version, response, self._solution) | python | def page(self, date_created_before=values.unset, date_created=values.unset,
date_created_after=values.unset, date_updated_before=values.unset,
date_updated=values.unset, date_updated_after=values.unset,
friendly_name=values.unset, status=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'DateCreated<': serialize.iso8601_date(date_created_before),
'DateCreated': serialize.iso8601_date(date_created),
'DateCreated>': serialize.iso8601_date(date_created_after),
'DateUpdated<': serialize.iso8601_date(date_updated_before),
'DateUpdated': serialize.iso8601_date(date_updated),
'DateUpdated>': serialize.iso8601_date(date_updated_after),
'FriendlyName': friendly_name,
'Status': status,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return ConferencePage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"date_created_before",
"=",
"values",
".",
"unset",
",",
"date_created",
"=",
"values",
".",
"unset",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"date_updated_before",
"=",
"values",
".",
"unset",
",",
"date... | Retrieve a single page of ConferenceInstance records from the API.
Request is executed immediately
:param date date_created_before: The `YYYY-MM-DD` value of the resources to read
:param date date_created: The `YYYY-MM-DD` value of the resources to read
:param date date_created_after: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_before: The `YYYY-MM-DD` value of the resources to read
:param date date_updated: The `YYYY-MM-DD` value of the resources to read
:param date date_updated_after: The `YYYY-MM-DD` value of the resources to read
:param unicode friendly_name: The string that identifies the Conference resources to read
:param ConferenceInstance.Status status: The status of the 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 ConferenceInstance
:rtype: twilio.rest.api.v2010.account.conference.ConferencePage | [
"Retrieve",
"a",
"single",
"page",
"of",
"ConferenceInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/conference/__init__.py#L125-L170 |
225,589 | twilio/twilio-python | twilio/rest/api/v2010/account/conference/__init__.py | ConferenceList.get | def get(self, sid):
"""
Constructs a ConferenceContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.conference.ConferenceContext
:rtype: twilio.rest.api.v2010.account.conference.ConferenceContext
"""
return ConferenceContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return ConferenceContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"ConferenceContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a ConferenceContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.conference.ConferenceContext
:rtype: twilio.rest.api.v2010.account.conference.ConferenceContext | [
"Constructs",
"a",
"ConferenceContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/conference/__init__.py#L189-L198 |
225,590 | twilio/twilio-python | twilio/rest/api/v2010/account/conference/__init__.py | ConferencePage.get_instance | def get_instance(self, payload):
"""
Build an instance of ConferenceInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.conference.ConferenceInstance
:rtype: twilio.rest.api.v2010.account.conference.ConferenceInstance
"""
return ConferenceInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return ConferenceInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"ConferenceInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of ConferenceInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.conference.ConferenceInstance
:rtype: twilio.rest.api.v2010.account.conference.ConferenceInstance | [
"Build",
"an",
"instance",
"of",
"ConferenceInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/conference/__init__.py#L240-L249 |
225,591 | twilio/twilio-python | twilio/rest/video/v1/room/room_participant/__init__.py | ParticipantContext.published_tracks | def published_tracks(self):
"""
Access the published_tracks
:returns: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList
"""
if self._published_tracks is None:
self._published_tracks = PublishedTrackList(
self._version,
room_sid=self._solution['room_sid'],
participant_sid=self._solution['sid'],
)
return self._published_tracks | python | def published_tracks(self):
if self._published_tracks is None:
self._published_tracks = PublishedTrackList(
self._version,
room_sid=self._solution['room_sid'],
participant_sid=self._solution['sid'],
)
return self._published_tracks | [
"def",
"published_tracks",
"(",
"self",
")",
":",
"if",
"self",
".",
"_published_tracks",
"is",
"None",
":",
"self",
".",
"_published_tracks",
"=",
"PublishedTrackList",
"(",
"self",
".",
"_version",
",",
"room_sid",
"=",
"self",
".",
"_solution",
"[",
"'roo... | Access the published_tracks
:returns: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_published_track.PublishedTrackList | [
"Access",
"the",
"published_tracks"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/room_participant/__init__.py#L302-L315 |
225,592 | twilio/twilio-python | twilio/rest/video/v1/room/room_participant/__init__.py | ParticipantContext.subscribed_tracks | def subscribed_tracks(self):
"""
Access the subscribed_tracks
:returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList
"""
if self._subscribed_tracks is None:
self._subscribed_tracks = SubscribedTrackList(
self._version,
room_sid=self._solution['room_sid'],
subscriber_sid=self._solution['sid'],
)
return self._subscribed_tracks | python | def subscribed_tracks(self):
if self._subscribed_tracks is None:
self._subscribed_tracks = SubscribedTrackList(
self._version,
room_sid=self._solution['room_sid'],
subscriber_sid=self._solution['sid'],
)
return self._subscribed_tracks | [
"def",
"subscribed_tracks",
"(",
"self",
")",
":",
"if",
"self",
".",
"_subscribed_tracks",
"is",
"None",
":",
"self",
".",
"_subscribed_tracks",
"=",
"SubscribedTrackList",
"(",
"self",
".",
"_version",
",",
"room_sid",
"=",
"self",
".",
"_solution",
"[",
"... | Access the subscribed_tracks
:returns: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList
:rtype: twilio.rest.video.v1.room.room_participant.room_participant_subscribed_track.SubscribedTrackList | [
"Access",
"the",
"subscribed_tracks"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/room_participant/__init__.py#L318-L331 |
225,593 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantList.create | def create(self, friendly_name=values.unset, log_queries=values.unset,
unique_name=values.unset, callback_url=values.unset,
callback_events=values.unset, style_sheet=values.unset,
defaults=values.unset):
"""
Create a new AssistantInstance
:param unicode friendly_name: A string to describe the new resource
:param bool log_queries: Whether queries should be logged and kept after training
:param unicode unique_name: An application-defined string that uniquely identifies the new resource
:param unicode callback_url: Reserved
:param unicode callback_events: Reserved
:param dict style_sheet: A JSON string that defines the Assistant's style sheet
:param dict defaults: A JSON object that defines the Assistant's default tasks for various scenarios
:returns: Newly created AssistantInstance
:rtype: twilio.rest.autopilot.v1.assistant.AssistantInstance
"""
data = values.of({
'FriendlyName': friendly_name,
'LogQueries': log_queries,
'UniqueName': unique_name,
'CallbackUrl': callback_url,
'CallbackEvents': callback_events,
'StyleSheet': serialize.object(style_sheet),
'Defaults': serialize.object(defaults),
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AssistantInstance(self._version, payload, ) | python | def create(self, friendly_name=values.unset, log_queries=values.unset,
unique_name=values.unset, callback_url=values.unset,
callback_events=values.unset, style_sheet=values.unset,
defaults=values.unset):
data = values.of({
'FriendlyName': friendly_name,
'LogQueries': log_queries,
'UniqueName': unique_name,
'CallbackUrl': callback_url,
'CallbackEvents': callback_events,
'StyleSheet': serialize.object(style_sheet),
'Defaults': serialize.object(defaults),
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AssistantInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"log_queries",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
",",
"callback_url",
"=",
"values",
".",
"unset",
",",
"callback_events",
"="... | Create a new AssistantInstance
:param unicode friendly_name: A string to describe the new resource
:param bool log_queries: Whether queries should be logged and kept after training
:param unicode unique_name: An application-defined string that uniquely identifies the new resource
:param unicode callback_url: Reserved
:param unicode callback_events: Reserved
:param dict style_sheet: A JSON string that defines the Assistant's style sheet
:param dict defaults: A JSON object that defines the Assistant's default tasks for various scenarios
:returns: Newly created AssistantInstance
:rtype: twilio.rest.autopilot.v1.assistant.AssistantInstance | [
"Create",
"a",
"new",
"AssistantInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L126-L160 |
225,594 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantContext.field_types | def field_types(self):
"""
Access the field_types
:returns: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeList
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeList
"""
if self._field_types is None:
self._field_types = FieldTypeList(self._version, assistant_sid=self._solution['sid'], )
return self._field_types | python | def field_types(self):
if self._field_types is None:
self._field_types = FieldTypeList(self._version, assistant_sid=self._solution['sid'], )
return self._field_types | [
"def",
"field_types",
"(",
"self",
")",
":",
"if",
"self",
".",
"_field_types",
"is",
"None",
":",
"self",
".",
"_field_types",
"=",
"FieldTypeList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",... | Access the field_types
:returns: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeList
:rtype: twilio.rest.autopilot.v1.assistant.field_type.FieldTypeList | [
"Access",
"the",
"field_types"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L328-L337 |
225,595 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantContext.model_builds | def model_builds(self):
"""
Access the model_builds
:returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildList
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildList
"""
if self._model_builds is None:
self._model_builds = ModelBuildList(self._version, assistant_sid=self._solution['sid'], )
return self._model_builds | python | def model_builds(self):
if self._model_builds is None:
self._model_builds = ModelBuildList(self._version, assistant_sid=self._solution['sid'], )
return self._model_builds | [
"def",
"model_builds",
"(",
"self",
")",
":",
"if",
"self",
".",
"_model_builds",
"is",
"None",
":",
"self",
".",
"_model_builds",
"=",
"ModelBuildList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
... | Access the model_builds
:returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildList
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildList | [
"Access",
"the",
"model_builds"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L352-L361 |
225,596 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantContext.queries | def queries(self):
"""
Access the queries
:returns: twilio.rest.autopilot.v1.assistant.query.QueryList
:rtype: twilio.rest.autopilot.v1.assistant.query.QueryList
"""
if self._queries is None:
self._queries = QueryList(self._version, assistant_sid=self._solution['sid'], )
return self._queries | python | def queries(self):
if self._queries is None:
self._queries = QueryList(self._version, assistant_sid=self._solution['sid'], )
return self._queries | [
"def",
"queries",
"(",
"self",
")",
":",
"if",
"self",
".",
"_queries",
"is",
"None",
":",
"self",
".",
"_queries",
"=",
"QueryList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"ret... | Access the queries
:returns: twilio.rest.autopilot.v1.assistant.query.QueryList
:rtype: twilio.rest.autopilot.v1.assistant.query.QueryList | [
"Access",
"the",
"queries"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L364-L373 |
225,597 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantContext.style_sheet | def style_sheet(self):
"""
Access the style_sheet
:returns: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetList
:rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetList
"""
if self._style_sheet is None:
self._style_sheet = StyleSheetList(self._version, assistant_sid=self._solution['sid'], )
return self._style_sheet | python | def style_sheet(self):
if self._style_sheet is None:
self._style_sheet = StyleSheetList(self._version, assistant_sid=self._solution['sid'], )
return self._style_sheet | [
"def",
"style_sheet",
"(",
"self",
")",
":",
"if",
"self",
".",
"_style_sheet",
"is",
"None",
":",
"self",
".",
"_style_sheet",
"=",
"StyleSheetList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
"... | Access the style_sheet
:returns: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetList
:rtype: twilio.rest.autopilot.v1.assistant.style_sheet.StyleSheetList | [
"Access",
"the",
"style_sheet"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L376-L385 |
225,598 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantContext.defaults | def defaults(self):
"""
Access the defaults
:returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsList
:rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsList
"""
if self._defaults is None:
self._defaults = DefaultsList(self._version, assistant_sid=self._solution['sid'], )
return self._defaults | python | def defaults(self):
if self._defaults is None:
self._defaults = DefaultsList(self._version, assistant_sid=self._solution['sid'], )
return self._defaults | [
"def",
"defaults",
"(",
"self",
")",
":",
"if",
"self",
".",
"_defaults",
"is",
"None",
":",
"self",
".",
"_defaults",
"=",
"DefaultsList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
... | Access the defaults
:returns: twilio.rest.autopilot.v1.assistant.defaults.DefaultsList
:rtype: twilio.rest.autopilot.v1.assistant.defaults.DefaultsList | [
"Access",
"the",
"defaults"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L388-L397 |
225,599 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/__init__.py | AssistantContext.dialogues | def dialogues(self):
"""
Access the dialogues
:returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueList
:rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueList
"""
if self._dialogues is None:
self._dialogues = DialogueList(self._version, assistant_sid=self._solution['sid'], )
return self._dialogues | python | def dialogues(self):
if self._dialogues is None:
self._dialogues = DialogueList(self._version, assistant_sid=self._solution['sid'], )
return self._dialogues | [
"def",
"dialogues",
"(",
"self",
")",
":",
"if",
"self",
".",
"_dialogues",
"is",
"None",
":",
"self",
".",
"_dialogues",
"=",
"DialogueList",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")... | Access the dialogues
:returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueList
:rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueList | [
"Access",
"the",
"dialogues"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/__init__.py#L400-L409 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.