Merge pull request #21005 from mattermost/MM-45580-notify-admin-delinquency-update-billing
[MM-45580] Send deliquency since to end users and allow new notify ad…
Этот коммит содержится в:
@@ -81,6 +81,7 @@ func getSubscription(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
DNS: "",
|
||||
IsPaidTier: "",
|
||||
LastInvoice: &model.Invoice{},
|
||||
DelinquentSince: subscription.DelinquentSince,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ func Test_getCloudLimits(t *testing.T) {
|
||||
}
|
||||
|
||||
func Test_GetSubscription(t *testing.T) {
|
||||
deliquencySince := int64(2000000000)
|
||||
|
||||
subscription := &model.Subscription{
|
||||
ID: "MySubscriptionID",
|
||||
CustomerID: "MyCustomer",
|
||||
@@ -125,6 +127,7 @@ func Test_GetSubscription(t *testing.T) {
|
||||
IsPaidTier: "false",
|
||||
TrialEndAt: 2000000000,
|
||||
LastInvoice: &model.Invoice{},
|
||||
DelinquentSince: &deliquencySince,
|
||||
}
|
||||
|
||||
userFacingSubscription := &model.Subscription{
|
||||
@@ -141,6 +144,7 @@ func Test_GetSubscription(t *testing.T) {
|
||||
IsPaidTier: "",
|
||||
TrialEndAt: 2000000000,
|
||||
LastInvoice: &model.Invoice{},
|
||||
DelinquentSince: &deliquencySince,
|
||||
}
|
||||
|
||||
t.Run("NON Admin users receive the user facing subscription", func(t *testing.T) {
|
||||
|
||||
@@ -22,6 +22,7 @@ const (
|
||||
PaidFeatureUnlimitedBoardcards = MattermostPaidFeature("mattermost.feature.unlimited_board_cards")
|
||||
PaidFeatureAllProfessionalfeatures = MattermostPaidFeature("mattermost.feature.all_professional")
|
||||
PaidFeatureAllEnterprisefeatures = MattermostPaidFeature("mattermost.feature.all_enterprise")
|
||||
UpgradeDowngradedWorkspace = MattermostPaidFeature("mattermost.feature.upgrade_downgraded_workspace")
|
||||
)
|
||||
|
||||
var validSKUs map[string]struct{} = map[string]struct{}{
|
||||
@@ -42,6 +43,7 @@ var paidFeatures map[MattermostPaidFeature]struct{} = map[MattermostPaidFeature]
|
||||
PaidFeatureUnlimitedBoardcards: {},
|
||||
PaidFeatureAllProfessionalfeatures: {},
|
||||
PaidFeatureAllEnterprisefeatures: {},
|
||||
UpgradeDowngradedWorkspace: {},
|
||||
}
|
||||
|
||||
type NotifyAdminToUpgradeRequest struct {
|
||||
|
||||
Ссылка в новой задаче
Block a user