コード例 #1
0
        /// <summary>
        /// Create a new fax to send to a phone number or SIP endpoint
        /// </summary>
        ///
        /// <param name="to"> The phone number or SIP address to send the fax to </param>
        /// <param name="mediaUrl"> URL that points to the fax media </param>
        /// <param name="quality"> The quality of this fax </param>
        /// <param name="statusCallback"> URL for fax status callbacks </param>
        /// <param name="from"> Twilio number from which to originate the fax </param>
        /// <param name="sipAuthUsername"> Username for SIP authentication </param>
        /// <param name="sipAuthPassword"> Password for SIP authentication </param>
        /// <param name="storeMedia"> Whether or not to store media </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Fax </returns>
        public static FaxResource Create(string to, Uri mediaUrl, FaxResource.QualityEnum quality = null, Uri statusCallback = null, string from = null, string sipAuthUsername = null, string sipAuthPassword = null, bool?storeMedia = null, ITwilioRestClient client = null)
        {
            var options = new CreateFaxOptions(to, mediaUrl)
            {
                Quality = quality, StatusCallback = statusCallback, From = from, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, StoreMedia = storeMedia
            };

            return(Create(options, client));
        }
コード例 #2
0
ファイル: FaxResource.cs プロジェクト: ssirjann/twilio-csharp
 /// <summary>
 /// Create a new fax to send to a phone number or SIP endpoint.
 /// </summary>
 /// <param name="to"> The phone number to receive the fax </param>
 /// <param name="mediaUrl"> The URL of the PDF that contains the fax </param>
 /// <param name="quality"> The quality of this fax </param>
 /// <param name="statusCallback"> The URL we should call to send status information to your application </param>
 /// <param name="from"> The number the fax was sent from </param>
 /// <param name="sipAuthUsername"> The username for SIP authentication </param>
 /// <param name="sipAuthPassword"> The password for SIP authentication </param>
 /// <param name="storeMedia"> Whether to store a copy of the sent media </param>
 /// <param name="ttl"> How long in minutes to try to send the fax </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> Task that resolves to A single instance of Fax </returns>
 public static async System.Threading.Tasks.Task<FaxResource> CreateAsync(string to,
                                                                          Uri mediaUrl,
                                                                          FaxResource.QualityEnum quality = null,
                                                                          Uri statusCallback = null,
                                                                          string from = null,
                                                                          string sipAuthUsername = null,
                                                                          string sipAuthPassword = null,
                                                                          bool? storeMedia = null,
                                                                          int? ttl = null,
                                                                          ITwilioRestClient client = null)
 {
     var options = new CreateFaxOptions(to, mediaUrl){Quality = quality, StatusCallback = statusCallback, From = from, SipAuthUsername = sipAuthUsername, SipAuthPassword = sipAuthPassword, StoreMedia = storeMedia, Ttl = ttl};
     return await CreateAsync(options, client);
 }