/// <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));
        }
 /// <summary>
 /// Updates a specific HostedNumberOrder.
 /// </summary>
 /// <param name="pathSid"> The 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="email"> Email. </param>
 /// <param name="ccEmails"> A list of emails. </param>
 /// <param name="status"> The Status of this HostedNumberOrder. </param>
 /// <param name="verificationCode"> A verification code. </param>
 /// <param name="verificationType"> Verification Type. </param>
 /// <param name="verificationDocumentSid"> Verification Document Sid </param>
 /// <param name="extension"> Digits to dial after connecting the verification call. </param>
 /// <param name="callDelay"> The number of seconds, between 0 and 60, to delay before initiating the verification call.
 ///                 </param>
 /// <param name="client"> Client to make requests to Twilio </param>
 /// <returns> A single instance of HostedNumberOrder </returns>
 public static HostedNumberOrderResource Update(string pathSid,
                                                string friendlyName = null,
                                                string uniqueName = null,
                                                string email = null,
                                                List<string> ccEmails = null,
                                                HostedNumberOrderResource.StatusEnum status = null,
                                                string verificationCode = null,
                                                HostedNumberOrderResource.VerificationTypeEnum verificationType = null,
                                                string verificationDocumentSid = null,
                                                string extension = null,
                                                int? callDelay = null,
                                                ITwilioRestClient client = null)
 {
     var options = new UpdateHostedNumberOrderOptions(pathSid){FriendlyName = friendlyName, UniqueName = uniqueName, Email = email, CcEmails = ccEmails, Status = status, VerificationCode = verificationCode, VerificationType = verificationType, VerificationDocumentSid = verificationDocumentSid, Extension = extension, CallDelay = callDelay};
     return Update(options, client);
 }
        /// <summary>
        /// Updates a specific HostedNumberOrder.
        /// </summary>
        /// <param name="pathSid"> The 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="email"> Email. </param>
        /// <param name="ccEmails"> A list of emails. </param>
        /// <param name="status"> The Status of this HostedNumberOrder. </param>
        /// <param name="verificationCode"> A verification code. </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> Task that resolves to A single instance of HostedNumberOrder </returns>
        public static async System.Threading.Tasks.Task <HostedNumberOrderResource> UpdateAsync(string pathSid,
                                                                                                string friendlyName    = null,
                                                                                                string uniqueName      = null,
                                                                                                string email           = null,
                                                                                                List <string> ccEmails = null,
                                                                                                HostedNumberOrderResource.StatusEnum status = null,
                                                                                                string verificationCode = null,
                                                                                                HostedNumberOrderResource.VerificationTypeEnum verificationType = null,
                                                                                                string verificationDocumentSid = null,
                                                                                                ITwilioRestClient client       = null)
        {
            var options = new UpdateHostedNumberOrderOptions(pathSid)
            {
                FriendlyName = friendlyName, UniqueName = uniqueName, Email = email, CcEmails = ccEmails, Status = status, VerificationCode = verificationCode, VerificationType = verificationType, VerificationDocumentSid = verificationDocumentSid
            };

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