/// <summary> /// Update an existing End User. /// </summary> /// <param name="options"> Update EndUser parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of EndUser </returns> public static EndUserResource Update(UpdateEndUserOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateEndUserOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Trusthub, "/v1/EndUsers/" + options.PathSid + "", postParams: options.GetParams(), headerParams: null )); }
/// <summary> /// Update an existing End User. /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> The string that you assigned to describe the resource </param> /// <param name="attributes"> The set of parameters that compose the End User resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of EndUser </returns> public static async System.Threading.Tasks.Task <EndUserResource> UpdateAsync(string pathSid, string friendlyName = null, object attributes = null, ITwilioRestClient client = null) { var options = new UpdateEndUserOptions(pathSid) { FriendlyName = friendlyName, Attributes = attributes }; return(await UpdateAsync(options, client)); }
/// <summary> /// Update an existing End User. /// </summary> /// <param name="pathSid"> The unique string that identifies the resource </param> /// <param name="friendlyName"> The string that you assigned to describe the resource </param> /// <param name="attributes"> The set of parameters that compose the End User resource </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of EndUser </returns> public static EndUserResource Update(string pathSid, string friendlyName = null, object attributes = null, ITwilioRestClient client = null) { var options = new UpdateEndUserOptions(pathSid) { FriendlyName = friendlyName, Attributes = attributes }; return(Update(options, client)); }
/// <summary> /// Update an existing End User. /// </summary> /// <param name="options"> Update EndUser parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of EndUser </returns> public static async System.Threading.Tasks.Task <EndUserResource> UpdateAsync(UpdateEndUserOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }