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>
Этот коммит содержится в:
Pablo Andrés Vélez Vidal
2022-05-18 10:19:38 +02:00
коммит произвёл GitHub
родитель 617007a56d
Коммит f08d65909f
6 изменённых файлов: 187 добавлений и 0 удалений

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

@@ -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)