Subscription Rate-Plan Domain Model (PlantUML)
Products, rate plans, charges, tiers, subscriptions and amendments as a billing domain model with tiered and volume pricing.
Rendering…
Make it your own.
@startuml
title Subscription rate-plan domain model
class Product {
+code : String
+name : String
+family : String
}
class RatePlan {
+code : String
+currency : String
+billingPeriod : Period
+effectiveFrom : Date
+effectiveTo : Date
}
class Charge {
+name : String
+type : ChargeType
+model : PricingModel
}
class PriceTier {
+fromQuantity : int
+toQuantity : int
+unitPrice : Decimal
}
class Subscription {
+number : String
+startDate : Date
+termMonths : int
+autoRenew : boolean
}
class SubscriptionItem {
+quantity : int
+discountPercent : Decimal
}
class Amendment {
+type : AmendmentType
+effectiveDate : Date
+prorate : boolean
}
enum ChargeType {
RECURRING
USAGE
ONE_OFF
}
enum PricingModel {
FLAT
PER_UNIT
TIERED
VOLUME
}
enum AmendmentType {
UPGRADE
DOWNGRADE
RENEWAL
CANCELLATION
}
Product "1" o-- "*" RatePlan
RatePlan "1" *-- "*" Charge
Charge "1" *-- "*" PriceTier
Subscription "1" *-- "*" SubscriptionItem
SubscriptionItem "*" --> "1" RatePlan
Subscription "1" o-- "*" Amendment
Charge --> ChargeType
Charge --> PricingModel
Amendment --> AmendmentType
@enduml