Ejemplo n.º 1
0
        /// <summary>
        /// create
        /// </summary>
        /// <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> Task that resolves to A single instance of Trunk </returns>
        public static async System.Threading.Tasks.Task <TrunkResource> CreateAsync(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 CreateTrunkOptions()
            {
                FriendlyName = friendlyName, DomainName = domainName, DisasterRecoveryUrl = disasterRecoveryUrl, DisasterRecoveryMethod = disasterRecoveryMethod, Recording = recording, Secure = secure, CnamLookupEnabled = cnamLookupEnabled
            };

            return(await CreateAsync(options, client));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// create
        /// </summary>
        /// <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="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> A single instance of Trunk </returns>
        public static TrunkResource Create(string friendlyName     = null,
                                           string domainName       = null,
                                           Uri disasterRecoveryUrl = null,
                                           Twilio.Http.HttpMethod disasterRecoveryMethod  = null,
                                           TrunkResource.RecordingSettingEnum recording   = null,
                                           TrunkResource.TransferSettingEnum transferMode = null,
                                           bool?secure              = null,
                                           bool?cnamLookupEnabled   = null,
                                           ITwilioRestClient client = null)
        {
            var options = new CreateTrunkOptions()
            {
                FriendlyName = friendlyName, DomainName = domainName, DisasterRecoveryUrl = disasterRecoveryUrl, DisasterRecoveryMethod = disasterRecoveryMethod, Recording = recording, TransferMode = transferMode, Secure = secure, CnamLookupEnabled = cnamLookupEnabled
            };

            return(Create(options, client));
        }