Skip to content

Commit 30e29be

Browse files
committed
fix: more rabbit reviews
1 parent 3fc7750 commit 30e29be

File tree

2 files changed

+0
-16
lines changed

2 files changed

+0
-16
lines changed

openmeter/billing/service/gatheringinvoicependinglines.go

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,6 @@ func (in handleInvoicePendingLinesForCurrencyInput) Validate() error {
197197
return fmt.Errorf("gathering invoice: %w", err)
198198
}
199199

200-
if in.FeatureMeters == nil {
201-
return fmt.Errorf("feature meters cannot be nil")
202-
}
203-
204200
if len(in.InScopeLines) == 0 {
205201
return fmt.Errorf("in scope lines must contain at least one line")
206202
}
@@ -375,10 +371,6 @@ func (i prepareLinesToBillInput) Validate() error {
375371
errs = append(errs, fmt.Errorf("no lines to bill"))
376372
}
377373

378-
if i.FeatureMeters == nil {
379-
errs = append(errs, fmt.Errorf("feature meters cannot be nil"))
380-
}
381-
382374
if i.GatheringInvoice.Lines.IsAbsent() {
383375
errs = append(errs, fmt.Errorf("gathering invoice must have lines expanded"))
384376
}
@@ -630,10 +622,6 @@ func (in createStandardInvoiceFromGatheringLinesInput) Validate() error {
630622
errs = append(errs, fmt.Errorf("effective billing profile: %w", err))
631623
}
632624

633-
if in.FeatureMeters == nil {
634-
errs = append(errs, fmt.Errorf("feature meters cannot be nil"))
635-
}
636-
637625
if len(in.Lines) == 0 {
638626
errs = append(errs, fmt.Errorf("lines must contain at least one line"))
639627
}

openmeter/billing/service/invoice.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,10 +159,6 @@ func (s *Service) recalculateGatheringInvoice(ctx context.Context, in recalculat
159159
return invoice, fmt.Errorf("resolving feature meters: %w", err)
160160
}
161161

162-
if customerProfile.Customer == nil {
163-
return invoice, fmt.Errorf("customer profile is nil")
164-
}
165-
166162
inScopeLines := lo.Filter(invoice.Lines.OrEmpty(), func(line *billing.StandardLine, _ int) bool {
167163
return line.DeletedAt == nil
168164
})

0 commit comments

Comments
 (0)