Your Ticket 🎫
MarketingOS builds EmailCampaign objects before dispatching them.
The current code calls a constructor with 8 parameters — half of which
are optional — and then sets properties directly after construction.
Callers get it wrong constantly: null reference crashes, wrong
parameter order, partially-constructed campaigns sent by accident.
The team lead calls it "a construction nightmare."
Your mission:
Refactor EmailCampaign construction using the Builder Pattern:
1. Create an EmailCampaignBuilder class with fluent setter methods
(WithSubject(...), WithBody(...), WithRecipients(...), etc.)
that each return this (fluent interface)
2. Add a Build() method that validates required fields and returns
a fully constructed EmailCampaign
3. The EmailCampaign constructor should be private or internal —
only EmailCampaignBuilder.Build() should produce instances
4. CampaignDispatcher must use the builder, not new EmailCampaign(...)
You'll be scored on *structure*, not runtime behavior.