Use cases
Billing follows the ConnectSoft processor/retriever pattern (no MediatR): ISubscriptionsProcessor / ISubscriptionsRetriever, implemented by DefaultSubscriptionsProcessor / DefaultSubscriptionsRetriever, with FluentValidation *Validator types in DomainModel.Impl/Validators.
Commands (write)
| Input |
Processor method |
Purpose |
CreateSubscriptionInput |
CreateSubscriptionAsync |
Create a draft subscription for a tenant |
UpgradeSubscriptionInput |
UpgradeSubscriptionAsync |
Activate/upgrade |
ChangeEditionInput |
ChangeEditionAsync |
Assign/change edition |
CancelSubscriptionInput |
CancelSubscriptionAsync |
Cancel |
RecordInvoiceIssuedInput |
RecordInvoiceIssuedAsync |
Record an invoice-issued read-model event |
RecordPaymentCapturedInput |
RecordPaymentCapturedAsync |
Record payment captured |
RequestEntitlementsSyncInput |
RequestEntitlementsSyncAsync |
Emit entitlements-sync-requested |
Reaction hooks (saga-invoked, not public API)
| Input |
Method |
TenantActivationProvisioningInput |
ProvisionForTenantActivationAsync |
EntitlementsChangedReactionInput |
ReactToEntitlementsChangedAsync |
CatalogProductUpdatedReactionInput |
ReactToCatalogProductUpdatedAsync |
CatalogProductRetiredReactionInput |
ReactToCatalogProductRetiredAsync |
QuotaExceededReactionInput |
ReactToQuotaExceededAsync |
SubscriptionLifecycleUpgradeSignalInput |
HandleLifecycleUpgradeSignalAsync |
SubscriptionLifecycleCancelSignalInput |
HandleLifecycleCancelSignalAsync |
Queries (read)
| Input |
Retriever method |
GetSubscriptionByTenantInput |
GetRequiredForTenantAsync |
GetSubscriptionByIdInput |
GetRequiredByIdAsync |
Exposure
Commands/queries are exposed over REST and gRPC (see architecture); reaction hooks are invoked only by the inbound sagas listed in features.
See also