Get the latest tech news
Data Modeling SaaS Entitlements and Pricing
A high-level exploration of handling multiple sets of pricing and entitlements so no customers are ever forced to upgrade.
Figure 2 By designing a system that supports multiple concurrent versions of pricing, we can offer a dynamic feature comparison table that can let existing customers compare their current plan to new options so they can decide if they’d like to switch or not. In addition to the top-level Pricing class, we used the ActiveRecord::AssociatedObject gem by Kasper Timm Hansen to encapsulate various aspects of the billing and entitlements logic for individual accounts. I’ve glossed over the underlying storage mechanism for defining the features because any method can work, but hopefully the interfaces and focus on exposing the entitlements via accounts still makes sense.
Or read this on Hacker News