Hi Jay Kim, thank you for reading the blog and leaving a comment. We are not using type in the new implementation.

New code
let offer = user.getOffer();
console.log(‘your offer is’, offer);
// makes payment or other activities
user.setOffer(UserOffer.goldOffer);

Old code:
let offer = user.getOffer();
console.log(‘your offer is’, offer);
// makes payment or other activities
user.setType(‘gold’);

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