Пример #1
0
        private static GSTNPublicApiClient GetPublicClient(string gsp, string env)
        {
            IGSTNAuthProvider provider;

            switch (gsp.Trim().ToLower())
            {
            case "aspone":
                provider = new AspOnePublicAuthClient(env);
                break;

            case "kpmg":
                provider = new KpmgPublicAuthClient(env);
                break;

            default:
                provider = new GSTNPublicAuthClient(gsp, env);
                break;
            }
            provider.Init();
            var result2 = provider.RequestToken("");
            GSTNPublicApiClient client2;

            switch (gsp.Trim().ToLower())
            {
            case "aspone":
                client2 = new AspOnePublicApiClient(provider);
                break;

            default:
                client2 = new GSTNPublicApiClient(provider);
                break;
            }
            return(client2);
        }
Пример #2
0
 private static void Search(string gstin)
 {
     GSTNPublicAuthClient client = new GSTNPublicAuthClient();
     var result2 = client.RequestToken();
     GSTNPublicApiClient client2 = new GSTNPublicApiClient(client);
     var output = client2.Search(gstin);
 }