/// <summary> /// Parses a TeleSign PhoneID Score JSON response into a rich object. /// </summary> /// <param name="json">The json string containing the response.</param> /// <returns>A ScorePhoneIdResponse object populated with the data from the response.</returns> public PhoneIdScoreResponse ParsePhoneIdScoreResponse(string json) { CheckArgument.NotNull(json, "json"); JObject node = JObject.Parse(json); PhoneIdScoreResponse response = new PhoneIdScoreResponse(json); this.PopulateCommonPhoneIdResponseFields(response, node); this.PopulateStatusResponseFields(response, node); response.Risk = this.ParseRisk(node["risk"]); return(response); }
/// <summary> /// Parses a TeleSign PhoneID Score JSON response into a rich object. /// </summary> /// <param name="json">The json string containing the response.</param> /// <returns>A ScorePhoneIdResponse object populated with the data from the response.</returns> public PhoneIdScoreResponse ParsePhoneIdScoreResponse(string json) { CheckArgument.NotNull(json, "json"); JObject node = JObject.Parse(json); PhoneIdScoreResponse response = new PhoneIdScoreResponse(json); this.PopulateCommonPhoneIdResponseFields(response, node); this.PopulateStatusResponseFields(response, node); this.PopulatePhoneIdStandardResponseFields(response, node); response.Risk = this.ParseRisk(node["risk"]); return response; }