Exemple #1
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);
        }
        public GSTNResult <SaveInfo> Submit(string ret_prd)
        {
            GenerateRequestInfo model = new GenerateRequestInfo()
            {
                gstin      = gstin,
                ret_period = ret_prd
            };
            var data = this.Encrypt(model);

            data.action = "RETSUBMIT";
            var info   = this.Post <UnsignedDataInfo, ResponseDataInfo>(data);
            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);
        }