/// <summary>
 /// PUT /v1/calls/{uuid} - modify an existing Call
 /// </summary>
 /// <param name="id">id of call</param>
 /// <param name="cmd">Command to execute against call</param>
 /// <param name="creds">(Optional) Overridden credentials for only this request</param>
 /// <exception cref="NexmoHttpRequestException">thrown if an error is encountered when talking to the API</exception>
 public bool UpdateCall(string id, CallEditCommand command, Credentials creds = null)
 {
     ApiRequest.DoRequestWithJsonContent <CallRecord>(
         PUT,
         ApiRequest.GetBaseUri(ApiRequest.UriType.Api, $"{CALLS_ENDPOINT}/{id}"),
         command,
         ApiRequest.AuthType.Bearer,
         creds ?? Credentials
         );
     return(true);
 }
示例#2
0
        /// <summary>
        /// PUT /v1/calls/{uuid} - modify an existing Call
        /// </summary>
        public static CallResponse Edit(string id, CallEditCommand cmd, Credentials creds = null)
        {
            var response = VersionedApiRequest.DoRequest("PUT", ApiRequest.GetBaseUriFor(typeof(Call), $"/v1/calls/{id}"), cmd, creds);

            return(JsonConvert.DeserializeObject <CallResponse>(response.JsonResponse));
        }
示例#3
0
 /// <summary>
 /// PUT /v1/calls/{uuid} - modify an existing Call
 /// </summary>
 /// <param name="id">id of call</param>
 /// <param name="cmd">Command to execute against call</param>
 /// <param name="creds">(Optional) Overridden credentials for only this request</param>
 public static CallResponse Edit(string id, CallEditCommand cmd, Credentials creds = null)
 {
     return(ApiRequest.DoRequestWithJsonContent <CallResponse>("PUT", ApiRequest.GetBaseUriFor(typeof(Call), $"/v1/calls/{id}"), cmd, ApiRequest.AuthType.Bearer, creds));
 }