public async Task ImportCategories()
        {
            var erplyApi = _erplyApiFactory.GetApi();

            ErplyGetProductGroupsRequest erplyProductGroupsRequest = new ErplyGetProductGroupsRequest()
            {
                ShowInWebshop = 1
            };

            var erplyProductGroups = await erplyApi.GetProductGroups(erplyProductGroupsRequest);

            var categoryMappings = _erplyMappingService.GetAllCategoryMappings();
            var allCategories    = _categoryService.GetAllCategories(showHidden: true);

            SaveCategoriesRecursive(erplyProductGroups.Records, categoryMappings, allCategories);
        }
Esempio n. 2
0
 public async Task <ErplyProductGroupsResponse> GetProductGroups(ErplyGetProductGroupsRequest request = null)
 {
     return(await SendRequest <ErplyProductGroupsResponse>(request));
 }