def create(self, hosted_number_order_sids, address_sid, email, contact_title, contact_phone_number, cc_emails=values.unset): """ Create a new AuthorizationDocumentInstance :param unicode hosted_number_order_sids: A list of HostedNumberOrder sids. :param unicode address_sid: Address sid. :param unicode email: Email. :param unicode contact_title: Title of signee of this Authorization Document. :param unicode contact_phone_number: Authorization Document's signee's phone number. :param unicode cc_emails: A list of emails. :returns: Newly created AuthorizationDocumentInstance :rtype: twilio.rest.preview.hosted_numbers.authorization_document.AuthorizationDocumentInstance """ data = values.of({ 'HostedNumberOrderSids': serialize.map(hosted_number_order_sids, lambda e: e), 'AddressSid': address_sid, 'Email': email, 'ContactTitle': contact_title, 'ContactPhoneNumber': contact_phone_number, 'CcEmails': serialize.map(cc_emails, lambda e: e), }) payload = self._version.create( 'POST', self._uri, data=data, ) return AuthorizationDocumentInstance(self._version, payload, )
def fetch(self, country_code=values.unset, type=values.unset, add_ons=values.unset, add_ons_data=values.unset): """ Fetch a PhoneNumberInstance :param unicode country_code: Optional ISO country code of the phone number. :param unicode type: Indicates the type of information you would like returned with your request. :param unicode add_ons: Indicates the particular Add-on you would like to use to get more information. :param dict add_ons_data: The add_ons_data :returns: Fetched PhoneNumberInstance :rtype: twilio.rest.lookups.v1.phone_number.PhoneNumberInstance """ params = values.of({ 'CountryCode': country_code, 'Type': serialize.map(type, lambda e: e), 'AddOns': serialize.map(add_ons, lambda e: e), }) params.update( serialize.prefixed_collapsible_map(add_ons_data, 'AddOns')) payload = self._version.fetch( 'GET', self._uri, params=params, ) return PhoneNumberInstance( self._version, payload, phone_number=self._solution['phone_number'], )
def page(self, binding_type=values.unset, identity=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of BindingInstance records from the API. Request is executed immediately :param BindingInstance.BindingType binding_type: The push technology used for the bindings returned. :param unicode identity: The identity :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of BindingInstance :rtype: twilio.rest.chat.v2.service.binding.BindingPage """ params = values.of({ 'BindingType': serialize.map(binding_type, lambda e: e), '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 BindingPage(self._version, response, self._solution)
def update(self, hosted_number_order_sids=values.unset, address_sid=values.unset, email=values.unset, cc_emails=values.unset, status=values.unset, contact_title=values.unset, contact_phone_number=values.unset): """ Update the AuthorizationDocumentInstance :param unicode hosted_number_order_sids: A list of HostedNumberOrder sids. :param unicode address_sid: Address sid. :param unicode email: Email. :param unicode cc_emails: A list of emails. :param AuthorizationDocumentInstance.Status status: The Status of this AuthorizationDocument. :param unicode contact_title: Title of signee of this Authorization Document. :param unicode contact_phone_number: Authorization Document's signee's phone number. :returns: Updated AuthorizationDocumentInstance :rtype: twilio.rest.preview.hosted_numbers.authorization_document.AuthorizationDocumentInstance """ data = values.of({ 'HostedNumberOrderSids': serialize.map(hosted_number_order_sids, lambda e: e), 'AddressSid': address_sid, 'Email': email, 'CcEmails': serialize.map(cc_emails, lambda e: e), 'Status': status, 'ContactTitle': contact_title, 'ContactPhoneNumber': contact_phone_number, }) payload = self._version.update( 'POST', self._uri, data=data, ) return AuthorizationDocumentInstance(self._version, payload, sid=self._solution['sid'], )
def create(self, room_sid=values.unset, video_layout=values.unset, audio_sources=values.unset, audio_sources_excluded=values.unset, resolution=values.unset, format=values.unset, status_callback=values.unset, status_callback_method=values.unset, trim=values.unset): """ Create a new CompositionInstance :param unicode room_sid: Twilio Room SID. :param dict video_layout: The JSON video layout description. :param unicode audio_sources: A list of audio sources related to this Composition. :param unicode audio_sources_excluded: A list of audio sources excluded related to this Composition. :param unicode resolution: Pixel resolution of the composed video. :param CompositionInstance.Format format: Container format of the Composition media file. Any of the following: `mp4`, `webm`. :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. :param bool trim: Boolean flag for clipping intervals that have no media. :returns: Newly created CompositionInstance :rtype: twilio.rest.video.v1.composition.CompositionInstance """ data = values.of({ 'RoomSid': room_sid, 'VideoLayout': serialize.object(video_layout), 'AudioSources': serialize.map(audio_sources, lambda e: e), 'AudioSourcesExcluded': serialize.map(audio_sources_excluded, lambda e: e), 'Resolution': resolution, 'Format': format, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'Trim': trim, }) payload = self._version.create( 'POST', self._uri, data=data, ) return CompositionInstance( self._version, payload, )
def create(self, type, 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): """ Create a new WebhookInstance :param WebhookInstance.Type type: The type :param unicode configuration_url: The configuration.url :param WebhookInstance.Method configuration_method: The configuration.method :param unicode configuration_filters: The configuration.filters :param unicode configuration_triggers: The configuration.triggers :param unicode configuration_flow_sid: The configuration.flow_sid :param unicode configuration_retry_count: The configuration.retry_count :returns: Newly created WebhookInstance :rtype: twilio.rest.chat.v2.service.channel.webhook.WebhookInstance """ data = values.of({ 'Type': type, '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, }) payload = self._version.create( 'POST', self._uri, data=data, ) return WebhookInstance( self._version, payload, service_sid=self._solution['service_sid'], channel_sid=self._solution['channel_sid'], )
def page(self, type=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of ChannelInstance records from the API. Request is executed immediately :param ChannelInstance.ChannelType type: The visibility of the channel - public or private. :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 ChannelInstance :rtype: twilio.rest.chat.v2.service.channel.ChannelPage """ params = values.of({ 'Type': serialize.map(type, lambda e: e), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return ChannelPage(self._version, response, self._solution)
def update(self, permission): """ Update the RoleInstance :param unicode permission: A permission this role should have. :returns: Updated RoleInstance :rtype: twilio.rest.chat.v1.service.role.RoleInstance """ data = values.of({ 'Permission': serialize.map(permission, lambda e: e), }) payload = self._version.update( 'POST', self._uri, data=data, ) return RoleInstance( self._version, payload, service_sid=self._solution['service_sid'], sid=self._solution['sid'], )
def create(self, friendly_name, type, permission): """ Create a new RoleInstance :param unicode friendly_name: The human-readable name of this role. :param RoleInstance.RoleType type: What kind of role this is. :param unicode permission: A permission this role should have. :returns: Newly created RoleInstance :rtype: twilio.rest.chat.v1.service.role.RoleInstance """ data = values.of({ 'FriendlyName': friendly_name, 'Type': type, 'Permission': serialize.map(permission, lambda e: e), }) payload = self._version.create( 'POST', self._uri, data=data, ) return RoleInstance( self._version, payload, service_sid=self._solution['service_sid'], )
def page(self, identity=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of MemberInstance 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 MemberInstance :rtype: twilio.rest.chat.v1.service.channel.member.MemberPage """ 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 MemberPage(self._version, response, self._solution)
def create(self, body=values.unset, media_url=values.unset): """ Create a new MessageInteractionInstance :param unicode body: Message body :param unicode media_url: Not supported in beta :returns: Newly created MessageInteractionInstance :rtype: twilio.rest.proxy.v1.service.session.participant.message_interaction.MessageInteractionInstance """ data = values.of({ 'Body': body, 'MediaUrl': serialize.map(media_url, lambda e: e), }) payload = self._version.create( 'POST', self._uri, data=data, ) return MessageInteractionInstance( self._version, payload, service_sid=self._solution['service_sid'], session_sid=self._solution['session_sid'], participant_sid=self._solution['participant_sid'], )
def update(self, quality_score, issue=values.unset): """ Update the FeedbackInstance :param unicode quality_score: An integer from 1 to 5 :param FeedbackInstance.Issues issue: Issues experienced during the call :returns: Updated FeedbackInstance :rtype: twilio.rest.api.v2010.account.call.feedback.FeedbackInstance """ data = values.of({ 'QualityScore': quality_score, 'Issue': serialize.map(issue, lambda e: e), }) payload = self._version.update( 'POST', self._uri, data=data, ) return FeedbackInstance( self._version, payload, account_sid=self._solution['account_sid'], call_sid=self._solution['call_sid'], )
def create(self, enable_turn=values.unset, type=values.unset, unique_name=values.unset, status_callback=values.unset, status_callback_method=values.unset, max_participants=values.unset, record_participants_on_connect=values.unset, video_codecs=values.unset, media_region=values.unset): """ Create a new RoomInstance :param bool enable_turn: Use Twilio Network Traversal for TURN service. :param RoomInstance.RoomType type: Type of room, either peer-to-peer, group-small or group. :param unicode unique_name: Name of the Room. :param unicode status_callback: A URL that Twilio sends asynchronous webhook requests to on every room event. :param unicode status_callback_method: HTTP method Twilio should use when requesting the above URL. :param unicode max_participants: Maximum number of Participants in the Room. :param bool record_participants_on_connect: Start Participant recording when connected. :param RoomInstance.VideoCodec video_codecs: An array of video codecs supported when publishing a Track in the Room. :param unicode media_region: Region for the media server in Group Rooms. :returns: Newly created RoomInstance :rtype: twilio.rest.video.v1.room.RoomInstance """ data = values.of({ 'EnableTurn': enable_turn, 'Type': type, 'UniqueName': unique_name, 'StatusCallback': status_callback, 'StatusCallbackMethod': status_callback_method, 'MaxParticipants': max_participants, 'RecordParticipantsOnConnect': record_participants_on_connect, 'VideoCodecs': serialize.map(video_codecs, lambda e: e), 'MediaRegion': media_region, }) payload = self._version.create( 'POST', self._uri, data=data, ) return RoomInstance( self._version, payload, )
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, 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 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, }) payload = self._version.create( 'POST', self._uri, data=data, ) return MessageInstance(self._version, payload, account_sid=self._solution['account_sid'], )
def update(self, authorize_redirect_url=values.unset, company_name=values.unset, deauthorize_callback_method=values.unset, deauthorize_callback_url=values.unset, description=values.unset, friendly_name=values.unset, homepage_url=values.unset, permissions=values.unset): """ Update the ConnectAppInstance :param unicode authorize_redirect_url: URIL Twilio sends requests when users authorize :param unicode company_name: The company name set for this Connect App. :param unicode deauthorize_callback_method: HTTP method Twilio WIll use making requests to the url :param unicode deauthorize_callback_url: URL Twilio will send a request when a user de-authorizes this app :param unicode description: A more detailed human readable description :param unicode friendly_name: A human readable name for the Connect App. :param unicode homepage_url: The URL users can obtain more information :param ConnectAppInstance.Permission permissions: The set of permissions that your ConnectApp requests. :returns: Updated ConnectAppInstance :rtype: twilio.rest.api.v2010.account.connect_app.ConnectAppInstance """ data = values.of({ 'AuthorizeRedirectUrl': authorize_redirect_url, 'CompanyName': company_name, 'DeauthorizeCallbackMethod': deauthorize_callback_method, 'DeauthorizeCallbackUrl': deauthorize_callback_url, 'Description': description, 'FriendlyName': friendly_name, 'HomepageUrl': homepage_url, 'Permissions': serialize.map(permissions, lambda e: e), }) payload = self._version.update( 'POST', self._uri, data=data, ) return ConnectAppInstance( self._version, payload, account_sid=self._solution['account_sid'], sid=self._solution['sid'], )
def page(self, start_date=values.unset, end_date=values.unset, identity=values.unset, tag=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of BindingInstance records from the API. Request is executed immediately :param date start_date: Only list Bindings created on or after the given date. :param date end_date: Only list Bindings created on or before the given date. :param unicode identity: Only list Bindings that have any of the specified Identities. :param unicode tag: Only list Bindings that have all of the specified Tags. :param str page_token: PageToken provided by the API :param int page_number: Page Number, this value is simply for client state :param int page_size: Number of records to return, defaults to 50 :returns: Page of BindingInstance :rtype: twilio.rest.notify.v1.service.binding.BindingPage """ params = values.of({ 'StartDate': serialize.iso8601_date(start_date), 'EndDate': serialize.iso8601_date(end_date), 'Identity': serialize.map(identity, lambda e: e), 'Tag': serialize.map(tag, lambda e: e), 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return BindingPage(self._version, response, self._solution)
def update(self, friendly_name=values.unset, unique_name=values.unset, email=values.unset, cc_emails=values.unset, status=values.unset, verification_code=values.unset, verification_type=values.unset, verification_document_sid=values.unset, extension=values.unset, call_delay=values.unset): """ Update the HostedNumberOrderInstance :param unicode friendly_name: A human readable description of this resource. :param unicode unique_name: A unique, developer assigned name of this HostedNumberOrder. :param unicode email: Email. :param unicode cc_emails: A list of emails. :param HostedNumberOrderInstance.Status status: The Status of this HostedNumberOrder. :param unicode verification_code: A verification code. :param HostedNumberOrderInstance.VerificationType verification_type: Verification Type. :param unicode verification_document_sid: Verification Document Sid :param unicode extension: Digits to dial after connecting the verification call. :param unicode call_delay: The number of seconds, between 0 and 60, to delay before initiating the verification call. :returns: Updated HostedNumberOrderInstance :rtype: twilio.rest.preview.hosted_numbers.hosted_number_order.HostedNumberOrderInstance """ data = values.of({ 'FriendlyName': friendly_name, 'UniqueName': unique_name, 'Email': email, 'CcEmails': serialize.map(cc_emails, lambda e: e), 'Status': status, 'VerificationCode': verification_code, 'VerificationType': verification_type, 'VerificationDocumentSid': verification_document_sid, 'Extension': extension, 'CallDelay': call_delay, }) payload = self._version.update( 'POST', self._uri, data=data, ) return HostedNumberOrderInstance( self._version, payload, sid=self._solution['sid'], )
def page(self, status=values.unset, source_sid=values.unset, grouping_sid=values.unset, date_created_after=values.unset, date_created_before=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 RecordingInstance.Status status: Only show Recordings with the given status. :param unicode source_sid: Only show the Recordings with the given source Sid. :param unicode grouping_sid: Only show Recordings that have this GroupingSid. :param datetime date_created_after: Only show Recordings that started on or after this ISO8601 date-time. :param datetime date_created_before: Only show Recordings 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 RecordingInstance :rtype: twilio.rest.video.v1.recording.RecordingPage """ params = values.of({ 'Status': status, 'SourceSid': source_sid, 'GroupingSid': serialize.map(grouping_sid, lambda e: e), 'DateCreatedAfter': serialize.iso8601_datetime(date_created_after), 'DateCreatedBefore': serialize.iso8601_datetime(date_created_before), '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 page(self, priority=values.unset, assignment_status=values.unset, workflow_sid=values.unset, workflow_name=values.unset, task_queue_sid=values.unset, task_queue_name=values.unset, evaluate_task_attributes=values.unset, ordering=values.unset, has_addons=values.unset, page_token=values.unset, page_number=values.unset, page_size=values.unset): """ Retrieve a single page of TaskInstance records from the API. Request is executed immediately :param unicode priority: Retrieve the list of all Tasks in the workspace with the specified priority. :param unicode assignment_status: Returns the list of all Tasks in the workspace with the specified AssignmentStatus. :param unicode workflow_sid: Returns the list of Tasks that are being controlled by the Workflow with the specified Sid value. :param unicode workflow_name: Returns the list of Tasks that are being controlled by the Workflow with the specified FriendlyName value. :param unicode task_queue_sid: Returns the list of Tasks that are currently waiting in the TaskQueue identified by the Sid specified. :param unicode task_queue_name: Returns the list of Tasks that are currently waiting in the TaskQueue identified by the FriendlyName specified. :param unicode evaluate_task_attributes: Provide a task attributes expression, and this will return tasks which match the attributes. :param unicode ordering: Use this parameter to control the order of the Tasks returned. :param bool has_addons: The has_addons :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 TaskInstance :rtype: twilio.rest.taskrouter.v1.workspace.task.TaskPage """ params = values.of({ 'Priority': priority, 'AssignmentStatus': serialize.map(assignment_status, lambda e: e), 'WorkflowSid': workflow_sid, 'WorkflowName': workflow_name, 'TaskQueueSid': task_queue_sid, 'TaskQueueName': task_queue_name, 'EvaluateTaskAttributes': evaluate_task_attributes, 'Ordering': ordering, 'HasAddons': has_addons, 'PageToken': page_token, 'Page': page_number, 'PageSize': page_size, }) response = self._version.page( 'GET', self._uri, params=params, ) return TaskPage(self._version, response, self._solution)
def create(self, unique_name=values.unset, date_expiry=values.unset, ttl=values.unset, mode=values.unset, status=values.unset, participants=values.unset): """ Create a new SessionInstance :param unicode unique_name: A unique, developer assigned name of this Session. :param datetime date_expiry: The date this Session should expire :param unicode ttl: TTL for a Session, in seconds. :param SessionInstance.Mode mode: The Mode of this Session :param SessionInstance.Status status: Session status :param dict participants: The participants :returns: Newly created SessionInstance :rtype: twilio.rest.proxy.v1.service.session.SessionInstance """ data = values.of({ 'UniqueName': unique_name, 'DateExpiry': serialize.iso8601_datetime(date_expiry), 'Ttl': ttl, 'Mode': mode, 'Status': status, 'Participants': serialize.map(participants, lambda e: serialize.object(e)), }) payload = self._version.create( 'POST', self._uri, data=data, ) return SessionInstance( self._version, payload, service_sid=self._solution['service_sid'], )
def create(self, unique_name=values.unset, friendly_name=values.unset, data_enabled=values.unset, data_limit=values.unset, data_metering=values.unset, messaging_enabled=values.unset, voice_enabled=values.unset, national_roaming_enabled=values.unset, international_roaming=values.unset, national_roaming_data_limit=values.unset, international_roaming_data_limit=values.unset): """ Create a new RatePlanInstance :param unicode unique_name: A user-provided string that uniquely identifies this resource as an alternative to the Sid. :param unicode friendly_name: A user-provided string that identifies this resource. :param bool data_enabled: Defines whether SIMs are capable of using GPRS/3G/LTE data connectivity. :param unicode data_limit: Network-enforced limit specifying the total Megabytes of data usage allowed during one month on the home network. :param unicode data_metering: The model by which to meter data usage, in accordance with the two available data metering models. :param bool messaging_enabled: Defines whether SIMs are capable of making and sending and receiving SMS messages via either Commands or Programmable SMS APIs. :param bool voice_enabled: Defines whether SIMs are capable of making and receiving voice calls. :param bool national_roaming_enabled: Defines whether SIMs can roam onto other networks in the SIM's home country. :param unicode international_roaming: The international_roaming :param unicode national_roaming_data_limit: Network-enforced limit specifying the total Megabytes of national roaming data usage allowed during one month. :param unicode international_roaming_data_limit: The international_roaming_data_limit :returns: Newly created RatePlanInstance :rtype: twilio.rest.wireless.v1.rate_plan.RatePlanInstance """ data = values.of({ 'UniqueName': unique_name, 'FriendlyName': friendly_name, 'DataEnabled': data_enabled, 'DataLimit': data_limit, 'DataMetering': data_metering, 'MessagingEnabled': messaging_enabled, 'VoiceEnabled': voice_enabled, 'NationalRoamingEnabled': national_roaming_enabled, 'InternationalRoaming': serialize.map(international_roaming, lambda e: e), 'NationalRoamingDataLimit': national_roaming_data_limit, 'InternationalRoamingDataLimit': international_roaming_data_limit, }) payload = self._version.create( 'POST', self._uri, data=data, ) return RatePlanInstance(self._version, payload, )
def create(self, identity, binding_type, address, tag=values.unset, notification_protocol_version=values.unset, credential_sid=values.unset, endpoint=values.unset): """ Create a new BindingInstance :param unicode identity: The Identity to which this Binding belongs to. :param BindingInstance.BindingType binding_type: The type of the Binding. :param unicode address: The address specific to the channel. :param unicode tag: The list of tags associated with this Binding. :param unicode notification_protocol_version: The version of the protocol used to send the notification. :param unicode credential_sid: The unique identifier of the Credential resource to be used to send notifications to this Binding. :param unicode endpoint: DEPRECATED* :returns: Newly created BindingInstance :rtype: twilio.rest.notify.v1.service.binding.BindingInstance """ data = values.of({ 'Identity': identity, 'BindingType': binding_type, 'Address': address, 'Tag': serialize.map(tag, lambda e: e), 'NotificationProtocolVersion': notification_protocol_version, 'CredentialSid': credential_sid, 'Endpoint': endpoint, }) payload = self._version.create( 'POST', self._uri, data=data, ) return BindingInstance( self._version, payload, service_sid=self._solution['service_sid'], )
def create(self, recording_status_callback_event=values.unset, recording_status_callback=values.unset, recording_status_callback_method=values.unset, trim=values.unset, recording_channels=values.unset): """ Create a new RecordingInstance :param unicode recording_status_callback_event: The recording_status_callback_event :param unicode recording_status_callback: The recording_status_callback :param unicode recording_status_callback_method: The recording_status_callback_method :param unicode trim: Whether to trim the silence in the recording :param unicode recording_channels: The recording_channels :returns: Newly created RecordingInstance :rtype: twilio.rest.api.v2010.account.call.recording.RecordingInstance """ data = values.of({ 'RecordingStatusCallbackEvent': serialize.map(recording_status_callback_event, lambda e: e), 'RecordingStatusCallback': recording_status_callback, 'RecordingStatusCallbackMethod': recording_status_callback_method, 'Trim': trim, 'RecordingChannels': recording_channels, }) payload = self._version.create( 'POST', self._uri, data=data, ) return RecordingInstance( self._version, payload, account_sid=self._solution['account_sid'], call_sid=self._solution['call_sid'], )
def update(self, date_expiry=values.unset, ttl=values.unset, mode=values.unset, status=values.unset, participants=values.unset): """ Update the SessionInstance :param datetime date_expiry: The date this Session should expire :param unicode ttl: TTL for a Session, in seconds. :param SessionInstance.Mode mode: The mode :param SessionInstance.Status status: The Status of this Session :param dict participants: The participants :returns: Updated SessionInstance :rtype: twilio.rest.proxy.v1.service.session.SessionInstance """ data = values.of({ 'DateExpiry': serialize.iso8601_datetime(date_expiry), 'Ttl': ttl, 'Mode': mode, 'Status': status, 'Participants': serialize.map(participants, lambda e: serialize.object(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 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: Indicates the notification body text. :param NotificationInstance.Priority priority: Two priorities defined: low and high. :param unicode ttl: This parameter specifies how long the notification is valid. :param unicode title: Indicates the notification title. :param unicode sound: Indicates a sound to be played. :param unicode action: Specifies the actions to be displayed for the notification. :param dict data: This parameter specifies the custom key-value pairs of the notification's payload. :param dict apn: APNS specific payload that overrides corresponding attributes in a generic payload for Bindings with the apn BindingType. :param dict gcm: GCM specific payload that overrides corresponding attributes in generic payload for Bindings with gcm BindingType. :param dict sms: SMS specific payload that overrides corresponding attributes in generic payload for Bindings with sms BindingType. :param dict facebook_messenger: Messenger specific payload that overrides corresponding attributes in generic payload for Bindings with facebook-messenger BindingType. :param dict fcm: FCM specific payload that overrides corresponding attributes in generic payload for Bindings with fcm BindingType. :param unicode segment: The segment :param dict alexa: The alexa :param unicode to_binding: The destination address in a JSON object. :param unicode identity: Delivery will be attempted only to Bindings with an Identity in this list. :param unicode tag: Delivery will be attempted only to Bindings that have all of the Tags in this list. :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, 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 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, if_machine=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, url=values.unset, application_sid=values.unset): """ Create a new CallInstance :param unicode to: Phone number, SIP address, or client identifier to call :param unicode from_: Twilio number from which to originate the call :param unicode method: HTTP method to use to fetch TwiML :param unicode fallback_url: Fallback URL in case of error :param unicode fallback_method: HTTP Method to use with FallbackUrl :param unicode status_callback: Status Callback URL :param unicode status_callback_event: The call progress events that Twilio will send webhooks on. :param unicode status_callback_method: HTTP Method to use with StatusCallback :param unicode send_digits: Digits to send :param unicode if_machine: The if_machine :param unicode timeout: Number of seconds to wait for an answer :param bool record: Whether or not to record the Call :param unicode recording_channels: mono or dualSet this parameter to specify the number of channels in the final recording. :param unicode recording_status_callback: A URL that Twilio will send a webhook request to when the recording is available for access. :param unicode recording_status_callback_method: The HTTP method Twilio should use when requesting the `RecordingStatusCallback` URL. :param unicode sip_auth_username: The sip_auth_username :param unicode sip_auth_password: The sip_auth_password :param unicode machine_detection: Enable machine detection or end of greeting detection :param unicode machine_detection_timeout: Number of miliseconds to wait for machine detection :param unicode recording_status_callback_event: The recording status changes that Twilio will send webhooks on to the URL specified in RecordingStatusCallback. :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 url: Url from which to fetch TwiML :param unicode application_sid: ApplicationSid that configures from where to fetch TwiML :returns: Newly created CallInstance :rtype: twilio.rest.api.v2010.account.call.CallInstance """ data = values.of({ 'To': to, 'From': from_, 'Url': url, 'ApplicationSid': application_sid, 'Method': method, 'FallbackUrl': fallback_url, 'FallbackMethod': fallback_method, 'StatusCallback': status_callback, 'StatusCallbackEvent': serialize.map(status_callback_event, lambda e: e), 'StatusCallbackMethod': status_callback_method, 'SendDigits': send_digits, 'IfMachine': if_machine, '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, }) payload = self._version.create( 'POST', self._uri, data=data, ) return CallInstance(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): """ Update the ReservationInstance :param ReservationInstance.Status reservation_status: Yes :param unicode worker_activity_sid: No :param unicode instruction: Yes :param unicode dequeue_post_work_activity_sid: No :param unicode dequeue_from: Yes :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: Yes :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: Yes :param unicode call_status_callback_url: No :param bool call_accept: No :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 create(self, unique_name=values.unset, friendly_name=values.unset, data_enabled=values.unset, data_limit=values.unset, data_metering=values.unset, messaging_enabled=values.unset, voice_enabled=values.unset, commands_enabled=values.unset, national_roaming_enabled=values.unset, international_roaming=values.unset): """ Create a new RatePlanInstance :param unicode unique_name: The unique_name :param unicode friendly_name: The friendly_name :param bool data_enabled: The data_enabled :param unicode data_limit: The data_limit :param unicode data_metering: The data_metering :param bool messaging_enabled: The messaging_enabled :param bool voice_enabled: The voice_enabled :param bool commands_enabled: The commands_enabled :param bool national_roaming_enabled: The national_roaming_enabled :param unicode international_roaming: The international_roaming :returns: Newly created RatePlanInstance :rtype: twilio.rest.preview.wireless.rate_plan.RatePlanInstance """ data = values.of({ 'UniqueName': unique_name, 'FriendlyName': friendly_name, 'DataEnabled': data_enabled, 'DataLimit': data_limit, 'DataMetering': data_metering, 'MessagingEnabled': messaging_enabled, 'VoiceEnabled': voice_enabled, 'CommandsEnabled': commands_enabled, 'NationalRoamingEnabled': national_roaming_enabled, 'InternationalRoaming': serialize.map(international_roaming, lambda e: e), }) payload = self._version.create( 'POST', self._uri, data=data, ) return RatePlanInstance( self._version, payload, )
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): """ Update the ReservationInstance :param ReservationInstance.Status reservation_status: New reservation status :param unicode worker_activity_sid: New worker activity sid if rejecting a reservation :param unicode instruction: Assignment instruction for reservation :param unicode dequeue_post_work_activity_sid: New worker activity sid after executing a Dequeue instruction :param unicode dequeue_from: Caller ID for the call to the worker when executing a Dequeue instruction :param unicode dequeue_record: Attribute 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: Contact URI of the worker when executing a Dequeue instruction :param unicode dequeue_status_callback_url: Callback URL for completed call event when executing a Dequeue instruction :param unicode call_from: Caller ID for the outbound call when executing a Call instruction :param unicode call_record: Attribute 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: 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: Callback URL for completed call event when executing a Call instruction :param bool call_accept: Flag to determine if reservation should be accepted when executing a Call instruction :param unicode redirect_call_sid: Call sid of the call parked in the queue when executing a Redirect instruction :param bool redirect_accept: Flag to determine if 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: Contact URI of the worker when executing a Conference instruction :param unicode from_: Caller ID for the call to the worker when executing a Conference instruction :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: Timeout for call when executing a Conference instruction :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: Call progress events sent via webhooks as a result of a Dequeue instruction :param unicode post_work_activity_sid: New worker activity sid after executing a Conference instruction :param ReservationInstance.SupervisorMode supervisor_mode: Supervisor mode when executing the Supervise instruction :param unicode supervisor: Supervisor sid/uri when executing the Supervise instruction :returns: 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, }) payload = self._version.update( 'POST', 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'], )