15 lines
647 B
Go
15 lines
647 B
Go
package events
|
|
|
|
// SubscriptionChanged is published by billing whenever applyStripeEvent
|
|
// (now billing's internal/application use case of the same name)
|
|
// commits a plan/status change from a Stripe webhook. No consumer in
|
|
// this port of the monolith needs it synchronously — it's published so
|
|
// a future consumer (e.g. a usage-analytics or dunning-email service)
|
|
// can react without billing needing to know about it.
|
|
type SubscriptionChanged struct {
|
|
UserID int64 `json:"user_id"`
|
|
Plan string `json:"plan"`
|
|
Status string `json:"status"`
|
|
EventType string `json:"stripe_event_type"` // e.g. "customer.subscription.updated"
|
|
}
|