Exemple #1
0
        internal static TaxExemptionList getTaxExemptionList(HttpResponseMessage response)
        {
            var taxExemptionList = new TaxExemptionList();
            var jsonObj          = JsonConvert.DeserializeObject <Dictionary <string, object> >(response.Content.ReadAsStringAsync().Result);

            if (jsonObj.ContainsKey("tax_exemptions"))
            {
                var taxExemptionArray = JsonConvert.DeserializeObject <List <object> >(jsonObj["tax_exemptions"].ToString());
                foreach (var taxExemptionObj in taxExemptionArray)
                {
                    var taxExemption = new TaxExemption();
                    taxExemption = JsonConvert.DeserializeObject <TaxExemption>(taxExemptionObj.ToString());
                    taxExemptionList.Add(taxExemption);
                }
            }
            return(taxExemptionList);
        }
 internal static TaxExemptionList getTaxExemptionList(HttpResponseMessage response)
 {
     var taxExemptionList = new TaxExemptionList();
     var jsonObj = JsonConvert.DeserializeObject<Dictionary<string, object>>(response.Content.ReadAsStringAsync().Result);
     if (jsonObj.ContainsKey("tax_exemptions"))
     {
         var taxExemptionArray = JsonConvert.DeserializeObject<List<object>>(jsonObj["tax_exemptions"].ToString());
         foreach(var taxExemptionObj in taxExemptionArray)
         {
             var taxExemption = new TaxExemption();
             taxExemption = JsonConvert.DeserializeObject<TaxExemption>(taxExemptionObj.ToString());
             taxExemptionList.Add(taxExemption);
         }
     }
     return taxExemptionList;
 }