/// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="options"> Update CustomerProfiles parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CustomerProfiles </returns>
        public static CustomerProfilesResource Update(UpdateCustomerProfilesOptions options, ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = client.Request(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }
 private static Request BuildUpdateRequest(UpdateCustomerProfilesOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Trusthub,
                "/v1/CustomerProfiles/" + options.PathSid + "",
                postParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource. </param>
        /// <param name="status"> The verification status of the Customer-Profile resource </param>
        /// <param name="statusCallback"> The URL we call to inform your application of status changes. </param>
        /// <param name="friendlyName"> The string that you assigned to describe the resource </param>
        /// <param name="email"> The email address </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CustomerProfiles </returns>
        public static async System.Threading.Tasks.Task <CustomerProfilesResource> UpdateAsync(string pathSid,
                                                                                               CustomerProfilesResource.StatusEnum status = null,
                                                                                               Uri statusCallback       = null,
                                                                                               string friendlyName      = null,
                                                                                               string email             = null,
                                                                                               ITwilioRestClient client = null)
        {
            var options = new UpdateCustomerProfilesOptions(pathSid)
            {
                Status = status, StatusCallback = statusCallback, FriendlyName = friendlyName, Email = email
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="pathSid"> The unique string that identifies the resource. </param>
        /// <param name="status"> The verification status of the Customer-Profile resource </param>
        /// <param name="statusCallback"> The URL we call to inform your application of status changes. </param>
        /// <param name="friendlyName"> The string that you assigned to describe the resource </param>
        /// <param name="email"> The email address </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of CustomerProfiles </returns>
        public static CustomerProfilesResource Update(string pathSid,
                                                      CustomerProfilesResource.StatusEnum status = null,
                                                      Uri statusCallback       = null,
                                                      string friendlyName      = null,
                                                      string email             = null,
                                                      ITwilioRestClient client = null)
        {
            var options = new UpdateCustomerProfilesOptions(pathSid)
            {
                Status = status, StatusCallback = statusCallback, FriendlyName = friendlyName, Email = email
            };

            return(Update(options, client));
        }
        /// <summary>
        /// Updates a Customer-Profile in an account.
        /// </summary>
        /// <param name="options"> Update CustomerProfiles parameters </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> Task that resolves to A single instance of CustomerProfiles </returns>
        public static async System.Threading.Tasks.Task <CustomerProfilesResource> UpdateAsync(UpdateCustomerProfilesOptions options,
                                                                                               ITwilioRestClient client = null)
        {
            client = client ?? TwilioClient.GetRestClient();
            var response = await client.RequestAsync(BuildUpdateRequest(options, client));

            return(FromJson(response.Content));
        }