Exemplo n.º 1
0
 public override GSTNResult<EWBPostResponseInfo> Generate(GenerateEWBInfo data)
 {
     //var model = new BulkEWBInfo();
     //model.billLists = new List<GenerateEWBInfo>();
     //model.billLists.Add(data);
     var model = data;
     var payload = JsonConvert.SerializeObject(model,Newtonsoft.Json.Formatting.None,
                 new JsonSerializerSettings
                 {
                     NullValueHandling = NullValueHandling.Ignore
                 });
     return this.Generate(payload);
 }
Exemplo n.º 2
0
        public override GSTNResult <EWBPostResponseInfo> Generate(GenerateEWBInfo data)
        {
            var model = new EWBPostRequestInfo {
                eway_bill = data
            };
            var payload = JsonConvert.SerializeObject(model, Newtonsoft.Json.Formatting.None,
                                                      new JsonSerializerSettings
            {
                NullValueHandling = NullValueHandling.Ignore
            });

            return(this.Generate(payload));
        }
Exemplo n.º 3
0
        private static void TestEWB(string gstin, string userid, EWBApiClientBase client2)
        {
            System.Console.WriteLine("1=Generate, 2=Get, 3=Update, 4=Cancel");
            string selection = System.Console.ReadLine();

            switch (selection)
            {
            case "1":

                var             filename2 = "sampledataewb\\ewb.json";
                var             str1      = File.ReadAllText(filename2);
                GenerateEWBInfo model     = JsonConvert.DeserializeObject <GenerateEWBInfo>(str1);
                var             str2      = JsonConvert.SerializeObject(model);
                var             info      = client2.Generate(model);

                System.Console.WriteLine(JsonConvert.SerializeObject(info));
                break;

            case "2":
                System.Console.WriteLine("Enter EWB No.");
                string ewbnum = System.Console.ReadLine();
                var    info2  = client2.GetDetails((long)myUtils.cValTN(ewbnum));
                System.Console.WriteLine(JsonConvert.SerializeObject(info2));
                break;

            case "3":

                var filename3 = "sampledataewb\\UpdVeh.json";
                var str31     = File.ReadAllText(filename3);
                EWBUpdVehRequestInfo model3 = JsonConvert.DeserializeObject <EWBUpdVehRequestInfo>(str31);
                var str32 = JsonConvert.SerializeObject(model3);
                var info3 = client2.UpdateVehicle(model3);

                System.Console.WriteLine(JsonConvert.SerializeObject(info3));
                break;

            case "4":

                var filename4 = "sampledataewb\\CancelEWB.json";
                var str41     = File.ReadAllText(filename4);
                EWBCancelRequestInfo model4 = JsonConvert.DeserializeObject <EWBCancelRequestInfo>(str41);
                var str42 = JsonConvert.SerializeObject(model4);
                var info4 = client2.Cancel(model4);

                System.Console.WriteLine(JsonConvert.SerializeObject(info4));
                break;
            }
        }
Exemplo n.º 4
0
 public abstract GSTNResult <EWBPostResponseInfo> Generate(GenerateEWBInfo data);