/// <summary>
        /// Update the attributes of a domain
        /// </summary>
        /// <param name="pathSid"> The sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="authType"> The auth_type </param>
        /// <param name="friendlyName"> A user-specified, human-readable name for the trigger. </param>
        /// <param name="voiceFallbackMethod"> The voice_fallback_method </param>
        /// <param name="voiceFallbackUrl"> The voice_fallback_url </param>
        /// <param name="voiceMethod"> HTTP method to use with voice_url </param>
        /// <param name="voiceStatusCallbackMethod"> The voice_status_callback_method </param>
        /// <param name="voiceStatusCallbackUrl"> The voice_status_callback_url </param>
        /// <param name="voiceUrl"> The voice_url </param>
        /// <param name="sipRegistration"> The sip_registration </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Domain </returns>
        public static async System.Threading.Tasks.Task <DomainResource> UpdateAsync(string pathSid,
                                                                                     string pathAccountSid = null,
                                                                                     string authType       = null,
                                                                                     string friendlyName   = null,
                                                                                     Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                                                                     Uri voiceFallbackUrl = null,
                                                                                     Twilio.Http.HttpMethod voiceMethod = null,
                                                                                     Twilio.Http.HttpMethod voiceStatusCallbackMethod = null,
                                                                                     Uri voiceStatusCallbackUrl = null,
                                                                                     Uri voiceUrl             = null,
                                                                                     bool?sipRegistration     = null,
                                                                                     ITwilioRestClient client = null)
        {
            var options = new UpdateDomainOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, AuthType = authType, FriendlyName = friendlyName, VoiceFallbackMethod = voiceFallbackMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceMethod = voiceMethod, VoiceStatusCallbackMethod = voiceStatusCallbackMethod, VoiceStatusCallbackUrl = voiceStatusCallbackUrl, VoiceUrl = voiceUrl, SipRegistration = sipRegistration
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="voiceUrl"> The URL we should call when receiving a call </param>
        /// <param name="voiceMethod"> The HTTP method we should use with voice_url </param>
        /// <param name="voiceFallbackUrl"> The URL we should call when an error occurs in executing TwiML </param>
        /// <param name="voiceFallbackMethod"> The HTTP method used with voice_fallback_url </param>
        /// <param name="statusCallbackUrl"> The URL that we should call to pass status updates </param>
        /// <param name="statusCallbackMethod"> The HTTP method we should use to call status_callback_url </param>
        /// <param name="cnamLookupEnabled"> Whether Caller ID Name (CNAM) lookup is enabled for the trunk </param>
        /// <param name="connectionPolicySid"> Origination Connection Policy (to your Carrier) </param>
        /// <param name="fromDomainSid"> The SID of the SIP Domain that should be used in the `From` header of originating
        ///                     calls </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of ByocTrunk </returns>
        public static ByocTrunkResource Update(string pathSid,
                                               string friendlyName = null,
                                               Uri voiceUrl        = null,
                                               Twilio.Http.HttpMethod voiceMethod = null,
                                               Uri voiceFallbackUrl = null,
                                               Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                               Uri statusCallbackUrl = null,
                                               Twilio.Http.HttpMethod statusCallbackMethod = null,
                                               bool?cnamLookupEnabled     = null,
                                               string connectionPolicySid = null,
                                               string fromDomainSid       = null,
                                               ITwilioRestClient client   = null)
        {
            var options = new UpdateByocTrunkOptions(pathSid)
            {
                FriendlyName = friendlyName, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, CnamLookupEnabled = cnamLookupEnabled, ConnectionPolicySid = connectionPolicySid, FromDomainSid = fromDomainSid
            };

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathSid"> The SID that identifies the resource to update </param>
        /// <param name="friendlyName"> A unique string to describe the resource </param>
        /// <param name="enabled"> Whether the composition hook is active </param>
        /// <param name="videoLayout"> A JSON object that describes the video layout of the composition hook </param>
        /// <param name="audioSources"> An array of track names from the same group room to merge </param>
        /// <param name="audioSourcesExcluded"> An array of track names to exclude </param>
        /// <param name="trim"> Whether to clip the intervals where there is no active media in the Compositions triggered by
        ///            the composition hook </param>
        /// <param name="format"> The container format of the media files used by the compositions created by the composition
        ///              hook </param>
        /// <param name="resolution"> A string that describes the columns (width) and rows (height) of the generated composed
        ///                  video in pixels </param>
        /// <param name="statusCallback"> The URL we should call to send status information to your application </param>
        /// <param name="statusCallbackMethod"> The HTTP method we should use to call status_callback </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CompositionHook </returns>
        public static CompositionHookResource Update(string pathSid,
                                                     string friendlyName,
                                                     bool?enabled                       = null,
                                                     object videoLayout                 = null,
                                                     List <string> audioSources         = null,
                                                     List <string> audioSourcesExcluded = null,
                                                     bool?trim = null,
                                                     CompositionHookResource.FormatEnum format = null,
                                                     string resolution  = null,
                                                     Uri statusCallback = null,
                                                     Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                     ITwilioRestClient client = null)
        {
            var options = new UpdateCompositionHookOptions(pathSid, friendlyName)
            {
                Enabled = enabled, VideoLayout = videoLayout, AudioSources = audioSources, AudioSourcesExcluded = audioSourcesExcluded, Trim = trim, Format = format, Resolution = resolution, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod
            };

            return(Update(options, client));
        }
Esempio n. 4
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="audioSources"> The audio_sources </param>
        /// <param name="videoSources"> The video_sources </param>
        /// <param name="videoLayout"> The video_layout </param>
        /// <param name="resolution"> The resolution </param>
        /// <param name="format"> The format </param>
        /// <param name="desiredBitrate"> The desired_bitrate </param>
        /// <param name="desiredMaxDuration"> The desired_max_duration </param>
        /// <param name="statusCallback"> The status_callback </param>
        /// <param name="statusCallbackMethod"> The status_callback_method </param>
        /// <param name="trim"> The trim </param>
        /// <param name="reuse"> The reuse </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Composition </returns>
        public static CompositionResource Create(List <string> audioSources = null,
                                                 List <string> videoSources = null,
                                                 CompositionResource.VideoLayoutEnum videoLayout = null,
                                                 string resolution = null,
                                                 CompositionResource.FormatEnum format = null,
                                                 int?desiredBitrate     = null,
                                                 int?desiredMaxDuration = null,
                                                 Uri statusCallback     = null,
                                                 Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                 bool?trim  = null,
                                                 bool?reuse = null,
                                                 ITwilioRestClient client = null)
        {
            var options = new CreateCompositionOptions()
            {
                AudioSources = audioSources, VideoSources = videoSources, VideoLayout = videoLayout, Resolution = resolution, Format = format, DesiredBitrate = desiredBitrate, DesiredMaxDuration = desiredMaxDuration, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, Trim = trim, Reuse = reuse
            };

            return(Create(options, client));
        }
        /// <summary>
        /// Create a new Domain
        /// </summary>
        /// <param name="domainName"> The unique address on Twilio to route SIP traffic </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="friendlyName"> A user-specified, human-readable name for the trigger. </param>
        /// <param name="authType"> The types of authentication mapped to the domain </param>
        /// <param name="voiceUrl"> URL Twilio will request when receiving a call </param>
        /// <param name="voiceMethod"> HTTP method to use with voice_url </param>
        /// <param name="voiceFallbackUrl"> URL Twilio will request if an error occurs in executing TwiML </param>
        /// <param name="voiceFallbackMethod"> HTTP method used with voice_fallback_url </param>
        /// <param name="voiceStatusCallbackUrl"> URL that Twilio will request with status updates </param>
        /// <param name="voiceStatusCallbackMethod"> The voice_status_callback_method </param>
        /// <param name="sipRegistration"> The sip_registration </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Domain </returns>
        public static DomainResource Create(string domainName,
                                            string pathAccountSid = null,
                                            string friendlyName   = null,
                                            string authType       = null,
                                            Uri voiceUrl          = null,
                                            Twilio.Http.HttpMethod voiceMethod = null,
                                            Uri voiceFallbackUrl = null,
                                            Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                            Uri voiceStatusCallbackUrl = null,
                                            Twilio.Http.HttpMethod voiceStatusCallbackMethod = null,
                                            bool?sipRegistration     = null,
                                            ITwilioRestClient client = null)
        {
            var options = new CreateDomainOptions(domainName)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, AuthType = authType, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, VoiceStatusCallbackUrl = voiceStatusCallbackUrl, VoiceStatusCallbackMethod = voiceStatusCallbackMethod, SipRegistration = sipRegistration
            };

            return(Create(options, client));
        }
Esempio n. 6
0
        /// <summary>
        /// Create a new Domain
        /// </summary>
        /// <param name="domainName"> The unique address on Twilio to route SIP traffic </param>
        /// <param name="pathAccountSid"> The SID of the Account that will create the resource </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="voiceUrl"> The URL we should call when receiving a call </param>
        /// <param name="voiceMethod"> The HTTP method to use with voice_url </param>
        /// <param name="voiceFallbackUrl"> The URL we should call when an error occurs in executing TwiML </param>
        /// <param name="voiceFallbackMethod"> The HTTP method to use with voice_fallback_url </param>
        /// <param name="voiceStatusCallbackUrl"> The URL that we should call to pass status updates </param>
        /// <param name="voiceStatusCallbackMethod"> The HTTP method we should use to call `voice_status_callback_url` </param>
        /// <param name="sipRegistration"> Whether SIP registration is allowed </param>
        /// <param name="emergencyCallingEnabled"> Whether emergency calling is enabled for the domain. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Domain </returns>
        public static async System.Threading.Tasks.Task <DomainResource> CreateAsync(string domainName,
                                                                                     string pathAccountSid = null,
                                                                                     string friendlyName   = null,
                                                                                     Uri voiceUrl          = null,
                                                                                     Twilio.Http.HttpMethod voiceMethod = null,
                                                                                     Uri voiceFallbackUrl = null,
                                                                                     Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                                                                     Uri voiceStatusCallbackUrl = null,
                                                                                     Twilio.Http.HttpMethod voiceStatusCallbackMethod = null,
                                                                                     bool?sipRegistration         = null,
                                                                                     bool?emergencyCallingEnabled = null,
                                                                                     ITwilioRestClient client     = null)
        {
            var options = new CreateDomainOptions(domainName)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, VoiceStatusCallbackUrl = voiceStatusCallbackUrl, VoiceStatusCallbackMethod = voiceStatusCallbackMethod, SipRegistration = sipRegistration, EmergencyCallingEnabled = emergencyCallingEnabled
            };

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="pathConferenceSid"> The conference_sid </param>
        /// <param name="from"> The `from` phone number used to invite a participant. </param>
        /// <param name="to"> The number, client id, or sip address of the new participant. </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="statusCallback"> URL for conference event callback. </param>
        /// <param name="statusCallbackMethod"> Method Twilio should use to reach the status callback URL. </param>
        /// <param name="statusCallbackEvent"> Set state change events that will trigger a callback. </param>
        /// <param name="timeout"> Number of seconds Twilio will wait for an answer. </param>
        /// <param name="record"> Record the agent and their conferences. </param>
        /// <param name="muted"> Mute the agent. </param>
        /// <param name="beep"> Play a beep when the participant joins the conference. </param>
        /// <param name="startConferenceOnEnter"> Begin the conference when the participant joins. </param>
        /// <param name="endConferenceOnExit"> End the conference when the participant leaves. </param>
        /// <param name="waitUrl"> URL that hosts pre-conference hold music </param>
        /// <param name="waitMethod"> The method Twilio should use to request `WaitUrl`. </param>
        /// <param name="earlyMedia"> Agents can hear the state of the outbound call. </param>
        /// <param name="maxParticipants"> Maximum number of agent conference participants. </param>
        /// <param name="conferenceRecord"> Record the conference. </param>
        /// <param name="conferenceTrim"> Trim silence from audio files. </param>
        /// <param name="conferenceStatusCallback"> Callback URL for conference events. </param>
        /// <param name="conferenceStatusCallbackMethod"> HTTP method for requesting `ConferenceStatusCallback` URL. </param>
        /// <param name="conferenceStatusCallbackEvent"> Set which conference state changes should webhook to the
        ///                                     `ConferenceStatusCallback` </param>
        /// <param name="recordingChannels"> Specify `mono` or `dual` recording channels. </param>
        /// <param name="recordingStatusCallback"> The absolute URL for Twilio's webhook with recording status information.
        ///                               </param>
        /// <param name="recordingStatusCallbackMethod"> HTTP method for `RecordingStatusCallback` </param>
        /// <param name="sipAuthUsername"> SIP username used for authenticating. </param>
        /// <param name="sipAuthPassword"> SIP password for authentication. </param>
        /// <param name="region"> The region where Twilio should mix the conference audio. </param>
        /// <param name="conferenceRecordingStatusCallback"> Conference recording callback URL. </param>
        /// <param name="conferenceRecordingStatusCallbackMethod"> Method Twilio should use to request the
        ///                                               `ConferenceRecordingStatusCallback` URL. </param>
        /// <param name="recordingStatusCallbackEvent"> The recording_status_callback_event </param>
        /// <param name="conferenceRecordingStatusCallbackEvent"> The conference_recording_status_callback_event </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Participant </returns>
        public static ParticipantResource Create(string pathConferenceSid,
                                                 Types.PhoneNumber from,
                                                 Types.PhoneNumber to,
                                                 string pathAccountSid = null,
                                                 Uri statusCallback    = null,
                                                 Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                 List <string> statusCallbackEvent           = null,
                                                 int?timeout = null,
                                                 bool?record = null,
                                                 bool?muted  = null,
                                                 string beep = null,
                                                 bool?startConferenceOnEnter = null,
                                                 bool?endConferenceOnExit    = null,
                                                 Uri waitUrl = null,
                                                 Twilio.Http.HttpMethod waitMethod = null,
                                                 bool?earlyMedia              = null,
                                                 int?maxParticipants          = null,
                                                 string conferenceRecord      = null,
                                                 string conferenceTrim        = null,
                                                 Uri conferenceStatusCallback = null,
                                                 Twilio.Http.HttpMethod conferenceStatusCallbackMethod = null,
                                                 List <string> conferenceStatusCallbackEvent           = null,
                                                 string recordingChannels    = null,
                                                 Uri recordingStatusCallback = null,
                                                 Twilio.Http.HttpMethod recordingStatusCallbackMethod = null,
                                                 string sipAuthUsername = null,
                                                 string sipAuthPassword = null,
                                                 string region          = null,
                                                 Uri conferenceRecordingStatusCallback = null,
                                                 Twilio.Http.HttpMethod conferenceRecordingStatusCallbackMethod = null,
                                                 List <string> recordingStatusCallbackEvent           = null,
                                                 List <string> conferenceRecordingStatusCallbackEvent = null,
                                                 ITwilioRestClient client = null)
        {
            var options = new CreateParticipantOptions(pathConferenceSid, from, to)
            {
                PathAccountSid = pathAccountSid, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, Region = region, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, ConferenceRecordingStatusCallbackEvent = conferenceRecordingStatusCallbackEvent
            };

            return(Create(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="defaultServiceRoleSid"> The default_service_role_sid </param>
        /// <param name="defaultChannelRoleSid"> The default_channel_role_sid </param>
        /// <param name="defaultChannelCreatorRoleSid"> The default_channel_creator_role_sid </param>
        /// <param name="readStatusEnabled"> The read_status_enabled </param>
        /// <param name="reachabilityEnabled"> The reachability_enabled </param>
        /// <param name="typingIndicatorTimeout"> The typing_indicator_timeout </param>
        /// <param name="consumptionReportInterval"> The consumption_report_interval </param>
        /// <param name="notificationsNewMessageEnabled"> The notifications.new_message.enabled </param>
        /// <param name="notificationsNewMessageTemplate"> The notifications.new_message.template </param>
        /// <param name="notificationsNewMessageSound"> The notifications.new_message.sound </param>
        /// <param name="notificationsNewMessageBadgeCountEnabled"> The notifications.new_message.badge_count_enabled </param>
        /// <param name="notificationsAddedToChannelEnabled"> The notifications.added_to_channel.enabled </param>
        /// <param name="notificationsAddedToChannelTemplate"> The notifications.added_to_channel.template </param>
        /// <param name="notificationsAddedToChannelSound"> The notifications.added_to_channel.sound </param>
        /// <param name="notificationsRemovedFromChannelEnabled"> The notifications.removed_from_channel.enabled </param>
        /// <param name="notificationsRemovedFromChannelTemplate"> The notifications.removed_from_channel.template </param>
        /// <param name="notificationsRemovedFromChannelSound"> The notifications.removed_from_channel.sound </param>
        /// <param name="notificationsInvitedToChannelEnabled"> The notifications.invited_to_channel.enabled </param>
        /// <param name="notificationsInvitedToChannelTemplate"> The notifications.invited_to_channel.template </param>
        /// <param name="notificationsInvitedToChannelSound"> The notifications.invited_to_channel.sound </param>
        /// <param name="preWebhookUrl"> The pre_webhook_url </param>
        /// <param name="postWebhookUrl"> The post_webhook_url </param>
        /// <param name="webhookMethod"> The webhook_method </param>
        /// <param name="webhookFilters"> The webhook_filters </param>
        /// <param name="limitsChannelMembers"> The limits.channel_members </param>
        /// <param name="limitsUserChannels"> The limits.user_channels </param>
        /// <param name="mediaCompatibilityMessage"> The media.compatibility_message </param>
        /// <param name="preWebhookRetryCount"> The pre_webhook_retry_count </param>
        /// <param name="postWebhookRetryCount"> The post_webhook_retry_count </param>
        /// <param name="notificationsLogEnabled"> The notifications.log_enabled </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Service </returns>
        public static ServiceResource Update(string pathSid,
                                             string friendlyName                            = null,
                                             string defaultServiceRoleSid                   = null,
                                             string defaultChannelRoleSid                   = null,
                                             string defaultChannelCreatorRoleSid            = null,
                                             bool?readStatusEnabled                         = null,
                                             bool?reachabilityEnabled                       = null,
                                             int?typingIndicatorTimeout                     = null,
                                             int?consumptionReportInterval                  = null,
                                             bool?notificationsNewMessageEnabled            = null,
                                             string notificationsNewMessageTemplate         = null,
                                             string notificationsNewMessageSound            = null,
                                             bool?notificationsNewMessageBadgeCountEnabled  = null,
                                             bool?notificationsAddedToChannelEnabled        = null,
                                             string notificationsAddedToChannelTemplate     = null,
                                             string notificationsAddedToChannelSound        = null,
                                             bool?notificationsRemovedFromChannelEnabled    = null,
                                             string notificationsRemovedFromChannelTemplate = null,
                                             string notificationsRemovedFromChannelSound    = null,
                                             bool?notificationsInvitedToChannelEnabled      = null,
                                             string notificationsInvitedToChannelTemplate   = null,
                                             string notificationsInvitedToChannelSound      = null,
                                             Uri preWebhookUrl  = null,
                                             Uri postWebhookUrl = null,
                                             Twilio.Http.HttpMethod webhookMethod = null,
                                             List <string> webhookFilters         = null,
                                             int?limitsChannelMembers             = null,
                                             int?limitsUserChannels           = null,
                                             string mediaCompatibilityMessage = null,
                                             int?preWebhookRetryCount         = null,
                                             int?postWebhookRetryCount        = null,
                                             bool?notificationsLogEnabled     = null,
                                             ITwilioRestClient client         = null)
        {
            var options = new UpdateServiceOptions(pathSid)
            {
                FriendlyName = friendlyName, DefaultServiceRoleSid = defaultServiceRoleSid, DefaultChannelRoleSid = defaultChannelRoleSid, DefaultChannelCreatorRoleSid = defaultChannelCreatorRoleSid, ReadStatusEnabled = readStatusEnabled, ReachabilityEnabled = reachabilityEnabled, TypingIndicatorTimeout = typingIndicatorTimeout, ConsumptionReportInterval = consumptionReportInterval, NotificationsNewMessageEnabled = notificationsNewMessageEnabled, NotificationsNewMessageTemplate = notificationsNewMessageTemplate, NotificationsNewMessageSound = notificationsNewMessageSound, NotificationsNewMessageBadgeCountEnabled = notificationsNewMessageBadgeCountEnabled, NotificationsAddedToChannelEnabled = notificationsAddedToChannelEnabled, NotificationsAddedToChannelTemplate = notificationsAddedToChannelTemplate, NotificationsAddedToChannelSound = notificationsAddedToChannelSound, NotificationsRemovedFromChannelEnabled = notificationsRemovedFromChannelEnabled, NotificationsRemovedFromChannelTemplate = notificationsRemovedFromChannelTemplate, NotificationsRemovedFromChannelSound = notificationsRemovedFromChannelSound, NotificationsInvitedToChannelEnabled = notificationsInvitedToChannelEnabled, NotificationsInvitedToChannelTemplate = notificationsInvitedToChannelTemplate, NotificationsInvitedToChannelSound = notificationsInvitedToChannelSound, PreWebhookUrl = preWebhookUrl, PostWebhookUrl = postWebhookUrl, WebhookMethod = webhookMethod, WebhookFilters = webhookFilters, LimitsChannelMembers = limitsChannelMembers, LimitsUserChannels = limitsUserChannels, MediaCompatibilityMessage = mediaCompatibilityMessage, PreWebhookRetryCount = preWebhookRetryCount, PostWebhookRetryCount = postWebhookRetryCount, NotificationsLogEnabled = notificationsLogEnabled
            };

            return(Update(options, client));
        }
Esempio n. 9
0
        /// <summary>
        /// Update the attributes of a domain
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="pathAccountSid"> The SID of the Account that created the resource to update </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="voiceFallbackMethod"> The HTTP method used with voice_fallback_url </param>
        /// <param name="voiceFallbackUrl"> The URL we should call when an error occurs in executing TwiML </param>
        /// <param name="voiceMethod"> The HTTP method we should use with voice_url </param>
        /// <param name="voiceStatusCallbackMethod"> The HTTP method we should use to call voice_status_callback_url </param>
        /// <param name="voiceStatusCallbackUrl"> The URL that we should call to pass status updates </param>
        /// <param name="voiceUrl"> The URL we should call when receiving a call </param>
        /// <param name="sipRegistration"> Whether SIP registration is allowed </param>
        /// <param name="domainName"> The unique address on Twilio to route SIP traffic </param>
        /// <param name="emergencyCallingEnabled"> Whether emergency calling is enabled for the domain. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Domain </returns>
        public static DomainResource Update(string pathSid,
                                            string pathAccountSid = null,
                                            string friendlyName   = null,
                                            Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                            Uri voiceFallbackUrl = null,
                                            Twilio.Http.HttpMethod voiceMethod = null,
                                            Twilio.Http.HttpMethod voiceStatusCallbackMethod = null,
                                            Uri voiceStatusCallbackUrl = null,
                                            Uri voiceUrl                 = null,
                                            bool?sipRegistration         = null,
                                            string domainName            = null,
                                            bool?emergencyCallingEnabled = null,
                                            ITwilioRestClient client     = null)
        {
            var options = new UpdateDomainOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, VoiceFallbackMethod = voiceFallbackMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceMethod = voiceMethod, VoiceStatusCallbackMethod = voiceStatusCallbackMethod, VoiceStatusCallbackUrl = voiceStatusCallbackUrl, VoiceUrl = voiceUrl, SipRegistration = sipRegistration, DomainName = domainName, EmergencyCallingEnabled = emergencyCallingEnabled
            };

            return(Update(options, client));
        }
 /// <summary>
 /// Host a phone number's capability on Twilio's platform.
 /// </summary>
 /// <param name="phoneNumber"> An E164 formatted phone number. </param>
 /// <param name="smsCapability"> Specify SMS capability to host. </param>
 /// <param name="accountSid"> Account Sid. </param>
 /// <param name="friendlyName"> A human readable description of this resource. </param>
 /// <param name="uniqueName"> A unique, developer assigned name of this HostedNumberOrder. </param>
 /// <param name="ccEmails"> A list of emails. </param>
 /// <param name="smsUrl"> SMS URL. </param>
 /// <param name="smsMethod"> SMS Method. </param>
 /// <param name="smsFallbackUrl"> SMS Fallback URL. </param>
 /// <param name="smsFallbackMethod"> SMS Fallback Method. </param>
 /// <param name="statusCallbackUrl"> Status Callback URL. </param>
 /// <param name="statusCallbackMethod"> Status Callback Method. </param>
 /// <param name="smsApplicationSid"> SMS Application Sid. </param>
 /// <param name="addressSid"> Address sid. </param>
 /// <param name="email"> Email. </param>
 /// <param name="verificationType"> Verification Type. </param>
 /// <param name="verificationDocumentSid"> Verification Document Sid </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> A single instance of HostedNumberOrder </returns>
 public static HostedNumberOrderResource Create(Types.PhoneNumber phoneNumber,
                                                bool? smsCapability,
                                                string accountSid = null,
                                                string friendlyName = null,
                                                string uniqueName = null,
                                                List<string> ccEmails = null,
                                                Uri smsUrl = null,
                                                Twilio.Http.HttpMethod smsMethod = null,
                                                Uri smsFallbackUrl = null,
                                                Twilio.Http.HttpMethod smsFallbackMethod = null,
                                                Uri statusCallbackUrl = null,
                                                Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                string smsApplicationSid = null,
                                                string addressSid = null,
                                                string email = null,
                                                HostedNumberOrderResource.VerificationTypeEnum verificationType = null,
                                                string verificationDocumentSid = null,
                                                ITwilioRestClient client = null)
 {
     var options = new CreateHostedNumberOrderOptions(phoneNumber, smsCapability){AccountSid = accountSid, FriendlyName = friendlyName, UniqueName = uniqueName, CcEmails = ccEmails, SmsUrl = smsUrl, SmsMethod = smsMethod, SmsFallbackUrl = smsFallbackUrl, SmsFallbackMethod = smsFallbackMethod, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, SmsApplicationSid = smsApplicationSid, AddressSid = addressSid, Email = email, VerificationType = verificationType, VerificationDocumentSid = verificationDocumentSid};
     return Create(options, client);
 }
Esempio n. 11
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="inboundRequestUrl"> The URL we call using inbound_method when a message is received by any phone
        ///                         number or short code in the Service </param>
        /// <param name="inboundMethod"> The HTTP method we should use to call inbound_request_url </param>
        /// <param name="fallbackUrl"> The URL that we call using fallback_method if an error occurs while retrieving or
        ///                   executing the TwiML from the Inbound Request URL </param>
        /// <param name="fallbackMethod"> The HTTP method we should use to call fallback_url </param>
        /// <param name="statusCallback"> The URL we should call to pass status updates about message delivery </param>
        /// <param name="stickySender"> Whether to enable Sticky Sender on the Service instance </param>
        /// <param name="mmsConverter"> Whether to enable the MMS Converter for messages sent through the Service instance
        ///                    </param>
        /// <param name="smartEncoding"> Whether to enable Encoding for messages sent through the Service instance </param>
        /// <param name="scanMessageContent"> Reserved </param>
        /// <param name="fallbackToLongCode"> Whether to enable Fallback to Long Code for messages sent through the Service
        ///                          instance </param>
        /// <param name="areaCodeGeomatch"> Whether to enable Area Code Geomatch on the Service Instance </param>
        /// <param name="validityPeriod"> How long, in seconds, messages sent from the Service are valid </param>
        /// <param name="synchronousValidation"> Reserved </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Service </returns>
        public static ServiceResource Create(string friendlyName,
                                             Uri inboundRequestUrl = null,
                                             Twilio.Http.HttpMethod inboundMethod = null,
                                             Uri fallbackUrl = null,
                                             Twilio.Http.HttpMethod fallbackMethod = null,
                                             Uri statusCallback = null,
                                             bool?stickySender  = null,
                                             bool?mmsConverter  = null,
                                             bool?smartEncoding = null,
                                             ServiceResource.ScanMessageContentEnum scanMessageContent = null,
                                             bool?fallbackToLongCode    = null,
                                             bool?areaCodeGeomatch      = null,
                                             int?validityPeriod         = null,
                                             bool?synchronousValidation = null,
                                             ITwilioRestClient client   = null)
        {
            var options = new CreateServiceOptions(friendlyName)
            {
                InboundRequestUrl = inboundRequestUrl, InboundMethod = inboundMethod, FallbackUrl = fallbackUrl, FallbackMethod = fallbackMethod, StatusCallback = statusCallback, StickySender = stickySender, MmsConverter = mmsConverter, SmartEncoding = smartEncoding, ScanMessageContent = scanMessageContent, FallbackToLongCode = fallbackToLongCode, AreaCodeGeomatch = areaCodeGeomatch, ValidityPeriod = validityPeriod, SynchronousValidation = synchronousValidation
            };

            return(Create(options, client));
        }
        /// <summary>
        /// Create a new Domain
        /// </summary>
        /// <param name="domainName"> The unique address on Twilio to route SIP traffic </param>
        /// <param name="pathAccountSid"> The SID of the Account that will create the resource </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="voiceUrl"> The URL we should call when receiving a call </param>
        /// <param name="voiceMethod"> The HTTP method to use with voice_url </param>
        /// <param name="voiceFallbackUrl"> The URL we should call when an error occurs in executing TwiML </param>
        /// <param name="voiceFallbackMethod"> The HTTP method to use with voice_fallback_url </param>
        /// <param name="voiceStatusCallbackUrl"> The URL that we should call to pass status updates </param>
        /// <param name="voiceStatusCallbackMethod"> The HTTP method we should use to call `voice_status_callback_url` </param>
        /// <param name="sipRegistration"> Whether SIP registration is allowed </param>
        /// <param name="emergencyCallingEnabled"> Whether emergency calling is enabled for the domain. </param>
        /// <param name="secure"> Whether secure SIP is enabled for the domain </param>
        /// <param name="byocTrunkSid"> The SID of the BYOC Trunk resource. </param>
        /// <param name="emergencyCallerSid"> Whether an emergency caller sid is configured for the domain. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Domain </returns>
        public static DomainResource Create(string domainName,
                                            string pathAccountSid = null,
                                            string friendlyName   = null,
                                            Uri voiceUrl          = null,
                                            Twilio.Http.HttpMethod voiceMethod = null,
                                            Uri voiceFallbackUrl = null,
                                            Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                            Uri voiceStatusCallbackUrl = null,
                                            Twilio.Http.HttpMethod voiceStatusCallbackMethod = null,
                                            bool?sipRegistration         = null,
                                            bool?emergencyCallingEnabled = null,
                                            bool?secure               = null,
                                            string byocTrunkSid       = null,
                                            string emergencyCallerSid = null,
                                            ITwilioRestClient client  = null)
        {
            var options = new CreateDomainOptions(domainName)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, VoiceStatusCallbackUrl = voiceStatusCallbackUrl, VoiceStatusCallbackMethod = voiceStatusCallbackMethod, SipRegistration = sipRegistration, EmergencyCallingEnabled = emergencyCallingEnabled, Secure = secure, ByocTrunkSid = byocTrunkSid, EmergencyCallerSid = emergencyCallerSid
            };

            return(Create(options, client));
        }
        /// <summary>
        /// Initiates a Branded Call.
        /// </summary>
        /// <param name="from"> Twilio number from which to originate the call </param>
        /// <param name="to"> The terminating Phone Number </param>
        /// <param name="reason"> The business reason for this phone call </param>
        /// <param name="applicationSid"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="callerId"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="fallbackMethod"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="fallbackUrl"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="machineDetection"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="machineDetectionSilenceTimeout"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="machineDetectionSpeechEndThreshold"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="machineDetectionSpeechThreshold"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="machineDetectionTimeout"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="method"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="record"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="recordingChannels"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="recordingStatusCallback"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="recordingStatusCallbackEvent"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="recordingStatusCallbackMethod"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="sendDigits"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="sipAuthPassword"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="sipAuthUsername"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="statusCallback"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="statusCallbackEvent"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="statusCallbackMethod"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="timeout"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="trim"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="url"> Refers to the Voice API Initiate Call parameter </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of PhoneCall </returns>
        public static PhoneCallResource Create(string from,
                                               string to,
                                               string reason         = null,
                                               string applicationSid = null,
                                               string callerId       = null,
                                               Twilio.Http.HttpMethod fallbackMethod = null,
                                               Uri fallbackUrl                        = null,
                                               string machineDetection                = null,
                                               int?machineDetectionSilenceTimeout     = null,
                                               int?machineDetectionSpeechEndThreshold = null,
                                               int?machineDetectionSpeechThreshold    = null,
                                               int?machineDetectionTimeout            = null,
                                               Twilio.Http.HttpMethod method          = null,
                                               bool?record = null,
                                               string recordingChannels                             = null,
                                               string recordingStatusCallback                       = null,
                                               List <string> recordingStatusCallbackEvent           = null,
                                               Twilio.Http.HttpMethod recordingStatusCallbackMethod = null,
                                               string sendDigits                           = null,
                                               string sipAuthPassword                      = null,
                                               string sipAuthUsername                      = null,
                                               Uri statusCallback                          = null,
                                               List <string> statusCallbackEvent           = null,
                                               Twilio.Http.HttpMethod statusCallbackMethod = null,
                                               int?timeout = null,
                                               string trim = null,
                                               Uri url     = null,
                                               ITwilioRestClient client = null)
        {
            var options = new CreatePhoneCallOptions(from, to)
            {
                Reason = reason, ApplicationSid = applicationSid, CallerId = callerId, FallbackMethod = fallbackMethod, FallbackUrl = fallbackUrl, MachineDetection = machineDetection, MachineDetectionSilenceTimeout = machineDetectionSilenceTimeout, MachineDetectionSpeechEndThreshold = machineDetectionSpeechEndThreshold, MachineDetectionSpeechThreshold = machineDetectionSpeechThreshold, MachineDetectionTimeout = machineDetectionTimeout, Method = method, Record = record, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackEvent = recordingStatusCallbackEvent, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, SendDigits = sendDigits, SipAuthPassword = sipAuthPassword, SipAuthUsername = sipAuthUsername, StatusCallback = statusCallback, StatusCallbackEvent = statusCallbackEvent, StatusCallbackMethod = statusCallbackMethod, Timeout = timeout, Trim = trim, Url = url
            };

            return(Create(options, client));
        }
Esempio n. 14
0
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="startDate"> The start_date </param>
        /// <param name="endDate"> The end_date </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="includeSubaccounts"> The include_subaccounts </param>
        /// <param name="statusCallback"> The status_callback </param>
        /// <param name="statusCallbackMethod"> The status_callback_method </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of FeedbackSummary </returns>
        public static FeedbackSummaryResource Create(DateTime?startDate, DateTime?endDate, string pathAccountSid = null, bool?includeSubaccounts = null, Uri statusCallback = null, Twilio.Http.HttpMethod statusCallbackMethod = null, ITwilioRestClient client = null)
        {
            var options = new CreateFeedbackSummaryOptions(startDate, endDate)
            {
                PathAccountSid = pathAccountSid, IncludeSubaccounts = includeSubaccounts, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod
            };

            return(Create(options, client));
        }
Esempio n. 15
0
        /// <summary>
        /// Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL
        /// </summary>
        ///
        /// <param name="pathQueueSid"> The Queue in which to find the members </param>
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="url"> The url </param>
        /// <param name="method"> The method </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Member </returns>
        public static async System.Threading.Tasks.Task <MemberResource> UpdateAsync(string pathQueueSid, string pathCallSid, Uri url, Twilio.Http.HttpMethod method, string pathAccountSid = null, ITwilioRestClient client = null)
        {
            var options = new UpdateMemberOptions(pathQueueSid, pathCallSid, url, method)
            {
                PathAccountSid = pathAccountSid
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 16
0
        /// <summary>
        /// Dequeue a member from a queue and have the member's call begin executing the TwiML document at that URL
        /// </summary>
        ///
        /// <param name="pathQueueSid"> The Queue in which to find the members </param>
        /// <param name="pathCallSid"> The call_sid </param>
        /// <param name="url"> The url </param>
        /// <param name="method"> The method </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Member </returns>
        public static MemberResource Update(string pathQueueSid, string pathCallSid, Uri url, Twilio.Http.HttpMethod method, string pathAccountSid = null, ITwilioRestClient client = null)
        {
            var options = new UpdateMemberOptions(pathQueueSid, pathCallSid, url, method)
            {
                PathAccountSid = pathAccountSid
            };

            return(Update(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="phoneNumber"> The phone number to purchase in E.164 format </param>
        /// <param name="pathAccountSid"> The SID of the Account that will create the resource </param>
        /// <param name="apiVersion"> The API version to use for incoming calls made to the new phone number </param>
        /// <param name="friendlyName"> A string to describe the new phone number </param>
        /// <param name="smsApplicationSid"> The SID of the application to handle SMS messages </param>
        /// <param name="smsFallbackMethod"> HTTP method used with sms_fallback_url </param>
        /// <param name="smsFallbackUrl"> The URL we call when an error occurs while executing TwiML </param>
        /// <param name="smsMethod"> The HTTP method to use with sms_url </param>
        /// <param name="smsUrl"> The URL we should call when the new phone number receives an incoming SMS message </param>
        /// <param name="statusCallback"> The URL to send status information to your application </param>
        /// <param name="statusCallbackMethod"> The HTTP method we should use to call status_callback </param>
        /// <param name="voiceApplicationSid"> The SID of the application to handle the new phone number </param>
        /// <param name="voiceCallerIdLookup"> Whether to lookup the caller's name </param>
        /// <param name="voiceFallbackMethod"> The HTTP method used with voice_fallback_url </param>
        /// <param name="voiceFallbackUrl"> The URL we will call when an error occurs in TwiML </param>
        /// <param name="voiceMethod"> The HTTP method used with the voice_url </param>
        /// <param name="voiceUrl"> The URL we should call when the phone number receives a call </param>
        /// <param name="identitySid"> The SID of the Identity resource to associate with the new phone number </param>
        /// <param name="addressSid"> The SID of the Address resource associated with the phone number </param>
        /// <param name="emergencyStatus"> Status determining whether the new phone number is enabled for emergency calling
        ///                       </param>
        /// <param name="emergencyAddressSid"> The emergency address configuration to use for emergency calling </param>
        /// <param name="trunkSid"> SID of the trunk to handle calls to the new phone number </param>
        /// <param name="voiceReceiveMode"> Incoming call type: fax or voice </param>
        /// <param name="bundleSid"> The SID of the Bundle resource associated with number </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of TollFree </returns>
        public static async System.Threading.Tasks.Task <TollFreeResource> CreateAsync(Types.PhoneNumber phoneNumber,
                                                                                       string pathAccountSid    = null,
                                                                                       string apiVersion        = null,
                                                                                       string friendlyName      = null,
                                                                                       string smsApplicationSid = null,
                                                                                       Twilio.Http.HttpMethod smsFallbackMethod = null,
                                                                                       Uri smsFallbackUrl = null,
                                                                                       Twilio.Http.HttpMethod smsMethod = null,
                                                                                       Uri smsUrl         = null,
                                                                                       Uri statusCallback = null,
                                                                                       Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                       string voiceApplicationSid = null,
                                                                                       bool?voiceCallerIdLookup   = null,
                                                                                       Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                                                                       Uri voiceFallbackUrl = null,
                                                                                       Twilio.Http.HttpMethod voiceMethod = null,
                                                                                       Uri voiceUrl       = null,
                                                                                       string identitySid = null,
                                                                                       string addressSid  = null,
                                                                                       TollFreeResource.EmergencyStatusEnum emergencyStatus = null,
                                                                                       string emergencyAddressSid = null,
                                                                                       string trunkSid            = null,
                                                                                       TollFreeResource.VoiceReceiveModeEnum voiceReceiveMode = null,
                                                                                       string bundleSid         = null,
                                                                                       ITwilioRestClient client = null)
        {
            var options = new CreateTollFreeOptions(phoneNumber)
            {
                PathAccountSid = pathAccountSid, ApiVersion = apiVersion, FriendlyName = friendlyName, SmsApplicationSid = smsApplicationSid, SmsFallbackMethod = smsFallbackMethod, SmsFallbackUrl = smsFallbackUrl, SmsMethod = smsMethod, SmsUrl = smsUrl, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, VoiceApplicationSid = voiceApplicationSid, VoiceCallerIdLookup = voiceCallerIdLookup, VoiceFallbackMethod = voiceFallbackMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceMethod = voiceMethod, VoiceUrl = voiceUrl, IdentitySid = identitySid, AddressSid = addressSid, EmergencyStatus = emergencyStatus, EmergencyAddressSid = emergencyAddressSid, TrunkSid = trunkSid, VoiceReceiveMode = voiceReceiveMode, BundleSid = bundleSid
            };

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="voiceUrl"> The URL we should call when receiving a call </param>
        /// <param name="voiceMethod"> The HTTP method to use with voice_url </param>
        /// <param name="voiceFallbackUrl"> The URL we should call when an error occurs in executing TwiML </param>
        /// <param name="voiceFallbackMethod"> The HTTP method to use with voice_fallback_url </param>
        /// <param name="statusCallbackUrl"> The URL that we should call to pass status updates </param>
        /// <param name="statusCallbackMethod"> The HTTP method we should use to call `status_callback_url` </param>
        /// <param name="cnamLookupEnabled"> Whether Caller ID Name (CNAM) lookup is enabled for the trunk </param>
        /// <param name="connectionPolicySid"> Origination Connection Policy (to your Carrier) </param>
        /// <param name="fromDomainSid"> The SID of the SIP Domain that should be used in the `From` header of originating
        ///                     calls </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ByocTrunk </returns>
        public static async System.Threading.Tasks.Task <ByocTrunkResource> CreateAsync(string friendlyName = null,
                                                                                        Uri voiceUrl        = null,
                                                                                        Twilio.Http.HttpMethod voiceMethod = null,
                                                                                        Uri voiceFallbackUrl = null,
                                                                                        Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                                                                        Uri statusCallbackUrl = null,
                                                                                        Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                        bool?cnamLookupEnabled     = null,
                                                                                        string connectionPolicySid = null,
                                                                                        string fromDomainSid       = null,
                                                                                        ITwilioRestClient client   = null)
        {
            var options = new CreateByocTrunkOptions()
            {
                FriendlyName = friendlyName, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, StatusCallbackUrl = statusCallbackUrl, StatusCallbackMethod = statusCallbackMethod, CnamLookupEnabled = cnamLookupEnabled, ConnectionPolicySid = connectionPolicySid, FromDomainSid = fromDomainSid
            };

            return(await CreateAsync(options, client));
        }
Esempio n. 19
0
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="enableTurn"> The enable_turn </param>
        /// <param name="type"> The type </param>
        /// <param name="uniqueName"> The unique_name </param>
        /// <param name="statusCallback"> The status_callback </param>
        /// <param name="statusCallbackMethod"> The status_callback_method </param>
        /// <param name="maxParticipants"> The max_participants </param>
        /// <param name="recordParticipantsOnConnect"> The record_participants_on_connect </param>
        /// <param name="videoCodecs"> The video_codecs </param>
        /// <param name="mediaRegion"> The media_region </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Room </returns>
        public static async System.Threading.Tasks.Task <RoomResource> CreateAsync(bool?enableTurn = null, RoomResource.RoomTypeEnum type = null, string uniqueName = null, Uri statusCallback = null, Twilio.Http.HttpMethod statusCallbackMethod = null, int?maxParticipants = null, bool?recordParticipantsOnConnect = null, List <RoomResource.VideoCodecEnum> videoCodecs = null, string mediaRegion = null, ITwilioRestClient client = null)
        {
            var options = new CreateRoomOptions {
                EnableTurn = enableTurn, Type = type, UniqueName = uniqueName, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, MaxParticipants = maxParticipants, RecordParticipantsOnConnect = recordParticipantsOnConnect, VideoCodecs = videoCodecs, MediaRegion = mediaRegion
            };

            return(await CreateAsync(options, client));
        }
Esempio n. 20
0
        /// <summary>
        /// create
        /// </summary>
        /// <param name="phoneNumber"> The phone number to verify. </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="friendlyName"> A human readable description for the new caller ID with maximum length 64 characters.
        ///                    </param>
        /// <param name="callDelay"> The number of seconds, between 0 and 60, to delay before initiating the verification call.
        ///                 </param>
        /// <param name="extension"> Digits to dial after connecting the verification call. </param>
        /// <param name="statusCallback"> A URL that Twilio will request when the verification call ends to notify your app if
        ///                      the verification process was successful or not. </param>
        /// <param name="statusCallbackMethod"> The HTTP method Twilio should use when requesting the above URL. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ValidationRequest </returns>
        public static async System.Threading.Tasks.Task <ValidationRequestResource> CreateAsync(Types.PhoneNumber phoneNumber,
                                                                                                string pathAccountSid = null,
                                                                                                string friendlyName   = null,
                                                                                                int?callDelay         = null,
                                                                                                string extension      = null,
                                                                                                Uri statusCallback    = null,
                                                                                                Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                                ITwilioRestClient client = null)
        {
            var options = new CreateValidationRequestOptions(phoneNumber)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, CallDelay = callDelay, Extension = extension, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod
            };

            return(await CreateAsync(options, client));
        }
Esempio n. 21
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathWorkspaceSid"> The workspace_sid </param>
        /// <param name="pathTaskSid"> The task_sid </param>
        /// <param name="pathSid"> The sid </param>
        /// <param name="reservationStatus"> Yes </param>
        /// <param name="workerActivitySid"> No </param>
        /// <param name="instruction"> Yes </param>
        /// <param name="dequeuePostWorkActivitySid"> No </param>
        /// <param name="dequeueFrom"> Yes </param>
        /// <param name="dequeueRecord"> No </param>
        /// <param name="dequeueTimeout"> No </param>
        /// <param name="dequeueTo"> No </param>
        /// <param name="dequeueStatusCallbackUrl"> No </param>
        /// <param name="callFrom"> Yes </param>
        /// <param name="callRecord"> No </param>
        /// <param name="callTimeout"> No </param>
        /// <param name="callTo"> No </param>
        /// <param name="callUrl"> Yes </param>
        /// <param name="callStatusCallbackUrl"> No </param>
        /// <param name="callAccept"> No </param>
        /// <param name="redirectCallSid"> Yes </param>
        /// <param name="redirectAccept"> No </param>
        /// <param name="redirectUrl"> Yes </param>
        /// <param name="to"> No </param>
        /// <param name="from"> No </param>
        /// <param name="statusCallback"> The status_callback </param>
        /// <param name="statusCallbackMethod"> The status_callback_method </param>
        /// <param name="statusCallbackEvent"> The status_callback_event </param>
        /// <param name="timeout"> No </param>
        /// <param name="record"> The record </param>
        /// <param name="muted"> The muted </param>
        /// <param name="beep"> The beep </param>
        /// <param name="startConferenceOnEnter"> The start_conference_on_enter </param>
        /// <param name="endConferenceOnExit"> The end_conference_on_exit </param>
        /// <param name="waitUrl"> The wait_url </param>
        /// <param name="waitMethod"> The wait_method </param>
        /// <param name="earlyMedia"> The early_media </param>
        /// <param name="maxParticipants"> The max_participants </param>
        /// <param name="conferenceStatusCallback"> The conference_status_callback </param>
        /// <param name="conferenceStatusCallbackMethod"> The conference_status_callback_method </param>
        /// <param name="conferenceStatusCallbackEvent"> The conference_status_callback_event </param>
        /// <param name="conferenceRecord"> The conference_record </param>
        /// <param name="conferenceTrim"> The conference_trim </param>
        /// <param name="recordingChannels"> The recording_channels </param>
        /// <param name="recordingStatusCallback"> The recording_status_callback </param>
        /// <param name="recordingStatusCallbackMethod"> The recording_status_callback_method </param>
        /// <param name="conferenceRecordingStatusCallback"> The conference_recording_status_callback </param>
        /// <param name="conferenceRecordingStatusCallbackMethod"> The conference_recording_status_callback_method </param>
        /// <param name="region"> The region </param>
        /// <param name="sipAuthUsername"> The sip_auth_username </param>
        /// <param name="sipAuthPassword"> The sip_auth_password </param>
        /// <param name="dequeueStatusCallbackEvent"> No </param>
        /// <param name="postWorkActivitySid"> No </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Reservation </returns>
        public static async System.Threading.Tasks.Task <ReservationResource> UpdateAsync(string pathWorkspaceSid,
                                                                                          string pathTaskSid,
                                                                                          string pathSid,
                                                                                          ReservationResource.StatusEnum reservationStatus = null,
                                                                                          string workerActivitySid          = null,
                                                                                          string instruction                = null,
                                                                                          string dequeuePostWorkActivitySid = null,
                                                                                          string dequeueFrom                = null,
                                                                                          string dequeueRecord              = null,
                                                                                          int?dequeueTimeout                = null,
                                                                                          string dequeueTo             = null,
                                                                                          Uri dequeueStatusCallbackUrl = null,
                                                                                          string callFrom           = null,
                                                                                          string callRecord         = null,
                                                                                          int?callTimeout           = null,
                                                                                          string callTo             = null,
                                                                                          Uri callUrl               = null,
                                                                                          Uri callStatusCallbackUrl = null,
                                                                                          bool?callAccept           = null,
                                                                                          string redirectCallSid    = null,
                                                                                          bool?redirectAccept       = null,
                                                                                          Uri redirectUrl           = null,
                                                                                          string to          = null,
                                                                                          string from        = null,
                                                                                          Uri statusCallback = null,
                                                                                          Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                          List <ReservationResource.CallStatusEnum> statusCallbackEvent = null,
                                                                                          int?timeout = null,
                                                                                          bool?record = null,
                                                                                          bool?muted  = null,
                                                                                          string beep = null,
                                                                                          bool?startConferenceOnEnter = null,
                                                                                          bool?endConferenceOnExit    = null,
                                                                                          Uri waitUrl = null,
                                                                                          Twilio.Http.HttpMethod waitMethod = null,
                                                                                          bool?earlyMedia              = null,
                                                                                          int?maxParticipants          = null,
                                                                                          Uri conferenceStatusCallback = null,
                                                                                          Twilio.Http.HttpMethod conferenceStatusCallbackMethod = null,
                                                                                          List <ReservationResource.ConferenceEventEnum> conferenceStatusCallbackEvent = null,
                                                                                          string conferenceRecord     = null,
                                                                                          string conferenceTrim       = null,
                                                                                          string recordingChannels    = null,
                                                                                          Uri recordingStatusCallback = null,
                                                                                          Twilio.Http.HttpMethod recordingStatusCallbackMethod = null,
                                                                                          Uri conferenceRecordingStatusCallback = null,
                                                                                          Twilio.Http.HttpMethod conferenceRecordingStatusCallbackMethod = null,
                                                                                          string region          = null,
                                                                                          string sipAuthUsername = null,
                                                                                          string sipAuthPassword = null,
                                                                                          List <string> dequeueStatusCallbackEvent = null,
                                                                                          string postWorkActivitySid = null,
                                                                                          ITwilioRestClient client   = null)
        {
            var options = new UpdateReservationOptions(pathWorkspaceSid, pathTaskSid, pathSid)
            {
                ReservationStatus = reservationStatus, WorkerActivitySid = workerActivitySid, Instruction = instruction, DequeuePostWorkActivitySid = dequeuePostWorkActivitySid, DequeueFrom = dequeueFrom, DequeueRecord = dequeueRecord, DequeueTimeout = dequeueTimeout, DequeueTo = dequeueTo, DequeueStatusCallbackUrl = dequeueStatusCallbackUrl, CallFrom = callFrom, CallRecord = callRecord, CallTimeout = callTimeout, CallTo = callTo, CallUrl = callUrl, CallStatusCallbackUrl = callStatusCallbackUrl, CallAccept = callAccept, RedirectCallSid = redirectCallSid, RedirectAccept = redirectAccept, RedirectUrl = redirectUrl, To = to, From = from, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, StatusCallbackEvent = statusCallbackEvent, Timeout = timeout, Record = record, Muted = muted, Beep = beep, StartConferenceOnEnter = startConferenceOnEnter, EndConferenceOnExit = endConferenceOnExit, WaitUrl = waitUrl, WaitMethod = waitMethod, EarlyMedia = earlyMedia, MaxParticipants = maxParticipants, ConferenceStatusCallback = conferenceStatusCallback, ConferenceStatusCallbackMethod = conferenceStatusCallbackMethod, ConferenceStatusCallbackEvent = conferenceStatusCallbackEvent, ConferenceRecord = conferenceRecord, ConferenceTrim = conferenceTrim, RecordingChannels = recordingChannels, RecordingStatusCallback = recordingStatusCallback, RecordingStatusCallbackMethod = recordingStatusCallbackMethod, ConferenceRecordingStatusCallback = conferenceRecordingStatusCallback, ConferenceRecordingStatusCallbackMethod = conferenceRecordingStatusCallbackMethod, Region = region, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, DequeueStatusCallbackEvent = dequeueStatusCallbackEvent, PostWorkActivitySid = postWorkActivitySid
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 22
0
        /// <summary>
        /// create
        /// </summary>
        ///
        /// <param name="phoneNumber"> The phone_number </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="apiVersion"> The api_version </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="smsApplicationSid"> The sms_application_sid </param>
        /// <param name="smsFallbackMethod"> The sms_fallback_method </param>
        /// <param name="smsFallbackUrl"> The sms_fallback_url </param>
        /// <param name="smsMethod"> The sms_method </param>
        /// <param name="smsUrl"> The sms_url </param>
        /// <param name="statusCallback"> The status_callback </param>
        /// <param name="statusCallbackMethod"> The status_callback_method </param>
        /// <param name="voiceApplicationSid"> The voice_application_sid </param>
        /// <param name="voiceCallerIdLookup"> The voice_caller_id_lookup </param>
        /// <param name="voiceFallbackMethod"> The voice_fallback_method </param>
        /// <param name="voiceFallbackUrl"> The voice_fallback_url </param>
        /// <param name="voiceMethod"> The voice_method </param>
        /// <param name="voiceUrl"> The voice_url </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Local </returns>
        public static async System.Threading.Tasks.Task <LocalResource> CreateAsync(Types.PhoneNumber phoneNumber, string pathAccountSid = null, string apiVersion = null, string friendlyName = null, string smsApplicationSid = null, Twilio.Http.HttpMethod smsFallbackMethod = null, Uri smsFallbackUrl = null, Twilio.Http.HttpMethod smsMethod = null, Uri smsUrl = null, Uri statusCallback = null, Twilio.Http.HttpMethod statusCallbackMethod = null, string voiceApplicationSid = null, bool?voiceCallerIdLookup = null, Twilio.Http.HttpMethod voiceFallbackMethod = null, Uri voiceFallbackUrl = null, Twilio.Http.HttpMethod voiceMethod = null, Uri voiceUrl = null, ITwilioRestClient client = null)
        {
            var options = new CreateLocalOptions(phoneNumber)
            {
                PathAccountSid = pathAccountSid, ApiVersion = apiVersion, FriendlyName = friendlyName, SmsApplicationSid = smsApplicationSid, SmsFallbackMethod = smsFallbackMethod, SmsFallbackUrl = smsFallbackUrl, SmsMethod = smsMethod, SmsUrl = smsUrl, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, VoiceApplicationSid = voiceApplicationSid, VoiceCallerIdLookup = voiceCallerIdLookup, VoiceFallbackMethod = voiceFallbackMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceMethod = voiceMethod, VoiceUrl = voiceUrl
            };

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// Create a new application within your account
        /// </summary>
        ///
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="apiVersion"> The API version to use </param>
        /// <param name="voiceUrl"> URL Twilio will make requests to when relieving a call </param>
        /// <param name="voiceMethod"> HTTP method to use with the URL </param>
        /// <param name="voiceFallbackUrl"> Fallback URL </param>
        /// <param name="voiceFallbackMethod"> HTTP method to use with the fallback url </param>
        /// <param name="statusCallback"> URL to hit with status updates </param>
        /// <param name="statusCallbackMethod"> HTTP method to use with the status callback </param>
        /// <param name="voiceCallerIdLookup"> True or False </param>
        /// <param name="smsUrl"> URL Twilio will request when receiving an SMS </param>
        /// <param name="smsMethod"> HTTP method to use with sms_url </param>
        /// <param name="smsFallbackUrl"> Fallback URL if there's an error parsing TwiML </param>
        /// <param name="smsFallbackMethod"> HTTP method to use with sms_fallback_method </param>
        /// <param name="smsStatusCallback"> URL Twilio with request with status updates </param>
        /// <param name="messageStatusCallback"> URL to make requests to with status updates </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Application </returns>
        public static ApplicationResource Create(string friendlyName, string pathAccountSid = null, string apiVersion = null, Uri voiceUrl = null, Twilio.Http.HttpMethod voiceMethod = null, Uri voiceFallbackUrl = null, Twilio.Http.HttpMethod voiceFallbackMethod = null, Uri statusCallback = null, Twilio.Http.HttpMethod statusCallbackMethod = null, bool?voiceCallerIdLookup = null, Uri smsUrl = null, Twilio.Http.HttpMethod smsMethod = null, Uri smsFallbackUrl = null, Twilio.Http.HttpMethod smsFallbackMethod = null, Uri smsStatusCallback = null, Uri messageStatusCallback = null, ITwilioRestClient client = null)
        {
            var options = new CreateApplicationOptions(friendlyName)
            {
                PathAccountSid = pathAccountSid, ApiVersion = apiVersion, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, VoiceCallerIdLookup = voiceCallerIdLookup, SmsUrl = smsUrl, SmsMethod = smsMethod, SmsFallbackUrl = smsFallbackUrl, SmsFallbackMethod = smsFallbackMethod, SmsStatusCallback = smsStatusCallback, MessageStatusCallback = messageStatusCallback
            };

            return(Create(options, client));
        }
Esempio n. 24
0
        /// <summary>
        /// Update an instance of a usage trigger
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="callbackMethod"> HTTP method to use with callback_url </param>
        /// <param name="callbackUrl"> URL Twilio will request when the trigger fires </param>
        /// <param name="friendlyName"> A user-specified, human-readable name for the trigger. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Trigger </returns>
        public static TriggerResource Update(string pathSid, string pathAccountSid = null, Twilio.Http.HttpMethod callbackMethod = null, Uri callbackUrl = null, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateTriggerOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, CallbackMethod = callbackMethod, CallbackUrl = callbackUrl, FriendlyName = friendlyName
            };

            return(Update(options, client));
        }
        /// <summary>
        /// Updates the application's properties
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource </param>
        /// <param name="pathAccountSid"> The SID of the Account that will create the resource </param>
        /// <param name="friendlyName"> A string to describe the resource </param>
        /// <param name="apiVersion"> The API version to use to start a new TwiML session </param>
        /// <param name="voiceUrl"> The URL to call when the phone number receives a call </param>
        /// <param name="voiceMethod"> The HTTP method to use with the voice_url </param>
        /// <param name="voiceFallbackUrl"> The URL to call when a TwiML error occurs </param>
        /// <param name="voiceFallbackMethod"> The HTTP method to use with voice_fallback_url </param>
        /// <param name="statusCallback"> The URL to send status information to your application </param>
        /// <param name="statusCallbackMethod"> The HTTP method to use to call status_callback </param>
        /// <param name="voiceCallerIdLookup"> Whether to lookup the caller's name </param>
        /// <param name="smsUrl"> The URL to call when the phone number receives an incoming SMS message </param>
        /// <param name="smsMethod"> The HTTP method to use with sms_url </param>
        /// <param name="smsFallbackUrl"> The URL to call when an error occurs while retrieving or executing the TwiML </param>
        /// <param name="smsFallbackMethod"> The HTTP method to use with sms_fallback_url </param>
        /// <param name="smsStatusCallback"> Same as message_status_callback. Deprecated, included for backwards compatibility.
        ///                         </param>
        /// <param name="messageStatusCallback"> The URL to send message status information to your application </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Application </returns>
        public static async System.Threading.Tasks.Task <ApplicationResource> UpdateAsync(string pathSid,
                                                                                          string pathAccountSid = null,
                                                                                          string friendlyName   = null,
                                                                                          string apiVersion     = null,
                                                                                          Uri voiceUrl          = null,
                                                                                          Twilio.Http.HttpMethod voiceMethod = null,
                                                                                          Uri voiceFallbackUrl = null,
                                                                                          Twilio.Http.HttpMethod voiceFallbackMethod = null,
                                                                                          Uri statusCallback = null,
                                                                                          Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                          bool?voiceCallerIdLookup = null,
                                                                                          Uri smsUrl = null,
                                                                                          Twilio.Http.HttpMethod smsMethod = null,
                                                                                          Uri smsFallbackUrl = null,
                                                                                          Twilio.Http.HttpMethod smsFallbackMethod = null,
                                                                                          Uri smsStatusCallback     = null,
                                                                                          Uri messageStatusCallback = null,
                                                                                          ITwilioRestClient client  = null)
        {
            var options = new UpdateApplicationOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, FriendlyName = friendlyName, ApiVersion = apiVersion, VoiceUrl = voiceUrl, VoiceMethod = voiceMethod, VoiceFallbackUrl = voiceFallbackUrl, VoiceFallbackMethod = voiceFallbackMethod, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, VoiceCallerIdLookup = voiceCallerIdLookup, SmsUrl = smsUrl, SmsMethod = smsMethod, SmsFallbackUrl = smsFallbackUrl, SmsFallbackMethod = smsFallbackMethod, SmsStatusCallback = smsStatusCallback, MessageStatusCallback = messageStatusCallback
            };

            return(await UpdateAsync(options, client));
        }
Esempio n. 26
0
        /// <summary>
        /// Update an instance of a usage trigger
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="callbackMethod"> HTTP method to use with callback_url </param>
        /// <param name="callbackUrl"> URL Twilio will request when the trigger fires </param>
        /// <param name="friendlyName"> A user-specified, human-readable name for the trigger. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Trigger </returns>
        public static async System.Threading.Tasks.Task <TriggerResource> UpdateAsync(string pathSid, string pathAccountSid = null, Twilio.Http.HttpMethod callbackMethod = null, Uri callbackUrl = null, string friendlyName = null, ITwilioRestClient client = null)
        {
            var options = new UpdateTriggerOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, CallbackMethod = callbackMethod, CallbackUrl = callbackUrl, FriendlyName = friendlyName
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// create
        /// </summary>
        /// <param name="friendlyName"> Friendly name of the Composition Hook to be shown in the console. </param>
        /// <param name="enabled"> Boolean flag for activating the Composition Hook. </param>
        /// <param name="videoLayout"> The JSON video layout description. </param>
        /// <param name="audioSources"> A list of audio sources related to this Composition Hook. </param>
        /// <param name="audioSourcesExcluded"> A list of audio sources excluded related to this Composition Hook. </param>
        /// <param name="resolution"> Pixel resolution of the composed video. </param>
        /// <param name="format"> Container format of the Composition Hook media file. Any of the following: `mp4`, `webm`.
        ///              </param>
        /// <param name="statusCallback"> A URL that Twilio sends asynchronous webhook requests to on every composition event.
        ///                      </param>
        /// <param name="statusCallbackMethod"> HTTP method Twilio should use when requesting the above URL. </param>
        /// <param name="trim"> Boolean flag for clipping intervals that have no media. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CompositionHook </returns>
        public static async System.Threading.Tasks.Task <CompositionHookResource> CreateAsync(string friendlyName,
                                                                                              bool?enabled                                = null,
                                                                                              object videoLayout                          = null,
                                                                                              List <string> audioSources                  = null,
                                                                                              List <string> audioSourcesExcluded          = null,
                                                                                              string resolution                           = null,
                                                                                              CompositionHookResource.FormatEnum format   = null,
                                                                                              Uri statusCallback                          = null,
                                                                                              Twilio.Http.HttpMethod statusCallbackMethod = null,
                                                                                              bool?trim = null,
                                                                                              ITwilioRestClient client = null)
        {
            var options = new CreateCompositionHookOptions(friendlyName)
            {
                Enabled = enabled, VideoLayout = videoLayout, AudioSources = audioSources, AudioSourcesExcluded = audioSourcesExcluded, Resolution = resolution, Format = format, StatusCallback = statusCallback, StatusCallbackMethod = statusCallbackMethod, Trim = trim
            };

            return(await CreateAsync(options, client));
        }
Esempio n. 28
0
        /// <summary>
        /// Create a new UsageTrigger
        /// </summary>
        ///
        /// <param name="callbackUrl"> URL Twilio will request when the trigger fires </param>
        /// <param name="triggerValue"> the value at which the trigger will fire </param>
        /// <param name="usageCategory"> The usage category the trigger watches </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="callbackMethod"> HTTP method to use with callback_url </param>
        /// <param name="friendlyName"> A user-specified, human-readable name for the trigger. </param>
        /// <param name="recurring"> How this trigger recurs </param>
        /// <param name="triggerBy"> The field in the UsageRecord that fires the trigger </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Trigger </returns>
        public static async System.Threading.Tasks.Task <TriggerResource> CreateAsync(Uri callbackUrl, string triggerValue, TriggerResource.UsageCategoryEnum usageCategory, string pathAccountSid = null, Twilio.Http.HttpMethod callbackMethod = null, string friendlyName = null, TriggerResource.RecurringEnum recurring = null, TriggerResource.TriggerFieldEnum triggerBy = null, ITwilioRestClient client = null)
        {
            var options = new CreateTriggerOptions(callbackUrl, triggerValue, usageCategory)
            {
                PathAccountSid = pathAccountSid, CallbackMethod = callbackMethod, FriendlyName = friendlyName, Recurring = recurring, TriggerBy = triggerBy
            };

            return(await CreateAsync(options, client));
        }
        /// <summary>
        /// Update a connect-app with the specified parameters
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="pathAccountSid"> The account_sid </param>
        /// <param name="authorizeRedirectUrl"> URIL Twilio sends requests when users authorize </param>
        /// <param name="companyName"> The company name set for this Connect App. </param>
        /// <param name="deauthorizeCallbackMethod"> HTTP method Twilio WIll use making requests to the url </param>
        /// <param name="deauthorizeCallbackUrl"> URL Twilio will send a request when a user de-authorizes this app </param>
        /// <param name="description"> A more detailed human readable description </param>
        /// <param name="friendlyName"> A human readable name for the Connect App. </param>
        /// <param name="homepageUrl"> The URL users can obtain more information </param>
        /// <param name="permissions"> The set of permissions that your ConnectApp requests. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of ConnectApp </returns>
        public static async System.Threading.Tasks.Task <ConnectAppResource> UpdateAsync(string pathSid, string pathAccountSid = null, Uri authorizeRedirectUrl = null, string companyName = null, Twilio.Http.HttpMethod deauthorizeCallbackMethod = null, Uri deauthorizeCallbackUrl = null, string description = null, string friendlyName = null, Uri homepageUrl = null, List <ConnectAppResource.PermissionEnum> permissions = null, ITwilioRestClient client = null)
        {
            var options = new UpdateConnectAppOptions(pathSid)
            {
                PathAccountSid = pathAccountSid, AuthorizeRedirectUrl = authorizeRedirectUrl, CompanyName = companyName, DeauthorizeCallbackMethod = deauthorizeCallbackMethod, DeauthorizeCallbackUrl = deauthorizeCallbackUrl, Description = description, FriendlyName = friendlyName, HomepageUrl = homepageUrl, Permissions = permissions
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Send a Command to a Sim.
        /// </summary>
        /// <param name="sim"> The sid or unique_name of the SIM to send the Command to </param>
        /// <param name="command"> The message body of the command </param>
        /// <param name="callbackMethod"> The HTTP method we should use to call callback_url </param>
        /// <param name="callbackUrl"> The URL we should call after we have sent the command </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Command </returns>
        public static async System.Threading.Tasks.Task <CommandResource> CreateAsync(string sim,
                                                                                      string command,
                                                                                      Twilio.Http.HttpMethod callbackMethod = null,
                                                                                      Uri callbackUrl          = null,
                                                                                      ITwilioRestClient client = null)
        {
            var options = new CreateCommandOptions(sim, command)
            {
                CallbackMethod = callbackMethod, CallbackUrl = callbackUrl
            };

            return(await CreateAsync(options, client));
        }