/// <summary> /// Changes the status of the recording to paused, stopped, or in-progress. Note: To use `Twilio.CURRENT`, pass it as /// recording sid. /// </summary> /// <param name="options"> Update Recording parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Recording </returns> public static RecordingResource Update(UpdateRecordingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = client.Request(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }
private static Request BuildUpdateRequest(UpdateRecordingOptions options, ITwilioRestClient client) { return(new Request( HttpMethod.Post, Rest.Domain.Api, "/2010-04-01/Accounts/" + (options.PathAccountSid ?? client.AccountSid) + "/Conferences/" + options.PathConferenceSid + "/Recordings/" + options.PathSid + ".json", postParams: options.GetParams() )); }
/// <summary> /// Changes the status of the recording to paused, stopped, or in-progress /// </summary> /// <param name="pathConferenceSid"> The conference_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="status"> The status to change the recording to. </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Recording </returns> public static async System.Threading.Tasks.Task <RecordingResource> UpdateAsync(string pathConferenceSid, string pathSid, RecordingResource.StatusEnum status, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new UpdateRecordingOptions(pathConferenceSid, pathSid, status) { PathAccountSid = pathAccountSid }; return(await UpdateAsync(options, client)); }
/// <summary> /// Changes the status of the recording to paused, stopped, or in-progress /// </summary> /// <param name="pathConferenceSid"> The conference_sid </param> /// <param name="pathSid"> The sid </param> /// <param name="status"> The status to change the recording to. </param> /// <param name="pathAccountSid"> The account_sid </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> A single instance of Recording </returns> public static RecordingResource Update(string pathConferenceSid, string pathSid, RecordingResource.StatusEnum status, string pathAccountSid = null, ITwilioRestClient client = null) { var options = new UpdateRecordingOptions(pathConferenceSid, pathSid, status) { PathAccountSid = pathAccountSid }; return(Update(options, client)); }
/// <summary> /// Changes the status of the recording to paused, stopped, or in-progress. Note: To use `Twilio.CURRENT`, pass it as /// recording sid. /// </summary> /// <param name="options"> Update Recording parameters </param> /// <param name="client"> Client to make requests to Twilio </param> /// <returns> Task that resolves to A single instance of Recording </returns> public static async System.Threading.Tasks.Task <RecordingResource> UpdateAsync(UpdateRecordingOptions options, ITwilioRestClient client = null) { client = client ?? TwilioClient.GetRestClient(); var response = await client.RequestAsync(BuildUpdateRequest(options, client)); return(FromJson(response.Content)); }