MM-43084 update product limits through webhook and websocket (#20076)

* Define interfaces for updating subscriptions and product limits from CWS webhook.
Этот коммит содержится в:
Nathaniel Allred
2022-05-09 08:05:50 -05:00
коммит произвёл GitHub
родитель c7fe5e9aab
Коммит 6f87eb67fc
15 изменённых файлов: 203 добавлений и 0 удалений

Просмотреть файл

@@ -10,6 +10,7 @@ const (
EventTypeFailedPaymentNoCard = "failed-payment-no-card"
EventTypeSendAdminWelcomeEmail = "send-admin-welcome-email"
EventTypeSendUpgradeConfirmationEmail = "send-upgrade-confirmation-email"
EventTypeSubscriptionChanged = "subscription-changed"
EventTypeTrialWillEnd = "trial-will-end"
EventTypeTrialEnded = "trial-ended"
)
@@ -166,6 +167,8 @@ type CWSWebhookPayload struct {
Event string `json:"event"`
FailedPayment *FailedPayment `json:"failed_payment"`
CloudWorkspaceOwner *CloudWorkspaceOwner `json:"cloud_workspace_owner"`
ProductLimits *ProductLimits `json:"product_limits"`
Subscription *Subscription `json:"subscription"`
SubscriptionTrialEndUnixTimeStamp int64 `json:"trial_end_time_stamp"`
}