2020-09-28 12:18:47 -04:00
|
|
|
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
|
|
|
// See LICENSE.txt for license information.
|
|
|
|
|
|
|
|
|
|
package einterfaces
|
|
|
|
|
|
|
|
|
|
import (
|
2021-07-22 12:21:47 +05:30
|
|
|
"github.com/mattermost/mattermost-server/v6/model"
|
2020-09-28 12:18:47 -04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type CloudInterface interface {
|
2021-03-05 09:23:39 +01:00
|
|
|
GetCloudProducts(userID string) ([]*model.Product, error)
|
2020-09-28 12:18:47 -04:00
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
CreateCustomerPayment(userID string) (*model.StripeSetupIntent, error)
|
|
|
|
|
ConfirmCustomerPayment(userID string, confirmRequest *model.ConfirmPaymentMethodRequest) error
|
2020-10-01 13:14:48 -04:00
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
GetCloudCustomer(userID string) (*model.CloudCustomer, error)
|
|
|
|
|
UpdateCloudCustomer(userID string, customerInfo *model.CloudCustomerInfo) (*model.CloudCustomer, error)
|
|
|
|
|
UpdateCloudCustomerAddress(userID string, address *model.Address) (*model.CloudCustomer, error)
|
2020-10-05 08:46:52 -04:00
|
|
|
|
2021-03-05 09:23:39 +01:00
|
|
|
GetSubscription(userID string) (*model.Subscription, error)
|
|
|
|
|
GetInvoicesForSubscription(userID string) ([]*model.Invoice, error)
|
|
|
|
|
GetInvoicePDF(userID, invoiceID string) ([]byte, string, error)
|
2021-05-27 09:12:47 -04:00
|
|
|
|
|
|
|
|
ChangeSubscription(userID, subscriptionID string, subscriptionChange *model.SubscriptionChange) (*model.Subscription, error)
|
2020-09-28 12:18:47 -04:00
|
|
|
}
|