/// <summary>
 /// Populates the additional data packages that are provided by PhoneID Standard.
 /// These are the location and phone type information.
 /// </summary>
 /// <param name="response">The response object to populate.</param>
 /// <param name="node">The root node of the JSON response.</param>
 private void PopulatePhoneIdStandardResponseFields(
     PhoneIdStandardResponse response,
     JObject node)
 {
     response.Location  = this.ParseLocation((JObject)node["location"]);
     response.PhoneType = this.ParsePhoneTypeInfo((JObject)node["phone_type"]);
 }
        /// <summary>
        /// Parses a TeleSign PhoneID Standard JSON response into a rich object.
        /// </summary>
        /// <param name="json">The json string containing the response.</param>
        /// <returns>A StandardPhoneIdResponse object populated with the data from the response.</returns>
        public PhoneIdStandardResponse ParsePhoneIdStandardResponse(string json)
        {
            CheckArgument.NotNull(json, "json");

            JObject node = JObject.Parse(json);

            PhoneIdStandardResponse response = new PhoneIdStandardResponse(json);
            this.PopulateCommonPhoneIdResponseFields(response, node);
            this.PopulateStatusResponseFields(response, node);
            this.PopulatePhoneIdStandardResponseFields(response, node);

            return response;
        }
        /// <summary>
        /// Parses a TeleSign PhoneID Standard JSON response into a rich object.
        /// </summary>
        /// <param name="json">The json string containing the response.</param>
        /// <returns>A StandardPhoneIdResponse object populated with the data from the response.</returns>
        public PhoneIdStandardResponse ParsePhoneIdStandardResponse(string json)
        {
            CheckArgument.NotNull(json, "json");

            JObject node = JObject.Parse(json);

            PhoneIdStandardResponse response = new PhoneIdStandardResponse(json);

            this.PopulateCommonPhoneIdResponseFields(response, node);
            this.PopulateStatusResponseFields(response, node);
            this.PopulatePhoneIdStandardResponseFields(response, node);

            return(response);
        }
 /// <summary>
 /// Populates the additional data packages that are provided by PhoneID Standard.
 /// These are the location and phone type information.
 /// </summary>
 /// <param name="response">The response object to populate.</param>
 /// <param name="node">The root node of the JSON response.</param>
 private void PopulatePhoneIdStandardResponseFields(
             PhoneIdStandardResponse response,
             JObject node)
 {
     response.Location = this.ParseLocation((JObject)node["location"]);
     response.PhoneType = this.ParsePhoneTypeInfo((JObject)node["phone_type"]);
 }