[MM-50534] - Renew email adds portal link when not eligible for self-serve renewal (#22350)
* [MM-50534] - Renew email adds portal link when not eligible for self-serve renewal * fix translations * make more checks * improve endpoint to make checks * use new checks * fix translations * fix lint * add meaningful names * rename struct * rename endpoint
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
9c7aab24f5
Коммит
1f5a6e439e
@@ -17,7 +17,7 @@ type CloudInterface interface {
|
||||
ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error
|
||||
|
||||
GetCloudCustomer(userID string) (*model.CloudCustomer, error)
|
||||
GetLicenseExpandStatus(userID string, token string) (*model.SubscriptionExpandStatus, error)
|
||||
GetLicenseSelfServeStatus(userID string, token string) (*model.SubscriptionLicenseSelfServeStatusResponse, error)
|
||||
UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error)
|
||||
UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error)
|
||||
|
||||
@@ -30,8 +30,6 @@ type CloudInterface interface {
|
||||
RequestCloudTrial(userID, subscriptionID, newValidBusinessEmail string) (*model.Subscription, error)
|
||||
ValidateBusinessEmail(userID, email string) error
|
||||
|
||||
// GetLicenseRenewalStatus checks on the portal whether it is possible to use token to renew a license
|
||||
GetLicenseRenewalStatus(userID, token string) error
|
||||
InvalidateCaches() error
|
||||
|
||||
// hosted customer methods
|
||||
|
||||
@@ -339,16 +339,16 @@ func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.In
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetLicenseExpandStatus provides a mock function with given fields: userID, token
|
||||
func (_m *CloudInterface) GetLicenseExpandStatus(userID string, token string) (*model.SubscriptionExpandStatus, error) {
|
||||
// GetLicenseSelfServeStatus provides a mock function with given fields: userID, token
|
||||
func (_m *CloudInterface) GetLicenseSelfServeStatus(userID string, token string) (*model.SubscriptionLicenseSelfServeStatusResponse, error) {
|
||||
ret := _m.Called(userID, token)
|
||||
|
||||
var r0 *model.SubscriptionExpandStatus
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.SubscriptionExpandStatus); ok {
|
||||
var r0 *model.SubscriptionLicenseSelfServeStatusResponse
|
||||
if rf, ok := ret.Get(0).(func(string, string) *model.SubscriptionLicenseSelfServeStatusResponse); ok {
|
||||
r0 = rf(userID, token)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.SubscriptionExpandStatus)
|
||||
r0 = ret.Get(0).(*model.SubscriptionLicenseSelfServeStatusResponse)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -362,20 +362,6 @@ func (_m *CloudInterface) GetLicenseExpandStatus(userID string, token string) (*
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// GetLicenseRenewalStatus provides a mock function with given fields: userID, token
|
||||
func (_m *CloudInterface) GetLicenseRenewalStatus(userID string, token string) error {
|
||||
ret := _m.Called(userID, token)
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
||||
r0 = rf(userID, token)
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// GetSelfHostedInvoicePDF provides a mock function with given fields: invoiceID
|
||||
func (_m *CloudInterface) GetSelfHostedInvoicePDF(invoiceID string) ([]byte, string, error) {
|
||||
ret := _m.Called(invoiceID)
|
||||
|
||||
Ссылка в новой задаче
Block a user