MM-43529 - start freemium trial (#20163)
* MM-43529 - start freemium trial * change the method to put * Add unit testing for the request-trial-endpoint * use correct require * add the translation texts * fix texts * remove unnecessary log * change response status code to forbidden when non cloud Co-authored-by: Pablo Velez Vidal <pablo.velez@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
617007a56d
Коммит
f08d65909f
@@ -25,6 +25,8 @@ type CloudInterface interface {
|
||||
|
||||
ChangeSubscription(userID, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error)
|
||||
|
||||
RequestCloudTrial(userID, subscriptionID string) (*model.Subscription, error)
|
||||
|
||||
// GetLicenseRenewalStatus checks on the portal whether it is possible to use token to renew a license
|
||||
GetLicenseRenewalStatus(userID, token string) error
|
||||
InvalidateCaches() error
|
||||
|
||||
@@ -247,6 +247,29 @@ func (_m *CloudInterface) InvalidateCaches() error {
|
||||
return r0
|
||||
}
|
||||
|
||||
// RequestCloudTrial provides a mock function with given fields: userID, subscriptionID
|
||||
func (_m *CloudInterface) RequestCloudTrial(userID string, subscriptionID string) (*model.Subscription, error) {
|
||||
ret := _m.Called(userID, subscriptionID)
|
||||
|
||||
var r0 *model.Subscription
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.Subscription); ok {
|
||||
r0 = rf(userID, subscriptionID)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Subscription)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
||||
r1 = rf(userID, subscriptionID)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// UpdateCloudCustomer provides a mock function with given fields: userID, customerInfo
|
||||
func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error) {
|
||||
ret := _m.Called(userID, customerInfo)
|
||||
|
||||
Ссылка в новой задаче
Block a user