private static void TestGSTR2(string gstin, string fp) { GSTNAuthClient client = GetAuth(gstin); GSTR2.GSTR2Total model = new GSTR2.GSTR2Total(); GSTR2ApiClient client2 = new GSTR2ApiClient(client, gstin, fp); model.b2b = client2.GetB2B("Y").Data; model.imp_g = client2.GetImpG(fp).Data; var result3 = client2.Save(model); var model2 = client2.GetSummary(fp).Data; }
private static void TestGSTR2Save(string gstin, string fp, string ctin) { GSTNAuthClient client = GetAuth(gstin); var filename = "sampledata\\b2bin.json"; if (String.IsNullOrEmpty(ctin)) { System.Console.Write("Enter CTIN:"); ctin = System.Console.ReadLine(); } var str1 = File.ReadAllText(filename).Replace("%ctin%", ctin); GSTR2.GSTR2Total model = JsonConvert.DeserializeObject <GSTR2.GSTR2Total>(str1); model.gstin = gstin; model.fp = fp; GSTR2ApiClient client2 = new GSTR2ApiClient(client, gstin, fp); var info = client2.Save(model); GetStatus(client2, info.Data, fp); }
private static void TestGSTR2Save(string gstin, string gsp, string userid, string fp, string ctin) { IGSTNAuthProvider auth = GetAuth(gstin, gsp, userid); var filename = "sampledatatp\\b2bin.json"; if (String.IsNullOrEmpty(ctin)) { System.Console.Write("Enter CTIN:"); ctin = System.Console.ReadLine(); } var str1 = File.ReadAllText(filename).Replace("%ctin%", ctin); GSTR2.GSTR2Total model = JsonConvert.DeserializeObject <GSTR2.GSTR2Total>(str1); model.gstin = gstin; model.fp = fp; GSTR2ApiClient client2 = new GSTR2ApiClient(auth, gstin, userid, fp); var info = client2.Save(model); System.Console.WriteLine("Reference_ID: " + info.Data.reference_id); var status = client2.GetStatus(info.Data.reference_id); System.Console.WriteLine(JsonConvert.SerializeObject(status.Data)); }