static void Main(string[] args)
        {
            //Instantiate REST client
            var client =
                new AvaTaxClient("ItemMasterUpload", "YourAppVersionHere",
                                 "yourMachineNameHere", avaTaxEnvironment)
                .WithSecurity(USERNAME, PASSWORD);

            var itemModels = new List <ItemModel>();

            //Load a list of Classification Systems into memory for easy lookup.
            var classificationSystems = client.ListProductClassificationSystems(string.Empty, null, null, string.Empty).value;

            //Open CSV
            OpenAndParseCsv(itemModels, classificationSystems);

            UpsertItems(client, itemModels);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //Pull SBX Items, Classifications, and Parameters.

            //Instantiate REST client
            var sbxClient =
                new AvaTaxClient("ItemMasterExtract", "v0.1",
                                 ".NET Machine", sbxEnvironment)
                .WithSecurity(SBX_USERNAME, SBX_PASSWORD);
            var prdClient =
                new AvaTaxClient("ItemMasterLoad", "v0.1", ".NET Machine", prdEnvironment)
                .WithSecurity(PRD_USERNAME, PRD_PASSWORD);

            var itemModels = new List <ItemModel>();
            var nexus      = new List <NexusModel>();

            //Load a list of Classification Systems into memory for easy lookup.
            var classificationSystems = sbxClient.ListProductClassificationSystems(string.Empty, null, null, string.Empty).value;

            ExtractSbxNexus(sbxClient, nexus);
            UpsertPrdNexus(prdClient, nexus);
            ExtractSbxItems(sbxClient, itemModels);
            UpsertItems(prdClient, itemModels);
        }