Skip to content

Commit 5eafb9b

Browse files
author
Andrew Farries
committed
Rename interface method
1 parent 91b244b commit 5eafb9b

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/usage/pkg/controller/billing.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ package controller
77
import "github.com/gitpod-io/gitpod/usage/pkg/stripe"
88

99
type BillingController interface {
10-
SubmitUsageToStripe(report []TeamUsage)
10+
Reconcile(report []TeamUsage)
1111
}
1212

1313
type NoOpBillingController struct{}
1414
type StripeBillingController struct{}
1515

16-
func (b *NoOpBillingController) SubmitUsageToStripe(report []TeamUsage) {}
16+
func (b *NoOpBillingController) Reconcile(report []TeamUsage) {}
1717

18-
func (b *StripeBillingController) SubmitUsageToStripe(report []TeamUsage) {
18+
func (b *StripeBillingController) Reconcile(report []TeamUsage) {
1919
// Convert the usage report to sum all entries for the same team.
2020
var summedReport = make(map[string]int64)
2121
for _, usageEntry := range report {

components/usage/pkg/controller/reconciler.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (u *UsageReconciler) ReconcileTimeRange(ctx context.Context, from, to time.
127127
}
128128
status.Report = report
129129

130-
u.billingController.SubmitUsageToStripe(status.Report)
130+
u.billingController.Reconcile(status.Report)
131131

132132
return status, nil
133133
}

0 commit comments

Comments
 (0)