Example #1
0
        /// <summary>
        /// Create a new Bundle.
        /// </summary>
        /// <param name="friendlyName"> The string that you assigned to describe the resource </param>
        /// <param name="email"> The email address </param>
        /// <param name="statusCallback"> The URL we call to inform your application of status changes. </param>
        /// <param name="regulationSid"> The unique string of a regulation. </param>
        /// <param name="isoCountry"> The ISO country code of the country </param>
        /// <param name="endUserType"> The type of End User of the Bundle resource </param>
        /// <param name="numberType"> The type of phone number </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of Bundle </returns>
        public static async System.Threading.Tasks.Task <BundleResource> CreateAsync(string friendlyName,
                                                                                     string email,
                                                                                     Uri statusCallback   = null,
                                                                                     string regulationSid = null,
                                                                                     string isoCountry    = null,
                                                                                     BundleResource.EndUserTypeEnum endUserType = null,
                                                                                     string numberType        = null,
                                                                                     ITwilioRestClient client = null)
        {
            var options = new CreateBundleOptions(friendlyName, email)
            {
                StatusCallback = statusCallback, RegulationSid = regulationSid, IsoCountry = isoCountry, EndUserType = endUserType, NumberType = numberType
            };

            return(await CreateAsync(options, client));
        }
Example #2
0
        /// <summary>
        /// Create a new Bundle.
        /// </summary>
        /// <param name="friendlyName"> The string that you assigned to describe the resource </param>
        /// <param name="email"> The email address </param>
        /// <param name="statusCallback"> The URL we call to inform your application of status changes. </param>
        /// <param name="regulationSid"> The unique string of a regulation. </param>
        /// <param name="isoCountry"> The ISO country code of the country </param>
        /// <param name="endUserType"> The type of End User of the Bundle resource </param>
        /// <param name="numberType"> The type of phone number </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Bundle </returns>
        public static BundleResource Create(string friendlyName,
                                            string email,
                                            Uri statusCallback   = null,
                                            string regulationSid = null,
                                            string isoCountry    = null,
                                            BundleResource.EndUserTypeEnum endUserType = null,
                                            string numberType        = null,
                                            ITwilioRestClient client = null)
        {
            var options = new CreateBundleOptions(friendlyName, email)
            {
                StatusCallback = statusCallback, RegulationSid = regulationSid, IsoCountry = isoCountry, EndUserType = endUserType, NumberType = numberType
            };

            return(Create(options, client));
        }