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,300 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/workspace_real_time_statistics.py | WorkspaceRealTimeStatisticsInstance.fetch | def fetch(self, task_channel=values.unset):
"""
Fetch a WorkspaceRealTimeStatisticsInstance
:param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel.
:returns: Fetched WorkspaceRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsInstance
"""
return self._proxy.fetch(task_channel=task_channel, ) | python | def fetch(self, task_channel=values.unset):
return self._proxy.fetch(task_channel=task_channel, ) | [
"def",
"fetch",
"(",
"self",
",",
"task_channel",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"fetch",
"(",
"task_channel",
"=",
"task_channel",
",",
")"
] | Fetch a WorkspaceRealTimeStatisticsInstance
:param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel.
:returns: Fetched WorkspaceRealTimeStatisticsInstance
:rtype: twilio.rest.taskrouter.v1.workspace.workspace_real_time_statistics.WorkspaceRealTimeStatisticsInstance | [
"Fetch",
"a",
"WorkspaceRealTimeStatisticsInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/workspace_real_time_statistics.py#L292-L301 |
225,301 | twilio/twilio-python | twilio/rest/wireless/v1/sim/usage_record.py | UsageRecordPage.get_instance | def get_instance(self, payload):
"""
Build an instance of UsageRecordInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance
:rtype: twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance
"""
return UsageRecordInstance(self._version, payload, sim_sid=self._solution['sim_sid'], ) | python | def get_instance(self, payload):
return UsageRecordInstance(self._version, payload, sim_sid=self._solution['sim_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"UsageRecordInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"sim_sid",
"=",
"self",
".",
"_solution",
"[",
"'sim_sid'",
"]",
",",
")"
] | Build an instance of UsageRecordInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance
:rtype: twilio.rest.wireless.v1.sim.usage_record.UsageRecordInstance | [
"Build",
"an",
"instance",
"of",
"UsageRecordInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/wireless/v1/sim/usage_record.py#L170-L179 |
225,302 | twilio/twilio-python | twilio/rest/video/v1/composition_hook.py | CompositionHookList.page | def page(self, enabled=values.unset, date_created_after=values.unset,
date_created_before=values.unset, friendly_name=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of CompositionHookInstance records from the API.
Request is executed immediately
:param bool enabled: Only show Composition Hooks enabled or disabled.
:param datetime date_created_after: Only show Composition Hooks created on or after this ISO8601 date-time with timezone.
:param datetime date_created_before: Only show Composition Hooks created before this ISO8601 date-time with timezone.
:param unicode friendly_name: Only show Composition Hooks with friendly name that match this name.
: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 CompositionHookInstance
:rtype: twilio.rest.video.v1.composition_hook.CompositionHookPage
"""
params = values.of({
'Enabled': enabled,
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'DateCreatedBefore': serialize.iso8601_datetime(date_created_before),
'FriendlyName': friendly_name,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CompositionHookPage(self._version, response, self._solution) | python | def page(self, enabled=values.unset, date_created_after=values.unset,
date_created_before=values.unset, friendly_name=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'Enabled': enabled,
'DateCreatedAfter': serialize.iso8601_datetime(date_created_after),
'DateCreatedBefore': serialize.iso8601_datetime(date_created_before),
'FriendlyName': friendly_name,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return CompositionHookPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"enabled",
"=",
"values",
".",
"unset",
",",
"date_created_after",
"=",
"values",
".",
"unset",
",",
"date_created_before",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"page_token",
... | Retrieve a single page of CompositionHookInstance records from the API.
Request is executed immediately
:param bool enabled: Only show Composition Hooks enabled or disabled.
:param datetime date_created_after: Only show Composition Hooks created on or after this ISO8601 date-time with timezone.
:param datetime date_created_before: Only show Composition Hooks created before this ISO8601 date-time with timezone.
:param unicode friendly_name: Only show Composition Hooks with friendly name that match this name.
: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 CompositionHookInstance
:rtype: twilio.rest.video.v1.composition_hook.CompositionHookPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"CompositionHookInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/composition_hook.py#L104-L139 |
225,303 | twilio/twilio-python | twilio/rest/api/v2010/account/token.py | TokenList.create | def create(self, ttl=values.unset):
"""
Create a new TokenInstance
:param unicode ttl: The duration in seconds the credentials are valid
:returns: Newly created TokenInstance
:rtype: twilio.rest.api.v2010.account.token.TokenInstance
"""
data = values.of({'Ttl': ttl, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TokenInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def create(self, ttl=values.unset):
data = values.of({'Ttl': ttl, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return TokenInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"ttl",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Ttl'",
":",
"ttl",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
"'POST'",
",",
"self",
... | Create a new TokenInstance
:param unicode ttl: The duration in seconds the credentials are valid
:returns: Newly created TokenInstance
:rtype: twilio.rest.api.v2010.account.token.TokenInstance | [
"Create",
"a",
"new",
"TokenInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/token.py#L35-L52 |
225,304 | twilio/twilio-python | twilio/rest/api/v2010/account/token.py | TokenPage.get_instance | def get_instance(self, payload):
"""
Build an instance of TokenInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.token.TokenInstance
:rtype: twilio.rest.api.v2010.account.token.TokenInstance
"""
return TokenInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return TokenInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"TokenInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of TokenInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.token.TokenInstance
:rtype: twilio.rest.api.v2010.account.token.TokenInstance | [
"Build",
"an",
"instance",
"of",
"TokenInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/token.py#L83-L92 |
225,305 | twilio/twilio-python | twilio/rest/preview/acc_security/service/verification_check.py | VerificationCheckPage.get_instance | def get_instance(self, payload):
"""
Build an instance of VerificationCheckInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckInstance
:rtype: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckInstance
"""
return VerificationCheckInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return VerificationCheckInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"VerificationCheckInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of VerificationCheckInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckInstance
:rtype: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckInstance | [
"Build",
"an",
"instance",
"of",
"VerificationCheckInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/acc_security/service/verification_check.py#L88-L97 |
225,306 | twilio/twilio-python | twilio/rest/studio/v1/flow/engagement/__init__.py | EngagementList.get | def get(self, sid):
"""
Constructs a EngagementContext
:param sid: Engagement Sid.
:returns: twilio.rest.studio.v1.flow.engagement.EngagementContext
:rtype: twilio.rest.studio.v1.flow.engagement.EngagementContext
"""
return EngagementContext(self._version, flow_sid=self._solution['flow_sid'], sid=sid, ) | python | def get(self, sid):
return EngagementContext(self._version, flow_sid=self._solution['flow_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"EngagementContext",
"(",
"self",
".",
"_version",
",",
"flow_sid",
"=",
"self",
".",
"_solution",
"[",
"'flow_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a EngagementContext
:param sid: Engagement Sid.
:returns: twilio.rest.studio.v1.flow.engagement.EngagementContext
:rtype: twilio.rest.studio.v1.flow.engagement.EngagementContext | [
"Constructs",
"a",
"EngagementContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/__init__.py#L141-L150 |
225,307 | twilio/twilio-python | twilio/rest/studio/v1/flow/engagement/__init__.py | EngagementPage.get_instance | def get_instance(self, payload):
"""
Build an instance of EngagementInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.engagement.EngagementInstance
:rtype: twilio.rest.studio.v1.flow.engagement.EngagementInstance
"""
return EngagementInstance(self._version, payload, flow_sid=self._solution['flow_sid'], ) | python | def get_instance(self, payload):
return EngagementInstance(self._version, payload, flow_sid=self._solution['flow_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"EngagementInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"flow_sid",
"=",
"self",
".",
"_solution",
"[",
"'flow_sid'",
"]",
",",
")"
] | Build an instance of EngagementInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.studio.v1.flow.engagement.EngagementInstance
:rtype: twilio.rest.studio.v1.flow.engagement.EngagementInstance | [
"Build",
"an",
"instance",
"of",
"EngagementInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/__init__.py#L192-L201 |
225,308 | twilio/twilio-python | twilio/rest/studio/v1/flow/engagement/__init__.py | EngagementContext.engagement_context | def engagement_context(self):
"""
Access the engagement_context
:returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
:rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
"""
if self._engagement_context is None:
self._engagement_context = EngagementContextList(
self._version,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['sid'],
)
return self._engagement_context | python | def engagement_context(self):
if self._engagement_context is None:
self._engagement_context = EngagementContextList(
self._version,
flow_sid=self._solution['flow_sid'],
engagement_sid=self._solution['sid'],
)
return self._engagement_context | [
"def",
"engagement_context",
"(",
"self",
")",
":",
"if",
"self",
".",
"_engagement_context",
"is",
"None",
":",
"self",
".",
"_engagement_context",
"=",
"EngagementContextList",
"(",
"self",
".",
"_version",
",",
"flow_sid",
"=",
"self",
".",
"_solution",
"["... | Access the engagement_context
:returns: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList
:rtype: twilio.rest.studio.v1.flow.engagement.engagement_context.EngagementContextList | [
"Access",
"the",
"engagement_context"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/studio/v1/flow/engagement/__init__.py#L285-L298 |
225,309 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/dialogue.py | DialogueList.get | def get(self, sid):
"""
Constructs a DialogueContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueContext
:rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueContext
"""
return DialogueContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, ) | python | def get(self, sid):
return DialogueContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"DialogueContext",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a DialogueContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueContext
:rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueContext | [
"Constructs",
"a",
"DialogueContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/dialogue.py#L36-L45 |
225,310 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/dialogue.py | DialoguePage.get_instance | def get_instance(self, payload):
"""
Build an instance of DialogueInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
:rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
"""
return DialogueInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | def get_instance(self, payload):
return DialogueInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DialogueInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
")"
] | Build an instance of DialogueInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance
:rtype: twilio.rest.autopilot.v1.assistant.dialogue.DialogueInstance | [
"Build",
"an",
"instance",
"of",
"DialogueInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/dialogue.py#L89-L98 |
225,311 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceList.create | def create(self, friendly_name, event_callback_url=values.unset,
events_filter=values.unset, multi_task_enabled=values.unset,
template=values.unset, prioritize_queue_order=values.unset):
"""
Create a new WorkspaceInstance
:param unicode friendly_name: Human readable description of this workspace
:param unicode event_callback_url: If provided, the Workspace will publish events to this URL.
:param unicode events_filter: Use this parameter to receive webhooks on EventCallbackUrl for specific events on a workspace.
:param bool multi_task_enabled: Multi tasking allows workers to handle multiple tasks simultaneously.
:param unicode template: One of the available template names.
:param WorkspaceInstance.QueueOrder prioritize_queue_order: Use this parameter to configure whether to prioritize LIFO or FIFO when workers are receiving Tasks from combination of LIFO and FIFO TaskQueues.
:returns: Newly created WorkspaceInstance
:rtype: twilio.rest.taskrouter.v1.workspace.WorkspaceInstance
"""
data = values.of({
'FriendlyName': friendly_name,
'EventCallbackUrl': event_callback_url,
'EventsFilter': events_filter,
'MultiTaskEnabled': multi_task_enabled,
'Template': template,
'PrioritizeQueueOrder': prioritize_queue_order,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return WorkspaceInstance(self._version, payload, ) | python | def create(self, friendly_name, event_callback_url=values.unset,
events_filter=values.unset, multi_task_enabled=values.unset,
template=values.unset, prioritize_queue_order=values.unset):
data = values.of({
'FriendlyName': friendly_name,
'EventCallbackUrl': event_callback_url,
'EventsFilter': events_filter,
'MultiTaskEnabled': multi_task_enabled,
'Template': template,
'PrioritizeQueueOrder': prioritize_queue_order,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return WorkspaceInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
",",
"event_callback_url",
"=",
"values",
".",
"unset",
",",
"events_filter",
"=",
"values",
".",
"unset",
",",
"multi_task_enabled",
"=",
"values",
".",
"unset",
",",
"template",
"=",
"values",
".",
"unset... | Create a new WorkspaceInstance
:param unicode friendly_name: Human readable description of this workspace
:param unicode event_callback_url: If provided, the Workspace will publish events to this URL.
:param unicode events_filter: Use this parameter to receive webhooks on EventCallbackUrl for specific events on a workspace.
:param bool multi_task_enabled: Multi tasking allows workers to handle multiple tasks simultaneously.
:param unicode template: One of the available template names.
:param WorkspaceInstance.QueueOrder prioritize_queue_order: Use this parameter to configure whether to prioritize LIFO or FIFO when workers are receiving Tasks from combination of LIFO and FIFO TaskQueues.
:returns: Newly created WorkspaceInstance
:rtype: twilio.rest.taskrouter.v1.workspace.WorkspaceInstance | [
"Create",
"a",
"new",
"WorkspaceInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L134-L165 |
225,312 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceContext.activities | def activities(self):
"""
Access the activities
:returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityList
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityList
"""
if self._activities is None:
self._activities = ActivityList(self._version, workspace_sid=self._solution['sid'], )
return self._activities | python | def activities(self):
if self._activities is None:
self._activities = ActivityList(self._version, workspace_sid=self._solution['sid'], )
return self._activities | [
"def",
"activities",
"(",
"self",
")",
":",
"if",
"self",
".",
"_activities",
"is",
"None",
":",
"self",
".",
"_activities",
"=",
"ActivityList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
... | Access the activities
:returns: twilio.rest.taskrouter.v1.workspace.activity.ActivityList
:rtype: twilio.rest.taskrouter.v1.workspace.activity.ActivityList | [
"Access",
"the",
"activities"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L333-L342 |
225,313 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceContext.events | def events(self):
"""
Access the events
:returns: twilio.rest.taskrouter.v1.workspace.event.EventList
:rtype: twilio.rest.taskrouter.v1.workspace.event.EventList
"""
if self._events is None:
self._events = EventList(self._version, workspace_sid=self._solution['sid'], )
return self._events | python | def events(self):
if self._events is None:
self._events = EventList(self._version, workspace_sid=self._solution['sid'], )
return self._events | [
"def",
"events",
"(",
"self",
")",
":",
"if",
"self",
".",
"_events",
"is",
"None",
":",
"self",
".",
"_events",
"=",
"EventList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"return... | Access the events
:returns: twilio.rest.taskrouter.v1.workspace.event.EventList
:rtype: twilio.rest.taskrouter.v1.workspace.event.EventList | [
"Access",
"the",
"events"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L345-L354 |
225,314 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceContext.task_queues | def task_queues(self):
"""
Access the task_queues
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList
"""
if self._task_queues is None:
self._task_queues = TaskQueueList(self._version, workspace_sid=self._solution['sid'], )
return self._task_queues | python | def task_queues(self):
if self._task_queues is None:
self._task_queues = TaskQueueList(self._version, workspace_sid=self._solution['sid'], )
return self._task_queues | [
"def",
"task_queues",
"(",
"self",
")",
":",
"if",
"self",
".",
"_task_queues",
"is",
"None",
":",
"self",
".",
"_task_queues",
"=",
"TaskQueueList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",... | Access the task_queues
:returns: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList
:rtype: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueueList | [
"Access",
"the",
"task_queues"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L369-L378 |
225,315 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceContext.workers | def workers(self):
"""
Access the workers
:returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerList
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerList
"""
if self._workers is None:
self._workers = WorkerList(self._version, workspace_sid=self._solution['sid'], )
return self._workers | python | def workers(self):
if self._workers is None:
self._workers = WorkerList(self._version, workspace_sid=self._solution['sid'], )
return self._workers | [
"def",
"workers",
"(",
"self",
")",
":",
"if",
"self",
".",
"_workers",
"is",
"None",
":",
"self",
".",
"_workers",
"=",
"WorkerList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"re... | Access the workers
:returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerList
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerList | [
"Access",
"the",
"workers"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L381-L390 |
225,316 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceContext.workflows | def workflows(self):
"""
Access the workflows
:returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList
"""
if self._workflows is None:
self._workflows = WorkflowList(self._version, workspace_sid=self._solution['sid'], )
return self._workflows | python | def workflows(self):
if self._workflows is None:
self._workflows = WorkflowList(self._version, workspace_sid=self._solution['sid'], )
return self._workflows | [
"def",
"workflows",
"(",
"self",
")",
":",
"if",
"self",
".",
"_workflows",
"is",
"None",
":",
"self",
".",
"_workflows",
"=",
"WorkflowList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")... | Access the workflows
:returns: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList
:rtype: twilio.rest.taskrouter.v1.workspace.workflow.WorkflowList | [
"Access",
"the",
"workflows"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L393-L402 |
225,317 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/__init__.py | WorkspaceContext.task_channels | def task_channels(self):
"""
Access the task_channels
:returns: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList
:rtype: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList
"""
if self._task_channels is None:
self._task_channels = TaskChannelList(self._version, workspace_sid=self._solution['sid'], )
return self._task_channels | python | def task_channels(self):
if self._task_channels is None:
self._task_channels = TaskChannelList(self._version, workspace_sid=self._solution['sid'], )
return self._task_channels | [
"def",
"task_channels",
"(",
"self",
")",
":",
"if",
"self",
".",
"_task_channels",
"is",
"None",
":",
"self",
".",
"_task_channels",
"=",
"TaskChannelList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"... | Access the task_channels
:returns: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList
:rtype: twilio.rest.taskrouter.v1.workspace.task_channel.TaskChannelList | [
"Access",
"the",
"task_channels"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/__init__.py#L447-L456 |
225,318 | twilio/twilio-python | twilio/rest/api/v2010/account/signing_key.py | SigningKeyList.get | def get(self, sid):
"""
Constructs a SigningKeyContext
:param sid: The sid
:returns: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
"""
return SigningKeyContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return SigningKeyContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"SigningKeyContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a SigningKeyContext
:param sid: The sid
:returns: twilio.rest.api.v2010.account.signing_key.SigningKeyContext
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyContext | [
"Constructs",
"a",
"SigningKeyContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/signing_key.py#L117-L126 |
225,319 | twilio/twilio-python | twilio/rest/api/v2010/account/signing_key.py | SigningKeyPage.get_instance | def get_instance(self, payload):
"""
Build an instance of SigningKeyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
"""
return SigningKeyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return SigningKeyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"SigningKeyInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of SigningKeyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance | [
"Build",
"an",
"instance",
"of",
"SigningKeyInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/signing_key.py#L168-L177 |
225,320 | twilio/twilio-python | twilio/rest/api/v2010/account/signing_key.py | SigningKeyContext.update | def update(self, friendly_name=values.unset):
"""
Update the SigningKeyInstance
:param unicode friendly_name: The friendly_name
:returns: Updated SigningKeyInstance
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance
"""
data = values.of({'FriendlyName': friendly_name, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return SigningKeyInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
sid=self._solution['sid'],
) | python | def update(self, friendly_name=values.unset):
data = values.of({'FriendlyName': friendly_name, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return SigningKeyInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
sid=self._solution['sid'],
) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'FriendlyName'",
":",
"friendly_name",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"update",
"(",
... | Update the SigningKeyInstance
:param unicode friendly_name: The friendly_name
:returns: Updated SigningKeyInstance
:rtype: twilio.rest.api.v2010.account.signing_key.SigningKeyInstance | [
"Update",
"the",
"SigningKeyInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/signing_key.py#L231-L253 |
225,321 | twilio/twilio-python | twilio/rest/preview/bulk_exports/export/day.py | DayPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DayInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.bulk_exports.export.day.DayInstance
:rtype: twilio.rest.preview.bulk_exports.export.day.DayInstance
"""
return DayInstance(self._version, payload, resource_type=self._solution['resource_type'], ) | python | def get_instance(self, payload):
return DayInstance(self._version, payload, resource_type=self._solution['resource_type'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DayInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"resource_type",
"=",
"self",
".",
"_solution",
"[",
"'resource_type'",
"]",
",",
")"
] | Build an instance of DayInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.bulk_exports.export.day.DayInstance
:rtype: twilio.rest.preview.bulk_exports.export.day.DayInstance | [
"Build",
"an",
"instance",
"of",
"DayInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/bulk_exports/export/day.py#L149-L158 |
225,322 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/record/this_month.py | ThisMonthPage.get_instance | def get_instance(self, payload):
"""
Build an instance of ThisMonthInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.this_month.ThisMonthInstance
:rtype: twilio.rest.api.v2010.account.usage.record.this_month.ThisMonthInstance
"""
return ThisMonthInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return ThisMonthInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"ThisMonthInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of ThisMonthInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.this_month.ThisMonthInstance
:rtype: twilio.rest.api.v2010.account.usage.record.this_month.ThisMonthInstance | [
"Build",
"an",
"instance",
"of",
"ThisMonthInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/record/this_month.py#L185-L194 |
225,323 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/__init__.py | WorkerList.stream | def stream(self, activity_name=values.unset, activity_sid=values.unset,
available=values.unset, friendly_name=values.unset,
target_workers_expression=values.unset, task_queue_name=values.unset,
task_queue_sid=values.unset, limit=None, page_size=None):
"""
Streams WorkerInstance 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 activity_name: Filter by workers that are in a particular Activity by Friendly Name
:param unicode activity_sid: Filter by workers that are in a particular Activity by SID
:param unicode available: Filter by workers that are available or unavailable.
:param unicode friendly_name: Filter by a worker's friendly name
:param unicode target_workers_expression: Filter by workers that would match an expression on a TaskQueue.
:param unicode task_queue_name: Filter by workers that are eligible for a TaskQueue by Friendly Name
:param unicode task_queue_sid: Filter by workers that are eligible for a TaskQueue by SID
:param int limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param int page_size: Number of records to fetch per request, when not set will use
the default value of 50 records. If no page_size is defined
but a limit is defined, stream() will attempt to read the
limit with the most efficient page size, i.e. min(limit, 1000)
:returns: Generator that will yield up to limit results
:rtype: list[twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
activity_name=activity_name,
activity_sid=activity_sid,
available=available,
friendly_name=friendly_name,
target_workers_expression=target_workers_expression,
task_queue_name=task_queue_name,
task_queue_sid=task_queue_sid,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, activity_name=values.unset, activity_sid=values.unset,
available=values.unset, friendly_name=values.unset,
target_workers_expression=values.unset, task_queue_name=values.unset,
task_queue_sid=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
activity_name=activity_name,
activity_sid=activity_sid,
available=available,
friendly_name=friendly_name,
target_workers_expression=target_workers_expression,
task_queue_name=task_queue_name,
task_queue_sid=task_queue_sid,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"activity_name",
"=",
"values",
".",
"unset",
",",
"activity_sid",
"=",
"values",
".",
"unset",
",",
"available",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"target_workers_expressi... | Streams WorkerInstance 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 activity_name: Filter by workers that are in a particular Activity by Friendly Name
:param unicode activity_sid: Filter by workers that are in a particular Activity by SID
:param unicode available: Filter by workers that are available or unavailable.
:param unicode friendly_name: Filter by a worker's friendly name
:param unicode target_workers_expression: Filter by workers that would match an expression on a TaskQueue.
:param unicode task_queue_name: Filter by workers that are eligible for a TaskQueue by Friendly Name
:param unicode task_queue_sid: Filter by workers that are eligible for a TaskQueue by SID
:param int limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param int page_size: Number of records to fetch per request, when not set will use
the default value of 50 records. If no page_size is defined
but a limit is defined, stream() will attempt to read the
limit with the most efficient page size, i.e. min(limit, 1000)
:returns: Generator that will yield up to limit results
:rtype: list[twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance] | [
"Streams",
"WorkerInstance",
"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/taskrouter/v1/workspace/worker/__init__.py#L45-L85 |
225,324 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/__init__.py | WorkerList.page | def page(self, activity_name=values.unset, activity_sid=values.unset,
available=values.unset, friendly_name=values.unset,
target_workers_expression=values.unset, task_queue_name=values.unset,
task_queue_sid=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of WorkerInstance records from the API.
Request is executed immediately
:param unicode activity_name: Filter by workers that are in a particular Activity by Friendly Name
:param unicode activity_sid: Filter by workers that are in a particular Activity by SID
:param unicode available: Filter by workers that are available or unavailable.
:param unicode friendly_name: Filter by a worker's friendly name
:param unicode target_workers_expression: Filter by workers that would match an expression on a TaskQueue.
:param unicode task_queue_name: Filter by workers that are eligible for a TaskQueue by Friendly Name
:param unicode task_queue_sid: Filter by workers that are eligible for a TaskQueue by SID
: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 WorkerInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerPage
"""
params = values.of({
'ActivityName': activity_name,
'ActivitySid': activity_sid,
'Available': available,
'FriendlyName': friendly_name,
'TargetWorkersExpression': target_workers_expression,
'TaskQueueName': task_queue_name,
'TaskQueueSid': task_queue_sid,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return WorkerPage(self._version, response, self._solution) | python | def page(self, activity_name=values.unset, activity_sid=values.unset,
available=values.unset, friendly_name=values.unset,
target_workers_expression=values.unset, task_queue_name=values.unset,
task_queue_sid=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'ActivityName': activity_name,
'ActivitySid': activity_sid,
'Available': available,
'FriendlyName': friendly_name,
'TargetWorkersExpression': target_workers_expression,
'TaskQueueName': task_queue_name,
'TaskQueueSid': task_queue_sid,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return WorkerPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"activity_name",
"=",
"values",
".",
"unset",
",",
"activity_sid",
"=",
"values",
".",
"unset",
",",
"available",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"target_workers_expression... | Retrieve a single page of WorkerInstance records from the API.
Request is executed immediately
:param unicode activity_name: Filter by workers that are in a particular Activity by Friendly Name
:param unicode activity_sid: Filter by workers that are in a particular Activity by SID
:param unicode available: Filter by workers that are available or unavailable.
:param unicode friendly_name: Filter by a worker's friendly name
:param unicode target_workers_expression: Filter by workers that would match an expression on a TaskQueue.
:param unicode task_queue_name: Filter by workers that are eligible for a TaskQueue by Friendly Name
:param unicode task_queue_sid: Filter by workers that are eligible for a TaskQueue by SID
: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 WorkerInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"WorkerInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/__init__.py#L125-L167 |
225,325 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/__init__.py | WorkerList.create | def create(self, friendly_name, activity_sid=values.unset,
attributes=values.unset):
"""
Create a new WorkerInstance
:param unicode friendly_name: String representing user-friendly name for the Worker.
:param unicode activity_sid: A valid Activity describing the worker's initial state.
:param unicode attributes: JSON object describing this worker.
:returns: Newly created WorkerInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance
"""
data = values.of({
'FriendlyName': friendly_name,
'ActivitySid': activity_sid,
'Attributes': attributes,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return WorkerInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def create(self, friendly_name, activity_sid=values.unset,
attributes=values.unset):
data = values.of({
'FriendlyName': friendly_name,
'ActivitySid': activity_sid,
'Attributes': attributes,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return WorkerInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"friendly_name",
",",
"activity_sid",
"=",
"values",
".",
"unset",
",",
"attributes",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'FriendlyName'",
":",
"friendly_name",
",",
"'Act... | Create a new WorkerInstance
:param unicode friendly_name: String representing user-friendly name for the Worker.
:param unicode activity_sid: A valid Activity describing the worker's initial state.
:param unicode attributes: JSON object describing this worker.
:returns: Newly created WorkerInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance | [
"Create",
"a",
"new",
"WorkerInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/__init__.py#L186-L210 |
225,326 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/__init__.py | WorkerList.get | def get(self, sid):
"""
Constructs a WorkerContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerContext
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerContext
"""
return WorkerContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | python | def get(self, sid):
return WorkerContext(self._version, workspace_sid=self._solution['workspace_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"WorkerContext",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a WorkerContext
:param sid: The sid
:returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerContext
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerContext | [
"Constructs",
"a",
"WorkerContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/__init__.py#L227-L236 |
225,327 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/__init__.py | WorkerPage.get_instance | def get_instance(self, payload):
"""
Build an instance of WorkerInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance
"""
return WorkerInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | python | def get_instance(self, payload):
return WorkerInstance(self._version, payload, workspace_sid=self._solution['workspace_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"WorkerInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'workspace_sid'",
"]",
",",
")"
] | Build an instance of WorkerInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance
:rtype: twilio.rest.taskrouter.v1.workspace.worker.WorkerInstance | [
"Build",
"an",
"instance",
"of",
"WorkerInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/__init__.py#L278-L287 |
225,328 | twilio/twilio-python | twilio/rest/taskrouter/v1/workspace/worker/__init__.py | WorkerContext.worker_channels | def worker_channels(self):
"""
Access the worker_channels
:returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelList
:rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelList
"""
if self._worker_channels is None:
self._worker_channels = WorkerChannelList(
self._version,
workspace_sid=self._solution['workspace_sid'],
worker_sid=self._solution['sid'],
)
return self._worker_channels | python | def worker_channels(self):
if self._worker_channels is None:
self._worker_channels = WorkerChannelList(
self._version,
workspace_sid=self._solution['workspace_sid'],
worker_sid=self._solution['sid'],
)
return self._worker_channels | [
"def",
"worker_channels",
"(",
"self",
")",
":",
"if",
"self",
".",
"_worker_channels",
"is",
"None",
":",
"self",
".",
"_worker_channels",
"=",
"WorkerChannelList",
"(",
"self",
".",
"_version",
",",
"workspace_sid",
"=",
"self",
".",
"_solution",
"[",
"'wo... | Access the worker_channels
:returns: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelList
:rtype: twilio.rest.taskrouter.v1.workspace.worker.worker_channel.WorkerChannelList | [
"Access",
"the",
"worker_channels"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/taskrouter/v1/workspace/worker/__init__.py#L454-L467 |
225,329 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/authorization_document/__init__.py | AuthorizationDocumentList.page | def page(self, email=values.unset, status=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
"""
Retrieve a single page of AuthorizationDocumentInstance records from the API.
Request is executed immediately
:param unicode email: Email.
:param AuthorizationDocumentInstance.Status status: The Status of this AuthorizationDocument.
: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 AuthorizationDocumentInstance
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.AuthorizationDocumentPage
"""
params = values.of({
'Email': email,
'Status': status,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return AuthorizationDocumentPage(self._version, response, self._solution) | python | def page(self, email=values.unset, status=values.unset, page_token=values.unset,
page_number=values.unset, page_size=values.unset):
params = values.of({
'Email': email,
'Status': status,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return AuthorizationDocumentPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"email",
"=",
"values",
".",
"unset",
",",
"status",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
"values",
".",
"unset",
",",
"page_number",
"=",
"values",
".",
"unset",
",",
"page_size",
"=",
"values",
".",
... | Retrieve a single page of AuthorizationDocumentInstance records from the API.
Request is executed immediately
:param unicode email: Email.
:param AuthorizationDocumentInstance.Status status: The Status of this AuthorizationDocument.
: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 AuthorizationDocumentInstance
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.AuthorizationDocumentPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"AuthorizationDocumentInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py#L86-L115 |
225,330 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/authorization_document/__init__.py | AuthorizationDocumentList.create | def create(self, hosted_number_order_sids, address_sid, email, contact_title,
contact_phone_number, cc_emails=values.unset):
"""
Create a new AuthorizationDocumentInstance
:param unicode hosted_number_order_sids: A list of HostedNumberOrder sids.
:param unicode address_sid: Address sid.
:param unicode email: Email.
:param unicode contact_title: Title of signee of this Authorization Document.
:param unicode contact_phone_number: Authorization Document's signee's phone number.
:param unicode cc_emails: A list of emails.
:returns: Newly created AuthorizationDocumentInstance
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.AuthorizationDocumentInstance
"""
data = values.of({
'HostedNumberOrderSids': serialize.map(hosted_number_order_sids, lambda e: e),
'AddressSid': address_sid,
'Email': email,
'ContactTitle': contact_title,
'ContactPhoneNumber': contact_phone_number,
'CcEmails': serialize.map(cc_emails, lambda e: e),
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AuthorizationDocumentInstance(self._version, payload, ) | python | def create(self, hosted_number_order_sids, address_sid, email, contact_title,
contact_phone_number, cc_emails=values.unset):
data = values.of({
'HostedNumberOrderSids': serialize.map(hosted_number_order_sids, lambda e: e),
'AddressSid': address_sid,
'Email': email,
'ContactTitle': contact_title,
'ContactPhoneNumber': contact_phone_number,
'CcEmails': serialize.map(cc_emails, lambda e: e),
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return AuthorizationDocumentInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
",",
"hosted_number_order_sids",
",",
"address_sid",
",",
"email",
",",
"contact_title",
",",
"contact_phone_number",
",",
"cc_emails",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'HostedN... | Create a new AuthorizationDocumentInstance
:param unicode hosted_number_order_sids: A list of HostedNumberOrder sids.
:param unicode address_sid: Address sid.
:param unicode email: Email.
:param unicode contact_title: Title of signee of this Authorization Document.
:param unicode contact_phone_number: Authorization Document's signee's phone number.
:param unicode cc_emails: A list of emails.
:returns: Newly created AuthorizationDocumentInstance
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.AuthorizationDocumentInstance | [
"Create",
"a",
"new",
"AuthorizationDocumentInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py#L134-L164 |
225,331 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/authorization_document/__init__.py | AuthorizationDocumentContext.dependent_hosted_number_orders | def dependent_hosted_number_orders(self):
"""
Access the dependent_hosted_number_orders
:returns: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderList
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderList
"""
if self._dependent_hosted_number_orders is None:
self._dependent_hosted_number_orders = DependentHostedNumberOrderList(
self._version,
signing_document_sid=self._solution['sid'],
)
return self._dependent_hosted_number_orders | python | def dependent_hosted_number_orders(self):
if self._dependent_hosted_number_orders is None:
self._dependent_hosted_number_orders = DependentHostedNumberOrderList(
self._version,
signing_document_sid=self._solution['sid'],
)
return self._dependent_hosted_number_orders | [
"def",
"dependent_hosted_number_orders",
"(",
"self",
")",
":",
"if",
"self",
".",
"_dependent_hosted_number_orders",
"is",
"None",
":",
"self",
".",
"_dependent_hosted_number_orders",
"=",
"DependentHostedNumberOrderList",
"(",
"self",
".",
"_version",
",",
"signing_do... | Access the dependent_hosted_number_orders
:returns: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderList
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderList | [
"Access",
"the",
"dependent_hosted_number_orders"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/authorization_document/__init__.py#L317-L329 |
225,332 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py | IpAccessControlListMappingList.create | def create(self, ip_access_control_list_sid):
"""
Create a new IpAccessControlListMappingInstance
:param unicode ip_access_control_list_sid: The unique id of the IP access control list to map to the SIP domain
:returns: Newly created IpAccessControlListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingInstance
"""
data = values.of({'IpAccessControlListSid': ip_access_control_list_sid, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return IpAccessControlListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_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 IpAccessControlListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_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 IpAccessControlListMappingInstance
:param unicode ip_access_control_list_sid: The unique id of the IP access control list to map to the SIP domain
:returns: Newly created IpAccessControlListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingInstance | [
"Create",
"a",
"new",
"IpAccessControlListMappingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py#L37-L59 |
225,333 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py | IpAccessControlListMappingList.get | def get(self, sid):
"""
Constructs a IpAccessControlListMappingContext
:param sid: A 34 character string that uniquely identifies the resource to fetch.
:returns: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingContext
"""
return IpAccessControlListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | python | def get(self, sid):
return IpAccessControlListMappingContext(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"IpAccessControlListMappingContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
"=",
"self",
".",
"_solution",
"[",... | Constructs a IpAccessControlListMappingContext
:param sid: A 34 character string that uniquely identifies the resource to fetch.
:returns: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingContext
:rtype: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingContext | [
"Constructs",
"a",
"IpAccessControlListMappingContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py#L142-L156 |
225,334 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py | IpAccessControlListMappingPage.get_instance | def get_instance(self, payload):
"""
Build an instance of IpAccessControlListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingInstance
"""
return IpAccessControlListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | python | def get_instance(self, payload):
return IpAccessControlListMappingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['domain_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"IpAccessControlListMappingInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_sid",
"=",
"s... | Build an instance of IpAccessControlListMappingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.ip_access_control_list_mapping.IpAccessControlListMappingInstance | [
"Build",
"an",
"instance",
"of",
"IpAccessControlListMappingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/ip_access_control_list_mapping.py#L204-L218 |
225,335 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.py | DependentHostedNumberOrderList.stream | def stream(self, status=values.unset, phone_number=values.unset,
incoming_phone_number_sid=values.unset, friendly_name=values.unset,
unique_name=values.unset, limit=None, page_size=None):
"""
Streams DependentHostedNumberOrderInstance 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 DependentHostedNumberOrderInstance.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 int limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param int page_size: Number of records to fetch per request, when not set will use
the default value of 50 records. If no page_size is defined
but a limit is defined, stream() will attempt to read the
limit with the most efficient page size, i.e. min(limit, 1000)
:returns: Generator that will yield up to limit results
:rtype: list[twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance]
"""
limits = self._version.read_limits(limit, page_size)
page = self.page(
status=status,
phone_number=phone_number,
incoming_phone_number_sid=incoming_phone_number_sid,
friendly_name=friendly_name,
unique_name=unique_name,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | python | def stream(self, status=values.unset, phone_number=values.unset,
incoming_phone_number_sid=values.unset, friendly_name=values.unset,
unique_name=values.unset, limit=None, page_size=None):
limits = self._version.read_limits(limit, page_size)
page = self.page(
status=status,
phone_number=phone_number,
incoming_phone_number_sid=incoming_phone_number_sid,
friendly_name=friendly_name,
unique_name=unique_name,
page_size=limits['page_size'],
)
return self._version.stream(page, limits['limit'], limits['page_limit']) | [
"def",
"stream",
"(",
"self",
",",
"status",
"=",
"values",
".",
"unset",
",",
"phone_number",
"=",
"values",
".",
"unset",
",",
"incoming_phone_number_sid",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"unique_name",
... | Streams DependentHostedNumberOrderInstance 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 DependentHostedNumberOrderInstance.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 int limit: Upper limit for the number of records to return. stream()
guarantees to never return more than limit. Default is no limit
:param int page_size: Number of records to fetch per request, when not set will use
the default value of 50 records. If no page_size is defined
but a limit is defined, stream() will attempt to read the
limit with the most efficient page size, i.e. min(limit, 1000)
:returns: Generator that will yield up to limit results
:rtype: list[twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance] | [
"Streams",
"DependentHostedNumberOrderInstance",
"records",
"from",
"the",
"API",
"as",
"a",
"generator",
"stream",
".",
"This",
"operation",
"lazily",
"loads",
"records",
"as",
"efficiently",
"as",
"possible",
"until",
"the",
"limit",
"is",
"reached",
".",
"The",... | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.py#L37-L72 |
225,336 | twilio/twilio-python | twilio/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.py | DependentHostedNumberOrderPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DependentHostedNumberOrderInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance
"""
return DependentHostedNumberOrderInstance(
self._version,
payload,
signing_document_sid=self._solution['signing_document_sid'],
) | python | def get_instance(self, payload):
return DependentHostedNumberOrderInstance(
self._version,
payload,
signing_document_sid=self._solution['signing_document_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DependentHostedNumberOrderInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"signing_document_sid",
"=",
"self",
".",
"_solution",
"[",
"'signing_document_sid'",
"]",
",",
")"
] | Build an instance of DependentHostedNumberOrderInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance
:rtype: twilio.rest.preview.hosted_numbers.authorization_document.dependent_hosted_number_order.DependentHostedNumberOrderInstance | [
"Build",
"an",
"instance",
"of",
"DependentHostedNumberOrderInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/hosted_numbers/authorization_document/dependent_hosted_number_order.py#L194-L207 |
225,337 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/origination_url.py | OriginationUrlList.create | def create(self, weight, priority, enabled, friendly_name, sip_url):
"""
Create a new OriginationUrlInstance
:param unicode weight: The value that determines the relative load the URI should receive compared to others with the same priority
:param unicode priority: The relative importance of the URI
:param bool enabled: Whether the URL is enabled
:param unicode friendly_name: A string to describe the resource
:param unicode sip_url: The SIP address you want Twilio to route your Origination calls to
:returns: Newly created OriginationUrlInstance
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
"""
data = values.of({
'Weight': weight,
'Priority': priority,
'Enabled': enabled,
'FriendlyName': friendly_name,
'SipUrl': sip_url,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return OriginationUrlInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | python | def create(self, weight, priority, enabled, friendly_name, sip_url):
data = values.of({
'Weight': weight,
'Priority': priority,
'Enabled': enabled,
'FriendlyName': friendly_name,
'SipUrl': sip_url,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return OriginationUrlInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"weight",
",",
"priority",
",",
"enabled",
",",
"friendly_name",
",",
"sip_url",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Weight'",
":",
"weight",
",",
"'Priority'",
":",
"priority",
",",
"'Enabled'",
"... | Create a new OriginationUrlInstance
:param unicode weight: The value that determines the relative load the URI should receive compared to others with the same priority
:param unicode priority: The relative importance of the URI
:param bool enabled: Whether the URL is enabled
:param unicode friendly_name: A string to describe the resource
:param unicode sip_url: The SIP address you want Twilio to route your Origination calls to
:returns: Newly created OriginationUrlInstance
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance | [
"Create",
"a",
"new",
"OriginationUrlInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/origination_url.py#L36-L63 |
225,338 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/origination_url.py | OriginationUrlList.get | def get(self, sid):
"""
Constructs a OriginationUrlContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlContext
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlContext
"""
return OriginationUrlContext(self._version, trunk_sid=self._solution['trunk_sid'], sid=sid, ) | python | def get(self, sid):
return OriginationUrlContext(self._version, trunk_sid=self._solution['trunk_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"OriginationUrlContext",
"(",
"self",
".",
"_version",
",",
"trunk_sid",
"=",
"self",
".",
"_solution",
"[",
"'trunk_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a OriginationUrlContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlContext
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlContext | [
"Constructs",
"a",
"OriginationUrlContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/origination_url.py#L146-L155 |
225,339 | twilio/twilio-python | twilio/rest/trunking/v1/trunk/origination_url.py | OriginationUrlPage.get_instance | def get_instance(self, payload):
"""
Build an instance of OriginationUrlInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
"""
return OriginationUrlInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | python | def get_instance(self, payload):
return OriginationUrlInstance(self._version, payload, trunk_sid=self._solution['trunk_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"OriginationUrlInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"trunk_sid",
"=",
"self",
".",
"_solution",
"[",
"'trunk_sid'",
"]",
",",
")"
] | Build an instance of OriginationUrlInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance
:rtype: twilio.rest.trunking.v1.trunk.origination_url.OriginationUrlInstance | [
"Build",
"an",
"instance",
"of",
"OriginationUrlInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/trunking/v1/trunk/origination_url.py#L197-L206 |
225,340 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/__init__.py | FunctionList.get | def get(self, sid):
"""
Constructs a FunctionContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.function.FunctionContext
:rtype: twilio.rest.serverless.v1.service.function.FunctionContext
"""
return FunctionContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return FunctionContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"FunctionContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a FunctionContext
:param sid: The sid
:returns: twilio.rest.serverless.v1.service.function.FunctionContext
:rtype: twilio.rest.serverless.v1.service.function.FunctionContext | [
"Constructs",
"a",
"FunctionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/__init__.py#L139-L148 |
225,341 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/__init__.py | FunctionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of FunctionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.function.FunctionInstance
:rtype: twilio.rest.serverless.v1.service.function.FunctionInstance
"""
return FunctionInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return FunctionInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"FunctionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of FunctionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.serverless.v1.service.function.FunctionInstance
:rtype: twilio.rest.serverless.v1.service.function.FunctionInstance | [
"Build",
"an",
"instance",
"of",
"FunctionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/__init__.py#L192-L201 |
225,342 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/__init__.py | FunctionContext.update | def update(self, friendly_name):
"""
Update the FunctionInstance
:param unicode friendly_name: The friendly_name
:returns: Updated FunctionInstance
:rtype: twilio.rest.serverless.v1.service.function.FunctionInstance
"""
data = values.of({'FriendlyName': friendly_name, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return FunctionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
sid=self._solution['sid'],
) | python | def update(self, friendly_name):
data = values.of({'FriendlyName': friendly_name, })
payload = self._version.update(
'POST',
self._uri,
data=data,
)
return FunctionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
sid=self._solution['sid'],
) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'FriendlyName'",
":",
"friendly_name",
",",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"update",
"(",
"'POST'",
",",
"self",
".",
... | Update the FunctionInstance
:param unicode friendly_name: The friendly_name
:returns: Updated FunctionInstance
:rtype: twilio.rest.serverless.v1.service.function.FunctionInstance | [
"Update",
"the",
"FunctionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/__init__.py#L260-L282 |
225,343 | twilio/twilio-python | twilio/rest/serverless/v1/service/function/__init__.py | FunctionContext.function_versions | def function_versions(self):
"""
Access the function_versions
:returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionList
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionList
"""
if self._function_versions is None:
self._function_versions = FunctionVersionList(
self._version,
service_sid=self._solution['service_sid'],
function_sid=self._solution['sid'],
)
return self._function_versions | python | def function_versions(self):
if self._function_versions is None:
self._function_versions = FunctionVersionList(
self._version,
service_sid=self._solution['service_sid'],
function_sid=self._solution['sid'],
)
return self._function_versions | [
"def",
"function_versions",
"(",
"self",
")",
":",
"if",
"self",
".",
"_function_versions",
"is",
"None",
":",
"self",
".",
"_function_versions",
"=",
"FunctionVersionList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
... | Access the function_versions
:returns: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionList
:rtype: twilio.rest.serverless.v1.service.function.function_version.FunctionVersionList | [
"Access",
"the",
"function_versions"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/serverless/v1/service/function/__init__.py#L285-L298 |
225,344 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/record/daily.py | DailyList.page | def page(self, category=values.unset, start_date=values.unset,
end_date=values.unset, include_subaccounts=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of DailyInstance records from the API.
Request is executed immediately
:param DailyInstance.Category category: The usage category of the UsageRecord resources to read
:param date start_date: Only include usage that has occurred on or after this date
:param date end_date: Only include usage that occurred on or before this date
:param bool include_subaccounts: Whether to include usage from the master account and all its subaccounts
: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 DailyInstance
:rtype: twilio.rest.api.v2010.account.usage.record.daily.DailyPage
"""
params = values.of({
'Category': category,
'StartDate': serialize.iso8601_date(start_date),
'EndDate': serialize.iso8601_date(end_date),
'IncludeSubaccounts': include_subaccounts,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return DailyPage(self._version, response, self._solution) | python | def page(self, category=values.unset, start_date=values.unset,
end_date=values.unset, include_subaccounts=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'Category': category,
'StartDate': serialize.iso8601_date(start_date),
'EndDate': serialize.iso8601_date(end_date),
'IncludeSubaccounts': include_subaccounts,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return DailyPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"category",
"=",
"values",
".",
"unset",
",",
"start_date",
"=",
"values",
".",
"unset",
",",
"end_date",
"=",
"values",
".",
"unset",
",",
"include_subaccounts",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
"valu... | Retrieve a single page of DailyInstance records from the API.
Request is executed immediately
:param DailyInstance.Category category: The usage category of the UsageRecord resources to read
:param date start_date: Only include usage that has occurred on or after this date
:param date end_date: Only include usage that occurred on or before this date
:param bool include_subaccounts: Whether to include usage from the master account and all its subaccounts
: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 DailyInstance
:rtype: twilio.rest.api.v2010.account.usage.record.daily.DailyPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"DailyInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/record/daily.py#L102-L137 |
225,345 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/record/daily.py | DailyPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DailyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.daily.DailyInstance
:rtype: twilio.rest.api.v2010.account.usage.record.daily.DailyInstance
"""
return DailyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return DailyInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DailyInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of DailyInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.daily.DailyInstance
:rtype: twilio.rest.api.v2010.account.usage.record.daily.DailyInstance | [
"Build",
"an",
"instance",
"of",
"DailyInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/record/daily.py#L185-L194 |
225,346 | twilio/twilio-python | twilio/rest/api/v2010/account/message/media.py | MediaList.get | def get(self, sid):
"""
Constructs a MediaContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.message.media.MediaContext
:rtype: twilio.rest.api.v2010.account.message.media.MediaContext
"""
return MediaContext(
self._version,
account_sid=self._solution['account_sid'],
message_sid=self._solution['message_sid'],
sid=sid,
) | python | def get(self, sid):
return MediaContext(
self._version,
account_sid=self._solution['account_sid'],
message_sid=self._solution['message_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"MediaContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"message_sid",
"=",
"self",
".",
"_solution",
"[",
"'message_sid'",
... | Constructs a MediaContext
:param sid: The unique string that identifies this resource
:returns: twilio.rest.api.v2010.account.message.media.MediaContext
:rtype: twilio.rest.api.v2010.account.message.media.MediaContext | [
"Constructs",
"a",
"MediaContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/message/media.py#L149-L163 |
225,347 | twilio/twilio-python | twilio/rest/api/v2010/account/message/media.py | MediaPage.get_instance | def get_instance(self, payload):
"""
Build an instance of MediaInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.message.media.MediaInstance
:rtype: twilio.rest.api.v2010.account.message.media.MediaInstance
"""
return MediaInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
message_sid=self._solution['message_sid'],
) | python | def get_instance(self, payload):
return MediaInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
message_sid=self._solution['message_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"MediaInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"message_sid",
"=",
"self",
".",
"_sol... | Build an instance of MediaInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.message.media.MediaInstance
:rtype: twilio.rest.api.v2010.account.message.media.MediaInstance | [
"Build",
"an",
"instance",
"of",
"MediaInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/message/media.py#L211-L225 |
225,348 | twilio/twilio-python | twilio/rest/api/v2010/account/message/media.py | MediaContext.fetch | def fetch(self):
"""
Fetch a MediaInstance
:returns: Fetched MediaInstance
:rtype: twilio.rest.api.v2010.account.message.media.MediaInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return MediaInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
message_sid=self._solution['message_sid'],
sid=self._solution['sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return MediaInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
message_sid=self._solution['message_sid'],
sid=self._solution['sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Media... | Fetch a MediaInstance
:returns: Fetched MediaInstance
:rtype: twilio.rest.api.v2010.account.message.media.MediaInstance | [
"Fetch",
"a",
"MediaInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/message/media.py#L267-L288 |
225,349 | twilio/twilio-python | twilio/rest/preview/deployed_devices/fleet/__init__.py | FleetContext.devices | def devices(self):
"""
Access the devices
:returns: twilio.rest.preview.deployed_devices.fleet.device.DeviceList
:rtype: twilio.rest.preview.deployed_devices.fleet.device.DeviceList
"""
if self._devices is None:
self._devices = DeviceList(self._version, fleet_sid=self._solution['sid'], )
return self._devices | python | def devices(self):
if self._devices is None:
self._devices = DeviceList(self._version, fleet_sid=self._solution['sid'], )
return self._devices | [
"def",
"devices",
"(",
"self",
")",
":",
"if",
"self",
".",
"_devices",
"is",
"None",
":",
"self",
".",
"_devices",
"=",
"DeviceList",
"(",
"self",
".",
"_version",
",",
"fleet_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"return... | Access the devices
:returns: twilio.rest.preview.deployed_devices.fleet.device.DeviceList
:rtype: twilio.rest.preview.deployed_devices.fleet.device.DeviceList | [
"Access",
"the",
"devices"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/deployed_devices/fleet/__init__.py#L289-L298 |
225,350 | twilio/twilio-python | twilio/rest/preview/deployed_devices/fleet/__init__.py | FleetContext.certificates | def certificates(self):
"""
Access the certificates
:returns: twilio.rest.preview.deployed_devices.fleet.certificate.CertificateList
:rtype: twilio.rest.preview.deployed_devices.fleet.certificate.CertificateList
"""
if self._certificates is None:
self._certificates = CertificateList(self._version, fleet_sid=self._solution['sid'], )
return self._certificates | python | def certificates(self):
if self._certificates is None:
self._certificates = CertificateList(self._version, fleet_sid=self._solution['sid'], )
return self._certificates | [
"def",
"certificates",
"(",
"self",
")",
":",
"if",
"self",
".",
"_certificates",
"is",
"None",
":",
"self",
".",
"_certificates",
"=",
"CertificateList",
"(",
"self",
".",
"_version",
",",
"fleet_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
"... | Access the certificates
:returns: twilio.rest.preview.deployed_devices.fleet.certificate.CertificateList
:rtype: twilio.rest.preview.deployed_devices.fleet.certificate.CertificateList | [
"Access",
"the",
"certificates"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/deployed_devices/fleet/__init__.py#L313-L322 |
225,351 | twilio/twilio-python | twilio/rest/preview/deployed_devices/fleet/__init__.py | FleetInstance.update | def update(self, friendly_name=values.unset,
default_deployment_sid=values.unset):
"""
Update the FleetInstance
:param unicode friendly_name: A human readable description for this Fleet.
:param unicode default_deployment_sid: A default Deployment SID.
:returns: Updated FleetInstance
:rtype: twilio.rest.preview.deployed_devices.fleet.FleetInstance
"""
return self._proxy.update(
friendly_name=friendly_name,
default_deployment_sid=default_deployment_sid,
) | python | def update(self, friendly_name=values.unset,
default_deployment_sid=values.unset):
return self._proxy.update(
friendly_name=friendly_name,
default_deployment_sid=default_deployment_sid,
) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"default_deployment_sid",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"friendly_name",
"=",
"friendly_name",
",",
"default_d... | Update the FleetInstance
:param unicode friendly_name: A human readable description for this Fleet.
:param unicode default_deployment_sid: A default Deployment SID.
:returns: Updated FleetInstance
:rtype: twilio.rest.preview.deployed_devices.fleet.FleetInstance | [
"Update",
"the",
"FleetInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/deployed_devices/fleet/__init__.py#L481-L495 |
225,352 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/__init__.py | DomainList.create | def create(self, domain_name, friendly_name=values.unset,
voice_url=values.unset, voice_method=values.unset,
voice_fallback_url=values.unset, voice_fallback_method=values.unset,
voice_status_callback_url=values.unset,
voice_status_callback_method=values.unset,
sip_registration=values.unset):
"""
Create a new DomainInstance
:param unicode domain_name: The unique address on Twilio to route SIP traffic
:param unicode friendly_name: A string to describe the resource
:param unicode voice_url: The URL we should call when receiving a call
:param unicode voice_method: The HTTP method to use with voice_url
:param unicode voice_fallback_url: The URL we should call when an error occurs in executing TwiML
:param unicode voice_fallback_method: The HTTP method to use with voice_fallback_url
:param unicode voice_status_callback_url: The URL that we should call to pass status updates
:param unicode voice_status_callback_method: The HTTP method we should use to call `voice_status_callback_url`
:param bool sip_registration: Whether SIP registration is allowed
:returns: Newly created DomainInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainInstance
"""
data = values.of({
'DomainName': domain_name,
'FriendlyName': friendly_name,
'VoiceUrl': voice_url,
'VoiceMethod': voice_method,
'VoiceFallbackUrl': voice_fallback_url,
'VoiceFallbackMethod': voice_fallback_method,
'VoiceStatusCallbackUrl': voice_status_callback_url,
'VoiceStatusCallbackMethod': voice_status_callback_method,
'SipRegistration': sip_registration,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return DomainInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def create(self, domain_name, friendly_name=values.unset,
voice_url=values.unset, voice_method=values.unset,
voice_fallback_url=values.unset, voice_fallback_method=values.unset,
voice_status_callback_url=values.unset,
voice_status_callback_method=values.unset,
sip_registration=values.unset):
data = values.of({
'DomainName': domain_name,
'FriendlyName': friendly_name,
'VoiceUrl': voice_url,
'VoiceMethod': voice_method,
'VoiceFallbackUrl': voice_fallback_url,
'VoiceFallbackMethod': voice_fallback_method,
'VoiceStatusCallbackUrl': voice_status_callback_url,
'VoiceStatusCallbackMethod': voice_status_callback_method,
'SipRegistration': sip_registration,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return DomainInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"domain_name",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"voice_url",
"=",
"values",
".",
"unset",
",",
"voice_method",
"=",
"values",
".",
"unset",
",",
"voice_fallback_url",
"=",
"values",
".",
"unset",
",... | Create a new DomainInstance
:param unicode domain_name: The unique address on Twilio to route SIP traffic
:param unicode friendly_name: A string to describe the resource
:param unicode voice_url: The URL we should call when receiving a call
:param unicode voice_method: The HTTP method to use with voice_url
:param unicode voice_fallback_url: The URL we should call when an error occurs in executing TwiML
:param unicode voice_fallback_method: The HTTP method to use with voice_fallback_url
:param unicode voice_status_callback_url: The URL that we should call to pass status updates
:param unicode voice_status_callback_method: The HTTP method we should use to call `voice_status_callback_url`
:param bool sip_registration: Whether SIP registration is allowed
:returns: Newly created DomainInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainInstance | [
"Create",
"a",
"new",
"DomainInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/__init__.py#L120-L160 |
225,353 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/__init__.py | DomainList.get | def get(self, sid):
"""
Constructs a DomainContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.DomainContext
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainContext
"""
return DomainContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return DomainContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"DomainContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a DomainContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.sip.domain.DomainContext
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainContext | [
"Constructs",
"a",
"DomainContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/__init__.py#L162-L171 |
225,354 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/__init__.py | DomainPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DomainInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.DomainInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainInstance
"""
return DomainInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return DomainInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DomainInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of DomainInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.domain.DomainInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainInstance | [
"Build",
"an",
"instance",
"of",
"DomainInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/__init__.py#L213-L222 |
225,355 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/__init__.py | DomainContext.auth | def auth(self):
"""
Access the auth
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesList
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesList
"""
if self._auth is None:
self._auth = AuthTypesList(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['sid'],
)
return self._auth | python | def auth(self):
if self._auth is None:
self._auth = AuthTypesList(
self._version,
account_sid=self._solution['account_sid'],
domain_sid=self._solution['sid'],
)
return self._auth | [
"def",
"auth",
"(",
"self",
")",
":",
"if",
"self",
".",
"_auth",
"is",
"None",
":",
"self",
".",
"_auth",
"=",
"AuthTypesList",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"domain_si... | Access the auth
:returns: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesList
:rtype: twilio.rest.api.v2010.account.sip.domain.auth_types.AuthTypesList | [
"Access",
"the",
"auth"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/__init__.py#L369-L382 |
225,356 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/domain/__init__.py | DomainInstance.update | def update(self, friendly_name=values.unset, voice_fallback_method=values.unset,
voice_fallback_url=values.unset, voice_method=values.unset,
voice_status_callback_method=values.unset,
voice_status_callback_url=values.unset, voice_url=values.unset,
sip_registration=values.unset, domain_name=values.unset):
"""
Update the DomainInstance
:param unicode friendly_name: A string to describe the resource
:param unicode voice_fallback_method: The HTTP method used with voice_fallback_url
:param unicode voice_fallback_url: The URL we should call when an error occurs in executing TwiML
:param unicode voice_method: The HTTP method we should use with voice_url
:param unicode voice_status_callback_method: The HTTP method we should use to call voice_status_callback_url
:param unicode voice_status_callback_url: The URL that we should call to pass status updates
:param unicode voice_url: The URL we should call when receiving a call
:param bool sip_registration: Whether SIP registration is allowed
:param unicode domain_name: The unique address on Twilio to route SIP traffic
:returns: Updated DomainInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainInstance
"""
return self._proxy.update(
friendly_name=friendly_name,
voice_fallback_method=voice_fallback_method,
voice_fallback_url=voice_fallback_url,
voice_method=voice_method,
voice_status_callback_method=voice_status_callback_method,
voice_status_callback_url=voice_status_callback_url,
voice_url=voice_url,
sip_registration=sip_registration,
domain_name=domain_name,
) | python | def update(self, friendly_name=values.unset, voice_fallback_method=values.unset,
voice_fallback_url=values.unset, voice_method=values.unset,
voice_status_callback_method=values.unset,
voice_status_callback_url=values.unset, voice_url=values.unset,
sip_registration=values.unset, domain_name=values.unset):
return self._proxy.update(
friendly_name=friendly_name,
voice_fallback_method=voice_fallback_method,
voice_fallback_url=voice_fallback_url,
voice_method=voice_method,
voice_status_callback_method=voice_status_callback_method,
voice_status_callback_url=voice_status_callback_url,
voice_url=voice_url,
sip_registration=sip_registration,
domain_name=domain_name,
) | [
"def",
"update",
"(",
"self",
",",
"friendly_name",
"=",
"values",
".",
"unset",
",",
"voice_fallback_method",
"=",
"values",
".",
"unset",
",",
"voice_fallback_url",
"=",
"values",
".",
"unset",
",",
"voice_method",
"=",
"values",
".",
"unset",
",",
"voice_... | Update the DomainInstance
:param unicode friendly_name: A string to describe the resource
:param unicode voice_fallback_method: The HTTP method used with voice_fallback_url
:param unicode voice_fallback_url: The URL we should call when an error occurs in executing TwiML
:param unicode voice_method: The HTTP method we should use with voice_url
:param unicode voice_status_callback_method: The HTTP method we should use to call voice_status_callback_url
:param unicode voice_status_callback_url: The URL that we should call to pass status updates
:param unicode voice_url: The URL we should call when receiving a call
:param bool sip_registration: Whether SIP registration is allowed
:param unicode domain_name: The unique address on Twilio to route SIP traffic
:returns: Updated DomainInstance
:rtype: twilio.rest.api.v2010.account.sip.domain.DomainInstance | [
"Update",
"the",
"DomainInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/domain/__init__.py#L594-L625 |
225,357 | twilio/twilio-python | twilio/rest/preview/sync/service/sync_list/sync_list_item.py | SyncListItemList.page | def page(self, order=values.unset, from_=values.unset, bounds=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
"""
Retrieve a single page of SyncListItemInstance records from the API.
Request is executed immediately
:param SyncListItemInstance.QueryResultOrder order: The order
:param unicode from_: The from
:param SyncListItemInstance.QueryFromBoundType bounds: The bounds
: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 SyncListItemInstance
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemPage
"""
params = values.of({
'Order': order,
'From': from_,
'Bounds': bounds,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SyncListItemPage(self._version, response, self._solution) | python | def page(self, order=values.unset, from_=values.unset, bounds=values.unset,
page_token=values.unset, page_number=values.unset,
page_size=values.unset):
params = values.of({
'Order': order,
'From': from_,
'Bounds': bounds,
'PageToken': page_token,
'Page': page_number,
'PageSize': page_size,
})
response = self._version.page(
'GET',
self._uri,
params=params,
)
return SyncListItemPage(self._version, response, self._solution) | [
"def",
"page",
"(",
"self",
",",
"order",
"=",
"values",
".",
"unset",
",",
"from_",
"=",
"values",
".",
"unset",
",",
"bounds",
"=",
"values",
".",
"unset",
",",
"page_token",
"=",
"values",
".",
"unset",
",",
"page_number",
"=",
"values",
".",
"uns... | Retrieve a single page of SyncListItemInstance records from the API.
Request is executed immediately
:param SyncListItemInstance.QueryResultOrder order: The order
:param unicode from_: The from
:param SyncListItemInstance.QueryFromBoundType bounds: The bounds
: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 SyncListItemInstance
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemPage | [
"Retrieve",
"a",
"single",
"page",
"of",
"SyncListItemInstance",
"records",
"from",
"the",
"API",
".",
"Request",
"is",
"executed",
"immediately"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/sync_list/sync_list_item.py#L113-L145 |
225,358 | twilio/twilio-python | twilio/rest/preview/sync/service/sync_list/sync_list_item.py | SyncListItemList.get | def get(self, index):
"""
Constructs a SyncListItemContext
:param index: The index
:returns: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemContext
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemContext
"""
return SyncListItemContext(
self._version,
service_sid=self._solution['service_sid'],
list_sid=self._solution['list_sid'],
index=index,
) | python | def get(self, index):
return SyncListItemContext(
self._version,
service_sid=self._solution['service_sid'],
list_sid=self._solution['list_sid'],
index=index,
) | [
"def",
"get",
"(",
"self",
",",
"index",
")",
":",
"return",
"SyncListItemContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"list_sid",
"=",
"self",
".",
"_solution",
"[",
"'list_sid'... | Constructs a SyncListItemContext
:param index: The index
:returns: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemContext
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemContext | [
"Constructs",
"a",
"SyncListItemContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/sync_list/sync_list_item.py#L164-L178 |
225,359 | twilio/twilio-python | twilio/rest/preview/sync/service/sync_list/sync_list_item.py | SyncListItemPage.get_instance | def get_instance(self, payload):
"""
Build an instance of SyncListItemInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance
"""
return SyncListItemInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
list_sid=self._solution['list_sid'],
) | python | def get_instance(self, payload):
return SyncListItemInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
list_sid=self._solution['list_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"SyncListItemInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"list_sid",
"=",
"self",
".",
"... | Build an instance of SyncListItemInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance | [
"Build",
"an",
"instance",
"of",
"SyncListItemInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/sync_list/sync_list_item.py#L228-L242 |
225,360 | twilio/twilio-python | twilio/rest/preview/sync/service/sync_list/sync_list_item.py | SyncListItemContext.fetch | def fetch(self):
"""
Fetch a SyncListItemInstance
:returns: Fetched SyncListItemInstance
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return SyncListItemInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
list_sid=self._solution['list_sid'],
index=self._solution['index'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return SyncListItemInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
list_sid=self._solution['list_sid'],
index=self._solution['index'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"SyncL... | Fetch a SyncListItemInstance
:returns: Fetched SyncListItemInstance
:rtype: twilio.rest.preview.sync.service.sync_list.sync_list_item.SyncListItemInstance | [
"Fetch",
"a",
"SyncListItemInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/sync_list/sync_list_item.py#L277-L298 |
225,361 | twilio/twilio-python | twilio/rest/api/v2010/account/balance.py | BalanceList.fetch | def fetch(self):
"""
Fetch a BalanceInstance
:returns: Fetched BalanceInstance
:rtype: twilio.rest.api.v2010.account.balance.BalanceInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return BalanceInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return BalanceInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Balan... | Fetch a BalanceInstance
:returns: Fetched BalanceInstance
:rtype: twilio.rest.api.v2010.account.balance.BalanceInstance | [
"Fetch",
"a",
"BalanceInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/balance.py#L34-L49 |
225,362 | twilio/twilio-python | twilio/rest/api/v2010/account/balance.py | BalancePage.get_instance | def get_instance(self, payload):
"""
Build an instance of BalanceInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.balance.BalanceInstance
:rtype: twilio.rest.api.v2010.account.balance.BalanceInstance
"""
return BalanceInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return BalanceInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"BalanceInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of BalanceInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.balance.BalanceInstance
:rtype: twilio.rest.api.v2010.account.balance.BalanceInstance | [
"Build",
"an",
"instance",
"of",
"BalanceInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/balance.py#L80-L89 |
225,363 | twilio/twilio-python | twilio/rest/api/v2010/account/call/recording.py | RecordingList.create | def create(self, recording_status_callback_event=values.unset,
recording_status_callback=values.unset,
recording_status_callback_method=values.unset, trim=values.unset,
recording_channels=values.unset):
"""
Create a new RecordingInstance
:param unicode recording_status_callback_event: The recording status changes that should generate a callback
:param unicode recording_status_callback: The callback URL on each selected recording event
:param unicode recording_status_callback_method: The HTTP method we should use to call `recording_status_callback`
:param unicode trim: Whether to trim the silence in the recording
:param unicode recording_channels: The number of channels that the output recording will be configured with
:returns: Newly created RecordingInstance
:rtype: twilio.rest.api.v2010.account.call.recording.RecordingInstance
"""
data = values.of({
'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e),
'RecordingStatusCallback': recording_status_callback,
'RecordingStatusCallbackMethod': recording_status_callback_method,
'Trim': trim,
'RecordingChannels': recording_channels,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return RecordingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | python | def create(self, recording_status_callback_event=values.unset,
recording_status_callback=values.unset,
recording_status_callback_method=values.unset, trim=values.unset,
recording_channels=values.unset):
data = values.of({
'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e),
'RecordingStatusCallback': recording_status_callback,
'RecordingStatusCallbackMethod': recording_status_callback_method,
'Trim': trim,
'RecordingChannels': recording_channels,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return RecordingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | [
"def",
"create",
"(",
"self",
",",
"recording_status_callback_event",
"=",
"values",
".",
"unset",
",",
"recording_status_callback",
"=",
"values",
".",
"unset",
",",
"recording_status_callback_method",
"=",
"values",
".",
"unset",
",",
"trim",
"=",
"values",
".",... | Create a new RecordingInstance
:param unicode recording_status_callback_event: The recording status changes that should generate a callback
:param unicode recording_status_callback: The callback URL on each selected recording event
:param unicode recording_status_callback_method: The HTTP method we should use to call `recording_status_callback`
:param unicode trim: Whether to trim the silence in the recording
:param unicode recording_channels: The number of channels that the output recording will be configured with
:returns: Newly created RecordingInstance
:rtype: twilio.rest.api.v2010.account.call.recording.RecordingInstance | [
"Create",
"a",
"new",
"RecordingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/recording.py#L38-L73 |
225,364 | twilio/twilio-python | twilio/rest/api/v2010/account/call/recording.py | RecordingPage.get_instance | def get_instance(self, payload):
"""
Build an instance of RecordingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.call.recording.RecordingInstance
:rtype: twilio.rest.api.v2010.account.call.recording.RecordingInstance
"""
return RecordingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | python | def get_instance(self, payload):
return RecordingInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"RecordingInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"call_sid",
"=",
"self",
".",
"_so... | Build an instance of RecordingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.call.recording.RecordingInstance
:rtype: twilio.rest.api.v2010.account.call.recording.RecordingInstance | [
"Build",
"an",
"instance",
"of",
"RecordingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/recording.py#L248-L262 |
225,365 | twilio/twilio-python | twilio/rest/api/v2010/account/recording/transcription.py | TranscriptionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of TranscriptionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.recording.transcription.TranscriptionInstance
:rtype: twilio.rest.api.v2010.account.recording.transcription.TranscriptionInstance
"""
return TranscriptionInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
recording_sid=self._solution['recording_sid'],
) | python | def get_instance(self, payload):
return TranscriptionInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
recording_sid=self._solution['recording_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"TranscriptionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"recording_sid",
"=",
"self",
".... | Build an instance of TranscriptionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.recording.transcription.TranscriptionInstance
:rtype: twilio.rest.api.v2010.account.recording.transcription.TranscriptionInstance | [
"Build",
"an",
"instance",
"of",
"TranscriptionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/recording/transcription.py#L180-L194 |
225,366 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/model_build.py | ModelBuildList.create | def create(self, status_callback=values.unset, unique_name=values.unset):
"""
Create a new ModelBuildInstance
:param unicode status_callback: The URL we should call using a POST method to send status information to your application
:param unicode unique_name: An application-defined string that uniquely identifies the new resource
:returns: Newly created ModelBuildInstance
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
"""
data = values.of({'StatusCallback': status_callback, 'UniqueName': unique_name, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ModelBuildInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | def create(self, status_callback=values.unset, unique_name=values.unset):
data = values.of({'StatusCallback': status_callback, 'UniqueName': unique_name, })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ModelBuildInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"status_callback",
"=",
"values",
".",
"unset",
",",
"unique_name",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'StatusCallback'",
":",
"status_callback",
",",
"'UniqueName'",
":",
... | Create a new ModelBuildInstance
:param unicode status_callback: The URL we should call using a POST method to send status information to your application
:param unicode unique_name: An application-defined string that uniquely identifies the new resource
:returns: Newly created ModelBuildInstance
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance | [
"Create",
"a",
"new",
"ModelBuildInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/model_build.py#L119-L137 |
225,367 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/model_build.py | ModelBuildList.get | def get(self, sid):
"""
Constructs a ModelBuildContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildContext
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildContext
"""
return ModelBuildContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, ) | python | def get(self, sid):
return ModelBuildContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"ModelBuildContext",
"(",
"self",
".",
"_version",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a ModelBuildContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildContext
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildContext | [
"Constructs",
"a",
"ModelBuildContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/model_build.py#L139-L148 |
225,368 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/model_build.py | ModelBuildPage.get_instance | def get_instance(self, payload):
"""
Build an instance of ModelBuildInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
"""
return ModelBuildInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | python | def get_instance(self, payload):
return ModelBuildInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"ModelBuildInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"assistant_sid",
"=",
"self",
".",
"_solution",
"[",
"'assistant_sid'",
"]",
",",
")"
] | Build an instance of ModelBuildInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance | [
"Build",
"an",
"instance",
"of",
"ModelBuildInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/model_build.py#L192-L201 |
225,369 | twilio/twilio-python | twilio/rest/autopilot/v1/assistant/model_build.py | ModelBuildInstance.update | def update(self, unique_name=values.unset):
"""
Update the ModelBuildInstance
:param unicode unique_name: An application-defined string that uniquely identifies the resource
:returns: Updated ModelBuildInstance
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance
"""
return self._proxy.update(unique_name=unique_name, ) | python | def update(self, unique_name=values.unset):
return self._proxy.update(unique_name=unique_name, ) | [
"def",
"update",
"(",
"self",
",",
"unique_name",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"unique_name",
"=",
"unique_name",
",",
")"
] | Update the ModelBuildInstance
:param unicode unique_name: An application-defined string that uniquely identifies the resource
:returns: Updated ModelBuildInstance
:rtype: twilio.rest.autopilot.v1.assistant.model_build.ModelBuildInstance | [
"Update",
"the",
"ModelBuildInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/autopilot/v1/assistant/model_build.py#L446-L455 |
225,370 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/credential_list/credential.py | CredentialList.get | def get(self, sid):
"""
Constructs a CredentialContext
:param sid: The unique id that identifies the resource to fetch.
:returns: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialContext
:rtype: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialContext
"""
return CredentialContext(
self._version,
account_sid=self._solution['account_sid'],
credential_list_sid=self._solution['credential_list_sid'],
sid=sid,
) | python | def get(self, sid):
return CredentialContext(
self._version,
account_sid=self._solution['account_sid'],
credential_list_sid=self._solution['credential_list_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"CredentialContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"credential_list_sid",
"=",
"self",
".",
"_solution",
"[",
"'cr... | Constructs a CredentialContext
:param sid: The unique id that identifies the resource to fetch.
:returns: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialContext
:rtype: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialContext | [
"Constructs",
"a",
"CredentialContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/credential_list/credential.py#L143-L157 |
225,371 | twilio/twilio-python | twilio/rest/api/v2010/account/sip/credential_list/credential.py | CredentialPage.get_instance | def get_instance(self, payload):
"""
Build an instance of CredentialInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialInstance
:rtype: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialInstance
"""
return CredentialInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
credential_list_sid=self._solution['credential_list_sid'],
) | python | def get_instance(self, payload):
return CredentialInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
credential_list_sid=self._solution['credential_list_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"CredentialInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"credential_list_sid",
"=",
"self",
... | Build an instance of CredentialInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialInstance
:rtype: twilio.rest.api.v2010.account.sip.credential_list.credential.CredentialInstance | [
"Build",
"an",
"instance",
"of",
"CredentialInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/sip/credential_list/credential.py#L205-L219 |
225,372 | twilio/twilio-python | twilio/rest/api/v2010/account/call/feedback_summary.py | FeedbackSummaryList.create | def create(self, start_date, end_date, include_subaccounts=values.unset,
status_callback=values.unset, status_callback_method=values.unset):
"""
Create a new FeedbackSummaryInstance
:param date start_date: Only include feedback given on or after this date
:param date end_date: Only include feedback given on or before this date
:param bool include_subaccounts: `true` includes feedback from the specified account and its subaccounts
:param unicode status_callback: The URL that we will request when the feedback summary is complete
:param unicode status_callback_method: The HTTP method we use to make requests to the StatusCallback URL
:returns: Newly created FeedbackSummaryInstance
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
"""
data = values.of({
'StartDate': serialize.iso8601_date(start_date),
'EndDate': serialize.iso8601_date(end_date),
'IncludeSubaccounts': include_subaccounts,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FeedbackSummaryInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def create(self, start_date, end_date, include_subaccounts=values.unset,
status_callback=values.unset, status_callback_method=values.unset):
data = values.of({
'StartDate': serialize.iso8601_date(start_date),
'EndDate': serialize.iso8601_date(end_date),
'IncludeSubaccounts': include_subaccounts,
'StatusCallback': status_callback,
'StatusCallbackMethod': status_callback_method,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return FeedbackSummaryInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"start_date",
",",
"end_date",
",",
"include_subaccounts",
"=",
"values",
".",
"unset",
",",
"status_callback",
"=",
"values",
".",
"unset",
",",
"status_callback_method",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",... | Create a new FeedbackSummaryInstance
:param date start_date: Only include feedback given on or after this date
:param date end_date: Only include feedback given on or before this date
:param bool include_subaccounts: `true` includes feedback from the specified account and its subaccounts
:param unicode status_callback: The URL that we will request when the feedback summary is complete
:param unicode status_callback_method: The HTTP method we use to make requests to the StatusCallback URL
:returns: Newly created FeedbackSummaryInstance
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance | [
"Create",
"a",
"new",
"FeedbackSummaryInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/feedback_summary.py#L37-L65 |
225,373 | twilio/twilio-python | twilio/rest/api/v2010/account/call/feedback_summary.py | FeedbackSummaryList.get | def get(self, sid):
"""
Constructs a FeedbackSummaryContext
:param sid: A string that uniquely identifies this feedback summary resource
:returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
"""
return FeedbackSummaryContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return FeedbackSummaryContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"FeedbackSummaryContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a FeedbackSummaryContext
:param sid: A string that uniquely identifies this feedback summary resource
:returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryContext | [
"Constructs",
"a",
"FeedbackSummaryContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/feedback_summary.py#L67-L76 |
225,374 | twilio/twilio-python | twilio/rest/api/v2010/account/call/feedback_summary.py | FeedbackSummaryPage.get_instance | def get_instance(self, payload):
"""
Build an instance of FeedbackSummaryInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
"""
return FeedbackSummaryInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return FeedbackSummaryInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"FeedbackSummaryInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of FeedbackSummaryInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance
:rtype: twilio.rest.api.v2010.account.call.feedback_summary.FeedbackSummaryInstance | [
"Build",
"an",
"instance",
"of",
"FeedbackSummaryInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/feedback_summary.py#L118-L127 |
225,375 | twilio/twilio-python | twilio/rest/video/v1/room/recording/__init__.py | RoomRecordingList.get | def get(self, sid):
"""
Constructs a RoomRecordingContext
:param sid: The sid
:returns: twilio.rest.video.v1.room.recording.RoomRecordingContext
:rtype: twilio.rest.video.v1.room.recording.RoomRecordingContext
"""
return RoomRecordingContext(self._version, room_sid=self._solution['room_sid'], sid=sid, ) | python | def get(self, sid):
return RoomRecordingContext(self._version, room_sid=self._solution['room_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"RoomRecordingContext",
"(",
"self",
".",
"_version",
",",
"room_sid",
"=",
"self",
".",
"_solution",
"[",
"'room_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a RoomRecordingContext
:param sid: The sid
:returns: twilio.rest.video.v1.room.recording.RoomRecordingContext
:rtype: twilio.rest.video.v1.room.recording.RoomRecordingContext | [
"Constructs",
"a",
"RoomRecordingContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/recording/__init__.py#L157-L166 |
225,376 | twilio/twilio-python | twilio/rest/video/v1/room/recording/__init__.py | RoomRecordingPage.get_instance | def get_instance(self, payload):
"""
Build an instance of RoomRecordingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.video.v1.room.recording.RoomRecordingInstance
:rtype: twilio.rest.video.v1.room.recording.RoomRecordingInstance
"""
return RoomRecordingInstance(self._version, payload, room_sid=self._solution['room_sid'], ) | python | def get_instance(self, payload):
return RoomRecordingInstance(self._version, payload, room_sid=self._solution['room_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"RoomRecordingInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"room_sid",
"=",
"self",
".",
"_solution",
"[",
"'room_sid'",
"]",
",",
")"
] | Build an instance of RoomRecordingInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.video.v1.room.recording.RoomRecordingInstance
:rtype: twilio.rest.video.v1.room.recording.RoomRecordingInstance | [
"Build",
"an",
"instance",
"of",
"RoomRecordingInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/video/v1/room/recording/__init__.py#L208-L217 |
225,377 | twilio/twilio-python | twilio/rest/voice/v1/dialing_permissions/__init__.py | DialingPermissionsList.countries | def countries(self):
"""
Access the countries
:returns: twilio.rest.voice.v1.dialing_permissions.country.CountryList
:rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryList
"""
if self._countries is None:
self._countries = CountryList(self._version, )
return self._countries | python | def countries(self):
if self._countries is None:
self._countries = CountryList(self._version, )
return self._countries | [
"def",
"countries",
"(",
"self",
")",
":",
"if",
"self",
".",
"_countries",
"is",
"None",
":",
"self",
".",
"_countries",
"=",
"CountryList",
"(",
"self",
".",
"_version",
",",
")",
"return",
"self",
".",
"_countries"
] | Access the countries
:returns: twilio.rest.voice.v1.dialing_permissions.country.CountryList
:rtype: twilio.rest.voice.v1.dialing_permissions.country.CountryList | [
"Access",
"the",
"countries"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/__init__.py#L42-L51 |
225,378 | twilio/twilio-python | twilio/rest/voice/v1/dialing_permissions/__init__.py | DialingPermissionsList.settings | def settings(self):
"""
Access the settings
:returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsList
:rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsList
"""
if self._settings is None:
self._settings = SettingsList(self._version, )
return self._settings | python | def settings(self):
if self._settings is None:
self._settings = SettingsList(self._version, )
return self._settings | [
"def",
"settings",
"(",
"self",
")",
":",
"if",
"self",
".",
"_settings",
"is",
"None",
":",
"self",
".",
"_settings",
"=",
"SettingsList",
"(",
"self",
".",
"_version",
",",
")",
"return",
"self",
".",
"_settings"
] | Access the settings
:returns: twilio.rest.voice.v1.dialing_permissions.settings.SettingsList
:rtype: twilio.rest.voice.v1.dialing_permissions.settings.SettingsList | [
"Access",
"the",
"settings"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/__init__.py#L54-L63 |
225,379 | twilio/twilio-python | twilio/rest/voice/v1/dialing_permissions/__init__.py | DialingPermissionsList.bulk_country_updates | def bulk_country_updates(self):
"""
Access the bulk_country_updates
:returns: twilio.rest.voice.v1.dialing_permissions.bulk_country_update.BulkCountryUpdateList
:rtype: twilio.rest.voice.v1.dialing_permissions.bulk_country_update.BulkCountryUpdateList
"""
if self._bulk_country_updates is None:
self._bulk_country_updates = BulkCountryUpdateList(self._version, )
return self._bulk_country_updates | python | def bulk_country_updates(self):
if self._bulk_country_updates is None:
self._bulk_country_updates = BulkCountryUpdateList(self._version, )
return self._bulk_country_updates | [
"def",
"bulk_country_updates",
"(",
"self",
")",
":",
"if",
"self",
".",
"_bulk_country_updates",
"is",
"None",
":",
"self",
".",
"_bulk_country_updates",
"=",
"BulkCountryUpdateList",
"(",
"self",
".",
"_version",
",",
")",
"return",
"self",
".",
"_bulk_country... | Access the bulk_country_updates
:returns: twilio.rest.voice.v1.dialing_permissions.bulk_country_update.BulkCountryUpdateList
:rtype: twilio.rest.voice.v1.dialing_permissions.bulk_country_update.BulkCountryUpdateList | [
"Access",
"the",
"bulk_country_updates"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/voice/v1/dialing_permissions/__init__.py#L66-L75 |
225,380 | twilio/twilio-python | twilio/rest/api/v2010/account/address/dependent_phone_number.py | DependentPhoneNumberPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DependentPhoneNumberInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberInstance
"""
return DependentPhoneNumberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
address_sid=self._solution['address_sid'],
) | python | def get_instance(self, payload):
return DependentPhoneNumberInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
address_sid=self._solution['address_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DependentPhoneNumberInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"address_sid",
"=",
"self",... | Build an instance of DependentPhoneNumberInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberInstance
:rtype: twilio.rest.api.v2010.account.address.dependent_phone_number.DependentPhoneNumberInstance | [
"Build",
"an",
"instance",
"of",
"DependentPhoneNumberInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/address/dependent_phone_number.py#L147-L161 |
225,381 | twilio/twilio-python | twilio/rest/preview/acc_security/service/__init__.py | ServiceContext.verifications | def verifications(self):
"""
Access the verifications
:returns: twilio.rest.preview.acc_security.service.verification.VerificationList
:rtype: twilio.rest.preview.acc_security.service.verification.VerificationList
"""
if self._verifications is None:
self._verifications = VerificationList(self._version, service_sid=self._solution['sid'], )
return self._verifications | python | def verifications(self):
if self._verifications is None:
self._verifications = VerificationList(self._version, service_sid=self._solution['sid'], )
return self._verifications | [
"def",
"verifications",
"(",
"self",
")",
":",
"if",
"self",
".",
"_verifications",
"is",
"None",
":",
"self",
".",
"_verifications",
"=",
"VerificationList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]... | Access the verifications
:returns: twilio.rest.preview.acc_security.service.verification.VerificationList
:rtype: twilio.rest.preview.acc_security.service.verification.VerificationList | [
"Access",
"the",
"verifications"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/acc_security/service/__init__.py#L276-L285 |
225,382 | twilio/twilio-python | twilio/rest/preview/acc_security/service/__init__.py | ServiceContext.verification_checks | def verification_checks(self):
"""
Access the verification_checks
:returns: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
:rtype: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
"""
if self._verification_checks is None:
self._verification_checks = VerificationCheckList(self._version, service_sid=self._solution['sid'], )
return self._verification_checks | python | def verification_checks(self):
if self._verification_checks is None:
self._verification_checks = VerificationCheckList(self._version, service_sid=self._solution['sid'], )
return self._verification_checks | [
"def",
"verification_checks",
"(",
"self",
")",
":",
"if",
"self",
".",
"_verification_checks",
"is",
"None",
":",
"self",
".",
"_verification_checks",
"=",
"VerificationCheckList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",... | Access the verification_checks
:returns: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList
:rtype: twilio.rest.preview.acc_security.service.verification_check.VerificationCheckList | [
"Access",
"the",
"verification_checks"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/acc_security/service/__init__.py#L288-L297 |
225,383 | twilio/twilio-python | twilio/rest/api/v2010/account/call/feedback.py | FeedbackList.get | def get(self):
"""
Constructs a FeedbackContext
:returns: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
:rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
"""
return FeedbackContext(
self._version,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | python | def get(self):
return FeedbackContext(
self._version,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | [
"def",
"get",
"(",
"self",
")",
":",
"return",
"FeedbackContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"call_sid",
"=",
"self",
".",
"_solution",
"[",
"'call_sid'",
"]",
",",
")"... | Constructs a FeedbackContext
:returns: twilio.rest.api.v2010.account.call.feedback.FeedbackContext
:rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackContext | [
"Constructs",
"a",
"FeedbackContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/feedback.py#L37-L48 |
225,384 | twilio/twilio-python | twilio/rest/api/v2010/account/call/feedback.py | FeedbackContext.fetch | def fetch(self):
"""
Fetch a FeedbackInstance
:returns: Fetched FeedbackInstance
:rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
"""
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return FeedbackInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | python | def fetch(self):
params = values.of({})
payload = self._version.fetch(
'GET',
self._uri,
params=params,
)
return FeedbackInstance(
self._version,
payload,
account_sid=self._solution['account_sid'],
call_sid=self._solution['call_sid'],
) | [
"def",
"fetch",
"(",
"self",
")",
":",
"params",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"fetch",
"(",
"'GET'",
",",
"self",
".",
"_uri",
",",
"params",
"=",
"params",
",",
")",
"return",
"Feedb... | Fetch a FeedbackInstance
:returns: Fetched FeedbackInstance
:rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance | [
"Fetch",
"a",
"FeedbackInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/feedback.py#L164-L184 |
225,385 | twilio/twilio-python | twilio/rest/api/v2010/account/call/feedback.py | FeedbackInstance.update | def update(self, quality_score, issue=values.unset):
"""
Update the FeedbackInstance
:param unicode quality_score: The call quality expressed as an integer from 1 to 5
:param FeedbackInstance.Issues issue: Issues experienced during the call
:returns: Updated FeedbackInstance
:rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance
"""
return self._proxy.update(quality_score, issue=issue, ) | python | def update(self, quality_score, issue=values.unset):
return self._proxy.update(quality_score, issue=issue, ) | [
"def",
"update",
"(",
"self",
",",
"quality_score",
",",
"issue",
"=",
"values",
".",
"unset",
")",
":",
"return",
"self",
".",
"_proxy",
".",
"update",
"(",
"quality_score",
",",
"issue",
"=",
"issue",
",",
")"
] | Update the FeedbackInstance
:param unicode quality_score: The call quality expressed as an integer from 1 to 5
:param FeedbackInstance.Issues issue: Issues experienced during the call
:returns: Updated FeedbackInstance
:rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance | [
"Update",
"the",
"FeedbackInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/call/feedback.py#L344-L354 |
225,386 | twilio/twilio-python | twilio/rest/api/v2010/account/incoming_phone_number/mobile.py | MobilePage.get_instance | def get_instance(self, payload):
"""
Build an instance of MobileInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileInstance
"""
return MobileInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return MobileInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"MobileInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of MobileInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileInstance
:rtype: twilio.rest.api.v2010.account.incoming_phone_number.mobile.MobileInstance | [
"Build",
"an",
"instance",
"of",
"MobileInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/incoming_phone_number/mobile.py#L248-L257 |
225,387 | twilio/twilio-python | twilio/rest/proxy/v1/service/__init__.py | ServiceContext.sessions | def sessions(self):
"""
Access the sessions
:returns: twilio.rest.proxy.v1.service.session.SessionList
:rtype: twilio.rest.proxy.v1.service.session.SessionList
"""
if self._sessions is None:
self._sessions = SessionList(self._version, service_sid=self._solution['sid'], )
return self._sessions | python | def sessions(self):
if self._sessions is None:
self._sessions = SessionList(self._version, service_sid=self._solution['sid'], )
return self._sessions | [
"def",
"sessions",
"(",
"self",
")",
":",
"if",
"self",
".",
"_sessions",
"is",
"None",
":",
"self",
".",
"_sessions",
"=",
"SessionList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'sid'",
"]",
",",
")",
"... | Access the sessions
:returns: twilio.rest.proxy.v1.service.session.SessionList
:rtype: twilio.rest.proxy.v1.service.session.SessionList | [
"Access",
"the",
"sessions"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/proxy/v1/service/__init__.py#L324-L333 |
225,388 | twilio/twilio-python | twilio/rest/flex_api/v1/configuration.py | ConfigurationContext.create | def create(self):
"""
Create a new ConfigurationInstance
:returns: Newly created ConfigurationInstance
:rtype: twilio.rest.flex_api.v1.configuration.ConfigurationInstance
"""
data = values.of({})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ConfigurationInstance(self._version, payload, ) | python | def create(self):
data = values.of({})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return ConfigurationInstance(self._version, payload, ) | [
"def",
"create",
"(",
"self",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"}",
")",
"payload",
"=",
"self",
".",
"_version",
".",
"create",
"(",
"'POST'",
",",
"self",
".",
"_uri",
",",
"data",
"=",
"data",
",",
")",
"return",
"Configur... | Create a new ConfigurationInstance
:returns: Newly created ConfigurationInstance
:rtype: twilio.rest.flex_api.v1.configuration.ConfigurationInstance | [
"Create",
"a",
"new",
"ConfigurationInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/flex_api/v1/configuration.py#L138-L153 |
225,389 | twilio/twilio-python | twilio/rest/api/v2010/account/usage/record/last_month.py | LastMonthPage.get_instance | def get_instance(self, payload):
"""
Build an instance of LastMonthInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.last_month.LastMonthInstance
:rtype: twilio.rest.api.v2010.account.usage.record.last_month.LastMonthInstance
"""
return LastMonthInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return LastMonthInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"LastMonthInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of LastMonthInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.usage.record.last_month.LastMonthInstance
:rtype: twilio.rest.api.v2010.account.usage.record.last_month.LastMonthInstance | [
"Build",
"an",
"instance",
"of",
"LastMonthInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/usage/record/last_month.py#L185-L194 |
225,390 | twilio/twilio-python | twilio/rest/preview/sync/service/document/__init__.py | DocumentList.create | def create(self, unique_name=values.unset, data=values.unset):
"""
Create a new DocumentInstance
:param unicode unique_name: The unique_name
:param dict data: The data
:returns: Newly created DocumentInstance
:rtype: twilio.rest.preview.sync.service.document.DocumentInstance
"""
data = values.of({'UniqueName': unique_name, 'Data': serialize.object(data), })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def create(self, unique_name=values.unset, data=values.unset):
data = values.of({'UniqueName': unique_name, 'Data': serialize.object(data), })
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"unique_name",
"=",
"values",
".",
"unset",
",",
"data",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'UniqueName'",
":",
"unique_name",
",",
"'Data'",
":",
"serialize",
".",
"... | Create a new DocumentInstance
:param unicode unique_name: The unique_name
:param dict data: The data
:returns: Newly created DocumentInstance
:rtype: twilio.rest.preview.sync.service.document.DocumentInstance | [
"Create",
"a",
"new",
"DocumentInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/document/__init__.py#L40-L58 |
225,391 | twilio/twilio-python | twilio/rest/preview/sync/service/document/__init__.py | DocumentList.get | def get(self, sid):
"""
Constructs a DocumentContext
:param sid: The sid
:returns: twilio.rest.preview.sync.service.document.DocumentContext
:rtype: twilio.rest.preview.sync.service.document.DocumentContext
"""
return DocumentContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | python | def get(self, sid):
return DocumentContext(self._version, service_sid=self._solution['service_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"DocumentContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a DocumentContext
:param sid: The sid
:returns: twilio.rest.preview.sync.service.document.DocumentContext
:rtype: twilio.rest.preview.sync.service.document.DocumentContext | [
"Constructs",
"a",
"DocumentContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/document/__init__.py#L141-L150 |
225,392 | twilio/twilio-python | twilio/rest/preview/sync/service/document/__init__.py | DocumentPage.get_instance | def get_instance(self, payload):
"""
Build an instance of DocumentInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.sync.service.document.DocumentInstance
:rtype: twilio.rest.preview.sync.service.document.DocumentInstance
"""
return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def get_instance(self, payload):
return DocumentInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"DocumentInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
")"
] | Build an instance of DocumentInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.preview.sync.service.document.DocumentInstance
:rtype: twilio.rest.preview.sync.service.document.DocumentInstance | [
"Build",
"an",
"instance",
"of",
"DocumentInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/document/__init__.py#L194-L203 |
225,393 | twilio/twilio-python | twilio/rest/preview/sync/service/document/__init__.py | DocumentContext.document_permissions | def document_permissions(self):
"""
Access the document_permissions
:returns: twilio.rest.preview.sync.service.document.document_permission.DocumentPermissionList
:rtype: twilio.rest.preview.sync.service.document.document_permission.DocumentPermissionList
"""
if self._document_permissions is None:
self._document_permissions = DocumentPermissionList(
self._version,
service_sid=self._solution['service_sid'],
document_sid=self._solution['sid'],
)
return self._document_permissions | python | def document_permissions(self):
if self._document_permissions is None:
self._document_permissions = DocumentPermissionList(
self._version,
service_sid=self._solution['service_sid'],
document_sid=self._solution['sid'],
)
return self._document_permissions | [
"def",
"document_permissions",
"(",
"self",
")",
":",
"if",
"self",
".",
"_document_permissions",
"is",
"None",
":",
"self",
".",
"_document_permissions",
"=",
"DocumentPermissionList",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_soluti... | Access the document_permissions
:returns: twilio.rest.preview.sync.service.document.document_permission.DocumentPermissionList
:rtype: twilio.rest.preview.sync.service.document.document_permission.DocumentPermissionList | [
"Access",
"the",
"document_permissions"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/preview/sync/service/document/__init__.py#L296-L309 |
225,394 | twilio/twilio-python | twilio/http/http_client.py | TwilioHttpClient.request | def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
"""
Make an HTTP Request with parameters provided.
:param str method: The HTTP method to use
:param str url: The URL to request
:param dict params: Query parameters to append to the URL
:param dict data: Parameters to go in the body of the HTTP request
:param dict headers: HTTP Headers to send with the request
:param tuple auth: Basic Auth arguments
:param float timeout: Socket/Read timeout for the request
:param boolean allow_redirects: Whether or not to allow redirects
See the requests documentation for explanation of all these parameters
:return: An http response
:rtype: A :class:`Response <twilio.rest.http.response.Response>` object
"""
kwargs = {
'method': method.upper(),
'url': url,
'params': params,
'data': data,
'headers': headers,
'auth': auth,
'hooks': self.request_hooks
}
if params:
_logger.info('{method} Request: {url}?{query}'.format(query=urlencode(params), **kwargs))
_logger.info('PARAMS: {params}'.format(**kwargs))
else:
_logger.info('{method} Request: {url}'.format(**kwargs))
if data:
_logger.info('PAYLOAD: {data}'.format(**kwargs))
self.last_response = None
session = self.session or Session()
request = Request(**kwargs)
self.last_request = TwilioRequest(**kwargs)
prepped_request = session.prepare_request(request)
response = session.send(
prepped_request,
allow_redirects=allow_redirects,
timeout=timeout,
)
_logger.info('{method} Response: {status} {text}'.format(method=method, status=response.status_code, text=response.text))
self.last_response = Response(int(response.status_code), response.text)
return self.last_response | python | def request(self, method, url, params=None, data=None, headers=None, auth=None, timeout=None,
allow_redirects=False):
kwargs = {
'method': method.upper(),
'url': url,
'params': params,
'data': data,
'headers': headers,
'auth': auth,
'hooks': self.request_hooks
}
if params:
_logger.info('{method} Request: {url}?{query}'.format(query=urlencode(params), **kwargs))
_logger.info('PARAMS: {params}'.format(**kwargs))
else:
_logger.info('{method} Request: {url}'.format(**kwargs))
if data:
_logger.info('PAYLOAD: {data}'.format(**kwargs))
self.last_response = None
session = self.session or Session()
request = Request(**kwargs)
self.last_request = TwilioRequest(**kwargs)
prepped_request = session.prepare_request(request)
response = session.send(
prepped_request,
allow_redirects=allow_redirects,
timeout=timeout,
)
_logger.info('{method} Response: {status} {text}'.format(method=method, status=response.status_code, text=response.text))
self.last_response = Response(int(response.status_code), response.text)
return self.last_response | [
"def",
"request",
"(",
"self",
",",
"method",
",",
"url",
",",
"params",
"=",
"None",
",",
"data",
"=",
"None",
",",
"headers",
"=",
"None",
",",
"auth",
"=",
"None",
",",
"timeout",
"=",
"None",
",",
"allow_redirects",
"=",
"False",
")",
":",
"kwa... | Make an HTTP Request with parameters provided.
:param str method: The HTTP method to use
:param str url: The URL to request
:param dict params: Query parameters to append to the URL
:param dict data: Parameters to go in the body of the HTTP request
:param dict headers: HTTP Headers to send with the request
:param tuple auth: Basic Auth arguments
:param float timeout: Socket/Read timeout for the request
:param boolean allow_redirects: Whether or not to allow redirects
See the requests documentation for explanation of all these parameters
:return: An http response
:rtype: A :class:`Response <twilio.rest.http.response.Response>` object | [
"Make",
"an",
"HTTP",
"Request",
"with",
"parameters",
"provided",
"."
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/http/http_client.py#L22-L75 |
225,395 | twilio/twilio-python | twilio/rest/proxy/v1/service/session/interaction.py | InteractionList.get | def get(self, sid):
"""
Constructs a InteractionContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.proxy.v1.service.session.interaction.InteractionContext
:rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionContext
"""
return InteractionContext(
self._version,
service_sid=self._solution['service_sid'],
session_sid=self._solution['session_sid'],
sid=sid,
) | python | def get(self, sid):
return InteractionContext(
self._version,
service_sid=self._solution['service_sid'],
session_sid=self._solution['session_sid'],
sid=sid,
) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"InteractionContext",
"(",
"self",
".",
"_version",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"session_sid",
"=",
"self",
".",
"_solution",
"[",
"'session_s... | Constructs a InteractionContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.proxy.v1.service.session.interaction.InteractionContext
:rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionContext | [
"Constructs",
"a",
"InteractionContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/proxy/v1/service/session/interaction.py#L119-L133 |
225,396 | twilio/twilio-python | twilio/rest/proxy/v1/service/session/interaction.py | InteractionPage.get_instance | def get_instance(self, payload):
"""
Build an instance of InteractionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
:rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
"""
return InteractionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
session_sid=self._solution['session_sid'],
) | python | def get_instance(self, payload):
return InteractionInstance(
self._version,
payload,
service_sid=self._solution['service_sid'],
session_sid=self._solution['session_sid'],
) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"InteractionInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"service_sid",
"=",
"self",
".",
"_solution",
"[",
"'service_sid'",
"]",
",",
"session_sid",
"=",
"self",
".",
... | Build an instance of InteractionInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance
:rtype: twilio.rest.proxy.v1.service.session.interaction.InteractionInstance | [
"Build",
"an",
"instance",
"of",
"InteractionInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/proxy/v1/service/session/interaction.py#L182-L196 |
225,397 | twilio/twilio-python | twilio/rest/api/v2010/account/outgoing_caller_id.py | OutgoingCallerIdList.get | def get(self, sid):
"""
Constructs a OutgoingCallerIdContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdContext
:rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdContext
"""
return OutgoingCallerIdContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | python | def get(self, sid):
return OutgoingCallerIdContext(self._version, account_sid=self._solution['account_sid'], sid=sid, ) | [
"def",
"get",
"(",
"self",
",",
"sid",
")",
":",
"return",
"OutgoingCallerIdContext",
"(",
"self",
".",
"_version",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
"sid",
"=",
"sid",
",",
")"
] | Constructs a OutgoingCallerIdContext
:param sid: The unique string that identifies the resource
:returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdContext
:rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdContext | [
"Constructs",
"a",
"OutgoingCallerIdContext"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/outgoing_caller_id.py#L141-L150 |
225,398 | twilio/twilio-python | twilio/rest/api/v2010/account/outgoing_caller_id.py | OutgoingCallerIdPage.get_instance | def get_instance(self, payload):
"""
Build an instance of OutgoingCallerIdInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdInstance
:rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdInstance
"""
return OutgoingCallerIdInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | python | def get_instance(self, payload):
return OutgoingCallerIdInstance(self._version, payload, account_sid=self._solution['account_sid'], ) | [
"def",
"get_instance",
"(",
"self",
",",
"payload",
")",
":",
"return",
"OutgoingCallerIdInstance",
"(",
"self",
".",
"_version",
",",
"payload",
",",
"account_sid",
"=",
"self",
".",
"_solution",
"[",
"'account_sid'",
"]",
",",
")"
] | Build an instance of OutgoingCallerIdInstance
:param dict payload: Payload response from the API
:returns: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdInstance
:rtype: twilio.rest.api.v2010.account.outgoing_caller_id.OutgoingCallerIdInstance | [
"Build",
"an",
"instance",
"of",
"OutgoingCallerIdInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/api/v2010/account/outgoing_caller_id.py#L192-L201 |
225,399 | twilio/twilio-python | twilio/rest/ip_messaging/v2/service/user/__init__.py | UserList.create | def create(self, identity, role_sid=values.unset, attributes=values.unset,
friendly_name=values.unset):
"""
Create a new UserInstance
:param unicode identity: The `identity` value that identifies the new resource's User
:param unicode role_sid: The SID of the Role assigned to this user
:param unicode attributes: A valid JSON string that contains application-specific data
:param unicode friendly_name: A string to describe the new resource
:returns: Newly created UserInstance
:rtype: twilio.rest.chat.v2.service.user.UserInstance
"""
data = values.of({
'Identity': identity,
'RoleSid': role_sid,
'Attributes': attributes,
'FriendlyName': friendly_name,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return UserInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | python | def create(self, identity, role_sid=values.unset, attributes=values.unset,
friendly_name=values.unset):
data = values.of({
'Identity': identity,
'RoleSid': role_sid,
'Attributes': attributes,
'FriendlyName': friendly_name,
})
payload = self._version.create(
'POST',
self._uri,
data=data,
)
return UserInstance(self._version, payload, service_sid=self._solution['service_sid'], ) | [
"def",
"create",
"(",
"self",
",",
"identity",
",",
"role_sid",
"=",
"values",
".",
"unset",
",",
"attributes",
"=",
"values",
".",
"unset",
",",
"friendly_name",
"=",
"values",
".",
"unset",
")",
":",
"data",
"=",
"values",
".",
"of",
"(",
"{",
"'Id... | Create a new UserInstance
:param unicode identity: The `identity` value that identifies the new resource's User
:param unicode role_sid: The SID of the Role assigned to this user
:param unicode attributes: A valid JSON string that contains application-specific data
:param unicode friendly_name: A string to describe the new resource
:returns: Newly created UserInstance
:rtype: twilio.rest.chat.v2.service.user.UserInstance | [
"Create",
"a",
"new",
"UserInstance"
] | c867895f55dcc29f522e6e8b8868d0d18483132f | https://github.com/twilio/twilio-python/blob/c867895f55dcc29f522e6e8b8868d0d18483132f/twilio/rest/ip_messaging/v2/service/user/__init__.py#L38-L64 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.