Ejemplo n.º 1
0
        public GSTNResult <SaveInfo> Submit()
        {
            dicParams.Clear();
            GenerateRequestInfo model = new GenerateRequestInfo()
            {
                gstin      = gstin,
                ret_period = ret_period
            };

            var model2 = this.Encrypt(model);

            model2.action = "RETSUBMIT";

            var info   = this.Post <UnsignedDataInfo, ResponseDataInfo>(model2);
            var output = this.Decrypt <SaveInfo>(info.Data);

            if (output != null)
            {
                this.dicParams.Add("reference_id", output.reference_id);
                this.LogMessage("Obtained Result:" + output.reference_id + System.Environment.NewLine);
            }
            var result = this.BuildResult <SaveInfo>(info, output);

            return(result);
        }
Ejemplo n.º 2
0
        //API call for generating GSTR3 returns
        public GSTNResult <GenerateResponseInfo> Generate(string ret_prd)
        {
            GenerateRequestInfo data = new GenerateRequestInfo {
                gstin      = gstin,
                ret_period = ret_prd
            };
            var model = this.Encrypt(data);

            model.action = "GENERATE";
            var info   = this.Post <UnsignedDataInfo, ResponseDataInfo>(model);
            var output = this.Decrypt <GenerateResponseInfo>(info.Data);
            var model2 = this.BuildResult <GenerateResponseInfo>(info, output);

            return(model2);
        }
Ejemplo n.º 3
0
        public GSTNResult <SaveInfo> Submit(string ret_prd)
        {
            this.PrepareQueryString(new Dictionary <string, string> {
                { "gstin", gstin },
                { "action", "RETSUBMIT" },
                { "ret_period", ret_prd },
            });
            GenerateRequestInfo model = new GenerateRequestInfo()
            {
                gstin      = gstin,
                ret_period = ret_prd
            };
            var info   = this.Post <GenerateRequestInfo, ResponseDataInfo>(model);
            var output = this.Decrypt <SaveInfo>(info.Data);
            var model2 = this.BuildResult <SaveInfo>(info, output);

            System.Console.WriteLine("Obtained Result:" + model2.Data.reference_id + System.Environment.NewLine);
            return(model2);
        }