_id
stringlengths
2
7
title
stringlengths
1
88
partition
stringclasses
3 values
text
stringlengths
75
19.8k
language
stringclasses
1 value
meta_information
dict
q29100
WorkerList.stream
train
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
{ "resource": "" }
q29101
WorkerList.page
train
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
{ "resource": "" }
q29102
WorkerList.create
train
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
{ "resource": "" }
q29103
WorkerList.get
train
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
{ "resource": "" }
q29104
WorkerPage.get_instance
train
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
{ "resource": "" }
q29105
WorkerContext.worker_channels
train
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
{ "resource": "" }
q29106
AuthorizationDocumentList.page
train
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
{ "resource": "" }
q29107
AuthorizationDocumentList.create
train
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
{ "resource": "" }
q29108
AuthorizationDocumentContext.dependent_hosted_number_orders
train
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
{ "resource": "" }
q29109
IpAccessControlListMappingList.create
train
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
{ "resource": "" }
q29110
IpAccessControlListMappingList.get
train
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
{ "resource": "" }
q29111
IpAccessControlListMappingPage.get_instance
train
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
{ "resource": "" }
q29112
DependentHostedNumberOrderList.stream
train
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
{ "resource": "" }
q29113
DependentHostedNumberOrderPage.get_instance
train
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
{ "resource": "" }
q29114
OriginationUrlList.create
train
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
{ "resource": "" }
q29115
OriginationUrlList.get
train
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
{ "resource": "" }
q29116
OriginationUrlPage.get_instance
train
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
{ "resource": "" }
q29117
FunctionList.get
train
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
{ "resource": "" }
q29118
FunctionPage.get_instance
train
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
{ "resource": "" }
q29119
FunctionContext.update
train
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
{ "resource": "" }
q29120
FunctionContext.function_versions
train
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
{ "resource": "" }
q29121
DailyList.page
train
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
{ "resource": "" }
q29122
DailyPage.get_instance
train
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
{ "resource": "" }
q29123
MediaList.get
train
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
{ "resource": "" }
q29124
MediaPage.get_instance
train
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
{ "resource": "" }
q29125
MediaContext.fetch
train
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
{ "resource": "" }
q29126
FleetContext.devices
train
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
{ "resource": "" }
q29127
FleetContext.certificates
train
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
{ "resource": "" }
q29128
FleetInstance.update
train
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
{ "resource": "" }
q29129
DomainList.create
train
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
{ "resource": "" }
q29130
DomainList.get
train
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
{ "resource": "" }
q29131
DomainPage.get_instance
train
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
{ "resource": "" }
q29132
DomainContext.auth
train
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
{ "resource": "" }
q29133
DomainInstance.update
train
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
{ "resource": "" }
q29134
SyncListItemList.page
train
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
{ "resource": "" }
q29135
SyncListItemList.get
train
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
{ "resource": "" }
q29136
SyncListItemPage.get_instance
train
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
{ "resource": "" }
q29137
SyncListItemContext.fetch
train
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
{ "resource": "" }
q29138
BalanceList.fetch
train
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
{ "resource": "" }
q29139
BalancePage.get_instance
train
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
{ "resource": "" }
q29140
RecordingList.create
train
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
{ "resource": "" }
q29141
RecordingPage.get_instance
train
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
{ "resource": "" }
q29142
TranscriptionPage.get_instance
train
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
{ "resource": "" }
q29143
ModelBuildList.create
train
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
{ "resource": "" }
q29144
ModelBuildList.get
train
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
{ "resource": "" }
q29145
ModelBuildPage.get_instance
train
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
{ "resource": "" }
q29146
ModelBuildInstance.update
train
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
{ "resource": "" }
q29147
CredentialList.get
train
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
{ "resource": "" }
q29148
CredentialPage.get_instance
train
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
{ "resource": "" }
q29149
FeedbackSummaryList.create
train
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
{ "resource": "" }
q29150
FeedbackSummaryList.get
train
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
{ "resource": "" }
q29151
FeedbackSummaryPage.get_instance
train
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
{ "resource": "" }
q29152
RoomRecordingList.get
train
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
{ "resource": "" }
q29153
RoomRecordingPage.get_instance
train
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
{ "resource": "" }
q29154
DialingPermissionsList.countries
train
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
{ "resource": "" }
q29155
DialingPermissionsList.settings
train
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
{ "resource": "" }
q29156
DialingPermissionsList.bulk_country_updates
train
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
{ "resource": "" }
q29157
DependentPhoneNumberPage.get_instance
train
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
{ "resource": "" }
q29158
ServiceContext.verifications
train
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
{ "resource": "" }
q29159
ServiceContext.verification_checks
train
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
{ "resource": "" }
q29160
FeedbackList.get
train
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
{ "resource": "" }
q29161
FeedbackContext.fetch
train
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
{ "resource": "" }
q29162
FeedbackInstance.update
train
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
{ "resource": "" }
q29163
MobilePage.get_instance
train
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
{ "resource": "" }
q29164
ServiceContext.sessions
train
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
{ "resource": "" }
q29165
ConfigurationContext.create
train
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
{ "resource": "" }
q29166
LastMonthPage.get_instance
train
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
{ "resource": "" }
q29167
DocumentList.create
train
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
{ "resource": "" }
q29168
DocumentList.get
train
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
{ "resource": "" }
q29169
DocumentPage.get_instance
train
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
{ "resource": "" }
q29170
DocumentContext.document_permissions
train
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
{ "resource": "" }
q29171
TwilioHttpClient.request
train
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
{ "resource": "" }
q29172
InteractionList.get
train
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
{ "resource": "" }
q29173
InteractionPage.get_instance
train
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
{ "resource": "" }
q29174
OutgoingCallerIdList.get
train
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
{ "resource": "" }
q29175
OutgoingCallerIdPage.get_instance
train
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
{ "resource": "" }
q29176
UserList.create
train
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
{ "resource": "" }
q29177
UserList.get
train
def get(self, sid): """ Constructs a UserContext :param sid: The unique string that identifies the resource :returns: twilio.rest.chat.v2.service.user.UserContext :rtype: twilio.rest.chat.v2.service.user.UserContext """ return UserContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
{ "resource": "" }
q29178
UserPage.get_instance
train
def get_instance(self, payload): """ Build an instance of UserInstance :param dict payload: Payload response from the API :returns: twilio.rest.chat.v2.service.user.UserInstance :rtype: twilio.rest.chat.v2.service.user.UserInstance """ return UserInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29179
UserContext.user_channels
train
def user_channels(self): """ Access the user_channels :returns: twilio.rest.chat.v2.service.user.user_channel.UserChannelList :rtype: twilio.rest.chat.v2.service.user.user_channel.UserChannelList """ if self._user_channels is None: self._user_channels = UserChannelList( self._version, service_sid=self._solution['service_sid'], user_sid=self._solution['sid'], ) return self._user_channels
python
{ "resource": "" }
q29180
UserContext.user_bindings
train
def user_bindings(self): """ Access the user_bindings :returns: twilio.rest.chat.v2.service.user.user_binding.UserBindingList :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingList """ if self._user_bindings is None: self._user_bindings = UserBindingList( self._version, service_sid=self._solution['service_sid'], user_sid=self._solution['sid'], ) return self._user_bindings
python
{ "resource": "" }
q29181
FormContext.fetch
train
def fetch(self): """ Fetch a FormInstance :returns: Fetched FormInstance :rtype: twilio.rest.authy.v1.form.FormInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return FormInstance(self._version, payload, form_type=self._solution['form_type'], )
python
{ "resource": "" }
q29182
InviteList.create
train
def create(self, identity, role_sid=values.unset): """ Create a new InviteInstance :param unicode identity: The `identity` value that identifies the new resource's User :param unicode role_sid: The Role assigned to the new member :returns: Newly created InviteInstance :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance """ data = values.of({'Identity': identity, 'RoleSid': role_sid, }) payload = self._version.create( 'POST', self._uri, data=data, ) return InviteInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], )
python
{ "resource": "" }
q29183
InviteList.get
train
def get(self, sid): """ Constructs a InviteContext :param sid: The unique string that identifies the resource :returns: twilio.rest.chat.v2.service.channel.invite.InviteContext :rtype: twilio.rest.chat.v2.service.channel.invite.InviteContext """ return InviteContext( self._version, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], sid=sid, )
python
{ "resource": "" }
q29184
InvitePage.get_instance
train
def get_instance(self, payload): """ Build an instance of InviteInstance :param dict payload: Payload response from the API :returns: twilio.rest.chat.v2.service.channel.invite.InviteInstance :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance """ return InviteInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], )
python
{ "resource": "" }
q29185
InviteContext.fetch
train
def fetch(self): """ Fetch a InviteInstance :returns: Fetched InviteInstance :rtype: twilio.rest.chat.v2.service.channel.invite.InviteInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return InviteInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], sid=self._solution['sid'], )
python
{ "resource": "" }
q29186
IpAddressList.get
train
def get(self, sid): """ Constructs a IpAddressContext :param sid: A string that identifies the IpAddress resource to fetch :returns: twilio.rest.api.v2010.account.sip.ip_access_control_list.ip_address.IpAddressContext :rtype: twilio.rest.api.v2010.account.sip.ip_access_control_list.ip_address.IpAddressContext """ return IpAddressContext( self._version, account_sid=self._solution['account_sid'], ip_access_control_list_sid=self._solution['ip_access_control_list_sid'], sid=sid, )
python
{ "resource": "" }
q29187
IpAddressPage.get_instance
train
def get_instance(self, payload): """ Build an instance of IpAddressInstance :param dict payload: Payload response from the API :returns: twilio.rest.api.v2010.account.sip.ip_access_control_list.ip_address.IpAddressInstance :rtype: twilio.rest.api.v2010.account.sip.ip_access_control_list.ip_address.IpAddressInstance """ return IpAddressInstance( self._version, payload, account_sid=self._solution['account_sid'], ip_access_control_list_sid=self._solution['ip_access_control_list_sid'], )
python
{ "resource": "" }
q29188
IpAddressContext.fetch
train
def fetch(self): """ Fetch a IpAddressInstance :returns: Fetched IpAddressInstance :rtype: twilio.rest.api.v2010.account.sip.ip_access_control_list.ip_address.IpAddressInstance """ params = values.of({}) payload = self._version.fetch( 'GET', self._uri, params=params, ) return IpAddressInstance( self._version, payload, account_sid=self._solution['account_sid'], ip_access_control_list_sid=self._solution['ip_access_control_list_sid'], sid=self._solution['sid'], )
python
{ "resource": "" }
q29189
TaskContext.fields
train
def fields(self): """ Access the fields :returns: twilio.rest.autopilot.v1.assistant.task.field.FieldList :rtype: twilio.rest.autopilot.v1.assistant.task.field.FieldList """ if self._fields is None: self._fields = FieldList( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['sid'], ) return self._fields
python
{ "resource": "" }
q29190
TaskContext.samples
train
def samples(self): """ Access the samples :returns: twilio.rest.autopilot.v1.assistant.task.sample.SampleList :rtype: twilio.rest.autopilot.v1.assistant.task.sample.SampleList """ if self._samples is None: self._samples = SampleList( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['sid'], ) return self._samples
python
{ "resource": "" }
q29191
TaskContext.task_actions
train
def task_actions(self): """ Access the task_actions :returns: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsList :rtype: twilio.rest.autopilot.v1.assistant.task.task_actions.TaskActionsList """ if self._task_actions is None: self._task_actions = TaskActionsList( self._version, assistant_sid=self._solution['assistant_sid'], task_sid=self._solution['sid'], ) return self._task_actions
python
{ "resource": "" }
q29192
AssetList.create
train
def create(self, friendly_name): """ Create a new AssetInstance :param unicode friendly_name: The friendly_name :returns: Newly created AssetInstance :rtype: twilio.rest.serverless.v1.service.asset.AssetInstance """ data = values.of({'FriendlyName': friendly_name, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AssetInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29193
AssetList.get
train
def get(self, sid): """ Constructs a AssetContext :param sid: The sid :returns: twilio.rest.serverless.v1.service.asset.AssetContext :rtype: twilio.rest.serverless.v1.service.asset.AssetContext """ return AssetContext(self._version, service_sid=self._solution['service_sid'], sid=sid, )
python
{ "resource": "" }
q29194
AssetPage.get_instance
train
def get_instance(self, payload): """ Build an instance of AssetInstance :param dict payload: Payload response from the API :returns: twilio.rest.serverless.v1.service.asset.AssetInstance :rtype: twilio.rest.serverless.v1.service.asset.AssetInstance """ return AssetInstance(self._version, payload, service_sid=self._solution['service_sid'], )
python
{ "resource": "" }
q29195
AssetContext.asset_versions
train
def asset_versions(self): """ Access the asset_versions :returns: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionList :rtype: twilio.rest.serverless.v1.service.asset.asset_version.AssetVersionList """ if self._asset_versions is None: self._asset_versions = AssetVersionList( self._version, service_sid=self._solution['service_sid'], asset_sid=self._solution['sid'], ) return self._asset_versions
python
{ "resource": "" }
q29196
QueryList.page
train
def page(self, language=values.unset, model_build=values.unset, status=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of QueryInstance records from the API. Request is executed immediately :param unicode language: The ISO language-country string that specifies the language used by the Query resources to read :param unicode model_build: The SID or unique name of the Model Build to be queried :param unicode status: The status of the resources to read :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of QueryInstance :rtype: twilio.rest.autopilot.v1.assistant.query.QueryPage """ params = values.of({ 'Language': language, 'ModelBuild': model_build, 'Status': status, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return QueryPage(self._version, response, self._solution)
python
{ "resource": "" }
q29197
QueryList.get
train
def get(self, sid): """ Constructs a QueryContext :param sid: The unique string that identifies the resource :returns: twilio.rest.autopilot.v1.assistant.query.QueryContext :rtype: twilio.rest.autopilot.v1.assistant.query.QueryContext """ return QueryContext(self._version, assistant_sid=self._solution['assistant_sid'], sid=sid, )
python
{ "resource": "" }
q29198
QueryPage.get_instance
train
def get_instance(self, payload): """ Build an instance of QueryInstance :param dict payload: Payload response from the API :returns: twilio.rest.autopilot.v1.assistant.query.QueryInstance :rtype: twilio.rest.autopilot.v1.assistant.query.QueryInstance """ return QueryInstance(self._version, payload, assistant_sid=self._solution['assistant_sid'], )
python
{ "resource": "" }
q29199
DeviceList.create
train
def create(self, unique_name=values.unset, friendly_name=values.unset, identity=values.unset, deployment_sid=values.unset, enabled=values.unset): """ Create a new DeviceInstance :param unicode unique_name: A unique, addressable name of this Device. :param unicode friendly_name: A human readable description for this Device. :param unicode identity: An identifier of the Device user. :param unicode deployment_sid: The unique SID of the Deployment group. :param bool enabled: The enabled :returns: Newly created DeviceInstance :rtype: twilio.rest.preview.deployed_devices.fleet.device.DeviceInstance """ data = values.of({ 'UniqueName': unique_name, 'FriendlyName': friendly_name, 'Identity': identity, 'DeploymentSid': deployment_sid, 'Enabled': enabled, }) payload = self._version.create( 'POST', self._uri, data=data, ) return DeviceInstance(self._version, payload, fleet_sid=self._solution['fleet_sid'], )
python
{ "resource": "" }