github.com/mattermost/mattermost-server/v6@v6.7.2/einterfaces/mocks/CloudInterface.go (about) 1 // Code generated by mockery v2.10.4. DO NOT EDIT. 2 3 // Regenerate this file using `make einterfaces-mocks`. 4 5 package mocks 6 7 import ( 8 model "github.com/mattermost/mattermost-server/v6/model" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // CloudInterface is an autogenerated mock type for the CloudInterface type 13 type CloudInterface struct { 14 mock.Mock 15 } 16 17 // ChangeSubscription provides a mock function with given fields: userID, subscriptionID, subscriptionChange 18 func (_m *CloudInterface) ChangeSubscription(userID string, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error) { 19 ret := _m.Called(userID, subscriptionID, subscriptionChange) 20 21 var r0 *model.Subscription 22 if rf, ok := ret.Get(0).(func(string, string, *model.SubscriptionChange) *model.Subscription); ok { 23 r0 = rf(userID, subscriptionID, subscriptionChange) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(*model.Subscription) 27 } 28 } 29 30 var r1 error 31 if rf, ok := ret.Get(1).(func(string, string, *model.SubscriptionChange) error); ok { 32 r1 = rf(userID, subscriptionID, subscriptionChange) 33 } else { 34 r1 = ret.Error(1) 35 } 36 37 return r0, r1 38 } 39 40 // ConfirmCustomerPayment provides a mock function with given fields: userID, confirmRequest 41 func (_m *CloudInterface) ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error { 42 ret := _m.Called(userID, confirmRequest) 43 44 var r0 error 45 if rf, ok := ret.Get(0).(func(string, *model.ConfirmPaymentMethodRequest) error); ok { 46 r0 = rf(userID, confirmRequest) 47 } else { 48 r0 = ret.Error(0) 49 } 50 51 return r0 52 } 53 54 // CreateCustomerPayment provides a mock function with given fields: userID 55 func (_m *CloudInterface) CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error) { 56 ret := _m.Called(userID) 57 58 var r0 *model.StripeSetupIntent 59 if rf, ok := ret.Get(0).(func(string) *model.StripeSetupIntent); ok { 60 r0 = rf(userID) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).(*model.StripeSetupIntent) 64 } 65 } 66 67 var r1 error 68 if rf, ok := ret.Get(1).(func(string) error); ok { 69 r1 = rf(userID) 70 } else { 71 r1 = ret.Error(1) 72 } 73 74 return r0, r1 75 } 76 77 // GetCloudCustomer provides a mock function with given fields: userID 78 func (_m *CloudInterface) GetCloudCustomer(userID string) (*model.CloudCustomer, error) { 79 ret := _m.Called(userID) 80 81 var r0 *model.CloudCustomer 82 if rf, ok := ret.Get(0).(func(string) *model.CloudCustomer); ok { 83 r0 = rf(userID) 84 } else { 85 if ret.Get(0) != nil { 86 r0 = ret.Get(0).(*model.CloudCustomer) 87 } 88 } 89 90 var r1 error 91 if rf, ok := ret.Get(1).(func(string) error); ok { 92 r1 = rf(userID) 93 } else { 94 r1 = ret.Error(1) 95 } 96 97 return r0, r1 98 } 99 100 // GetCloudProducts provides a mock function with given fields: userID, includeLegacyProducts 101 func (_m *CloudInterface) GetCloudProducts(userID string, includeLegacyProducts bool) ([]*model.Product, error) { 102 ret := _m.Called(userID, includeLegacyProducts) 103 104 var r0 []*model.Product 105 if rf, ok := ret.Get(0).(func(string, bool) []*model.Product); ok { 106 r0 = rf(userID, includeLegacyProducts) 107 } else { 108 if ret.Get(0) != nil { 109 r0 = ret.Get(0).([]*model.Product) 110 } 111 } 112 113 var r1 error 114 if rf, ok := ret.Get(1).(func(string, bool) error); ok { 115 r1 = rf(userID, includeLegacyProducts) 116 } else { 117 r1 = ret.Error(1) 118 } 119 120 return r0, r1 121 } 122 123 // GetInvoicePDF provides a mock function with given fields: userID, invoiceID 124 func (_m *CloudInterface) GetInvoicePDF(userID string, invoiceID string) ([]byte, string, error) { 125 ret := _m.Called(userID, invoiceID) 126 127 var r0 []byte 128 if rf, ok := ret.Get(0).(func(string, string) []byte); ok { 129 r0 = rf(userID, invoiceID) 130 } else { 131 if ret.Get(0) != nil { 132 r0 = ret.Get(0).([]byte) 133 } 134 } 135 136 var r1 string 137 if rf, ok := ret.Get(1).(func(string, string) string); ok { 138 r1 = rf(userID, invoiceID) 139 } else { 140 r1 = ret.Get(1).(string) 141 } 142 143 var r2 error 144 if rf, ok := ret.Get(2).(func(string, string) error); ok { 145 r2 = rf(userID, invoiceID) 146 } else { 147 r2 = ret.Error(2) 148 } 149 150 return r0, r1, r2 151 } 152 153 // GetInvoicesForSubscription provides a mock function with given fields: userID 154 func (_m *CloudInterface) GetInvoicesForSubscription(userID string) ([]*model.Invoice, error) { 155 ret := _m.Called(userID) 156 157 var r0 []*model.Invoice 158 if rf, ok := ret.Get(0).(func(string) []*model.Invoice); ok { 159 r0 = rf(userID) 160 } else { 161 if ret.Get(0) != nil { 162 r0 = ret.Get(0).([]*model.Invoice) 163 } 164 } 165 166 var r1 error 167 if rf, ok := ret.Get(1).(func(string) error); ok { 168 r1 = rf(userID) 169 } else { 170 r1 = ret.Error(1) 171 } 172 173 return r0, r1 174 } 175 176 // GetLicenseRenewalStatus provides a mock function with given fields: userID, token 177 func (_m *CloudInterface) GetLicenseRenewalStatus(userID string, token string) error { 178 ret := _m.Called(userID, token) 179 180 var r0 error 181 if rf, ok := ret.Get(0).(func(string, string) error); ok { 182 r0 = rf(userID, token) 183 } else { 184 r0 = ret.Error(0) 185 } 186 187 return r0 188 } 189 190 // GetSubscription provides a mock function with given fields: userID 191 func (_m *CloudInterface) GetSubscription(userID string) (*model.Subscription, error) { 192 ret := _m.Called(userID) 193 194 var r0 *model.Subscription 195 if rf, ok := ret.Get(0).(func(string) *model.Subscription); ok { 196 r0 = rf(userID) 197 } else { 198 if ret.Get(0) != nil { 199 r0 = ret.Get(0).(*model.Subscription) 200 } 201 } 202 203 var r1 error 204 if rf, ok := ret.Get(1).(func(string) error); ok { 205 r1 = rf(userID) 206 } else { 207 r1 = ret.Error(1) 208 } 209 210 return r0, r1 211 } 212 213 // InvalidateCaches provides a mock function with given fields: 214 func (_m *CloudInterface) InvalidateCaches() error { 215 ret := _m.Called() 216 217 var r0 error 218 if rf, ok := ret.Get(0).(func() error); ok { 219 r0 = rf() 220 } else { 221 r0 = ret.Error(0) 222 } 223 224 return r0 225 } 226 227 // UpdateCloudCustomer provides a mock function with given fields: userID, customerInfo 228 func (_m *CloudInterface) UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error) { 229 ret := _m.Called(userID, customerInfo) 230 231 var r0 *model.CloudCustomer 232 if rf, ok := ret.Get(0).(func(string, *model.CloudCustomerInfo) *model.CloudCustomer); ok { 233 r0 = rf(userID, customerInfo) 234 } else { 235 if ret.Get(0) != nil { 236 r0 = ret.Get(0).(*model.CloudCustomer) 237 } 238 } 239 240 var r1 error 241 if rf, ok := ret.Get(1).(func(string, *model.CloudCustomerInfo) error); ok { 242 r1 = rf(userID, customerInfo) 243 } else { 244 r1 = ret.Error(1) 245 } 246 247 return r0, r1 248 } 249 250 // UpdateCloudCustomerAddress provides a mock function with given fields: userID, address 251 func (_m *CloudInterface) UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error) { 252 ret := _m.Called(userID, address) 253 254 var r0 *model.CloudCustomer 255 if rf, ok := ret.Get(0).(func(string, *model.Address) *model.CloudCustomer); ok { 256 r0 = rf(userID, address) 257 } else { 258 if ret.Get(0) != nil { 259 r0 = ret.Get(0).(*model.CloudCustomer) 260 } 261 } 262 263 var r1 error 264 if rf, ok := ret.Get(1).(func(string, *model.Address) error); ok { 265 r1 = rf(userID, address) 266 } else { 267 r1 = ret.Error(1) 268 } 269 270 return r0, r1 271 }