I did a major architectural refactoring, replacing the Category enum with a polymorphic ProductCategory class hierarchy. Each retailer now has its own category class (CoachCategory, FarfetchCategory, FwrdCategory, OutnetCategory) that encapsulates retailer-specific behavior like scraping logic, URL construction, and metadata extraction.

This follows the “Enumeration” pattern - a type-safe alternative to enums that allows adding behavior to each value. The Enumeration base class provides ID-based lookup and display name mapping, while each concrete category class implements methods like GetProductMetadataFromUrl and GetProducts.

The refactoring significantly cleaned up the command handlers. Instead of switch statements scattered throughout the codebase checking which category we’re dealing with, the category object itself now knows how to perform its operations. I also added a TestAllCommand that runs through all categories to verify they’re working correctly.