|
|
@@ -44,38 +44,47 @@ type BillingManager interface {
|
|
|
// NoopBillingManager performs no billing operations
|
|
|
type NoopBillingManager struct{}
|
|
|
|
|
|
+// CreateCustomer is a no-op
|
|
|
func (s *NoopBillingManager) CreateCustomer(userEmail string, proj *models.Project) (customerID string, err error) {
|
|
|
return "", nil
|
|
|
}
|
|
|
|
|
|
+// ListPaymentMethod is a no-op
|
|
|
func (s *NoopBillingManager) ListPaymentMethod(proj *models.Project) (paymentMethods []types.PaymentMethod, err error) {
|
|
|
return []types.PaymentMethod{}, nil
|
|
|
}
|
|
|
|
|
|
+// CreatePaymentMethod is a no-op
|
|
|
func (s *NoopBillingManager) CreatePaymentMethod(proj *models.Project) (clientSecret string, err error) {
|
|
|
return "", nil
|
|
|
}
|
|
|
|
|
|
+// DeletePaymentMethod is a no-op
|
|
|
func (s *NoopBillingManager) DeletePaymentMethod(paymentMethodID string) (err error) {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+// CreateTeam is a no-op
|
|
|
func (n *NoopBillingManager) CreateTeam(user *models.User, proj *models.Project) (teamID string, err error) {
|
|
|
return fmt.Sprintf("%d", proj.ID), nil
|
|
|
}
|
|
|
|
|
|
+// DeleteTeam is a no-op
|
|
|
func (n *NoopBillingManager) DeleteTeam(user *models.User, proj *models.Project) (err error) {
|
|
|
return nil
|
|
|
}
|
|
|
|
|
|
+// GetRedirectURI is a no-op
|
|
|
func (n *NoopBillingManager) GetRedirectURI(user *models.User, proj *models.Project) (url string, err error) {
|
|
|
return "", nil
|
|
|
}
|
|
|
|
|
|
+// ParseProjectUsageFromWebhook is a no-op
|
|
|
func (n *NoopBillingManager) ParseProjectUsageFromWebhook(payload []byte) (*models.ProjectUsage, *types.FeatureFlags, error) {
|
|
|
return nil, nil, nil
|
|
|
}
|
|
|
|
|
|
+// VerifySignature is a no-op
|
|
|
func (n *NoopBillingManager) VerifySignature(signature string, body []byte) bool {
|
|
|
return false
|
|
|
}
|