def page(self, friendly_name=values.unset, evaluate_worker_attributes=values.unset, worker_sid=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of TaskQueueInstance records from the API. Request is executed immediately :param unicode friendly_name: The friendly_name :param unicode evaluate_worker_attributes: The evaluate_worker_attributes :param unicode worker_sid: The worker_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 TaskQueueInstance :rtype: twilio.rest.taskrouter.v1.workspace.task_queue.TaskQueuePage """ params = values.of({ 'FriendlyName': friendly_name, 'EvaluateWorkerAttributes': evaluate_worker_attributes, 'WorkerSid': worker_sid, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TaskQueuePage(self._version, response, self._solution)
def page(self, identity=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of InviteInstance records from the API. Request is executed immediately :param unicode identity: A unique string identifier for this User in this Service. :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 InviteInstance :rtype: twilio.rest.chat.v1.service.channel.invite.InvitePage """ params = values.of({ 'Identity': serialize.map(identity, lambda e: e), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return InvitePage(self._version, response, self._solution)
def page(self, date_created_from=values.unset, date_created_to=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of ExecutionInstance records from the API. Request is executed immediately :param datetime date_created_from: Only show Executions that started on or after this ISO8601 date-time. :param datetime date_created_to: Only show Executions that started before this this ISO8601 date-time. :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 ExecutionInstance :rtype: twilio.rest.studio.v1.flow.execution.ExecutionPage """ params = values.of({ 'DateCreatedFrom': serialize.iso8601_datetime(date_created_from), 'DateCreatedTo': serialize.iso8601_datetime(date_created_to), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return ExecutionPage(self._version, response, self._solution)
def update(self, role_sid=values.unset, attributes=values.unset, friendly_name=values.unset): """ Update the UserInstance :param unicode role_sid: The SID id 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 resource :returns: Updated UserInstance :rtype: twilio.rest.chat.v2.service.user.UserInstance """ data = values.of({'RoleSid': role_sid, 'Attributes': attributes, 'FriendlyName': friendly_name, }) payload = self._version.update( 'POST', self._uri, data=data, ) return UserInstance( self._version, payload, service_sid=self._solution['service_sid'], sid=self._solution['sid'], )
def page(self, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of CredentialInstance records from the API. Request is executed immediately :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 CredentialInstance :rtype: twilio.rest.chat.v2.credential.CredentialPage """ params = values.of({ 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return CredentialPage(self._version, response, self._solution)
def update(self, unique_name=values.unset, ttl=values.unset, status=values.unset, participants=values.unset): """ Update the SessionInstance :param unicode unique_name: A unique, developer assigned name of this Session. :param unicode ttl: How long will this session stay open, in seconds. :param SessionInstance.Status status: The Status of this Session :param unicode participants: The participants :returns: Updated SessionInstance :rtype: twilio.rest.preview.proxy.service.session.SessionInstance """ data = values.of({ 'UniqueName': unique_name, 'Ttl': ttl, 'Status': status, 'Participants': serialize.map(participants, lambda e: e), }) payload = self._version.update( 'POST', self._uri, data=data, ) return SessionInstance( self._version, payload, service_sid=self._solution['service_sid'], sid=self._solution['sid'], )
def page(self, unique_name=values.unset, status=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of SessionInstance records from the API. Request is executed immediately :param unicode unique_name: A unique, developer assigned name of this Session. :param SessionInstance.Status status: The Status of this Session :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 SessionInstance :rtype: twilio.rest.preview.proxy.service.session.SessionPage """ params = values.of({ 'UniqueName': unique_name, 'Status': status, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return SessionPage(self._version, response, self._solution)
def page(self, reservation_status=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of ReservationInstance records from the API. Request is executed immediately :param ReservationInstance.Status reservation_status: The reservation_status :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 ReservationInstance :rtype: twilio.rest.taskrouter.v1.workspace.worker.reservation.ReservationPage """ params = values.of({ 'ReservationStatus': reservation_status, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return ReservationPage(self._version, response, self._solution)
def update(self, url, method): """ Update the MemberInstance :param unicode url: The url :param unicode method: The method :returns: Updated MemberInstance :rtype: twilio.rest.api.v2010.account.queue.member.MemberInstance """ data = values.of({ 'Url': url, 'Method': method, }) payload = self._version.update( 'POST', self._uri, data=data, ) return MemberInstance( self._version, payload, account_sid=self._solution['account_sid'], queue_sid=self._solution['queue_sid'], call_sid=self._solution['call_sid'], )
def update(self, body=values.unset, attributes=values.unset): """ Update the MessageInstance :param unicode body: The body :param unicode attributes: The attributes :returns: Updated MessageInstance :rtype: twilio.rest.chat.v2.service.channel.message.MessageInstance """ data = values.of({ 'Body': body, 'Attributes': attributes, }) payload = self._version.update( 'POST', self._uri, data=data, ) return MessageInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], sid=self._solution['sid'], )
def create(self, body, from_=values.unset, attributes=values.unset): """ Create a new MessageInstance :param unicode body: The body :param unicode from_: The from :param unicode attributes: The attributes :returns: Newly created MessageInstance :rtype: twilio.rest.chat.v2.service.channel.message.MessageInstance """ data = values.of({ 'Body': body, 'From': from_, 'Attributes': attributes, }) payload = self._version.create( 'POST', self._uri, data=data, ) return MessageInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], )
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, )
def page(self, friendly_name=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of WorkspaceInstance records from the API. Request is executed immediately :param unicode friendly_name: Filter by a workspace’s friendly 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 WorkspaceInstance :rtype: twilio.rest.taskrouter.v1.workspace.WorkspacePage """ params = values.of({ 'FriendlyName': friendly_name, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return WorkspacePage(self._version, response, self._solution)
def update(self, read, write, manage): """ Update the SyncMapPermissionInstance :param bool read: Read access. :param bool write: Write access. :param bool manage: Manage access. :returns: Updated SyncMapPermissionInstance :rtype: twilio.rest.preview.sync.service.sync_map.sync_map_permission.SyncMapPermissionInstance """ data = values.of({'Read': read, 'Write': write, 'Manage': manage, }) payload = self._version.update( 'POST', self._uri, data=data, ) return SyncMapPermissionInstance( self._version, payload, service_sid=self._solution['service_sid'], map_sid=self._solution['map_sid'], identity=self._solution['identity'], )
def create(self, code, to=values.unset, verification_sid=values.unset, amount=values.unset, payee=values.unset): """ Create a new VerificationCheckInstance :param unicode code: The verification string :param unicode to: The phone number to verify :param unicode verification_sid: A SID that uniquely identifies the Verification Check :param unicode amount: The amount of the associated PSD2 compliant transaction. :param unicode payee: The payee of the associated PSD2 compliant transaction :returns: Newly created VerificationCheckInstance :rtype: twilio.rest.verify.v2.service.verification_check.VerificationCheckInstance """ data = values.of({ 'Code': code, 'To': to, 'VerificationSid': verification_sid, 'Amount': amount, 'Payee': payee, }) payload = self._version.create( 'POST', self._uri, data=data, ) return VerificationCheckInstance(self._version, payload, service_sid=self._solution['service_sid'], )
def page(self, binding_type=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of UserBindingInstance records from the API. Request is executed immediately :param UserBindingInstance.BindingType binding_type: The binding_type :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 UserBindingInstance :rtype: twilio.rest.chat.v2.service.user.user_binding.UserBindingPage """ params = values.of({ 'BindingType': serialize.map(binding_type, lambda e: e), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return UserBindingPage(self._version, response, self._solution)
def page(self, end=values.unset, start=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of DataSessionInstance records from the API. Request is executed immediately :param datetime end: The end :param datetime start: The start :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 DataSessionInstance :rtype: twilio.rest.wireless.v1.sim.data_session.DataSessionPage """ params = values.of({ 'End': serialize.iso8601_datetime(end), 'Start': serialize.iso8601_datetime(start), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return DataSessionPage(self._version, response, self._solution)
def page(self, start_date=values.unset, end_date=values.unset, tag=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of UserBindingInstance records from the API. Request is executed immediately :param date start_date: The start_date :param date end_date: The end_date :param unicode tag: The tag :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 UserBindingInstance :rtype: twilio.rest.notify.v1.service.user.user_binding.UserBindingPage """ params = values.of({ 'StartDate': serialize.iso8601_date(start_date), 'EndDate': serialize.iso8601_date(end_date), 'Tag': serialize.map(tag, lambda e: e), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return UserBindingPage(self._version, response, self._solution)
def page(self, inbound_participant_status=values.unset, outbound_participant_status=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of InteractionInstance records from the API. Request is executed immediately :param InteractionInstance.ResourceStatus inbound_participant_status: The Inbound Participant Status of this Interaction :param InteractionInstance.ResourceStatus outbound_participant_status: The Outbound Participant Status of this Interaction :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 InteractionInstance :rtype: twilio.rest.preview.proxy.service.session.interaction.InteractionPage """ params = values.of({ 'InboundParticipantStatus': inbound_participant_status, 'OutboundParticipantStatus': outbound_participant_status, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return InteractionPage(self._version, response, self._solution)
def fetch(self, end_date=values.unset, minutes=values.unset, start_date=values.unset, task_channel=values.unset, split_by_wait_time=values.unset): """ Fetch a WorkspaceCumulativeStatisticsInstance :param datetime end_date: Filter cumulative statistics by an end date. :param unicode minutes: Filter cumulative statistics by up to ‘x’ minutes in the past. :param datetime start_date: Filter cumulative statistics by a start date. :param unicode task_channel: Filter real-time and cumulative statistics by TaskChannel. :param unicode split_by_wait_time: A comma separated values for viewing splits of tasks canceled and accepted above the given threshold in seconds. :returns: Fetched WorkspaceCumulativeStatisticsInstance :rtype: twilio.rest.taskrouter.v1.workspace.workspace_cumulative_statistics.WorkspaceCumulativeStatisticsInstance """ params = values.of({ 'EndDate': serialize.iso8601_datetime(end_date), 'Minutes': minutes, 'StartDate': serialize.iso8601_datetime(start_date), 'TaskChannel': task_channel, 'SplitByWaitTime': split_by_wait_time, }) payload = self._version.fetch( 'GET', self._uri, params=params, ) return WorkspaceCumulativeStatisticsInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], )
def page(self, date_created_before=values.unset, date_created=values.unset, date_created_after=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of RecordingInstance records from the API. Request is executed immediately :param date date_created_before: The date_created :param date date_created: The date_created :param date date_created_after: The date_created :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 RecordingInstance :rtype: twilio.rest.api.v2010.account.call.recording.RecordingPage """ params = values.of({ 'DateCreated<': serialize.iso8601_date(date_created_before), 'DateCreated': serialize.iso8601_date(date_created), 'DateCreated>': serialize.iso8601_date(date_created_after), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return RecordingPage(self._version, response, self._solution)
def update(self, role_sid=values.unset, attributes=values.unset, friendly_name=values.unset): """ Update the UserInstance :param unicode role_sid: The unique id of the [Role][role] assigned to this user. :param unicode attributes: An optional string used to contain any metadata or other information for the User. :param unicode friendly_name: An optional human readable string representing the user. :returns: Updated UserInstance :rtype: twilio.rest.chat.v1.service.user.UserInstance """ data = values.of({'RoleSid': role_sid, 'Attributes': attributes, 'FriendlyName': friendly_name, }) payload = self._version.update( 'POST', self._uri, data=data, ) return UserInstance( self._version, payload, service_sid=self._solution['service_sid'], sid=self._solution['sid'], )
def update(self, body=values.unset, attributes=values.unset): """ Update the MessageInstance :param unicode body: The new message body string. :param unicode attributes: The new attributes metadata field you can use to store any data you wish. :returns: Updated MessageInstance :rtype: twilio.rest.chat.v1.service.channel.message.MessageInstance """ data = values.of({'Body': body, 'Attributes': attributes, }) payload = self._version.update( 'POST', self._uri, data=data, ) return MessageInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], sid=self._solution['sid'], )
def create(self, credentials, friendly_name=values.unset, account_sid=values.unset): """ Create a new AwsInstance :param unicode credentials: A string that contains the AWS access credentials in the format <AWS_ACCESS_KEY_ID>:<AWS_SECRET_ACCESS_KEY> :param unicode friendly_name: A string to describe the resource :param unicode account_sid: The Subaccount this Credential should be associated with. :returns: Newly created AwsInstance :rtype: twilio.rest.accounts.v1.credential.aws.AwsInstance """ data = values.of({ 'Credentials': credentials, 'FriendlyName': friendly_name, 'AccountSid': account_sid, }) payload = self._version.create( 'POST', self._uri, data=data, ) return AwsInstance(self._version, payload, )
def page(self, order=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of MessageInstance records from the API. Request is executed immediately :param MessageInstance.OrderType order: The order :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of MessageInstance :rtype: twilio.rest.chat.v1.service.channel.message.MessagePage """ params = values.of({ 'Order': order, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return MessagePage(self._version, response, self._solution)
def page(self, recurring=values.unset, trigger_by=values.unset, usage_category=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of TriggerInstance records from the API. Request is executed immediately :param TriggerInstance.Recurring recurring: Filter by recurring :param TriggerInstance.TriggerField trigger_by: Filter by trigger by :param TriggerInstance.UsageCategory usage_category: Filter by Usage Category :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerPage """ params = values.of({ 'Recurring': recurring, 'TriggerBy': trigger_by, 'UsageCategory': usage_category, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TriggerPage(self._version, response, self._solution)
def update(self, callback_method=values.unset, callback_url=values.unset, friendly_name=values.unset): """ Update the TriggerInstance :param unicode callback_method: HTTP method to use with callback_url :param unicode callback_url: URL Twilio will request when the trigger fires :param unicode friendly_name: A user-specified, human-readable name for the trigger. :returns: Updated TriggerInstance :rtype: twilio.rest.api.v2010.account.usage.trigger.TriggerInstance """ data = values.of({ 'CallbackMethod': callback_method, 'CallbackUrl': callback_url, 'FriendlyName': friendly_name, }) payload = self._version.update( 'POST', self._uri, data=data, ) return TriggerInstance( self._version, payload, account_sid=self._solution['account_sid'], sid=self._solution['sid'], )
def update(self, friendly_name=values.unset, certificate=values.unset, private_key=values.unset, sandbox=values.unset, api_key=values.unset, secret=values.unset): """ Update the CredentialInstance :param unicode friendly_name: A string to describe the resource :param unicode certificate: [APN only] The URL encoded representation of the certificate :param unicode private_key: [APN only] The URL encoded representation of the private key :param bool sandbox: [APN only] Whether to send the credential to sandbox APNs :param unicode api_key: [GCM only] The API key for the project that was obtained from the Google Developer console for your GCM Service application credential :param unicode secret: [FCM only] The Server key of your project from Firebase console :returns: Updated CredentialInstance :rtype: twilio.rest.chat.v2.credential.CredentialInstance """ data = values.of({ 'FriendlyName': friendly_name, 'Certificate': certificate, 'PrivateKey': private_key, 'Sandbox': sandbox, 'ApiKey': api_key, 'Secret': secret, }) payload = self._version.update( 'POST', self._uri, data=data, ) return CredentialInstance(self._version, payload, sid=self._solution['sid'], )
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'], )
def create(self, identity, role_sid=values.unset, attributes=values.unset, friendly_name=values.unset): """ Create a new UserInstance :param unicode identity: A unique string that identifies the user within this service - often a username or email address. :param unicode role_sid: The unique id of the Role assigned to this user. :param unicode attributes: An optional string used to contain any metadata or other information for the User. :param unicode friendly_name: An optional human readable string representing the user. :returns: Newly created UserInstance :rtype: twilio.rest.chat.v1.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'], )
def update(self, friendly_name=values.unset, default_service_role_sid=values.unset, default_channel_role_sid=values.unset, default_channel_creator_role_sid=values.unset, read_status_enabled=values.unset, reachability_enabled=values.unset, typing_indicator_timeout=values.unset, consumption_report_interval=values.unset, notifications_new_message_enabled=values.unset, notifications_new_message_template=values.unset, notifications_added_to_channel_enabled=values.unset, notifications_added_to_channel_template=values.unset, notifications_removed_from_channel_enabled=values.unset, notifications_removed_from_channel_template=values.unset, notifications_invited_to_channel_enabled=values.unset, notifications_invited_to_channel_template=values.unset, pre_webhook_url=values.unset, post_webhook_url=values.unset, webhook_method=values.unset, webhook_filters=values.unset, webhooks_on_message_send_url=values.unset, webhooks_on_message_send_method=values.unset, webhooks_on_message_update_url=values.unset, webhooks_on_message_update_method=values.unset, webhooks_on_message_remove_url=values.unset, webhooks_on_message_remove_method=values.unset, webhooks_on_channel_add_url=values.unset, webhooks_on_channel_add_method=values.unset, webhooks_on_channel_destroy_url=values.unset, webhooks_on_channel_destroy_method=values.unset, webhooks_on_channel_update_url=values.unset, webhooks_on_channel_update_method=values.unset, webhooks_on_member_add_url=values.unset, webhooks_on_member_add_method=values.unset, webhooks_on_member_remove_url=values.unset, webhooks_on_member_remove_method=values.unset, webhooks_on_message_sent_url=values.unset, webhooks_on_message_sent_method=values.unset, webhooks_on_message_updated_url=values.unset, webhooks_on_message_updated_method=values.unset, webhooks_on_message_removed_url=values.unset, webhooks_on_message_removed_method=values.unset, webhooks_on_channel_added_url=values.unset, webhooks_on_channel_added_method=values.unset, webhooks_on_channel_destroyed_url=values.unset, webhooks_on_channel_destroyed_method=values.unset, webhooks_on_channel_updated_url=values.unset, webhooks_on_channel_updated_method=values.unset, webhooks_on_member_added_url=values.unset, webhooks_on_member_added_method=values.unset, webhooks_on_member_removed_url=values.unset, webhooks_on_member_removed_method=values.unset, limits_channel_members=values.unset, limits_user_channels=values.unset): """ Update the ServiceInstance :param unicode friendly_name: A string to describe the resource :param unicode default_service_role_sid: The service role assigned to users when they are added to the service :param unicode default_channel_role_sid: The channel role assigned to users when they are added to a channel :param unicode default_channel_creator_role_sid: The channel role assigned to a channel creator when they join a new channel :param bool read_status_enabled: Whether to enable the Message Consumption Horizon feature :param bool reachability_enabled: Whether to enable the Reachability Indicator feature for this Service instance :param unicode typing_indicator_timeout: How long in seconds to wait before assuming the user is no longer typing :param unicode consumption_report_interval: DEPRECATED :param bool notifications_new_message_enabled: Whether to send a notification when a new message is added to a channel :param unicode notifications_new_message_template: The template to use to create the notification text displayed when a new message is added to a channel :param bool notifications_added_to_channel_enabled: Whether to send a notification when a member is added to a channel :param unicode notifications_added_to_channel_template: The template to use to create the notification text displayed when a member is added to a channel :param bool notifications_removed_from_channel_enabled: Whether to send a notification to a user when they are removed from a channel :param unicode notifications_removed_from_channel_template: The template to use to create the notification text displayed to a user when they are removed :param bool notifications_invited_to_channel_enabled: Whether to send a notification when a user is invited to a channel :param unicode notifications_invited_to_channel_template: The template to use to create the notification text displayed when a user is invited to a channel :param unicode pre_webhook_url: The webhook URL for pre-event webhooks :param unicode post_webhook_url: The URL for post-event webhooks :param unicode webhook_method: The HTTP method to use for both PRE and POST webhooks :param unicode webhook_filters: The list of WebHook events that are enabled for this Service instance :param unicode webhooks_on_message_send_url: The URL of the webhook to call in response to the on_message_send event :param unicode webhooks_on_message_send_method: The HTTP method to use when calling the webhooks.on_message_send.url :param unicode webhooks_on_message_update_url: The URL of the webhook to call in response to the on_message_update event :param unicode webhooks_on_message_update_method: The HTTP method to use when calling the webhooks.on_message_update.url :param unicode webhooks_on_message_remove_url: The URL of the webhook to call in response to the on_message_remove event :param unicode webhooks_on_message_remove_method: The HTTP method to use when calling the webhooks.on_message_remove.url :param unicode webhooks_on_channel_add_url: The URL of the webhook to call in response to the on_channel_add event :param unicode webhooks_on_channel_add_method: The HTTP method to use when calling the webhooks.on_channel_add.url :param unicode webhooks_on_channel_destroy_url: The URL of the webhook to call in response to the on_channel_destroy event :param unicode webhooks_on_channel_destroy_method: The HTTP method to use when calling the webhooks.on_channel_destroy.url :param unicode webhooks_on_channel_update_url: The URL of the webhook to call in response to the on_channel_update event :param unicode webhooks_on_channel_update_method: The HTTP method to use when calling the webhooks.on_channel_update.url :param unicode webhooks_on_member_add_url: The URL of the webhook to call in response to the on_member_add event :param unicode webhooks_on_member_add_method: The HTTP method to use when calling the webhooks.on_member_add.url :param unicode webhooks_on_member_remove_url: The URL of the webhook to call in response to the on_member_remove event :param unicode webhooks_on_member_remove_method: The HTTP method to use when calling the webhooks.on_member_remove.url :param unicode webhooks_on_message_sent_url: The URL of the webhook to call in response to the on_message_sent event :param unicode webhooks_on_message_sent_method: The URL of the webhook to call in response to the on_message_sent event :param unicode webhooks_on_message_updated_url: The URL of the webhook to call in response to the on_message_updated event :param unicode webhooks_on_message_updated_method: The HTTP method to use when calling the webhooks.on_message_updated.url :param unicode webhooks_on_message_removed_url: The URL of the webhook to call in response to the on_message_removed event :param unicode webhooks_on_message_removed_method: The HTTP method to use when calling the webhooks.on_message_removed.url :param unicode webhooks_on_channel_added_url: The URL of the webhook to call in response to the on_channel_added event :param unicode webhooks_on_channel_added_method: The URL of the webhook to call in response to the on_channel_added event :param unicode webhooks_on_channel_destroyed_url: The URL of the webhook to call in response to the on_channel_added event :param unicode webhooks_on_channel_destroyed_method: The HTTP method to use when calling the webhooks.on_channel_destroyed.url :param unicode webhooks_on_channel_updated_url: he URL of the webhook to call in response to the on_channel_updated event :param unicode webhooks_on_channel_updated_method: The HTTP method to use when calling the webhooks.on_channel_updated.url :param unicode webhooks_on_member_added_url: The URL of the webhook to call in response to the on_channel_updated event :param unicode webhooks_on_member_added_method: he HTTP method to use when calling the webhooks.on_channel_updated.url :param unicode webhooks_on_member_removed_url: The URL of the webhook to call in response to the on_member_removed event :param unicode webhooks_on_member_removed_method: The HTTP method to use when calling the webhooks.on_member_removed.url :param unicode limits_channel_members: The maximum number of Members that can be added to Channels within this Service :param unicode limits_user_channels: The maximum number of Channels Users can be a Member of within this Service :returns: The updated ServiceInstance :rtype: twilio.rest.chat.v1.service.ServiceInstance """ data = values.of({ 'FriendlyName': friendly_name, 'DefaultServiceRoleSid': default_service_role_sid, 'DefaultChannelRoleSid': default_channel_role_sid, 'DefaultChannelCreatorRoleSid': default_channel_creator_role_sid, 'ReadStatusEnabled': read_status_enabled, 'ReachabilityEnabled': reachability_enabled, 'TypingIndicatorTimeout': typing_indicator_timeout, 'ConsumptionReportInterval': consumption_report_interval, 'Notifications.NewMessage.Enabled': notifications_new_message_enabled, 'Notifications.NewMessage.Template': notifications_new_message_template, 'Notifications.AddedToChannel.Enabled': notifications_added_to_channel_enabled, 'Notifications.AddedToChannel.Template': notifications_added_to_channel_template, 'Notifications.RemovedFromChannel.Enabled': notifications_removed_from_channel_enabled, 'Notifications.RemovedFromChannel.Template': notifications_removed_from_channel_template, 'Notifications.InvitedToChannel.Enabled': notifications_invited_to_channel_enabled, 'Notifications.InvitedToChannel.Template': notifications_invited_to_channel_template, 'PreWebhookUrl': pre_webhook_url, 'PostWebhookUrl': post_webhook_url, 'WebhookMethod': webhook_method, 'WebhookFilters': serialize.map(webhook_filters, lambda e: e), 'Webhooks.OnMessageSend.Url': webhooks_on_message_send_url, 'Webhooks.OnMessageSend.Method': webhooks_on_message_send_method, 'Webhooks.OnMessageUpdate.Url': webhooks_on_message_update_url, 'Webhooks.OnMessageUpdate.Method': webhooks_on_message_update_method, 'Webhooks.OnMessageRemove.Url': webhooks_on_message_remove_url, 'Webhooks.OnMessageRemove.Method': webhooks_on_message_remove_method, 'Webhooks.OnChannelAdd.Url': webhooks_on_channel_add_url, 'Webhooks.OnChannelAdd.Method': webhooks_on_channel_add_method, 'Webhooks.OnChannelDestroy.Url': webhooks_on_channel_destroy_url, 'Webhooks.OnChannelDestroy.Method': webhooks_on_channel_destroy_method, 'Webhooks.OnChannelUpdate.Url': webhooks_on_channel_update_url, 'Webhooks.OnChannelUpdate.Method': webhooks_on_channel_update_method, 'Webhooks.OnMemberAdd.Url': webhooks_on_member_add_url, 'Webhooks.OnMemberAdd.Method': webhooks_on_member_add_method, 'Webhooks.OnMemberRemove.Url': webhooks_on_member_remove_url, 'Webhooks.OnMemberRemove.Method': webhooks_on_member_remove_method, 'Webhooks.OnMessageSent.Url': webhooks_on_message_sent_url, 'Webhooks.OnMessageSent.Method': webhooks_on_message_sent_method, 'Webhooks.OnMessageUpdated.Url': webhooks_on_message_updated_url, 'Webhooks.OnMessageUpdated.Method': webhooks_on_message_updated_method, 'Webhooks.OnMessageRemoved.Url': webhooks_on_message_removed_url, 'Webhooks.OnMessageRemoved.Method': webhooks_on_message_removed_method, 'Webhooks.OnChannelAdded.Url': webhooks_on_channel_added_url, 'Webhooks.OnChannelAdded.Method': webhooks_on_channel_added_method, 'Webhooks.OnChannelDestroyed.Url': webhooks_on_channel_destroyed_url, 'Webhooks.OnChannelDestroyed.Method': webhooks_on_channel_destroyed_method, 'Webhooks.OnChannelUpdated.Url': webhooks_on_channel_updated_url, 'Webhooks.OnChannelUpdated.Method': webhooks_on_channel_updated_method, 'Webhooks.OnMemberAdded.Url': webhooks_on_member_added_url, 'Webhooks.OnMemberAdded.Method': webhooks_on_member_added_method, 'Webhooks.OnMemberRemoved.Url': webhooks_on_member_removed_url, 'Webhooks.OnMemberRemoved.Method': webhooks_on_member_removed_method, 'Limits.ChannelMembers': limits_channel_members, 'Limits.UserChannels': limits_user_channels, }) payload = self._version.update( method='POST', uri=self._uri, data=data, ) return ServiceInstance( self._version, payload, sid=self._solution['sid'], )
def create(self, api_version=values.unset, friendly_name=values.unset, sms_application_sid=values.unset, sms_fallback_method=values.unset, sms_fallback_url=values.unset, sms_method=values.unset, sms_url=values.unset, status_callback=values.unset, status_callback_method=values.unset, voice_application_sid=values.unset, voice_caller_id_lookup=values.unset, voice_fallback_method=values.unset, voice_fallback_url=values.unset, voice_method=values.unset, voice_url=values.unset, emergency_status=values.unset, emergency_address_sid=values.unset, trunk_sid=values.unset, identity_sid=values.unset, address_sid=values.unset, voice_receive_mode=values.unset, phone_number=values.unset, area_code=values.unset): """ Create a new IncomingPhoneNumberInstance :param unicode api_version: The API version to use for incoming calls made to the new phone number :param unicode friendly_name: A string to describe the new phone number :param unicode sms_application_sid: The SID of the application to handle SMS messages :param unicode sms_fallback_method: HTTP method used with sms_fallback_url :param unicode sms_fallback_url: The URL we call when an error occurs while executing TwiML :param unicode sms_method: The HTTP method to use with sms url :param unicode sms_url: The URL we should call when the new phone number receives an incoming SMS message :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_method: HTTP method we should use to call status_callback :param unicode voice_application_sid: The SID of the application to handle the new phone number :param bool voice_caller_id_lookup: Whether to lookup the caller's name :param unicode voice_fallback_method: The HTTP method used with voice_fallback_url :param unicode voice_fallback_url: The URL we will call when an error occurs in TwiML :param unicode voice_method: The HTTP method used with the voice_url :param unicode voice_url: The URL we should call when the phone number receives a call :param IncomingPhoneNumberInstance.EmergencyStatus emergency_status: Status determining whether the new phone number is enabled for emergency calling :param unicode emergency_address_sid: The emergency address configuration to use for emergency calling :param unicode trunk_sid: SID of the trunk to handle calls to the new phone number :param unicode identity_sid: The SID of the Identity resource to associate with the new phone number :param unicode address_sid: The SID of the Address resource associated with the phone number :param IncomingPhoneNumberInstance.VoiceReceiveMode voice_receive_mode: Incoming call type: fax or voice :param unicode phone_number: The phone number to purchase in E.164 format :param unicode area_code: The desired area code for the new phone number :returns: Newly created IncomingPhoneNumberInstance :rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance """ data = values.of({ 'PhoneNumber': phone_number, 'AreaCode': area_code, 'ApiVersion': api_version, 'FriendlyName': friendly_name, 'SmsApplicationSid': sms_application_sid, 'SmsFallbackMethod': sms_fallback_method, 'SmsFallbackUrl': sms_fallback_url, 'SmsMethod': sms_method, 'SmsUrl': sms_url, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'VoiceApplicationSid': voice_application_sid, 'VoiceCallerIdLookup': voice_caller_id_lookup, 'VoiceFallbackMethod': voice_fallback_method, 'VoiceFallbackUrl': voice_fallback_url, 'VoiceMethod': voice_method, 'VoiceUrl': voice_url, 'EmergencyStatus': emergency_status, 'EmergencyAddressSid': emergency_address_sid, 'TrunkSid': trunk_sid, 'IdentitySid': identity_sid, 'AddressSid': address_sid, 'VoiceReceiveMode': voice_receive_mode, }) payload = self._version.create( 'POST', self._uri, data=data, ) return IncomingPhoneNumberInstance( self._version, payload, account_sid=self._solution['account_sid'], )
def create(self, to, status_callback=values.unset, application_sid=values.unset, max_price=values.unset, provide_feedback=values.unset, validity_period=values.unset, max_rate=values.unset, force_delivery=values.unset, provider_sid=values.unset, content_retention=values.unset, address_retention=values.unset, smart_encoded=values.unset, interactive_data=values.unset, from_=values.unset, messaging_service_sid=values.unset, body=values.unset, media_url=values.unset): """ Create a new MessageInstance :param unicode to: The phone number to receive the message :param unicode status_callback: URL Twilio will request when the status changes :param unicode application_sid: The application to use for callbacks :param unicode max_price: The total maximum price up to the fourth decimal in US dollars acceptable for the message to be delivered. :param bool provide_feedback: Set this value to true if you are sending messages that have a trackable user action and you intend to confirm delivery of the message using the Message Feedback API. :param unicode validity_period: The number of seconds that the message can remain in a Twilio queue. :param unicode max_rate: The max_rate :param bool force_delivery: The force_delivery :param unicode provider_sid: The provider_sid :param MessageInstance.ContentRetention content_retention: The content_retention :param MessageInstance.AddressRetention address_retention: The address_retention :param bool smart_encoded: The smart_encoded :param unicode interactive_data: JSON string representing interactive data message. :param unicode from_: The phone number that initiated the message :param unicode messaging_service_sid: The 34 character unique id of the Messaging Service you want to associate with this Message. :param unicode body: The text of the message you want to send, limited to 1600 characters. :param unicode media_url: The URL of the media you wish to send out with the message. :returns: Newly created MessageInstance :rtype: twilio.rest.api.v2010.account.message.MessageInstance """ data = values.of({ 'To': to, 'From': from_, 'MessagingServiceSid': messaging_service_sid, 'Body': body, 'MediaUrl': serialize.map(media_url, lambda e: e), 'StatusCallback': status_callback, 'ApplicationSid': application_sid, 'MaxPrice': max_price, 'ProvideFeedback': provide_feedback, 'ValidityPeriod': validity_period, 'MaxRate': max_rate, 'ForceDelivery': force_delivery, 'ProviderSid': provider_sid, 'ContentRetention': content_retention, 'AddressRetention': address_retention, 'SmartEncoded': smart_encoded, 'InteractiveData': interactive_data, }) payload = self._version.create( 'POST', self._uri, data=data, ) return MessageInstance( self._version, payload, account_sid=self._solution['account_sid'], )
def create(self, identity=values.unset, messaging_binding_address=values.unset, messaging_binding_proxy_address=values.unset, date_created=values.unset, date_updated=values.unset, attributes=values.unset, messaging_binding_projected_address=values.unset, role_sid=values.unset, x_twilio_webhook_enabled=values.unset): """ Create the ParticipantInstance :param unicode identity: A unique string identifier for the conversation participant as Conversation User. :param unicode messaging_binding_address: The address of the participant's device. :param unicode messaging_binding_proxy_address: The address of the Twilio phone number that the participant is in contact with. :param datetime date_created: The date that this resource was created. :param datetime date_updated: The date that this resource was last updated. :param unicode attributes: An optional string metadata field you can use to store any data you wish. :param unicode messaging_binding_projected_address: The address of the Twilio phone number that is used in Group MMS. :param unicode role_sid: The SID of a conversation-level Role to assign to the participant :param ParticipantInstance.WebhookEnabledType x_twilio_webhook_enabled: The X-Twilio-Webhook-Enabled HTTP request header :returns: The created ParticipantInstance :rtype: twilio.rest.conversations.v1.service.conversation.participant.ParticipantInstance """ data = values.of({ 'Identity': identity, 'MessagingBinding.Address': messaging_binding_address, 'MessagingBinding.ProxyAddress': messaging_binding_proxy_address, 'DateCreated': serialize.iso8601_datetime(date_created), 'DateUpdated': serialize.iso8601_datetime(date_updated), 'Attributes': attributes, 'MessagingBinding.ProjectedAddress': messaging_binding_projected_address, 'RoleSid': role_sid, }) headers = values.of({ 'X-Twilio-Webhook-Enabled': x_twilio_webhook_enabled, }) payload = self._version.create( method='POST', uri=self._uri, data=data, headers=headers, ) return ParticipantInstance( self._version, payload, chat_service_sid=self._solution['chat_service_sid'], conversation_sid=self._solution['conversation_sid'], )
def update(self, account_sid=values.unset, api_version=values.unset, friendly_name=values.unset, sms_application_sid=values.unset, sms_fallback_method=values.unset, sms_fallback_url=values.unset, sms_method=values.unset, sms_url=values.unset, status_callback=values.unset, status_callback_method=values.unset, voice_application_sid=values.unset, voice_caller_id_lookup=values.unset, voice_fallback_method=values.unset, voice_fallback_url=values.unset, voice_method=values.unset, voice_url=values.unset, emergency_status=values.unset, emergency_address_sid=values.unset, trunk_sid=values.unset, voice_receive_mode=values.unset, identity_sid=values.unset, address_sid=values.unset): """ Update the IncomingPhoneNumberInstance :param unicode account_sid: The new owner of the phone number :param unicode api_version: The Twilio REST API version to use :param unicode friendly_name: A human readable description of this resource :param unicode sms_application_sid: Unique string that identifies the application :param unicode sms_fallback_method: HTTP method used with sms fallback url :param unicode sms_fallback_url: URL Twilio will request if an error occurs in executing TwiML :param unicode sms_method: HTTP method to use with sms url :param unicode sms_url: URL Twilio will request when receiving an SMS :param unicode status_callback: URL Twilio will use to pass status parameters :param unicode status_callback_method: HTTP method twilio will use with status callback :param unicode voice_application_sid: The unique sid of the application to handle this number :param bool voice_caller_id_lookup: Look up the caller's caller-ID :param unicode voice_fallback_method: HTTP method used with fallback_url :param unicode voice_fallback_url: URL Twilio will request when an error occurs in TwiML :param unicode voice_method: HTTP method used with the voice url :param unicode voice_url: URL Twilio will request when receiving a call :param IncomingPhoneNumberInstance.EmergencyStatus emergency_status: Status determining whether the number is enabled for emergency calling :param unicode emergency_address_sid: EmergencyAddress configuration to leverage emergency calling :param unicode trunk_sid: Unique string to identify the trunk :param IncomingPhoneNumberInstance.VoiceReceiveMode voice_receive_mode: Incoming call type: `fax` or `voice` :param unicode identity_sid: Unique string that identifies the identity associated with number :param unicode address_sid: Unique string that identifies the address associated with number :returns: Updated IncomingPhoneNumberInstance :rtype: twilio.rest.api.v2010.account.incoming_phone_number.IncomingPhoneNumberInstance """ data = values.of({ 'AccountSid': account_sid, 'ApiVersion': api_version, 'FriendlyName': friendly_name, 'SmsApplicationSid': sms_application_sid, 'SmsFallbackMethod': sms_fallback_method, 'SmsFallbackUrl': sms_fallback_url, 'SmsMethod': sms_method, 'SmsUrl': sms_url, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'VoiceApplicationSid': voice_application_sid, 'VoiceCallerIdLookup': voice_caller_id_lookup, 'VoiceFallbackMethod': voice_fallback_method, 'VoiceFallbackUrl': voice_fallback_url, 'VoiceMethod': voice_method, 'VoiceUrl': voice_url, 'EmergencyStatus': emergency_status, 'EmergencyAddressSid': emergency_address_sid, 'TrunkSid': trunk_sid, 'VoiceReceiveMode': voice_receive_mode, 'IdentitySid': identity_sid, 'AddressSid': address_sid, }) payload = self._version.update( 'POST', self._uri, data=data, ) return IncomingPhoneNumberInstance( self._version, payload, account_sid=self._solution['account_sid'], sid=self._solution['sid'], )
def update(self, friendly_name=values.unset, default_service_role_sid=values.unset, default_channel_role_sid=values.unset, default_channel_creator_role_sid=values.unset, read_status_enabled=values.unset, reachability_enabled=values.unset, typing_indicator_timeout=values.unset, consumption_report_interval=values.unset, notifications_new_message_enabled=values.unset, notifications_new_message_template=values.unset, notifications_new_message_sound=values.unset, notifications_new_message_badge_count_enabled=values.unset, notifications_added_to_channel_enabled=values.unset, notifications_added_to_channel_template=values.unset, notifications_added_to_channel_sound=values.unset, notifications_removed_from_channel_enabled=values.unset, notifications_removed_from_channel_template=values.unset, notifications_removed_from_channel_sound=values.unset, notifications_invited_to_channel_enabled=values.unset, notifications_invited_to_channel_template=values.unset, notifications_invited_to_channel_sound=values.unset, pre_webhook_url=values.unset, post_webhook_url=values.unset, webhook_method=values.unset, webhook_filters=values.unset, limits_channel_members=values.unset, limits_user_channels=values.unset, media_compatibility_message=values.unset, pre_webhook_retry_count=values.unset, post_webhook_retry_count=values.unset, notifications_log_enabled=values.unset): """ Update the ServiceInstance :param unicode friendly_name: A string to describe the resource :param unicode default_service_role_sid: The service role assigned to users when they are added to the service :param unicode default_channel_role_sid: The channel role assigned to users when they are added to a channel :param unicode default_channel_creator_role_sid: The channel role assigned to a channel creator when they join a new channel :param bool read_status_enabled: Whether to enable the Message Consumption Horizon feature :param bool reachability_enabled: Whether to enable the Reachability Indicator feature for this Service instance :param unicode typing_indicator_timeout: How long in seconds to wait before assuming the user is no longer typing :param unicode consumption_report_interval: DEPRECATED :param bool notifications_new_message_enabled: Whether to send a notification when a new message is added to a channel :param unicode notifications_new_message_template: The template to use to create the notification text displayed when a new message is added to a channel :param unicode notifications_new_message_sound: The name of the sound to play when a new message is added to a channel :param bool notifications_new_message_badge_count_enabled: Whether the new message badge is enabled :param bool notifications_added_to_channel_enabled: Whether to send a notification when a member is added to a channel :param unicode notifications_added_to_channel_template: The template to use to create the notification text displayed when a member is added to a channel :param unicode notifications_added_to_channel_sound: The name of the sound to play when a member is added to a channel :param bool notifications_removed_from_channel_enabled: Whether to send a notification to a user when they are removed from a channel :param unicode notifications_removed_from_channel_template: The template to use to create the notification text displayed to a user when they are removed :param unicode notifications_removed_from_channel_sound: The name of the sound to play to a user when they are removed from a channel :param bool notifications_invited_to_channel_enabled: Whether to send a notification when a user is invited to a channel :param unicode notifications_invited_to_channel_template: The template to use to create the notification text displayed when a user is invited to a channel :param unicode notifications_invited_to_channel_sound: The name of the sound to play when a user is invited to a channel :param unicode pre_webhook_url: The webhook URL for pre-event webhooks :param unicode post_webhook_url: The URL for post-event webhooks :param unicode webhook_method: The HTTP method to use for both PRE and POST webhooks :param unicode webhook_filters: The list of webhook events that are enabled for this Service instance :param unicode limits_channel_members: The maximum number of Members that can be added to Channels within this Service :param unicode limits_user_channels: The maximum number of Channels Users can be a Member of within this Service :param unicode media_compatibility_message: The message to send when a media message has no text :param unicode pre_webhook_retry_count: Count of times webhook will be retried in case of timeout or 429/503/504 HTTP responses :param unicode post_webhook_retry_count: The number of times calls to the `post_webhook_url` will be retried :param bool notifications_log_enabled: Whether to log notifications :returns: Updated ServiceInstance :rtype: twilio.rest.chat.v2.service.ServiceInstance """ data = values.of({ 'FriendlyName': friendly_name, 'DefaultServiceRoleSid': default_service_role_sid, 'DefaultChannelRoleSid': default_channel_role_sid, 'DefaultChannelCreatorRoleSid': default_channel_creator_role_sid, 'ReadStatusEnabled': read_status_enabled, 'ReachabilityEnabled': reachability_enabled, 'TypingIndicatorTimeout': typing_indicator_timeout, 'ConsumptionReportInterval': consumption_report_interval, 'Notifications.NewMessage.Enabled': notifications_new_message_enabled, 'Notifications.NewMessage.Template': notifications_new_message_template, 'Notifications.NewMessage.Sound': notifications_new_message_sound, 'Notifications.NewMessage.BadgeCountEnabled': notifications_new_message_badge_count_enabled, 'Notifications.AddedToChannel.Enabled': notifications_added_to_channel_enabled, 'Notifications.AddedToChannel.Template': notifications_added_to_channel_template, 'Notifications.AddedToChannel.Sound': notifications_added_to_channel_sound, 'Notifications.RemovedFromChannel.Enabled': notifications_removed_from_channel_enabled, 'Notifications.RemovedFromChannel.Template': notifications_removed_from_channel_template, 'Notifications.RemovedFromChannel.Sound': notifications_removed_from_channel_sound, 'Notifications.InvitedToChannel.Enabled': notifications_invited_to_channel_enabled, 'Notifications.InvitedToChannel.Template': notifications_invited_to_channel_template, 'Notifications.InvitedToChannel.Sound': notifications_invited_to_channel_sound, 'PreWebhookUrl': pre_webhook_url, 'PostWebhookUrl': post_webhook_url, 'WebhookMethod': webhook_method, 'WebhookFilters': serialize.map(webhook_filters, lambda e: e), 'Limits.ChannelMembers': limits_channel_members, 'Limits.UserChannels': limits_user_channels, 'Media.CompatibilityMessage': media_compatibility_message, 'PreWebhookRetryCount': pre_webhook_retry_count, 'PostWebhookRetryCount': post_webhook_retry_count, 'Notifications.LogEnabled': notifications_log_enabled, }) payload = self._version.update( 'POST', self._uri, data=data, ) return ServiceInstance( self._version, payload, sid=self._solution['sid'], )
def create(self, target, configuration_url=values.unset, configuration_method=values.unset, configuration_filters=values.unset, configuration_triggers=values.unset, configuration_flow_sid=values.unset, configuration_retry_count=values.unset, configuration_replay_after=values.unset, configuration_buffer_messages=values.unset, configuration_buffer_window=values.unset): """ Create the WebhookInstance :param WebhookInstance.Target target: The target of the webhook :param unicode configuration_url: The absolute URL the webhook request should be sent to :param WebhookInstance.Method configuration_method: The HTTP method we should use when sending a webhook request to url :param unicode configuration_filters: The list of events that trigger a webhook event for the Session :param unicode configuration_triggers: The list of keywords, firing webhook event for the Session :param unicode configuration_flow_sid: The SID of the studio flow where the webhook should be sent to :param unicode configuration_retry_count: The number of times to call the webhook request if the first attempt fails :param unicode configuration_replay_after: The message index for which and its successors the webhook will be replayed :param bool configuration_buffer_messages: Whether buffering should be applied to messages :param unicode configuration_buffer_window: The period to buffer messages :returns: The created WebhookInstance :rtype: twilio.rest.messaging.v1.session.webhook.WebhookInstance """ data = values.of({ 'Target': target, 'Configuration.Url': configuration_url, 'Configuration.Method': configuration_method, 'Configuration.Filters': serialize.map(configuration_filters, lambda e: e), 'Configuration.Triggers': serialize.map(configuration_triggers, lambda e: e), 'Configuration.FlowSid': configuration_flow_sid, 'Configuration.RetryCount': configuration_retry_count, 'Configuration.ReplayAfter': configuration_replay_after, 'Configuration.BufferMessages': configuration_buffer_messages, 'Configuration.BufferWindow': configuration_buffer_window, }) payload = self._version.create( method='POST', uri=self._uri, data=data, ) return WebhookInstance( self._version, payload, session_sid=self._solution['session_sid'], )
def create(self, from_, to, status_callback=values.unset, status_callback_method=values.unset, status_callback_event=values.unset, timeout=values.unset, record=values.unset, muted=values.unset, beep=values.unset, start_conference_on_enter=values.unset, end_conference_on_exit=values.unset, wait_url=values.unset, wait_method=values.unset, early_media=values.unset, max_participants=values.unset, conference_record=values.unset, conference_trim=values.unset, conference_status_callback=values.unset, conference_status_callback_method=values.unset, conference_status_callback_event=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, region=values.unset, conference_recording_status_callback=values.unset, conference_recording_status_callback_method=values.unset, recording_status_callback_event=values.unset, conference_recording_status_callback_event=values.unset, coaching=values.unset, call_sid_to_coach=values.unset): """ Create the ParticipantInstance :param unicode from_: The `from` phone number used to invite a participant :param unicode to: The number, client id, or sip address of the new participant :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_method: The HTTP method we should use to call `status_callback` :param unicode status_callback_event: Set state change events that will trigger a callback :param unicode timeout: he number of seconds that we should wait for an answer :param bool record: Whether to record the participant and their conferences :param bool muted: Whether to mute the agent :param unicode beep: Whether to play a notification beep to the conference when the participant joins :param bool start_conference_on_enter: Whether the conference starts when the participant joins the conference :param bool end_conference_on_exit: Whether to end the conference when the participant leaves :param unicode wait_url: URL that hosts pre-conference hold music :param unicode wait_method: The HTTP method we should use to call `wait_url` :param bool early_media: Whether agents can hear the state of the outbound call :param unicode max_participants: The maximum number of agent conference participants :param unicode conference_record: Whether to record the conference the participant is joining :param unicode conference_trim: Whether to trim leading and trailing silence from your recorded conference audio files :param unicode conference_status_callback: The callback URL for conference events :param unicode conference_status_callback_method: HTTP method for requesting `conference_status_callback` URL :param unicode conference_status_callback_event: The conference state changes that should generate a call to `conference_status_callback` :param unicode recording_channels: Specify `mono` or `dual` recording channels :param unicode recording_status_callback: The URL that we should call using the `recording_status_callback_method` when the recording status changes :param unicode recording_status_callback_method: The HTTP method we should use when we call `recording_status_callback` :param unicode sip_auth_username: The SIP username used for authentication :param unicode sip_auth_password: The SIP password for authentication :param unicode region: The region where we should mix the conference audio :param unicode conference_recording_status_callback: The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available :param unicode conference_recording_status_callback_method: The HTTP method we should use to call `conference_recording_status_callback` :param unicode recording_status_callback_event: The recording state changes that should generate a call to `recording_status_callback` :param unicode conference_recording_status_callback_event: The conference recording state changes that should generate a call to `conference_recording_status_callback` :param bool coaching: Indicates if the participant changed to coach :param unicode call_sid_to_coach: The SID of the participant who is being `coached` :returns: The created ParticipantInstance :rtype: twilio.rest.api.v2010.account.conference.participant.ParticipantInstance """ data = values.of({ 'From': from_, 'To': to, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'Timeout': timeout, 'Record': record, 'Muted': muted, 'Beep': beep, 'StartConferenceOnEnter': start_conference_on_enter, 'EndConferenceOnExit': end_conference_on_exit, 'WaitUrl': wait_url, 'WaitMethod': wait_method, 'EarlyMedia': early_media, 'MaxParticipants': max_participants, 'ConferenceRecord': conference_record, 'ConferenceTrim': conference_trim, 'ConferenceStatusCallback': conference_status_callback, 'ConferenceStatusCallbackMethod': conference_status_callback_method, 'ConferenceStatusCallbackEvent': serialize.map(conference_status_callback_event, lambda e: e), 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'Region': region, 'ConferenceRecordingStatusCallback': conference_recording_status_callback, 'ConferenceRecordingStatusCallbackMethod': conference_recording_status_callback_method, 'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e), 'ConferenceRecordingStatusCallbackEvent': serialize.map(conference_recording_status_callback_event, lambda e: e), 'Coaching': coaching, 'CallSidToCoach': call_sid_to_coach, }) payload = self._version.create(method='POST', uri=self._uri, data=data, ) return ParticipantInstance( self._version, payload, account_sid=self._solution['account_sid'], conference_sid=self._solution['conference_sid'], )
def create(self, body=values.unset, priority=values.unset, ttl=values.unset, title=values.unset, sound=values.unset, action=values.unset, data=values.unset, apn=values.unset, gcm=values.unset, sms=values.unset, facebook_messenger=values.unset, fcm=values.unset, segment=values.unset, alexa=values.unset, to_binding=values.unset, identity=values.unset, tag=values.unset): """ Create a new NotificationInstance :param unicode body: The body :param NotificationInstance.Priority priority: The priority :param unicode ttl: The ttl :param unicode title: The title :param unicode sound: The sound :param unicode action: The action :param dict data: The data :param dict apn: The apn :param dict gcm: The gcm :param dict sms: The sms :param dict facebook_messenger: The facebook_messenger :param dict fcm: The fcm :param unicode segment: The segment :param dict alexa: The alexa :param unicode to_binding: The to_binding :param unicode identity: The identity :param unicode tag: The tag :returns: Newly created NotificationInstance :rtype: twilio.rest.notify.v1.service.notification.NotificationInstance """ data = values.of({ 'Identity': serialize.map(identity, lambda e: e), 'Tag': serialize.map(tag, lambda e: e), 'Body': body, 'Priority': priority, 'Ttl': ttl, 'Title': title, 'Sound': sound, 'Action': action, 'Data': serialize.object(data), 'Apn': serialize.object(apn), 'Gcm': serialize.object(gcm), 'Sms': serialize.object(sms), 'FacebookMessenger': serialize.object(facebook_messenger), 'Fcm': serialize.object(fcm), 'Segment': serialize.map(segment, lambda e: e), 'Alexa': serialize.object(alexa), 'ToBinding': serialize.map(to_binding, lambda e: e), }) payload = self._version.create( 'POST', self._uri, data=data, ) return NotificationInstance(self._version, payload, service_sid=self._solution['service_sid'])
def create(self, friendly_name=values.unset, apn_credential_sid=values.unset, gcm_credential_sid=values.unset, messaging_service_sid=values.unset, facebook_messenger_page_id=values.unset, default_apn_notification_protocol_version=values.unset, default_gcm_notification_protocol_version=values.unset, fcm_credential_sid=values.unset, default_fcm_notification_protocol_version=values.unset, log_enabled=values.unset, alexa_skill_id=values.unset, default_alexa_notification_protocol_version=values.unset): """ Create the ServiceInstance :param unicode friendly_name: A string to describe the resource :param unicode apn_credential_sid: The SID of the Credential to use for APN Bindings :param unicode gcm_credential_sid: The SID of the Credential to use for GCM Bindings :param unicode messaging_service_sid: The SID of the Messaging Service to use for SMS Bindings :param unicode facebook_messenger_page_id: Deprecated :param unicode default_apn_notification_protocol_version: The protocol version to use for sending APNS notifications :param unicode default_gcm_notification_protocol_version: The protocol version to use for sending GCM notifications :param unicode fcm_credential_sid: The SID of the Credential to use for FCM Bindings :param unicode default_fcm_notification_protocol_version: The protocol version to use for sending FCM notifications :param bool log_enabled: Whether to log notifications :param unicode alexa_skill_id: Deprecated :param unicode default_alexa_notification_protocol_version: Deprecated :returns: The created ServiceInstance :rtype: twilio.rest.notify.v1.service.ServiceInstance """ data = values.of({ 'FriendlyName': friendly_name, 'ApnCredentialSid': apn_credential_sid, 'GcmCredentialSid': gcm_credential_sid, 'MessagingServiceSid': messaging_service_sid, 'FacebookMessengerPageId': facebook_messenger_page_id, 'DefaultApnNotificationProtocolVersion': default_apn_notification_protocol_version, 'DefaultGcmNotificationProtocolVersion': default_gcm_notification_protocol_version, 'FcmCredentialSid': fcm_credential_sid, 'DefaultFcmNotificationProtocolVersion': default_fcm_notification_protocol_version, 'LogEnabled': log_enabled, 'AlexaSkillId': alexa_skill_id, 'DefaultAlexaNotificationProtocolVersion': default_alexa_notification_protocol_version, }) payload = self._version.create( method='POST', uri=self._uri, data=data, ) return ServiceInstance( self._version, payload, )
def update(self, friendly_name=values.unset, default_service_role_sid=values.unset, default_channel_role_sid=values.unset, default_channel_creator_role_sid=values.unset, read_status_enabled=values.unset, reachability_enabled=values.unset, typing_indicator_timeout=values.unset, consumption_report_interval=values.unset, notifications_new_message_enabled=values.unset, notifications_new_message_template=values.unset, notifications_added_to_channel_enabled=values.unset, notifications_added_to_channel_template=values.unset, notifications_removed_from_channel_enabled=values.unset, notifications_removed_from_channel_template=values.unset, notifications_invited_to_channel_enabled=values.unset, notifications_invited_to_channel_template=values.unset, pre_webhook_url=values.unset, post_webhook_url=values.unset, webhook_method=values.unset, webhook_filters=values.unset, webhooks_on_message_send_url=values.unset, webhooks_on_message_send_method=values.unset, webhooks_on_message_send_format=values.unset, webhooks_on_message_update_url=values.unset, webhooks_on_message_update_method=values.unset, webhooks_on_message_update_format=values.unset, webhooks_on_message_remove_url=values.unset, webhooks_on_message_remove_method=values.unset, webhooks_on_message_remove_format=values.unset, webhooks_on_channel_add_url=values.unset, webhooks_on_channel_add_method=values.unset, webhooks_on_channel_add_format=values.unset, webhooks_on_channel_destroy_url=values.unset, webhooks_on_channel_destroy_method=values.unset, webhooks_on_channel_destroy_format=values.unset, webhooks_on_channel_update_url=values.unset, webhooks_on_channel_update_method=values.unset, webhooks_on_channel_update_format=values.unset, webhooks_on_member_add_url=values.unset, webhooks_on_member_add_method=values.unset, webhooks_on_member_add_format=values.unset, webhooks_on_member_remove_url=values.unset, webhooks_on_member_remove_method=values.unset, webhooks_on_member_remove_format=values.unset, webhooks_on_message_sent_url=values.unset, webhooks_on_message_sent_method=values.unset, webhooks_on_message_sent_format=values.unset, webhooks_on_message_updated_url=values.unset, webhooks_on_message_updated_method=values.unset, webhooks_on_message_updated_format=values.unset, webhooks_on_message_removed_url=values.unset, webhooks_on_message_removed_method=values.unset, webhooks_on_message_removed_format=values.unset, webhooks_on_channel_added_url=values.unset, webhooks_on_channel_added_method=values.unset, webhooks_on_channel_added_format=values.unset, webhooks_on_channel_destroyed_url=values.unset, webhooks_on_channel_destroyed_method=values.unset, webhooks_on_channel_destroyed_format=values.unset, webhooks_on_channel_updated_url=values.unset, webhooks_on_channel_updated_method=values.unset, webhooks_on_channel_updated_format=values.unset, webhooks_on_member_added_url=values.unset, webhooks_on_member_added_method=values.unset, webhooks_on_member_added_format=values.unset, webhooks_on_member_removed_url=values.unset, webhooks_on_member_removed_method=values.unset, webhooks_on_member_removed_format=values.unset, limits_channel_members=values.unset, limits_user_channels=values.unset): """ Update the ServiceInstance :param unicode friendly_name: The friendly_name :param unicode default_service_role_sid: The default_service_role_sid :param unicode default_channel_role_sid: The default_channel_role_sid :param unicode default_channel_creator_role_sid: The default_channel_creator_role_sid :param bool read_status_enabled: The read_status_enabled :param bool reachability_enabled: The reachability_enabled :param unicode typing_indicator_timeout: The typing_indicator_timeout :param unicode consumption_report_interval: The consumption_report_interval :param bool notifications_new_message_enabled: The notifications.new_message.enabled :param unicode notifications_new_message_template: The notifications.new_message.template :param bool notifications_added_to_channel_enabled: The notifications.added_to_channel.enabled :param unicode notifications_added_to_channel_template: The notifications.added_to_channel.template :param bool notifications_removed_from_channel_enabled: The notifications.removed_from_channel.enabled :param unicode notifications_removed_from_channel_template: The notifications.removed_from_channel.template :param bool notifications_invited_to_channel_enabled: The notifications.invited_to_channel.enabled :param unicode notifications_invited_to_channel_template: The notifications.invited_to_channel.template :param unicode pre_webhook_url: The pre_webhook_url :param unicode post_webhook_url: The post_webhook_url :param unicode webhook_method: The webhook_method :param unicode webhook_filters: The webhook_filters :param unicode webhooks_on_message_send_url: The webhooks.on_message_send.url :param unicode webhooks_on_message_send_method: The webhooks.on_message_send.method :param unicode webhooks_on_message_send_format: The webhooks.on_message_send.format :param unicode webhooks_on_message_update_url: The webhooks.on_message_update.url :param unicode webhooks_on_message_update_method: The webhooks.on_message_update.method :param unicode webhooks_on_message_update_format: The webhooks.on_message_update.format :param unicode webhooks_on_message_remove_url: The webhooks.on_message_remove.url :param unicode webhooks_on_message_remove_method: The webhooks.on_message_remove.method :param unicode webhooks_on_message_remove_format: The webhooks.on_message_remove.format :param unicode webhooks_on_channel_add_url: The webhooks.on_channel_add.url :param unicode webhooks_on_channel_add_method: The webhooks.on_channel_add.method :param unicode webhooks_on_channel_add_format: The webhooks.on_channel_add.format :param unicode webhooks_on_channel_destroy_url: The webhooks.on_channel_destroy.url :param unicode webhooks_on_channel_destroy_method: The webhooks.on_channel_destroy.method :param unicode webhooks_on_channel_destroy_format: The webhooks.on_channel_destroy.format :param unicode webhooks_on_channel_update_url: The webhooks.on_channel_update.url :param unicode webhooks_on_channel_update_method: The webhooks.on_channel_update.method :param unicode webhooks_on_channel_update_format: The webhooks.on_channel_update.format :param unicode webhooks_on_member_add_url: The webhooks.on_member_add.url :param unicode webhooks_on_member_add_method: The webhooks.on_member_add.method :param unicode webhooks_on_member_add_format: The webhooks.on_member_add.format :param unicode webhooks_on_member_remove_url: The webhooks.on_member_remove.url :param unicode webhooks_on_member_remove_method: The webhooks.on_member_remove.method :param unicode webhooks_on_member_remove_format: The webhooks.on_member_remove.format :param unicode webhooks_on_message_sent_url: The webhooks.on_message_sent.url :param unicode webhooks_on_message_sent_method: The webhooks.on_message_sent.method :param unicode webhooks_on_message_sent_format: The webhooks.on_message_sent.format :param unicode webhooks_on_message_updated_url: The webhooks.on_message_updated.url :param unicode webhooks_on_message_updated_method: The webhooks.on_message_updated.method :param unicode webhooks_on_message_updated_format: The webhooks.on_message_updated.format :param unicode webhooks_on_message_removed_url: The webhooks.on_message_removed.url :param unicode webhooks_on_message_removed_method: The webhooks.on_message_removed.method :param unicode webhooks_on_message_removed_format: The webhooks.on_message_removed.format :param unicode webhooks_on_channel_added_url: The webhooks.on_channel_added.url :param unicode webhooks_on_channel_added_method: The webhooks.on_channel_added.method :param unicode webhooks_on_channel_added_format: The webhooks.on_channel_added.format :param unicode webhooks_on_channel_destroyed_url: The webhooks.on_channel_destroyed.url :param unicode webhooks_on_channel_destroyed_method: The webhooks.on_channel_destroyed.method :param unicode webhooks_on_channel_destroyed_format: The webhooks.on_channel_destroyed.format :param unicode webhooks_on_channel_updated_url: The webhooks.on_channel_updated.url :param unicode webhooks_on_channel_updated_method: The webhooks.on_channel_updated.method :param unicode webhooks_on_channel_updated_format: The webhooks.on_channel_updated.format :param unicode webhooks_on_member_added_url: The webhooks.on_member_added.url :param unicode webhooks_on_member_added_method: The webhooks.on_member_added.method :param unicode webhooks_on_member_added_format: The webhooks.on_member_added.format :param unicode webhooks_on_member_removed_url: The webhooks.on_member_removed.url :param unicode webhooks_on_member_removed_method: The webhooks.on_member_removed.method :param unicode webhooks_on_member_removed_format: The webhooks.on_member_removed.format :param unicode limits_channel_members: The limits.channel_members :param unicode limits_user_channels: The limits.user_channels :returns: Updated ServiceInstance :rtype: twilio.rest.ip_messaging.v1.service.ServiceInstance """ data = values.of({ 'FriendlyName': friendly_name, 'DefaultServiceRoleSid': default_service_role_sid, 'DefaultChannelRoleSid': default_channel_role_sid, 'DefaultChannelCreatorRoleSid': default_channel_creator_role_sid, 'ReadStatusEnabled': read_status_enabled, 'ReachabilityEnabled': reachability_enabled, 'TypingIndicatorTimeout': typing_indicator_timeout, 'ConsumptionReportInterval': consumption_report_interval, 'Notifications.NewMessage.Enabled': notifications_new_message_enabled, 'Notifications.NewMessage.Template': notifications_new_message_template, 'Notifications.AddedToChannel.Enabled': notifications_added_to_channel_enabled, 'Notifications.AddedToChannel.Template': notifications_added_to_channel_template, 'Notifications.RemovedFromChannel.Enabled': notifications_removed_from_channel_enabled, 'Notifications.RemovedFromChannel.Template': notifications_removed_from_channel_template, 'Notifications.InvitedToChannel.Enabled': notifications_invited_to_channel_enabled, 'Notifications.InvitedToChannel.Template': notifications_invited_to_channel_template, 'PreWebhookUrl': pre_webhook_url, 'PostWebhookUrl': post_webhook_url, 'WebhookMethod': webhook_method, 'WebhookFilters': webhook_filters, 'Webhooks.OnMessageSend.Url': webhooks_on_message_send_url, 'Webhooks.OnMessageSend.Method': webhooks_on_message_send_method, 'Webhooks.OnMessageSend.Format': webhooks_on_message_send_format, 'Webhooks.OnMessageUpdate.Url': webhooks_on_message_update_url, 'Webhooks.OnMessageUpdate.Method': webhooks_on_message_update_method, 'Webhooks.OnMessageUpdate.Format': webhooks_on_message_update_format, 'Webhooks.OnMessageRemove.Url': webhooks_on_message_remove_url, 'Webhooks.OnMessageRemove.Method': webhooks_on_message_remove_method, 'Webhooks.OnMessageRemove.Format': webhooks_on_message_remove_format, 'Webhooks.OnChannelAdd.Url': webhooks_on_channel_add_url, 'Webhooks.OnChannelAdd.Method': webhooks_on_channel_add_method, 'Webhooks.OnChannelAdd.Format': webhooks_on_channel_add_format, 'Webhooks.OnChannelDestroy.Url': webhooks_on_channel_destroy_url, 'Webhooks.OnChannelDestroy.Method': webhooks_on_channel_destroy_method, 'Webhooks.OnChannelDestroy.Format': webhooks_on_channel_destroy_format, 'Webhooks.OnChannelUpdate.Url': webhooks_on_channel_update_url, 'Webhooks.OnChannelUpdate.Method': webhooks_on_channel_update_method, 'Webhooks.OnChannelUpdate.Format': webhooks_on_channel_update_format, 'Webhooks.OnMemberAdd.Url': webhooks_on_member_add_url, 'Webhooks.OnMemberAdd.Method': webhooks_on_member_add_method, 'Webhooks.OnMemberAdd.Format': webhooks_on_member_add_format, 'Webhooks.OnMemberRemove.Url': webhooks_on_member_remove_url, 'Webhooks.OnMemberRemove.Method': webhooks_on_member_remove_method, 'Webhooks.OnMemberRemove.Format': webhooks_on_member_remove_format, 'Webhooks.OnMessageSent.Url': webhooks_on_message_sent_url, 'Webhooks.OnMessageSent.Method': webhooks_on_message_sent_method, 'Webhooks.OnMessageSent.Format': webhooks_on_message_sent_format, 'Webhooks.OnMessageUpdated.Url': webhooks_on_message_updated_url, 'Webhooks.OnMessageUpdated.Method': webhooks_on_message_updated_method, 'Webhooks.OnMessageUpdated.Format': webhooks_on_message_updated_format, 'Webhooks.OnMessageRemoved.Url': webhooks_on_message_removed_url, 'Webhooks.OnMessageRemoved.Method': webhooks_on_message_removed_method, 'Webhooks.OnMessageRemoved.Format': webhooks_on_message_removed_format, 'Webhooks.OnChannelAdded.Url': webhooks_on_channel_added_url, 'Webhooks.OnChannelAdded.Method': webhooks_on_channel_added_method, 'Webhooks.OnChannelAdded.Format': webhooks_on_channel_added_format, 'Webhooks.OnChannelDestroyed.Url': webhooks_on_channel_destroyed_url, 'Webhooks.OnChannelDestroyed.Method': webhooks_on_channel_destroyed_method, 'Webhooks.OnChannelDestroyed.Format': webhooks_on_channel_destroyed_format, 'Webhooks.OnChannelUpdated.Url': webhooks_on_channel_updated_url, 'Webhooks.OnChannelUpdated.Method': webhooks_on_channel_updated_method, 'Webhooks.OnChannelUpdated.Format': webhooks_on_channel_updated_format, 'Webhooks.OnMemberAdded.Url': webhooks_on_member_added_url, 'Webhooks.OnMemberAdded.Method': webhooks_on_member_added_method, 'Webhooks.OnMemberAdded.Format': webhooks_on_member_added_format, 'Webhooks.OnMemberRemoved.Url': webhooks_on_member_removed_url, 'Webhooks.OnMemberRemoved.Method': webhooks_on_member_removed_method, 'Webhooks.OnMemberRemoved.Format': webhooks_on_member_removed_format, 'Limits.ChannelMembers': limits_channel_members, 'Limits.UserChannels': limits_user_channels, }) payload = self._version.update( 'POST', self._uri, data=data, ) return ServiceInstance( self._version, payload, sid=self._solution['sid'], )
def page(self, area_code=values.unset, contains=values.unset, sms_enabled=values.unset, mms_enabled=values.unset, voice_enabled=values.unset, exclude_all_address_required=values.unset, exclude_local_address_required=values.unset, exclude_foreign_address_required=values.unset, beta=values.unset, near_number=values.unset, near_lat_long=values.unset, distance=values.unset, in_postal_code=values.unset, in_region=values.unset, in_rate_center=values.unset, in_lata=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of TollFreeInstance records from the API. Request is executed immediately :param unicode area_code: The area_code :param unicode contains: The contains :param bool sms_enabled: The sms_enabled :param bool mms_enabled: The mms_enabled :param bool voice_enabled: The voice_enabled :param bool exclude_all_address_required: The exclude_all_address_required :param bool exclude_local_address_required: The exclude_local_address_required :param bool exclude_foreign_address_required: The exclude_foreign_address_required :param bool beta: The beta :param unicode near_number: The near_number :param unicode near_lat_long: The near_lat_long :param unicode distance: The distance :param unicode in_postal_code: The in_postal_code :param unicode in_region: The in_region :param unicode in_rate_center: The in_rate_center :param unicode in_lata: The in_lata :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 TollFreeInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.toll_free.TollFreePage """ params = values.of({ 'AreaCode': area_code, 'Contains': contains, 'SmsEnabled': sms_enabled, 'MmsEnabled': mms_enabled, 'VoiceEnabled': voice_enabled, 'ExcludeAllAddressRequired': exclude_all_address_required, 'ExcludeLocalAddressRequired': exclude_local_address_required, 'ExcludeForeignAddressRequired': exclude_foreign_address_required, 'Beta': beta, 'NearNumber': near_number, 'NearLatLong': near_lat_long, 'Distance': distance, 'InPostalCode': in_postal_code, 'InRegion': in_region, 'InRateCenter': in_rate_center, 'InLata': in_lata, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TollFreePage(self._version, response, self._solution)
def page(self, to=values.unset, from_=values.unset, parent_call_sid=values.unset, status=values.unset, start_time_before=values.unset, start_time=values.unset, start_time_after=values.unset, end_time_before=values.unset, end_time=values.unset, end_time_after=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of CallInstance records from the API. Request is executed immediately :param unicode to: Phone number or Client identifier of calls to include :param unicode from_: Phone number or Client identifier to filter `from` on :param unicode parent_call_sid: Parent call SID to filter on :param CallInstance.Status status: The status of the resources to read :param datetime start_time_before: Only include calls that started on this date :param datetime start_time: Only include calls that started on this date :param datetime start_time_after: Only include calls that started on this date :param datetime end_time_before: Only include calls that ended on this date :param datetime end_time: Only include calls that ended on this date :param datetime end_time_after: Only include calls that ended on this date :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of CallInstance :rtype: twilio.rest.api.v2010.account.call.CallPage """ data = values.of({ 'To': to, 'From': from_, 'ParentCallSid': parent_call_sid, 'Status': status, 'StartTime<': serialize.iso8601_datetime(start_time_before), 'StartTime': serialize.iso8601_datetime(start_time), 'StartTime>': serialize.iso8601_datetime(start_time_after), 'EndTime<': serialize.iso8601_datetime(end_time_before), 'EndTime': serialize.iso8601_datetime(end_time), 'EndTime>': serialize.iso8601_datetime(end_time_after), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( method='GET', uri=self._uri, params=data, ) return CallPage(self._version, response, self._solution)
def update(self, friendly_name=values.unset, default_service_role_sid=values.unset, default_channel_role_sid=values.unset, default_channel_creator_role_sid=values.unset, read_status_enabled=values.unset, reachability_enabled=values.unset, typing_indicator_timeout=values.unset, consumption_report_interval=values.unset, notifications_new_message_enabled=values.unset, notifications_new_message_template=values.unset, notifications_new_message_sound=values.unset, notifications_new_message_badge_count_enabled=values.unset, notifications_added_to_channel_enabled=values.unset, notifications_added_to_channel_template=values.unset, notifications_added_to_channel_sound=values.unset, notifications_removed_from_channel_enabled=values.unset, notifications_removed_from_channel_template=values.unset, notifications_removed_from_channel_sound=values.unset, notifications_invited_to_channel_enabled=values.unset, notifications_invited_to_channel_template=values.unset, notifications_invited_to_channel_sound=values.unset, pre_webhook_url=values.unset, post_webhook_url=values.unset, webhook_method=values.unset, webhook_filters=values.unset, limits_channel_members=values.unset, limits_user_channels=values.unset, media_compatibility_message=values.unset): """ Update the ServiceInstance :param unicode friendly_name: The friendly_name :param unicode default_service_role_sid: The default_service_role_sid :param unicode default_channel_role_sid: The default_channel_role_sid :param unicode default_channel_creator_role_sid: The default_channel_creator_role_sid :param bool read_status_enabled: The read_status_enabled :param bool reachability_enabled: The reachability_enabled :param unicode typing_indicator_timeout: The typing_indicator_timeout :param unicode consumption_report_interval: The consumption_report_interval :param bool notifications_new_message_enabled: The notifications.new_message.enabled :param unicode notifications_new_message_template: The notifications.new_message.template :param unicode notifications_new_message_sound: The notifications.new_message.sound :param bool notifications_new_message_badge_count_enabled: The notifications.new_message.badge_count_enabled :param bool notifications_added_to_channel_enabled: The notifications.added_to_channel.enabled :param unicode notifications_added_to_channel_template: The notifications.added_to_channel.template :param unicode notifications_added_to_channel_sound: The notifications.added_to_channel.sound :param bool notifications_removed_from_channel_enabled: The notifications.removed_from_channel.enabled :param unicode notifications_removed_from_channel_template: The notifications.removed_from_channel.template :param unicode notifications_removed_from_channel_sound: The notifications.removed_from_channel.sound :param bool notifications_invited_to_channel_enabled: The notifications.invited_to_channel.enabled :param unicode notifications_invited_to_channel_template: The notifications.invited_to_channel.template :param unicode notifications_invited_to_channel_sound: The notifications.invited_to_channel.sound :param unicode pre_webhook_url: The pre_webhook_url :param unicode post_webhook_url: The post_webhook_url :param unicode webhook_method: The webhook_method :param unicode webhook_filters: The webhook_filters :param unicode limits_channel_members: The limits.channel_members :param unicode limits_user_channels: The limits.user_channels :param unicode media_compatibility_message: The media.compatibility_message :returns: Updated ServiceInstance :rtype: twilio.rest.chat.v2.service.ServiceInstance """ data = values.of({ 'FriendlyName': friendly_name, 'DefaultServiceRoleSid': default_service_role_sid, 'DefaultChannelRoleSid': default_channel_role_sid, 'DefaultChannelCreatorRoleSid': default_channel_creator_role_sid, 'ReadStatusEnabled': read_status_enabled, 'ReachabilityEnabled': reachability_enabled, 'TypingIndicatorTimeout': typing_indicator_timeout, 'ConsumptionReportInterval': consumption_report_interval, 'Notifications.NewMessage.Enabled': notifications_new_message_enabled, 'Notifications.NewMessage.Template': notifications_new_message_template, 'Notifications.NewMessage.Sound': notifications_new_message_sound, 'Notifications.NewMessage.BadgeCountEnabled': notifications_new_message_badge_count_enabled, 'Notifications.AddedToChannel.Enabled': notifications_added_to_channel_enabled, 'Notifications.AddedToChannel.Template': notifications_added_to_channel_template, 'Notifications.AddedToChannel.Sound': notifications_added_to_channel_sound, 'Notifications.RemovedFromChannel.Enabled': notifications_removed_from_channel_enabled, 'Notifications.RemovedFromChannel.Template': notifications_removed_from_channel_template, 'Notifications.RemovedFromChannel.Sound': notifications_removed_from_channel_sound, 'Notifications.InvitedToChannel.Enabled': notifications_invited_to_channel_enabled, 'Notifications.InvitedToChannel.Template': notifications_invited_to_channel_template, 'Notifications.InvitedToChannel.Sound': notifications_invited_to_channel_sound, 'PreWebhookUrl': pre_webhook_url, 'PostWebhookUrl': post_webhook_url, 'WebhookMethod': webhook_method, 'WebhookFilters': webhook_filters, 'Limits.ChannelMembers': limits_channel_members, 'Limits.UserChannels': limits_user_channels, 'Media.CompatibilityMessage': media_compatibility_message, }) payload = self._version.update( 'POST', self._uri, data=data, ) return ServiceInstance( self._version, payload, sid=self._solution['sid'], )
def create(self, body=values.unset, priority=values.unset, ttl=values.unset, title=values.unset, sound=values.unset, action=values.unset, data=values.unset, apn=values.unset, gcm=values.unset, sms=values.unset, facebook_messenger=values.unset, fcm=values.unset, segment=values.unset, alexa=values.unset, to_binding=values.unset, delivery_callback_url=values.unset, identity=values.unset, tag=values.unset): """ Create the NotificationInstance :param unicode body: The notification body text :param NotificationInstance.Priority priority: The priority of the notification :param unicode ttl: How long, in seconds, the notification is valid :param unicode title: The notification title :param unicode sound: The name of the sound to be played for the notification :param unicode action: The actions to display for the notification :param dict data: The custom key-value pairs of the notification's payload :param dict apn: The APNS-specific payload that overrides corresponding attributes in a generic payload for APNS Bindings :param dict gcm: The GCM-specific payload that overrides corresponding attributes in generic payload for GCM Bindings :param dict sms: The SMS-specific payload that overrides corresponding attributes in generic payload for SMS Bindings :param dict facebook_messenger: Deprecated :param dict fcm: The FCM-specific payload that overrides corresponding attributes in generic payload for FCM Bindings :param unicode segment: A Segment to notify :param dict alexa: Deprecated :param unicode to_binding: The destination address specified as a JSON string :param unicode delivery_callback_url: URL to send webhooks :param unicode identity: The `identity` value that identifies the new resource's User :param unicode tag: A tag that selects the Bindings to notify :returns: The created NotificationInstance :rtype: twilio.rest.notify.v1.service.notification.NotificationInstance """ data = values.of({ 'Identity': serialize.map(identity, lambda e: e), 'Tag': serialize.map(tag, lambda e: e), 'Body': body, 'Priority': priority, 'Ttl': ttl, 'Title': title, 'Sound': sound, 'Action': action, 'Data': serialize.object(data), 'Apn': serialize.object(apn), 'Gcm': serialize.object(gcm), 'Sms': serialize.object(sms), 'FacebookMessenger': serialize.object(facebook_messenger), 'Fcm': serialize.object(fcm), 'Segment': serialize.map(segment, lambda e: e), 'Alexa': serialize.object(alexa), 'ToBinding': serialize.map(to_binding, lambda e: e), 'DeliveryCallbackUrl': delivery_callback_url, }) payload = self._version.create( method='POST', uri=self._uri, data=data, ) return NotificationInstance( self._version, payload, service_sid=self._solution['service_sid'], )
def create(self, to, from_, method=values.unset, fallback_url=values.unset, fallback_method=values.unset, status_callback=values.unset, status_callback_event=values.unset, status_callback_method=values.unset, send_digits=values.unset, timeout=values.unset, record=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, machine_detection=values.unset, machine_detection_timeout=values.unset, recording_status_callback_event=values.unset, trim=values.unset, caller_id=values.unset, machine_detection_speech_threshold=values.unset, machine_detection_speech_end_threshold=values.unset, machine_detection_silence_timeout=values.unset, async_amd=values.unset, async_amd_status_callback=values.unset, async_amd_status_callback_method=values.unset, byoc=values.unset, call_reason=values.unset, url=values.unset, twiml=values.unset, application_sid=values.unset): """ Create the CallInstance :param unicode to: Phone number, SIP address, or client identifier to call :param unicode from_: Twilio number from which to originate the call :param unicode method: HTTP method to use to fetch TwiML :param unicode fallback_url: Fallback URL in case of error :param unicode fallback_method: HTTP Method to use with fallback_url :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_event: The call progress events that we send to the `status_callback` URL. :param unicode status_callback_method: HTTP Method to use with status_callback :param unicode send_digits: The digits to dial after connecting to the number :param unicode timeout: Number of seconds to wait for an answer :param bool record: Whether to record the call :param unicode recording_channels: The number of channels in the final recording :param unicode recording_status_callback: The URL that we call when the recording is available to be accessed :param unicode recording_status_callback_method: The HTTP method we should use when calling the `recording_status_callback` URL :param unicode sip_auth_username: The username used to authenticate the caller making a SIP call :param unicode sip_auth_password: The password required to authenticate the user account specified in `sip_auth_username`. :param unicode machine_detection: Enable machine detection or end of greeting detection :param unicode machine_detection_timeout: Number of seconds to wait for machine detection :param unicode recording_status_callback_event: The recording status events that will trigger calls to the URL specified in `recording_status_callback` :param unicode trim: Set this parameter to control trimming of silence on the recording. :param unicode caller_id: The phone number, SIP address, or Client identifier that made this call. Phone numbers are in E.164 format (e.g., +16175551212). SIP addresses are formatted as `[email protected]`. :param unicode machine_detection_speech_threshold: Number of milliseconds for measuring stick for the length of the speech activity :param unicode machine_detection_speech_end_threshold: Number of milliseconds of silence after speech activity :param unicode machine_detection_silence_timeout: Number of milliseconds of initial silence :param unicode async_amd: Enable asynchronous AMD :param unicode async_amd_status_callback: The URL we should call to send amd status information to your application :param unicode async_amd_status_callback_method: HTTP Method to use with async_amd_status_callback :param unicode byoc: BYOC trunk SID (Beta) :param unicode call_reason: Reason for the call (Branded Calls Beta) :param unicode url: The absolute URL that returns TwiML for this call :param unicode twiml: TwiML instructions for the call :param unicode application_sid: The SID of the Application resource that will handle the call :returns: The created CallInstance :rtype: twilio.rest.api.v2010.account.call.CallInstance """ data = values.of({ 'To': to, 'From': from_, 'Url': url, 'Twiml': twiml, 'ApplicationSid': application_sid, 'Method': method, 'FallbackUrl': fallback_url, 'FallbackMethod': fallback_method, 'StatusCallback': status_callback, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'StatusCallbackMethod': status_callback_method, 'SendDigits': send_digits, 'Timeout': timeout, 'Record': record, 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'MachineDetection': machine_detection, 'MachineDetectionTimeout': machine_detection_timeout, 'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e), 'Trim': trim, 'CallerId': caller_id, 'MachineDetectionSpeechThreshold': machine_detection_speech_threshold, 'MachineDetectionSpeechEndThreshold': machine_detection_speech_end_threshold, 'MachineDetectionSilenceTimeout': machine_detection_silence_timeout, 'AsyncAmd': async_amd, 'AsyncAmdStatusCallback': async_amd_status_callback, 'AsyncAmdStatusCallbackMethod': async_amd_status_callback_method, 'Byoc': byoc, 'CallReason': call_reason, }) payload = self._version.create( method='POST', uri=self._uri, data=data, ) return CallInstance( self._version, payload, account_sid=self._solution['account_sid'], )
def update(self, friendly_name=values.unset, chat_service_sid=values.unset, channel_type=values.unset, contact_identity=values.unset, enabled=values.unset, integration_type=values.unset, integration_flow_sid=values.unset, integration_url=values.unset, integration_workspace_sid=values.unset, integration_workflow_sid=values.unset, integration_channel=values.unset, integration_timeout=values.unset, integration_priority=values.unset, integration_creation_on_message=values.unset, long_lived=values.unset, janitor_enabled=values.unset, integration_retry_count=values.unset): """ Update the FlexFlowInstance :param unicode friendly_name: A string to describe the resource :param unicode chat_service_sid: The SID of the chat service :param FlexFlowInstance.ChannelType channel_type: The channel type :param unicode contact_identity: The channel contact's Identity :param bool enabled: Whether the new Flex Flow is enabled :param FlexFlowInstance.IntegrationType integration_type: The integration type :param unicode integration_flow_sid: The SID of the Studio Flow :param unicode integration_url: The External Webhook URL :param unicode integration_workspace_sid: The Workspace SID for a new Task :param unicode integration_workflow_sid: The Workflow SID for a new Task :param unicode integration_channel: The Task Channel for a new Task :param unicode integration_timeout: The Task timeout in seconds for a new Task :param unicode integration_priority: The Task priority of a new Task :param bool integration_creation_on_message: Whether to create a Task when the first message arrives :param bool long_lived: Reuse this chat channel for future interactions with a contact :param bool janitor_enabled: Remove active Proxy sessions if the corresponding Task is deleted :param unicode integration_retry_count: The number of times to retry the webhook if the first attempt fails :returns: The updated FlexFlowInstance :rtype: twilio.rest.flex_api.v1.flex_flow.FlexFlowInstance """ data = values.of({ 'FriendlyName': friendly_name, 'ChatServiceSid': chat_service_sid, 'ChannelType': channel_type, 'ContactIdentity': contact_identity, 'Enabled': enabled, 'IntegrationType': integration_type, 'Integration.FlowSid': integration_flow_sid, 'Integration.Url': integration_url, 'Integration.WorkspaceSid': integration_workspace_sid, 'Integration.WorkflowSid': integration_workflow_sid, 'Integration.Channel': integration_channel, 'Integration.Timeout': integration_timeout, 'Integration.Priority': integration_priority, 'Integration.CreationOnMessage': integration_creation_on_message, 'LongLived': long_lived, 'JanitorEnabled': janitor_enabled, 'Integration.RetryCount': integration_retry_count, }) payload = self._version.update( method='POST', uri=self._uri, data=data, ) return FlexFlowInstance( self._version, payload, sid=self._solution['sid'], )
def create(self, from_, to, status_callback=values.unset, status_callback_method=values.unset, status_callback_event=values.unset, timeout=values.unset, record=values.unset, muted=values.unset, beep=values.unset, start_conference_on_enter=values.unset, end_conference_on_exit=values.unset, wait_url=values.unset, wait_method=values.unset, early_media=values.unset, max_participants=values.unset, conference_record=values.unset, conference_trim=values.unset, conference_status_callback=values.unset, conference_status_callback_method=values.unset, conference_status_callback_event=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, region=values.unset, conference_recording_status_callback=values.unset, conference_recording_status_callback_method=values.unset): """ Create a new ParticipantInstance :param unicode from_: The from :param unicode to: The to :param unicode status_callback: The status_callback :param unicode status_callback_method: The status_callback_method :param unicode status_callback_event: The status_callback_event :param unicode timeout: The timeout :param bool record: The record :param bool muted: The muted :param unicode beep: The beep :param bool start_conference_on_enter: The start_conference_on_enter :param bool end_conference_on_exit: The end_conference_on_exit :param unicode wait_url: The wait_url :param unicode wait_method: The wait_method :param bool early_media: The early_media :param unicode max_participants: The max_participants :param unicode conference_record: The conference_record :param unicode conference_trim: The conference_trim :param unicode conference_status_callback: The conference_status_callback :param unicode conference_status_callback_method: The conference_status_callback_method :param unicode conference_status_callback_event: The conference_status_callback_event :param unicode recording_channels: The recording_channels :param unicode recording_status_callback: The recording_status_callback :param unicode recording_status_callback_method: The recording_status_callback_method :param unicode sip_auth_username: The sip_auth_username :param unicode sip_auth_password: The sip_auth_password :param unicode region: The region :param unicode conference_recording_status_callback: The conference_recording_status_callback :param unicode conference_recording_status_callback_method: The conference_recording_status_callback_method :returns: Newly created ParticipantInstance :rtype: twilio.rest.api.v2010.account.conference.participant.ParticipantInstance """ data = values.of({ 'From': from_, 'To': to, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'StatusCallbackEvent': status_callback_event, 'Timeout': timeout, 'Record': record, 'Muted': muted, 'Beep': beep, 'StartConferenceOnEnter': start_conference_on_enter, 'EndConferenceOnExit': end_conference_on_exit, 'WaitUrl': wait_url, 'WaitMethod': wait_method, 'EarlyMedia': early_media, 'MaxParticipants': max_participants, 'ConferenceRecord': conference_record, 'ConferenceTrim': conference_trim, 'ConferenceStatusCallback': conference_status_callback, 'ConferenceStatusCallbackMethod': conference_status_callback_method, 'ConferenceStatusCallbackEvent': conference_status_callback_event, 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'Region': region, 'ConferenceRecordingStatusCallback': conference_recording_status_callback, 'ConferenceRecordingStatusCallbackMethod': conference_recording_status_callback_method, }) payload = self._version.create( 'POST', self._uri, data=data, ) return ParticipantInstance( self._version, payload, account_sid=self._solution['account_sid'], conference_sid=self._solution['conference_sid'], )
def create(self, from_, to, status_callback=values.unset, status_callback_method=values.unset, status_callback_event=values.unset, timeout=values.unset, record=values.unset, muted=values.unset, beep=values.unset, start_conference_on_enter=values.unset, end_conference_on_exit=values.unset, wait_url=values.unset, wait_method=values.unset, early_media=values.unset, max_participants=values.unset, conference_record=values.unset, conference_trim=values.unset, conference_status_callback=values.unset, conference_status_callback_method=values.unset, conference_status_callback_event=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, region=values.unset, conference_recording_status_callback=values.unset, conference_recording_status_callback_method=values.unset, recording_status_callback_event=values.unset, conference_recording_status_callback_event=values.unset): """ Create a new ParticipantInstance :param unicode from_: The `from` phone number used to invite a participant. :param unicode to: The number, client id, or sip address of the new participant. :param unicode status_callback: URL for conference event callback. :param unicode status_callback_method: Method Twilio should use to reach the status callback URL. :param unicode status_callback_event: Set state change events that will trigger a callback. :param unicode timeout: Number of seconds Twilio will wait for an answer. :param bool record: Record the agent and their conferences. :param bool muted: Mute the agent. :param unicode beep: Play a beep when the participant joins the conference. :param bool start_conference_on_enter: Begin the conference when the participant joins. :param bool end_conference_on_exit: End the conference when the participant leaves. :param unicode wait_url: URL that hosts pre-conference hold music :param unicode wait_method: The method Twilio should use to request `WaitUrl`. :param bool early_media: Agents can hear the state of the outbound call. :param unicode max_participants: Maximum number of agent conference participants. :param unicode conference_record: Record the conference. :param unicode conference_trim: Trim silence from audio files. :param unicode conference_status_callback: Callback URL for conference events. :param unicode conference_status_callback_method: HTTP method for requesting `ConferenceStatusCallback` URL. :param unicode conference_status_callback_event: Set which conference state changes should webhook to the `ConferenceStatusCallback` :param unicode recording_channels: Specify `mono` or `dual` recording channels. :param unicode recording_status_callback: The absolute URL for Twilio's webhook with recording status information. :param unicode recording_status_callback_method: HTTP method for `RecordingStatusCallback` :param unicode sip_auth_username: SIP username used for authenticating. :param unicode sip_auth_password: SIP password for authentication. :param unicode region: The region where Twilio should mix the conference audio. :param unicode conference_recording_status_callback: Conference recording callback URL. :param unicode conference_recording_status_callback_method: Method Twilio should use to request the `ConferenceRecordingStatusCallback` URL. :param unicode recording_status_callback_event: The recording_status_callback_event :param unicode conference_recording_status_callback_event: The conference_recording_status_callback_event :returns: Newly created ParticipantInstance :rtype: twilio.rest.api.v2010.account.conference.participant.ParticipantInstance """ data = values.of({ 'From': from_, 'To': to, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'Timeout': timeout, 'Record': record, 'Muted': muted, 'Beep': beep, 'StartConferenceOnEnter': start_conference_on_enter, 'EndConferenceOnExit': end_conference_on_exit, 'WaitUrl': wait_url, 'WaitMethod': wait_method, 'EarlyMedia': early_media, 'MaxParticipants': max_participants, 'ConferenceRecord': conference_record, 'ConferenceTrim': conference_trim, 'ConferenceStatusCallback': conference_status_callback, 'ConferenceStatusCallbackMethod': conference_status_callback_method, 'ConferenceStatusCallbackEvent': serialize.map(conference_status_callback_event, lambda e: e), 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'Region': region, 'ConferenceRecordingStatusCallback': conference_recording_status_callback, 'ConferenceRecordingStatusCallbackMethod': conference_recording_status_callback_method, 'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e), 'ConferenceRecordingStatusCallbackEvent': serialize.map(conference_recording_status_callback_event, lambda e: e), }) payload = self._version.create( 'POST', self._uri, data=data, ) return ParticipantInstance( self._version, payload, account_sid=self._solution['account_sid'], conference_sid=self._solution['conference_sid'], )
def update(self, friendly_name=values.unset, chat_service_sid=values.unset, channel_type=values.unset, contact_identity=values.unset, enabled=values.unset, integration_type=values.unset, integration_flow_sid=values.unset, integration_url=values.unset, integration_workspace_sid=values.unset, integration_workflow_sid=values.unset, integration_channel=values.unset, integration_timeout=values.unset, integration_priority=values.unset, integration_creation_on_message=values.unset, long_lived=values.unset): """ Update the FlexFlowInstance :param unicode friendly_name: Human readable description of this FlexFlow :param unicode chat_service_sid: Service Sid. :param FlexFlowInstance.ChannelType channel_type: Channel type :param unicode contact_identity: Channel contact Identity :param bool enabled: Boolean flag for enabling or disabling the FlexFlow :param FlexFlowInstance.IntegrationType integration_type: Integration type :param unicode integration_flow_sid: Flow Sid. :param unicode integration_url: External Webhook Url :param unicode integration_workspace_sid: Workspace Sid for a new task :param unicode integration_workflow_sid: Workflow Sid for a new task :param unicode integration_channel: Task Channel for a new task :param unicode integration_timeout: Task timeout in seconds for a new task :param unicode integration_priority: Task priority for a new task :param bool integration_creation_on_message: Flag for task creation :param bool long_lived: Long Lived flag for new Channel :returns: Updated FlexFlowInstance :rtype: twilio.rest.flex_api.v1.flex_flow.FlexFlowInstance """ data = values.of({ 'FriendlyName': friendly_name, 'ChatServiceSid': chat_service_sid, 'ChannelType': channel_type, 'ContactIdentity': contact_identity, 'Enabled': enabled, 'IntegrationType': integration_type, 'Integration.FlowSid': integration_flow_sid, 'Integration.Url': integration_url, 'Integration.WorkspaceSid': integration_workspace_sid, 'Integration.WorkflowSid': integration_workflow_sid, 'Integration.Channel': integration_channel, 'Integration.Timeout': integration_timeout, 'Integration.Priority': integration_priority, 'Integration.CreationOnMessage': integration_creation_on_message, 'LongLived': long_lived, }) payload = self._version.update( 'POST', self._uri, data=data, ) return FlexFlowInstance( self._version, payload, sid=self._solution['sid'], )
def update(self, friendly_name, enabled=values.unset, video_layout=values.unset, audio_sources=values.unset, audio_sources_excluded=values.unset, trim=values.unset, format=values.unset, resolution=values.unset, status_callback=values.unset, status_callback_method=values.unset): """ Update the CompositionHookInstance :param unicode friendly_name: Friendly name of the Composition Hook to be shown in the console. :param bool enabled: Boolean flag indicating if the Composition Hook is active. :param dict video_layout: The JSON video layout description. :param unicode audio_sources: A list of audio sources related to this Composition Hook. :param unicode audio_sources_excluded: A list of audio sources excluded related to this Composition Hook. :param bool trim: Boolean flag for clipping intervals that have no media. :param CompositionHookInstance.Format format: Container format of the Composition Hook media file. Any of the following: `mp4`, `webm`. :param unicode resolution: Pixel resolution of the composed video. :param unicode status_callback: A URL that Twilio sends asynchronous webhook requests to on every composition event. :param unicode status_callback_method: HTTP method Twilio should use when requesting the above URL. :returns: Updated CompositionHookInstance :rtype: twilio.rest.video.v1.composition_hook.CompositionHookInstance """ data = values.of({ 'FriendlyName': friendly_name, 'Enabled': enabled, 'VideoLayout': serialize.object(video_layout), 'AudioSources': serialize.map(audio_sources, lambda e: e), 'AudioSourcesExcluded': serialize.map(audio_sources_excluded, lambda e: e), 'Trim': trim, 'Format': format, 'Resolution': resolution, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, }) payload = self._version.update( 'POST', self._uri, data=data, ) return CompositionHookInstance( self._version, payload, sid=self._solution['sid'], )
def update(self, reservation_status=values.unset, worker_activity_sid=values.unset, instruction=values.unset, dequeue_post_work_activity_sid=values.unset, dequeue_from=values.unset, dequeue_record=values.unset, dequeue_timeout=values.unset, dequeue_to=values.unset, dequeue_status_callback_url=values.unset, call_from=values.unset, call_record=values.unset, call_timeout=values.unset, call_to=values.unset, call_url=values.unset, call_status_callback_url=values.unset, call_accept=values.unset, redirect_call_sid=values.unset, redirect_accept=values.unset, redirect_url=values.unset, to=values.unset, from_=values.unset, status_callback=values.unset, status_callback_method=values.unset, status_callback_event=values.unset, timeout=values.unset, record=values.unset, muted=values.unset, beep=values.unset, start_conference_on_enter=values.unset, end_conference_on_exit=values.unset, wait_url=values.unset, wait_method=values.unset, early_media=values.unset, max_participants=values.unset, conference_status_callback=values.unset, conference_status_callback_method=values.unset, conference_status_callback_event=values.unset, conference_record=values.unset, conference_trim=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, conference_recording_status_callback=values.unset, conference_recording_status_callback_method=values.unset, region=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, dequeue_status_callback_event=values.unset, post_work_activity_sid=values.unset): """ Update the ReservationInstance :param ReservationInstance.Status reservation_status: The reservation_status :param unicode worker_activity_sid: The worker_activity_sid :param unicode instruction: The instruction :param unicode dequeue_post_work_activity_sid: The dequeue_post_work_activity_sid :param unicode dequeue_from: The dequeue_from :param unicode dequeue_record: The dequeue_record :param unicode dequeue_timeout: The dequeue_timeout :param unicode dequeue_to: The dequeue_to :param unicode dequeue_status_callback_url: The dequeue_status_callback_url :param unicode call_from: The call_from :param unicode call_record: The call_record :param unicode call_timeout: The call_timeout :param unicode call_to: The call_to :param unicode call_url: The call_url :param unicode call_status_callback_url: The call_status_callback_url :param bool call_accept: The call_accept :param unicode redirect_call_sid: The redirect_call_sid :param bool redirect_accept: The redirect_accept :param unicode redirect_url: The redirect_url :param unicode to: The to :param unicode from_: The from :param unicode status_callback: The status_callback :param unicode status_callback_method: The status_callback_method :param ReservationInstance.CallStatus status_callback_event: The status_callback_event :param unicode timeout: The timeout :param bool record: The record :param bool muted: The muted :param unicode beep: The beep :param bool start_conference_on_enter: The start_conference_on_enter :param bool end_conference_on_exit: The end_conference_on_exit :param unicode wait_url: The wait_url :param unicode wait_method: The wait_method :param bool early_media: The early_media :param unicode max_participants: The max_participants :param unicode conference_status_callback: The conference_status_callback :param unicode conference_status_callback_method: The conference_status_callback_method :param ReservationInstance.ConferenceEvent conference_status_callback_event: The conference_status_callback_event :param unicode conference_record: The conference_record :param unicode conference_trim: The conference_trim :param unicode recording_channels: The recording_channels :param unicode recording_status_callback: The recording_status_callback :param unicode recording_status_callback_method: The recording_status_callback_method :param unicode conference_recording_status_callback: The conference_recording_status_callback :param unicode conference_recording_status_callback_method: The conference_recording_status_callback_method :param unicode region: The region :param unicode sip_auth_username: The sip_auth_username :param unicode sip_auth_password: The sip_auth_password :param unicode dequeue_status_callback_event: The dequeue_status_callback_event :param unicode post_work_activity_sid: The post_work_activity_sid :returns: Updated ReservationInstance :rtype: twilio.rest.taskrouter.v1.workspace.worker.reservation.ReservationInstance """ data = values.of({ 'ReservationStatus': reservation_status, 'WorkerActivitySid': worker_activity_sid, 'Instruction': instruction, 'DequeuePostWorkActivitySid': dequeue_post_work_activity_sid, 'DequeueFrom': dequeue_from, 'DequeueRecord': dequeue_record, 'DequeueTimeout': dequeue_timeout, 'DequeueTo': dequeue_to, 'DequeueStatusCallbackUrl': dequeue_status_callback_url, 'CallFrom': call_from, 'CallRecord': call_record, 'CallTimeout': call_timeout, 'CallTo': call_to, 'CallUrl': call_url, 'CallStatusCallbackUrl': call_status_callback_url, 'CallAccept': call_accept, 'RedirectCallSid': redirect_call_sid, 'RedirectAccept': redirect_accept, 'RedirectUrl': redirect_url, 'To': to, 'From': from_, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'Timeout': timeout, 'Record': record, 'Muted': muted, 'Beep': beep, 'StartConferenceOnEnter': start_conference_on_enter, 'EndConferenceOnExit': end_conference_on_exit, 'WaitUrl': wait_url, 'WaitMethod': wait_method, 'EarlyMedia': early_media, 'MaxParticipants': max_participants, 'ConferenceStatusCallback': conference_status_callback, 'ConferenceStatusCallbackMethod': conference_status_callback_method, 'ConferenceStatusCallbackEvent': serialize.map(conference_status_callback_event, lambda e: e), 'ConferenceRecord': conference_record, 'ConferenceTrim': conference_trim, 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'ConferenceRecordingStatusCallback': conference_recording_status_callback, 'ConferenceRecordingStatusCallbackMethod': conference_recording_status_callback_method, 'Region': region, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'DequeueStatusCallbackEvent': serialize.map(dequeue_status_callback_event, lambda e: e), 'PostWorkActivitySid': post_work_activity_sid, }) payload = self._version.update( 'POST', self._uri, data=data, ) return ReservationInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], sid=self._solution['sid'], )
def update(self, friendly_name, enabled=values.unset, video_layout=values.unset, audio_sources=values.unset, audio_sources_excluded=values.unset, trim=values.unset, format=values.unset, resolution=values.unset, status_callback=values.unset, status_callback_method=values.unset): """ Update the CompositionHookInstance :param unicode friendly_name: A unique string to describe the resource :param bool enabled: Whether the composition hook is active :param dict video_layout: A JSON object that describes the video layout of the composition hook :param list[unicode] audio_sources: An array of track names from the same group room to merge :param list[unicode] audio_sources_excluded: An array of track names to exclude :param bool trim: Whether to clip the intervals where there is no active media in the Compositions triggered by the composition hook :param CompositionHookInstance.Format format: The container format of the media files used by the compositions created by the composition hook :param unicode resolution: A string that describes the columns (width) and rows (height) of the generated composed video in pixels :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_method: The HTTP method we should use to call status_callback :returns: The updated CompositionHookInstance :rtype: twilio.rest.video.v1.composition_hook.CompositionHookInstance """ data = values.of({ 'FriendlyName': friendly_name, 'Enabled': enabled, 'VideoLayout': serialize.object(video_layout), 'AudioSources': serialize.map(audio_sources, lambda e: e), 'AudioSourcesExcluded': serialize.map(audio_sources_excluded, lambda e: e), 'Trim': trim, 'Format': format, 'Resolution': resolution, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, }) payload = self._version.update( method='POST', uri=self._uri, data=data, ) return CompositionHookInstance( self._version, payload, sid=self._solution['sid'], )
def create(self, friendly_name, api_version=values.unset, voice_url=values.unset, voice_method=values.unset, voice_fallback_url=values.unset, voice_fallback_method=values.unset, status_callback=values.unset, status_callback_method=values.unset, voice_caller_id_lookup=values.unset, sms_url=values.unset, sms_method=values.unset, sms_fallback_url=values.unset, sms_fallback_method=values.unset, sms_status_callback=values.unset, message_status_callback=values.unset): """ Create a new ApplicationInstance :param unicode friendly_name: A human readable description of the application :param unicode api_version: The API version to use :param unicode voice_url: URL Twilio will make requests to when relieving a call :param unicode voice_method: HTTP method to use with the URL :param unicode voice_fallback_url: Fallback URL :param unicode voice_fallback_method: HTTP method to use with the fallback url :param unicode status_callback: URL to hit with status updates :param unicode status_callback_method: HTTP method to use with the status callback :param bool voice_caller_id_lookup: True or False :param unicode sms_url: URL Twilio will request when receiving an SMS :param unicode sms_method: HTTP method to use with sms_url :param unicode sms_fallback_url: Fallback URL if there's an error parsing TwiML :param unicode sms_fallback_method: HTTP method to use with sms_fallback_method :param unicode sms_status_callback: URL Twilio with request with status updates :param unicode message_status_callback: URL to make requests to with status updates :returns: Newly created ApplicationInstance :rtype: twilio.rest.api.v2010.account.application.ApplicationInstance """ data = values.of({ 'FriendlyName': friendly_name, 'ApiVersion': api_version, 'VoiceUrl': voice_url, 'VoiceMethod': voice_method, 'VoiceFallbackUrl': voice_fallback_url, 'VoiceFallbackMethod': voice_fallback_method, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'VoiceCallerIdLookup': voice_caller_id_lookup, 'SmsUrl': sms_url, 'SmsMethod': sms_method, 'SmsFallbackUrl': sms_fallback_url, 'SmsFallbackMethod': sms_fallback_method, 'SmsStatusCallback': sms_status_callback, 'MessageStatusCallback': message_status_callback, }) payload = self._version.create( 'POST', self._uri, data=data, ) return ApplicationInstance( self._version, payload, account_sid=self._solution['account_sid'], )
def update(self, reservation_status=values.unset, worker_activity_sid=values.unset, instruction=values.unset, dequeue_post_work_activity_sid=values.unset, dequeue_from=values.unset, dequeue_record=values.unset, dequeue_timeout=values.unset, dequeue_to=values.unset, dequeue_status_callback_url=values.unset, call_from=values.unset, call_record=values.unset, call_timeout=values.unset, call_to=values.unset, call_url=values.unset, call_status_callback_url=values.unset, call_accept=values.unset, redirect_call_sid=values.unset, redirect_accept=values.unset, redirect_url=values.unset, to=values.unset, from_=values.unset, status_callback=values.unset, status_callback_method=values.unset, status_callback_event=values.unset, timeout=values.unset, record=values.unset, muted=values.unset, beep=values.unset, start_conference_on_enter=values.unset, end_conference_on_exit=values.unset, wait_url=values.unset, wait_method=values.unset, early_media=values.unset, max_participants=values.unset, conference_status_callback=values.unset, conference_status_callback_method=values.unset, conference_status_callback_event=values.unset, conference_record=values.unset, conference_trim=values.unset, recording_channels=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, conference_recording_status_callback=values.unset, conference_recording_status_callback_method=values.unset, region=values.unset, sip_auth_username=values.unset, sip_auth_password=values.unset, dequeue_status_callback_event=values.unset, post_work_activity_sid=values.unset, supervisor_mode=values.unset, supervisor=values.unset, end_conference_on_customer_exit=values.unset, beep_on_customer_entrance=values.unset): """ Update the ReservationInstance :param ReservationInstance.Status reservation_status: The new status of the reservation :param unicode worker_activity_sid: The new worker activity SID if rejecting a reservation :param unicode instruction: The assignment instruction for reservation :param unicode dequeue_post_work_activity_sid: The SID of the Activity resource to start after executing a Dequeue instruction :param unicode dequeue_from: The Caller ID of the call to the worker when executing a Dequeue instruction :param unicode dequeue_record: Whether to record both legs of a call when executing a Dequeue instruction :param unicode dequeue_timeout: Timeout for call when executing a Dequeue instruction :param unicode dequeue_to: The Contact URI of the worker when executing a Dequeue instruction :param unicode dequeue_status_callback_url: The Callback URL for completed call event when executing a Dequeue instruction :param unicode call_from: The Caller ID of the outbound call when executing a Call instruction :param unicode call_record: Whether to record both legs of a call when executing a Call instruction :param unicode call_timeout: Timeout for call when executing a Call instruction :param unicode call_to: The Contact URI of the worker when executing a Call instruction :param unicode call_url: TwiML URI executed on answering the worker's leg as a result of the Call instruction :param unicode call_status_callback_url: The URL to call for the completed call event when executing a Call instruction :param bool call_accept: Whether to accept a reservation when executing a Call instruction :param unicode redirect_call_sid: The Call SID of the call parked in the queue when executing a Redirect instruction :param bool redirect_accept: Whether the reservation should be accepted when executing a Redirect instruction :param unicode redirect_url: TwiML URI to redirect the call to when executing the Redirect instruction :param unicode to: The Contact URI of the worker when executing a Conference instruction :param unicode from_: The Caller ID of the call to the worker when executing a Conference instruction :param unicode status_callback: The URL we should call to send status information to your application :param unicode status_callback_method: The HTTP method we should use to call status_callback :param ReservationInstance.CallStatus status_callback_event: The call progress events that we will send to status_callback :param unicode timeout: Timeout for call when executing a Conference instruction :param bool record: Whether to record the participant and their conferences :param bool muted: Whether to mute the agent :param unicode beep: Whether to play a notification beep when the participant joins :param bool start_conference_on_enter: Whether the conference starts when the participant joins the conference :param bool end_conference_on_exit: Whether to end the conference when the agent leaves :param unicode wait_url: URL that hosts pre-conference hold music :param unicode wait_method: The HTTP method we should use to call `wait_url` :param bool early_media: Whether agents can hear the state of the outbound call :param unicode max_participants: The maximum number of agent conference participants :param unicode conference_status_callback: The callback URL for conference events :param unicode conference_status_callback_method: HTTP method for requesting `conference_status_callback` URL :param ReservationInstance.ConferenceEvent conference_status_callback_event: The conference status events that we will send to conference_status_callback :param unicode conference_record: Whether to record the conference the participant is joining :param unicode conference_trim: How to trim leading and trailing silence from your recorded conference audio files :param unicode recording_channels: Specify `mono` or `dual` recording channels :param unicode recording_status_callback: The URL that we should call using the `recording_status_callback_method` when the recording status changes :param unicode recording_status_callback_method: The HTTP method we should use when we call `recording_status_callback` :param unicode conference_recording_status_callback: The URL we should call using the `conference_recording_status_callback_method` when the conference recording is available :param unicode conference_recording_status_callback_method: The HTTP method we should use to call `conference_recording_status_callback` :param unicode region: The region where we should mix the conference audio :param unicode sip_auth_username: The SIP username used for authentication :param unicode sip_auth_password: The SIP password for authentication :param unicode dequeue_status_callback_event: The Call progress events sent via webhooks as a result of a Dequeue instruction :param unicode post_work_activity_sid: The new worker activity SID after executing a Conference instruction :param ReservationInstance.SupervisorMode supervisor_mode: The Supervisor mode when executing the Supervise instruction :param unicode supervisor: The Supervisor SID/URI when executing the Supervise instruction :param bool end_conference_on_customer_exit: Whether to end the conference when the customer leaves :param bool beep_on_customer_entrance: Whether to play a notification beep when the customer joins :returns: The updated ReservationInstance :rtype: twilio.rest.taskrouter.v1.workspace.task.reservation.ReservationInstance """ data = values.of({ 'ReservationStatus': reservation_status, 'WorkerActivitySid': worker_activity_sid, 'Instruction': instruction, 'DequeuePostWorkActivitySid': dequeue_post_work_activity_sid, 'DequeueFrom': dequeue_from, 'DequeueRecord': dequeue_record, 'DequeueTimeout': dequeue_timeout, 'DequeueTo': dequeue_to, 'DequeueStatusCallbackUrl': dequeue_status_callback_url, 'CallFrom': call_from, 'CallRecord': call_record, 'CallTimeout': call_timeout, 'CallTo': call_to, 'CallUrl': call_url, 'CallStatusCallbackUrl': call_status_callback_url, 'CallAccept': call_accept, 'RedirectCallSid': redirect_call_sid, 'RedirectAccept': redirect_accept, 'RedirectUrl': redirect_url, 'To': to, 'From': from_, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'Timeout': timeout, 'Record': record, 'Muted': muted, 'Beep': beep, 'StartConferenceOnEnter': start_conference_on_enter, 'EndConferenceOnExit': end_conference_on_exit, 'WaitUrl': wait_url, 'WaitMethod': wait_method, 'EarlyMedia': early_media, 'MaxParticipants': max_participants, 'ConferenceStatusCallback': conference_status_callback, 'ConferenceStatusCallbackMethod': conference_status_callback_method, 'ConferenceStatusCallbackEvent': serialize.map(conference_status_callback_event, lambda e: e), 'ConferenceRecord': conference_record, 'ConferenceTrim': conference_trim, 'RecordingChannels': recording_channels, 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'ConferenceRecordingStatusCallback': conference_recording_status_callback, 'ConferenceRecordingStatusCallbackMethod': conference_recording_status_callback_method, 'Region': region, 'SipAuthUsername': sip_auth_username, 'SipAuthPassword': sip_auth_password, 'DequeueStatusCallbackEvent': serialize.map(dequeue_status_callback_event, lambda e: e), 'PostWorkActivitySid': post_work_activity_sid, 'SupervisorMode': supervisor_mode, 'Supervisor': supervisor, 'EndConferenceOnCustomerExit': end_conference_on_customer_exit, 'BeepOnCustomerEntrance': beep_on_customer_entrance, }) payload = self._version.update( method='POST', uri=self._uri, data=data, ) return ReservationInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], task_sid=self._solution['task_sid'], sid=self._solution['sid'], )
def update(self, unique_name=values.unset, callback_method=values.unset, callback_url=values.unset, friendly_name=values.unset, rate_plan=values.unset, status=values.unset, commands_callback_method=values.unset, commands_callback_url=values.unset, sms_fallback_method=values.unset, sms_fallback_url=values.unset, sms_method=values.unset, sms_url=values.unset, voice_fallback_method=values.unset, voice_fallback_url=values.unset, voice_method=values.unset, voice_url=values.unset): """ Update the SimInstance :param unicode unique_name: A user-provided string that uniquely identifies this resource as an alternative to the Sid. :param unicode callback_method: The HTTP method Twilio will use when making a request to the callback URL. :param unicode callback_url: Twilio will make a request to this URL when the Sim has finished updating. :param unicode friendly_name: A user-provided string that identifies this resource. :param unicode rate_plan: The Sid or UniqueName of the RatePlan that this Sim should use. :param SimInstance.Status status: A string representing the status of the Sim. :param unicode commands_callback_method: A string representing the HTTP method to use when making a request to CommandsCallbackUrl. :param unicode commands_callback_url: The URL that will receive a webhook when this Sim originates a Command. :param unicode sms_fallback_method: The HTTP method Twilio will use when requesting the sms_fallback_url. :param unicode sms_fallback_url: The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by sms_url. :param unicode sms_method: The HTTP method Twilio will use when requesting the above Url. :param unicode sms_url: The URL Twilio will request when the SIM-connected device sends an SMS message that is not a Command. :param unicode voice_fallback_method: The HTTP method Twilio will use when requesting the voice_fallback_url. :param unicode voice_fallback_url: The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by voice_url. :param unicode voice_method: The HTTP method Twilio will use when requesting the above Url. :param unicode voice_url: The URL Twilio will request when the SIM-connected device makes a call. :returns: Updated SimInstance :rtype: twilio.rest.wireless.v1.sim.SimInstance """ data = values.of({ 'UniqueName': unique_name, 'CallbackMethod': callback_method, 'CallbackUrl': callback_url, 'FriendlyName': friendly_name, 'RatePlan': rate_plan, 'Status': status, 'CommandsCallbackMethod': commands_callback_method, 'CommandsCallbackUrl': commands_callback_url, 'SmsFallbackMethod': sms_fallback_method, 'SmsFallbackUrl': sms_fallback_url, 'SmsMethod': sms_method, 'SmsUrl': sms_url, 'VoiceFallbackMethod': voice_fallback_method, 'VoiceFallbackUrl': voice_fallback_url, 'VoiceMethod': voice_method, 'VoiceUrl': voice_url, }) payload = self._version.update( 'POST', self._uri, data=data, ) return SimInstance( self._version, payload, sid=self._solution['sid'], )
def create(self, api_version=values.unset, voice_url=values.unset, voice_method=values.unset, voice_fallback_url=values.unset, voice_fallback_method=values.unset, status_callback=values.unset, status_callback_method=values.unset, voice_caller_id_lookup=values.unset, sms_url=values.unset, sms_method=values.unset, sms_fallback_url=values.unset, sms_fallback_method=values.unset, sms_status_callback=values.unset, message_status_callback=values.unset, friendly_name=values.unset): """ Create the ApplicationInstance :param unicode api_version: The API version to use to start a new TwiML session :param unicode voice_url: The URL to call when the phone number receives a call :param unicode voice_method: The HTTP method to use with the voice_url :param unicode voice_fallback_url: The URL to call when a TwiML error occurs :param unicode voice_fallback_method: The HTTP method to use with voice_fallback_url :param unicode status_callback: The URL to send status information to your application :param unicode status_callback_method: The HTTP method to use to call status_callback :param bool voice_caller_id_lookup: Whether to lookup the caller's name :param unicode sms_url: The URL to call when the phone number receives an incoming SMS message :param unicode sms_method: The HTTP method to use with sms_url :param unicode sms_fallback_url: The URL to call when an error occurs while retrieving or executing the TwiML :param unicode sms_fallback_method: The HTTP method to use with sms_fallback_url :param unicode sms_status_callback: The URL to send status information to your application :param unicode message_status_callback: The URL to send message status information to your application :param unicode friendly_name: A string to describe the new resource :returns: The created ApplicationInstance :rtype: twilio.rest.api.v2010.account.application.ApplicationInstance """ data = values.of({ 'ApiVersion': api_version, 'VoiceUrl': voice_url, 'VoiceMethod': voice_method, 'VoiceFallbackUrl': voice_fallback_url, 'VoiceFallbackMethod': voice_fallback_method, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'VoiceCallerIdLookup': voice_caller_id_lookup, 'SmsUrl': sms_url, 'SmsMethod': sms_method, 'SmsFallbackUrl': sms_fallback_url, 'SmsFallbackMethod': sms_fallback_method, 'SmsStatusCallback': sms_status_callback, 'MessageStatusCallback': message_status_callback, 'FriendlyName': friendly_name, }) payload = self._version.create( method='POST', uri=self._uri, data=data, ) return ApplicationInstance( self._version, payload, account_sid=self._solution['account_sid'], )
def page(self, area_code=values.unset, contains=values.unset, sms_enabled=values.unset, mms_enabled=values.unset, voice_enabled=values.unset, exclude_all_address_required=values.unset, exclude_local_address_required=values.unset, exclude_foreign_address_required=values.unset, beta=values.unset, near_number=values.unset, near_lat_long=values.unset, distance=values.unset, in_postal_code=values.unset, in_region=values.unset, in_rate_center=values.unset, in_lata=values.unset, in_locality=values.unset, fax_enabled=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of NationalInstance records from the API. Request is executed immediately :param unicode area_code: The area code of the phone numbers to read :param unicode contains: The pattern on which to match phone numbers :param bool sms_enabled: Whether the phone numbers can receive text messages :param bool mms_enabled: Whether the phone numbers can receive MMS messages :param bool voice_enabled: Whether the phone numbers can receive calls. :param bool exclude_all_address_required: Whether to exclude phone numbers that require an Address :param bool exclude_local_address_required: Whether to exclude phone numbers that require a local address :param bool exclude_foreign_address_required: Whether to exclude phone numbers that require a foreign address :param bool beta: Whether to read phone numbers new to the Twilio platform :param unicode near_number: Given a phone number, find a geographically close number within distance miles. (US/Canada only) :param unicode near_lat_long: Given a latitude/longitude pair lat,long find geographically close numbers within distance miles. (US/Canada only) :param unicode distance: The search radius, in miles, for a near_ query. (US/Canada only) :param unicode in_postal_code: Limit results to a particular postal code. (US/Canada only) :param unicode in_region: Limit results to a particular region. (US/Canada only) :param unicode in_rate_center: Limit results to a specific rate center, or given a phone number search within the same rate center as that number. (US/Canada only) :param unicode in_lata: Limit results to a specific local access and transport area. (US/Canada only) :param unicode in_locality: Limit results to a particular locality :param bool fax_enabled: Whether the phone numbers can receive faxes :param 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 NationalInstance :rtype: twilio.rest.api.v2010.account.available_phone_number.national.NationalPage """ data = values.of({ 'AreaCode': area_code, 'Contains': contains, 'SmsEnabled': sms_enabled, 'MmsEnabled': mms_enabled, 'VoiceEnabled': voice_enabled, 'ExcludeAllAddressRequired': exclude_all_address_required, 'ExcludeLocalAddressRequired': exclude_local_address_required, 'ExcludeForeignAddressRequired': exclude_foreign_address_required, 'Beta': beta, 'NearNumber': near_number, 'NearLatLong': near_lat_long, 'Distance': distance, 'InPostalCode': in_postal_code, 'InRegion': in_region, 'InRateCenter': in_rate_center, 'InLata': in_lata, 'InLocality': in_locality, 'FaxEnabled': fax_enabled, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( method='GET', uri=self._uri, params=data, ) return NationalPage(self._version, response, self._solution)
def page(self, date_created_before=values.unset, date_created=values.unset, date_created_after=values.unset, date_updated_before=values.unset, date_updated=values.unset, date_updated_after=values.unset, friendly_name=values.unset, status=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of ConferenceInstance records from the API. Request is executed immediately :param date date_created_before: The `YYYY-MM-DD` value of the resources to read :param date date_created: The `YYYY-MM-DD` value of the resources to read :param date date_created_after: The `YYYY-MM-DD` value of the resources to read :param date date_updated_before: The `YYYY-MM-DD` value of the resources to read :param date date_updated: The `YYYY-MM-DD` value of the resources to read :param date date_updated_after: The `YYYY-MM-DD` value of the resources to read :param unicode friendly_name: The string that identifies the Conference resources to read :param ConferenceInstance.Status status: The status of the resources to read :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of ConferenceInstance :rtype: twilio.rest.api.v2010.account.conference.ConferencePage """ data = values.of({ 'DateCreated<': serialize.iso8601_date(date_created_before), 'DateCreated': serialize.iso8601_date(date_created), 'DateCreated>': serialize.iso8601_date(date_created_after), 'DateUpdated<': serialize.iso8601_date(date_updated_before), 'DateUpdated': serialize.iso8601_date(date_updated), 'DateUpdated>': serialize.iso8601_date(date_updated_after), 'FriendlyName': friendly_name, 'Status': status, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( method='GET', uri=self._uri, params=data, ) return ConferencePage(self._version, response, self._solution)
def update(self, reservation_status=values.unset, worker_activity_sid=values.unset, instruction=values.unset, dequeue_post_work_activity_sid=values.unset, dequeue_from=values.unset, dequeue_record=values.unset, dequeue_timeout=values.unset, dequeue_to=values.unset, dequeue_status_callback_url=values.unset, call_from=values.unset, call_record=values.unset, call_timeout=values.unset, call_to=values.unset, call_url=values.unset, call_status_callback_url=values.unset, call_accept=values.unset, redirect_call_sid=values.unset, redirect_accept=values.unset, redirect_url=values.unset): """ Update the ReservationInstance :param ReservationInstance.Status reservation_status: The reservation_status :param unicode worker_activity_sid: The worker_activity_sid :param unicode instruction: The instruction :param unicode dequeue_post_work_activity_sid: The dequeue_post_work_activity_sid :param unicode dequeue_from: The dequeue_from :param unicode dequeue_record: The dequeue_record :param unicode dequeue_timeout: The dequeue_timeout :param unicode dequeue_to: The dequeue_to :param unicode dequeue_status_callback_url: The dequeue_status_callback_url :param unicode call_from: The call_from :param unicode call_record: The call_record :param unicode call_timeout: The call_timeout :param unicode call_to: The call_to :param unicode call_url: The call_url :param unicode call_status_callback_url: The call_status_callback_url :param bool call_accept: The call_accept :param unicode redirect_call_sid: The redirect_call_sid :param bool redirect_accept: The redirect_accept :param unicode redirect_url: The redirect_url :returns: Updated ReservationInstance :rtype: twilio.rest.taskrouter.v1.workspace.worker.reservation.ReservationInstance """ data = values.of({ 'ReservationStatus': reservation_status, 'WorkerActivitySid': worker_activity_sid, 'Instruction': instruction, 'DequeuePostWorkActivitySid': dequeue_post_work_activity_sid, 'DequeueFrom': dequeue_from, 'DequeueRecord': dequeue_record, 'DequeueTimeout': dequeue_timeout, 'DequeueTo': dequeue_to, 'DequeueStatusCallbackUrl': dequeue_status_callback_url, 'CallFrom': call_from, 'CallRecord': call_record, 'CallTimeout': call_timeout, 'CallTo': call_to, 'CallUrl': call_url, 'CallStatusCallbackUrl': call_status_callback_url, 'CallAccept': call_accept, 'RedirectCallSid': redirect_call_sid, 'RedirectAccept': redirect_accept, 'RedirectUrl': redirect_url, }) payload = self._version.update( 'POST', self._uri, data=data, ) return ReservationInstance( self._version, payload, workspace_sid=self._solution['workspace_sid'], worker_sid=self._solution['worker_sid'], sid=self._solution['sid'], )