public CallControlPlaybackStopServiceTest(MockHttpClientFixture mockHttpClientFixture)
            : base(mockHttpClientFixture)
        {
            this.service = new CallControlPlaybackStopService();

            this.createOptions = new CallControlPlaybackStopOptions()
            {
                ClientState = "aGF2ZSBhIG5pY2UgZGF5ID1d",
                CommandId   = new System.Guid("891510ac-f3e4-11e8-af5b-de00688a4901"),
                Stop        = "all"
            };
        }
        public CallPlaybackStopResponse PlaybackStop()
        {
            CallPlaybackStopResponse       response = new CallPlaybackStopResponse();
            CallControlPlaybackStopOptions options  = new CallControlPlaybackStopOptions
            {
            };

            Console.WriteLine(JsonConvert.SerializeObject(options));

            try
            {
                response = callControlService.PlaybackStop(options);
                Console.WriteLine(JsonConvert.SerializeObject(response));
            }
            catch (TelnyxException ex)
            {
                Console.WriteLine("exception");
                Console.WriteLine(JsonConvert.SerializeObject(ex));
            }
            return(response);
        }
示例#3
0
 public virtual async Task <CallPlaybackStopResponse> PlaybackStopAsync(CallControlPlaybackStopOptions options, string postFix = "actions/playback_stop", RequestOptions requestOptions = null, CancellationToken ct = default)
 {
     return(await this.callControlPlaybackStopService.CreateAsync(this.CallControlId, options, postFix, requestOptions, ct));
 }
示例#4
0
 public virtual CallPlaybackStopResponse PlaybackStop(CallControlPlaybackStopOptions options, string postFix = "actions/playback_stop", RequestOptions requestOptions = null)
 {
     return(this.callControlPlaybackStopService.Create(this.CallControlId, options, postFix, requestOptions));
 }