2 Comments
User's avatar
Francisco De Grandis's avatar

Hey Maxi!

Thanks for sharing this — I really enjoy reading your posts.

I was wondering: why would you consider this a refactor? 🤔

It seems like we’re changing the system’s behavior — before we could only apply a single coupon, and now we’re allowing multiple redemptions and cumulative discounts.

I’m genuinely curious, not trying to be contrarian — just hoping to have a healthy discussion and learn more!

Expand full comment
Maximiliano Contieri's avatar

Hi Francisco.

Thank you for your polite and accurate comment.

You are right. This refactoring changes the behaviour and business rule by allowing more than a single element.

Instead of allowing (0 and 1) is allowing (0....n) . I will update the article to reflect this

Thanks again!

Expand full comment