Exemplo n.º 1
0
        private static void TestGSTR2Get(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("").Data;
            var model2 = client2.GetSummary(fp).Data;
        }
Exemplo n.º 2
0
        private static void TestGSTR2Get(IGSTNAuthProvider auth, string gstin, string userid, string fp)
        {
            GSTR2.GSTR2Total model   = new GSTR2.GSTR2Total();
            GSTR2ApiClient   client2 = new GSTR2ApiClient(auth, gstin, userid, fp);

            System.Console.Write("Action Required? Y/N/Enter");
            string action = System.Console.ReadLine();

            model = client2.GetSection("B2B", "", action, "").Data;
            var model2 = client2.GetSummary().Data;
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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));
        }