Ejemplo n.º 1
0
 private static Request BuildUpdateRequest(UpdateTrunkOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Trunking,
                "/v1/Trunks/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Ejemplo n.º 2
0
        /// <summary>
        /// update
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="friendlyName"> The friendly_name </param>
        /// <param name="domainName"> The domain_name </param>
        /// <param name="disasterRecoveryUrl"> The disaster_recovery_url </param>
        /// <param name="disasterRecoveryMethod"> The disaster_recovery_method </param>
        /// <param name="recording"> The recording </param>
        /// <param name="secure"> The secure </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Trunk </returns>
        public static async System.Threading.Tasks.Task <TrunkResource> UpdateAsync(string pathSid, string friendlyName = null, string domainName = null, Uri disasterRecoveryUrl = null, Twilio.Http.HttpMethod disasterRecoveryMethod = null, string recording = null, bool?secure = null, ITwilioRestClient client = null)
        {
            var options = new UpdateTrunkOptions(pathSid)
            {
                FriendlyName = friendlyName, DomainName = domainName, DisasterRecoveryUrl = disasterRecoveryUrl, DisasterRecoveryMethod = disasterRecoveryMethod, Recording = recording, Secure = secure
            };

            return(await UpdateAsync(options, client));
        }
Ejemplo n.º 3
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="domainName"> The unique address you reserve on Twilio to which you route your SIP traffic </param>
        /// <param name="disasterRecoveryUrl"> The HTTP URL that we should call if an error occurs while sending SIP traffic
        ///                           towards your configured Origination URL </param>
        /// <param name="disasterRecoveryMethod"> The HTTP method we should use to call the disaster_recovery_url </param>
        /// <param name="recording"> The recording settings for the trunk </param>
        /// <param name="secure"> Whether Secure Trunking is enabled for the trunk </param>
        /// <param name="cnamLookupEnabled"> Whether Caller ID Name (CNAM) lookup should be enabled for the trunk </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Trunk </returns>
        public static TrunkResource Update(string pathSid,
                                           string friendlyName     = null,
                                           string domainName       = null,
                                           Uri disasterRecoveryUrl = null,
                                           Twilio.Http.HttpMethod disasterRecoveryMethod = null,
                                           TrunkResource.RecordingSettingEnum recording  = null,
                                           bool?secure              = null,
                                           bool?cnamLookupEnabled   = null,
                                           ITwilioRestClient client = null)
        {
            var options = new UpdateTrunkOptions(pathSid)
            {
                FriendlyName = friendlyName, DomainName = domainName, DisasterRecoveryUrl = disasterRecoveryUrl, DisasterRecoveryMethod = disasterRecoveryMethod, Recording = recording, Secure = secure, CnamLookupEnabled = cnamLookupEnabled
            };

            return(Update(options, client));
        }
Ejemplo n.º 4
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="domainName"> The unique address you reserve on Twilio to which you route your SIP traffic </param>
        /// <param name="disasterRecoveryUrl"> The HTTP URL that we should call if an error occurs while sending SIP traffic
        ///                           towards your configured Origination URL </param>
        /// <param name="disasterRecoveryMethod"> The HTTP method we should use to call the disaster_recovery_url </param>
        /// <param name="transferMode"> The call transfer settings for the trunk </param>
        /// <param name="secure"> Whether Secure Trunking is enabled for the trunk </param>
        /// <param name="cnamLookupEnabled"> Whether Caller ID Name (CNAM) lookup should be enabled for the trunk </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Trunk </returns>
        public static async System.Threading.Tasks.Task <TrunkResource> UpdateAsync(string pathSid,
                                                                                    string friendlyName     = null,
                                                                                    string domainName       = null,
                                                                                    Uri disasterRecoveryUrl = null,
                                                                                    Twilio.Http.HttpMethod disasterRecoveryMethod  = null,
                                                                                    TrunkResource.TransferSettingEnum transferMode = null,
                                                                                    bool?secure              = null,
                                                                                    bool?cnamLookupEnabled   = null,
                                                                                    ITwilioRestClient client = null)
        {
            var options = new UpdateTrunkOptions(pathSid)
            {
                FriendlyName = friendlyName, DomainName = domainName, DisasterRecoveryUrl = disasterRecoveryUrl, DisasterRecoveryMethod = disasterRecoveryMethod, TransferMode = transferMode, Secure = secure, CnamLookupEnabled = cnamLookupEnabled
            };

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