MM-43084 update product limits through webhook and websocket (#20076)

* Define interfaces for updating subscriptions and product limits from CWS webhook.
Этот коммит содержится в:
Nathaniel Allred
2022-05-09 08:05:50 -05:00
коммит произвёл GitHub
родитель c7fe5e9aab
Коммит 6f87eb67fc
15 изменённых файлов: 203 добавлений и 0 удалений

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

@@ -10,6 +10,7 @@ import (
type CloudInterface interface {
GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error)
GetCloudLimits(userID string) (*model.ProductLimits, error)
UpdateSubscriptionFromHook(*model.ProductLimits, *model.Subscription) error
CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error)
ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error

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

@@ -292,3 +292,17 @@ func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *mod
return r0, r1
}
// UpdateSubscriptionFromHook provides a mock function with given fields: _a0, _a1
func (_m *CloudInterface) UpdateSubscriptionFromHook(_a0 *model.ProductLimits, _a1 *model.Subscription) error {
ret := _m.Called(_a0, _a1)
var r0 error
if rf, ok := ret.Get(0).(func(*model.ProductLimits, *model.Subscription) error); ok {
r0 = rf(_a0, _a1)
} else {
r0 = ret.Error(0)
}
return r0
}