/// <summary> /// Request endpoint. /// </summary> /// <param name="redirectRequest">redirect request instance object.</param> /// <returns>redirect response instance object.</returns> public override RedirectResponse Request(RedirectRequest redirectRequest) { XmlDocument response = new XmlDocument(); XmlDocument payload = JsonConvert.DeserializeXmlNode(redirectRequest.ToJsonObject().ToString(), "payload"); XElement body = new XElement(wsdl.GetName("createRequest"), XElement.Parse(payload.InnerXml)); response.LoadXml(MakeRequest(body)); response = RemoveNullFields(response); XmlNode data = response.SelectSingleNode("descendant::createRequestResult"); JObject json = JObject.Parse(JsonConvert.SerializeXmlNode(data)); return(new RedirectResponse(json.GetValue("createRequestResult").ToString())); }
/// <summary> /// Make request endpoint. /// </summary> /// <param name="redirectRequest">RedirectRequest</param> /// <returns>RedirectResponse</returns> public override RedirectResponse Request(RedirectRequest redirectRequest) { string result = MakeRequest("POST", "api/session", redirectRequest.ToJsonObject()); return(new RedirectResponse(result)); }