/// <summary>
        /// update
        /// </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));
        }
Ejemplo n.º 2
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathTrunkSid"> The trunk_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 pathTrunkSid,
                                                                                        ITwilioRestClient client = null)
        {
            var options = new UpdateRecordingOptions(pathTrunkSid);

            return(await UpdateAsync(options, client));
        }
 private static Request BuildUpdateRequest(UpdateRecordingOptions options, ITwilioRestClient client)
 {
     return(new Request(
                HttpMethod.Post,
                Rest.Domain.Trunking,
                "/v1/Trunks/" + options.PathTrunkSid + "/Recording",
                postParams: options.GetParams(),
                headerParams: null
                ));
 }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathTrunkSid"> The SID of the Trunk. </param>
        /// <param name="mode"> The recording mode for the trunk. </param>
        /// <param name="trim"> The recording trim setting for the trunk. </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 pathTrunkSid,
                                                                                        RecordingResource.RecordingModeEnum mode = null,
                                                                                        RecordingResource.RecordingTrimEnum trim = null,
                                                                                        ITwilioRestClient client = null)
        {
            var options = new UpdateRecordingOptions(pathTrunkSid)
            {
                Mode = mode, Trim = trim
            };

            return(await UpdateAsync(options, client));
        }
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathTrunkSid"> The SID of the Trunk. </param>
        /// <param name="mode"> The recording mode for the trunk. </param>
        /// <param name="trim"> The recording trim setting for the trunk. </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Recording </returns>
        public static RecordingResource Update(string pathTrunkSid,
                                               RecordingResource.RecordingModeEnum mode = null,
                                               RecordingResource.RecordingTrimEnum trim = null,
                                               ITwilioRestClient client = null)
        {
            var options = new UpdateRecordingOptions(pathTrunkSid)
            {
                Mode = mode, Trim = trim
            };

            return(Update(options, client));
        }
        /// <summary>
        /// update
        /// </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));
        }
Ejemplo n.º 7
0
        /// <summary>
        /// update
        /// </summary>
        /// <param name="pathTrunkSid"> The trunk_sid </param>
        /// <param name="client"> Client to make requests to Twilio </param>
        /// <returns> A single instance of Recording </returns>
        public static RecordingResource Update(string pathTrunkSid, ITwilioRestClient client = null)
        {
            var options = new UpdateRecordingOptions(pathTrunkSid);

            return(Update(options, client));
        }