Beispiel #1
0
 public ShopifyBaseProcessor(ShopifyBaseProcessorSettings _settings, LogsWriter logger)
 {
     ServiceName         = "ShopifyService";
     Settings            = _settings;
     _l                  = logger;
     ListingStatus       = BaseServicesStatuses.ServiceNotLaunched;
     ShopifyProductsList = new List <BaseShopifyProductEntity>();
 }
Beispiel #2
0
        public AkeneoBaseWriter(LogsWriter logger, List <CollectionsAsignerEntity> collectionRules, List <VendorsAssignerEntity> vendorsRules)
        {
            ServiceName  = "AkeneoService";
            akeneoStatus = BaseServicesStatuses.ServiceNotLaunched;
            _logger      = logger;

            httpManager = new BaseWebClientWriter();

            Akeneo = new AkeneoBaseInformation();
            Akeneo.BaseAkeneoUrl       = "http://localhost:8080/";
            Akeneo.BaseAkeneoUserName  = "******";
            Akeneo.BaseAkeneoPassword  = "******";
            Akeneo.BaseAkeneoClientId  = "1_3001g7f521uso44g0ggk8wk04c0ws0co8cc0ok0g08skg8k4k0";
            Akeneo.BaseAkeneoSecretKey = "4yde7syn96w448cockwwoo0oso00cskckkkwk888w40888gcg8";

            Connect(new object());

            CategoriesListener = new AkeneoBaseCategoriesListener(Akeneo, akeneoAuthInfo.access_token, logger);
            CategoriesListener.OnFinishedListing += AkeneoCategoriesListingCallback;

            ProductIndexer = new AkeneoBaseProductIndexer(Akeneo, akeneoAuthInfo.access_token, logger);
            ProductIndexer.OnFinishedListing += AkeneoListingReadyCallback;

            if (!ReferenceEquals(collectionRules, null))
            {
                CollectionRules = collectionRules;
            }
            else
            {
                collectionRules = new List <CollectionsAsignerEntity>();
                _logger.warn("Akeneo: Empty collections rules received.");
            }

            if (!ReferenceEquals(vendorsRules, null))
            {
                VendorsRules = vendorsRules;
            }
            else
            {
                vendorsRules = new List <VendorsAssignerEntity>();
                _logger.warn("Akeneo: Empty vendors rules received");
            }
        }