[MM-35625] Add controller for changing cloud subscription (#17676)
* Add a controller for changing subscription * Changes for PR * Another change * Fix pipeline Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
@@ -20,4 +20,6 @@ type CloudInterface interface {
|
||||
GetSubscription(userID string) (*model.Subscription, error)
|
||||
GetInvoicesForSubscription(userID string) ([]*model.Invoice, error)
|
||||
GetInvoicePDF(userID, invoiceID string) ([]byte, string, error)
|
||||
|
||||
ChangeSubscription(userID, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error)
|
||||
}
|
||||
|
||||
@@ -14,6 +14,29 @@ type CloudInterface struct {
|
||||
mock.Mock
|
||||
}
|
||||
|
||||
// ChangeSubscription provides a mock function with given fields: userID, subscriptionID, subscriptionChange
|
||||
func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error) {
|
||||
ret := _m.Called(userID, subscriptionID, subscriptionChange)
|
||||
|
||||
var r0 *model.Subscription
|
||||
if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) *model.Subscription); ok {
|
||||
r0 = rf(userID, subscriptionID, subscriptionChange)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).(*model.Subscription)
|
||||
}
|
||||
}
|
||||
|
||||
var r1 error
|
||||
if rf, ok := ret.Get(1).(func(string, string, *model.SubscriptionChange) error); ok {
|
||||
r1 = rf(userID, subscriptionID, subscriptionChange)
|
||||
} else {
|
||||
r1 = ret.Error(1)
|
||||
}
|
||||
|
||||
return r0, r1
|
||||
}
|
||||
|
||||
// ConfirmCustomerPayment provides a mock function with given fields: userID, confirmRequest
|
||||
func (_m *CloudInterface) ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error {
|
||||
ret := _m.Called(userID, confirmRequest)
|
||||
|
||||
Ссылка в новой задаче
Block a user