/// <summary> /// Parses the response. /// </summary> /// <param name="reader">The reader.</param> /// <returns>Response object.</returns> internal override object ParseResponse(EwsServiceXmlReader reader) { PlayOnPhoneResponse serviceResponse = new PlayOnPhoneResponse(this.Service); serviceResponse.LoadFromXml(reader, XmlElementNames.PlayOnPhoneResponse); return(serviceResponse); }
/// <summary> /// Executes this request. /// </summary> /// <returns>Service response.</returns> internal PlayOnPhoneResponse Execute() { PlayOnPhoneResponse serviceResponse = (PlayOnPhoneResponse)this.InternalExecute(); serviceResponse.ThrowIfNecessary(); return(serviceResponse); }
/// <summary> /// Parses the response. /// </summary> /// <param name="jsonBody">The json body.</param> /// <returns>Response object.</returns> internal override object ParseResponse(JsonObject jsonBody) { PlayOnPhoneResponse serviceResponse = new PlayOnPhoneResponse(this.Service); serviceResponse.LoadFromJson(jsonBody, this.Service); return(serviceResponse); }
/// <summary> /// Executes this request. /// </summary> /// <returns>Service response.</returns> internal async Task <PlayOnPhoneResponse> Execute() { PlayOnPhoneResponse serviceResponse = (PlayOnPhoneResponse)await this.InternalExecuteAsync().ConfigureAwait(false); serviceResponse.ThrowIfNecessary(); return(serviceResponse); }
/// <summary> /// Calls a phone and reads a message to the person who picks up. /// </summary> /// <param name="itemId">The Id of the message to read.</param> /// <param name="dialString">The full dial string used to call the phone.</param> /// <returns>An object providing status for the phone call.</returns> public PhoneCall PlayOnPhone(ItemId itemId, string dialString) { EwsUtilities.ValidateParam(itemId, "itemId"); EwsUtilities.ValidateParam(dialString, "dialString"); PlayOnPhoneRequest request = new PlayOnPhoneRequest(service); request.DialString = dialString; request.ItemId = itemId; PlayOnPhoneResponse serviceResponse = request.Execute(); PhoneCall callInformation = new PhoneCall(service, serviceResponse.PhoneCallId); return(callInformation); }
/// <summary> /// Calls a phone and reads a message to the person who picks up. /// </summary> /// <param name="itemId">The Id of the message to read.</param> /// <param name="dialString">The full dial string used to call the phone.</param> /// <returns>An object providing status for the phone call.</returns> public async Task <PhoneCall> PlayOnPhone(ItemId itemId, string dialString, CancellationToken token = default(CancellationToken)) { EwsUtilities.ValidateParam(itemId, "itemId"); EwsUtilities.ValidateParam(dialString, "dialString"); PlayOnPhoneRequest request = new PlayOnPhoneRequest(service); request.DialString = dialString; request.ItemId = itemId; PlayOnPhoneResponse serviceResponse = await request.Execute(token).ConfigureAwait(false); PhoneCall callInformation = new PhoneCall(service, serviceResponse.PhoneCallId); return(callInformation); }
/// <summary> /// Parses the response. /// </summary> /// <param name="reader">The reader.</param> /// <returns>Response object.</returns> internal override object ParseResponse(EwsServiceXmlReader reader) { PlayOnPhoneResponse serviceResponse = new PlayOnPhoneResponse(this.Service); serviceResponse.LoadFromXml(reader, XmlElementNames.PlayOnPhoneResponse); return serviceResponse; }