2020-12-06 10:02:53 +02:00
|
|
|
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
|
|
|
|
|
|
|
|
|
// Regenerate this file using `make einterfaces-mocks`.
|
|
|
|
|
|
|
|
|
|
package mocks
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
model "github.com/mattermost/mattermost-server/v5/model"
|
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
// CloudInterface is an autogenerated mock type for the CloudInterface type
|
|
|
|
|
type CloudInterface struct {
|
|
|
|
|
mock.Mock
|
|
|
|
|
}
|
|
|
|
|
|
2021-05-27 09:12:47 -04:00
|
|
|
// 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
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// 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)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r0 error
|
|
|
|
|
if rf, ok := ret.Get(0).(func(string, *model.ConfirmPaymentMethodRequest) error); ok {
|
|
|
|
|
r0 = rf(userID, confirmRequest)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r0 = ret.Error(0)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// CreateCustomerPayment provides a mock function with given fields: userID
|
|
|
|
|
func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error) {
|
|
|
|
|
ret := _m.Called(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 *model.StripeSetupIntent
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string) *model.StripeSetupIntent); ok {
|
|
|
|
|
r0 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).(*model.StripeSetupIntent)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
|
|
|
r1 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// GetCloudCustomer provides a mock function with given fields: userID
|
|
|
|
|
func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer, error) {
|
|
|
|
|
ret := _m.Called(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 *model.CloudCustomer
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string) *model.CloudCustomer); ok {
|
|
|
|
|
r0 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).(*model.CloudCustomer)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
|
|
|
r1 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// GetCloudProducts provides a mock function with given fields: userID
|
|
|
|
|
func (_m *CloudInterface) GetCloudProducts(userID string) ([]*model.Product, error) {
|
|
|
|
|
ret := _m.Called(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 []*model.Product
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string) []*model.Product); ok {
|
|
|
|
|
r0 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).([]*model.Product)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
|
|
|
r1 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// GetInvoicePDF provides a mock function with given fields: userID, invoiceID
|
|
|
|
|
func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte, string, error) {
|
|
|
|
|
ret := _m.Called(userID, invoiceID)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 []byte
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string, string) []byte); ok {
|
|
|
|
|
r0 = rf(userID, invoiceID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).([]byte)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
var r1 string
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(1).(func(string, string) string); ok {
|
|
|
|
|
r1 = rf(userID, invoiceID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
r1 = ret.Get(1).(string)
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r2 error
|
|
|
|
|
if rf, ok := ret.Get(2).(func(string, string) error); ok {
|
|
|
|
|
r2 = rf(userID, invoiceID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r2 = ret.Error(2)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1, r2
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// GetInvoicesForSubscription provides a mock function with given fields: userID
|
|
|
|
|
func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.Invoice, error) {
|
|
|
|
|
ret := _m.Called(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 []*model.Invoice
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string) []*model.Invoice); ok {
|
|
|
|
|
r0 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).([]*model.Invoice)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
|
|
|
r1 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// GetSubscription provides a mock function with given fields: userID
|
|
|
|
|
func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, error) {
|
|
|
|
|
ret := _m.Called(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 *model.Subscription
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string) *model.Subscription); ok {
|
|
|
|
|
r0 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).(*model.Subscription)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
|
|
|
r1 = rf(userID)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// 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)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 *model.CloudCustomer
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) *model.CloudCustomer); ok {
|
|
|
|
|
r0 = rf(userID, customerInfo)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).(*model.CloudCustomer)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string, *model.CloudCustomerInfo) error); ok {
|
|
|
|
|
r1 = rf(userID, customerInfo)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
// UpdateCloudCustomerAddress provides a mock function with given fields: userID, address
|
|
|
|
|
func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error) {
|
|
|
|
|
ret := _m.Called(userID, address)
|
2020-12-06 10:02:53 +02:00
|
|
|
|
|
|
|
|
var r0 *model.CloudCustomer
|
2021-03-05 09:23:39 +01:00
|
|
|
if rf, ok := ret.Get(0).(func(string, *model.Address) *model.CloudCustomer); ok {
|
|
|
|
|
r0 = rf(userID, address)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
|
|
|
|
if ret.Get(0) != nil {
|
|
|
|
|
r0 = ret.Get(0).(*model.CloudCustomer)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
var r1 error
|
|
|
|
|
if rf, ok := ret.Get(1).(func(string, *model.Address) error); ok {
|
|
|
|
|
r1 = rf(userID, address)
|
2020-12-06 10:02:53 +02:00
|
|
|
} else {
|
2021-03-05 09:23:39 +01:00
|
|
|
r1 = ret.Error(1)
|
2020-12-06 10:02:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return r0, r1
|
|
|
|
|
}
|