Exemplo n.º 1
0
        /// <summary>
        /// Updates a specific AuthorizationDocument.
        /// </summary>
        ///
        /// <param name="options"> Update AuthorizationDocument parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthorizationDocument </returns>
        public static AuthorizationDocumentResource Update(UpdateAuthorizationDocumentOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Updates a specific AuthorizationDocument.
        /// </summary>
        ///
        /// <param name="pathSid"> The sid </param>
        /// <param name="hostedNumberOrderSids"> A list of HostedNumberOrder sids. </param>
        /// <param name="addressSid"> Address sid. </param>
        /// <param name="email"> Email. </param>
        /// <param name="ccEmails"> A list of emails. </param>
        /// <param name="status"> The Status of this AuthorizationDocument. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthorizationDocument </returns>
        public static async System.Threading.Tasks.Task <AuthorizationDocumentResource> UpdateAsync(string pathSid, List <string> hostedNumberOrderSids = null, string addressSid = null, string email = null, List <string> ccEmails = null, AuthorizationDocumentResource.StatusEnum status = null, ITwilioRestClient client = null)
        {
            var options = new UpdateAuthorizationDocumentOptions(pathSid)
            {
                HostedNumberOrderSids = hostedNumberOrderSids, AddressSid = addressSid, Email = email, CcEmails = ccEmails, Status = status
            };

            return(await UpdateAsync(options, client));
        }
Exemplo n.º 3
0
 private static Request BuildUpdateRequest(UpdateAuthorizationDocumentOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Preview,
                "/HostedNumbers/AuthorizationDocuments/" + options.PathSid + "",
                postParams: options.GetParams()
                ));
 }
Exemplo n.º 4
0
        /// <summary>
        /// Updates a specific AuthorizationDocument.
        /// </summary>
        /// <param name="pathSid"> The sid </param>
        /// <param name="hostedNumberOrderSids"> A list of HostedNumberOrder sids. </param>
        /// <param name="addressSid"> Address sid. </param>
        /// <param name="email"> Email. </param>
        /// <param name="ccEmails"> A list of emails. </param>
        /// <param name="status"> The Status of this AuthorizationDocument. </param>
        /// <param name="contactTitle"> Title of signee of this Authorization Document. </param>
        /// <param name="contactPhoneNumber"> Authorization Document's signee's phone number. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of AuthorizationDocument </returns>
        public static AuthorizationDocumentResource Update(string pathSid,
                                                           List <string> hostedNumberOrderSids = null,
                                                           string addressSid      = null,
                                                           string email           = null,
                                                           List <string> ccEmails = null,
                                                           AuthorizationDocumentResource.StatusEnum status = null,
                                                           string contactTitle       = null,
                                                           string contactPhoneNumber = null,
                                                           ITwilioRestClient client  = null)
        {
            var options = new UpdateAuthorizationDocumentOptions(pathSid)
            {
                HostedNumberOrderSids = hostedNumberOrderSids, AddressSid = addressSid, Email = email, CcEmails = ccEmails, Status = status, ContactTitle = contactTitle, ContactPhoneNumber = contactPhoneNumber
            };

            return(Update(options, client));
        }
Exemplo n.º 5
0
        /// <summary>
        /// Updates a specific AuthorizationDocument.
        /// </summary>
        /// <param name="options"> Update AuthorizationDocument parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of AuthorizationDocument </returns>
        public static async System.Threading.Tasks.Task <AuthorizationDocumentResource> UpdateAsync(UpdateAuthorizationDocumentOptions options,
                                                                                                    ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }