Hi Tapan Anand, the logic for assigning the offer is not discussed in the code and should not be part of the User IMO. if we include dataUsage or any other field, we would have to change our user class every time we have a new dimension on the offer. For example, if someone pays a bill of $100 or more over the christmas, the user is gold for one year.

How a user get assigned a type is external to the code.

cc Jay Kim

--

--

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Abhinav Dhasmana

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine