Repository navigation
feat: credit then invoice delete - #4327
Conversation
|
Caution Review failedPull request was closed or merged during review No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (6)
✅ Files skipped from review due to trivial changes (2)
🚧 Files skipped from review as they are similar to previous changes (4)
📝 WalkthroughWalkthroughThis PR adds a generic TriggerPatchResult to pair charges with invoice patches, threads slog.Logger into charges service construction, records and drains invoice patches from state machines, resolves delete-by-charge-id patch ops into concrete invoice-line deletions, supports realization-run soft-deletes and filtering, and implements delete-patch behaviors with tests. ChangesCharge Deletion with Invoice Patch Tracking
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
d477e34 to
47ab99e
Compare
66ba7d0 to
36daa87
Compare
47ab99e to
2291455
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (9)
openmeter/billing/charges/usagebased/service/lineengine.go (3)
343-353: ⚡ Quick win
ExpandDetailedLineslooks like over-fetching here.The deletion loop only consumes
charge.Realizations(forGetByLineID, payment/usage checks, currency, run ID) and never touchesDetailedLines. Includingmeta.ExpandDetailedLineswill fan out an extra query per realization and materialize potentially large rows that aren't used. Dropping it should keep behavior identical and trim DB work on hot deletion paths.♻️ Suggested tweak
charges, err := e.service.GetByIDs(ctx, usagebased.GetByIDsInput{ Namespace: input.Invoice.Namespace, IDs: chargeIDs, - Expands: meta.Expands{ - meta.ExpandRealizations, - meta.ExpandDetailedLines, - }, + Expands: meta.Expands{ + meta.ExpandRealizations, + }, })As per coding guidelines: "Performance should be a priority in critical code paths. Anything related to event ingestion, message processing, database operations (regardless of database) should be vetted for potential performance bottlenecks."
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/usagebased/service/lineengine.go` around lines 343 - 353, The call to e.service.GetByIDs in lineengine.go is over-fetching by including meta.ExpandDetailedLines even though the deletion logic only uses charge.Realizations; remove meta.ExpandDetailedLines from the Expands slice in the usagebased.GetByIDsInput so only meta.ExpandRealizations is requested (keep the Namespace and IDs as-is) to avoid the extra per-realization queries and large materialized rows during deletion.
322-358: 💤 Low valueHelper reads cleanly — small readability nit.
getChargesForMutableStandardLineDeletedoes dedup + validation + batch fetch nicely. Tiny nit: sinceseenChargeIDsalready records membership, you can drop the parallelchargeIDsslice and derive it vialo.Keys(seenChargeIDs)at the end (or useslicesx/sorted form if order matters). Not a blocker — current form is also perfectly readable.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/usagebased/service/lineengine.go` around lines 322 - 358, The function getChargesForMutableStandardLineDelete currently builds both seenChargeIDs and a parallel chargeIDs slice; remove the redundant chargeIDs accumulation and instead derive the ID list from seenChargeIDs before calling e.service.GetByIDs (e.g., use lo.Keys(seenChargeIDs) or an equivalent to produce the []string), keeping the same Namespace and Expands passed to GetByIDs and preserving any ordering choice if required; update references to chargeIDs accordingly so GetByIDs receives the derived slice.
234-290: ⚡ Quick winUse a single
nowforAllocateAtandDeletedAt.
clock.Now()is called twice (line 275 and 281), so the credit correction'sAllocateAtand the realization run'sDeletedAtcan drift apart by a few microseconds. Capturing one timestamp at the top of the loop iteration (or once at the top of the function) keeps the two semantically aligned and slightly easier to reason about during incident triage.♻️ Suggested tweak
for _, stdLine := range input.Lines { charge, ok := chargesByID[*stdLine.ChargeID] @@ + now := clock.Now() + if _, err := e.service.runs.CorrectAllCredits(ctx, usagebasedrun.CorrectAllCreditRealizationsInput{ Charge: charge, Run: run, - AllocateAt: clock.Now(), + AllocateAt: now, CurrencyCalculator: currencyCalculator, }); err != nil { return fmt.Errorf("correcting credits for deleted usage based standard line[%s] run[%s]: %w", stdLine.ID, run.ID.ID, err) } - charge, err = e.markMutableStandardLineRunDeleted(ctx, charge, run, clock.Now()) + charge, err = e.markMutableStandardLineRunDeleted(ctx, charge, run, now)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/usagebased/service/lineengine.go` around lines 234 - 290, The loop in OnMutableStandardLinesDeleted calls clock.Now() twice causing AllocateAt and DeletedAt to differ; fix by capturing a single timestamp (e.g., now := clock.Now()) at the start of each iteration (or once before the loop) and use that single now value for usagebasedrun.CorrectAllCredits's AllocateAt and for markMutableStandardLineRunDeleted's DeletedAt, replacing both clock.Now() calls so both operations share the same timestamp.test/credits/suite_test.go (1)
68-99: 💤 Low valueTiny readability win: extract the repeated
ResolverDependencies.The same
transactions.ResolverDependencies{AccountService: deps.ResolversService, AccountCatalog: deps.AccountService, BalanceQuerier: deps.HistoricalLedger}literal is built three times (recognizer, collector, flat-fee/usage-based handlers). Pulling it into a local variable shortens those lines and makes future signature changes a one-liner.♻️ Suggested tweak
+ resolverDeps := transactions.ResolverDependencies{ + AccountService: deps.ResolversService, + AccountCatalog: deps.AccountService, + BalanceQuerier: deps.HistoricalLedger, + } + revenueRecognizer, err := recognizer.NewService(recognizer.Config{ Ledger: deps.HistoricalLedger, - Dependencies: transactions.ResolverDependencies{ - AccountService: deps.ResolversService, - AccountCatalog: deps.AccountService, - BalanceQuerier: deps.HistoricalLedger, - }, + Dependencies: resolverDeps, Lineage: lineageService, TransactionManager: enttx.NewCreator(s.DBClient), }) @@ - collectorService := ledgercollector.NewService(ledgercollector.Config{ - Ledger: deps.HistoricalLedger, - Dependencies: transactions.ResolverDependencies{ - AccountService: deps.ResolversService, - AccountCatalog: deps.AccountService, - BalanceQuerier: deps.HistoricalLedger, - }, - }) + collectorService := ledgercollector.NewService(ledgercollector.Config{ + Ledger: deps.HistoricalLedger, + Dependencies: resolverDeps, + }) @@ - FlatFeeHandler: ledgerchargeadapter.NewFlatFeeHandler(deps.HistoricalLedger, transactions.ResolverDependencies{AccountService: deps.ResolversService, AccountCatalog: deps.AccountService, BalanceQuerier: deps.HistoricalLedger}, collectorService), + FlatFeeHandler: ledgerchargeadapter.NewFlatFeeHandler(deps.HistoricalLedger, resolverDeps, collectorService), CreditPurchaseHandler: ledgerchargeadapter.NewCreditPurchaseHandler(deps.HistoricalLedger, deps.HistoricalLedger, deps.ResolversService, deps.AccountService), - UsageBasedHandler: ledgerchargeadapter.NewUsageBasedHandler(deps.HistoricalLedger, transactions.ResolverDependencies{AccountService: deps.ResolversService, AccountCatalog: deps.AccountService, BalanceQuerier: deps.HistoricalLedger}, collectorService), + UsageBasedHandler: ledgerchargeadapter.NewUsageBasedHandler(deps.HistoricalLedger, resolverDeps, collectorService),🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/credits/suite_test.go` around lines 68 - 99, Extract the repeated transactions.ResolverDependencies literal into a local variable (e.g., resolverDeps) and use it when constructing recognizer.NewService, ledgercollector.NewService, and the ledgerchargeadapter.NewFlatFeeHandler / NewUsageBasedHandler calls; replace each inline transactions.ResolverDependencies{AccountService: deps.ResolversService, AccountCatalog: deps.AccountService, BalanceQuerier: deps.HistoricalLedger} with resolverDeps so future signature changes are one-line and the calls in recognizer.NewService, ledgercollector.NewService, and the ledgerchargeadapter constructors are shorter and consistent.openmeter/billing/charges/usagebased/realizationrun_test.go (1)
93-118: 💤 Low valueSolid coverage on the happy and not-found paths.
One small thing you could optionally add: a run with
LineID: nilmixed in to explicitly assert the nil-guard insideGetByLineID(run.LineID != nil). Today the nil branch isn't directly exercised, and a regression there would silently dereference a nil pointer.♻️ Optional extra case
runs := RealizationRuns{ + { + RealizationRunBase: RealizationRunBase{ + ID: RealizationRunID{Namespace: "namespace", ID: "run-without-line"}, + LineID: nil, + }, + }, { RealizationRunBase: RealizationRunBase{ ID: RealizationRunID{Namespace: "namespace", ID: "run-1"}, LineID: &otherLineID, }, },🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/usagebased/realizationrun_test.go` around lines 93 - 118, Add a third test case entry in TestRealizationRuns_GetByLineID: insert a RealizationRun whose RealizationRunBase has LineID set to nil (explicitly omit or set to nil) into the runs slice before calling runs.GetByLineID; this will exercise the nil-guard inside RealizationRuns.GetByLineID and you should keep the same assertions (finding "run-2" for line-1 and the "realization run not found" error for "missing-line") to ensure the nil LineID does not cause a panic or change behavior.openmeter/billing/charges/usagebased/adapter/realizationrun.go (1)
49-66: 💤 Low valueClean refactor — normalization moved up and
DeletedAtplumbed through cleanly.Pulling
input = input.Normalized()to the top removes the per-callmeta.NormalizeTimestamp(...)wrapping at theSetStoredAtLtsite. Just one small consistency note:UpdateRealizationRunInput.Normalized()only normalizesStoredAtLT, soDeletedAtwill be persisted with whatever precision the caller passed in (typicallyclock.Now()). If your DB column relies on the normalized precision elsewhere in the code path, consider normalizingDeletedAttoo. Otherwise this is fine as-is.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/usagebased/adapter/realizationrun.go` around lines 49 - 66, UpdateRealizationRun moves input = input.Normalized() which only normalizes StoredAtLT, so DeletedAt may be stored with caller precision; fix by normalizing DeletedAt as well — either update UpdateRealizationRunInput.Normalized() to normalize DeletedAt (preferred) or call meta.NormalizeTimestamp/appropriate normalizer on input.DeletedAt before calling SetOrClearDeletedAt in UpdateRealizationRun; reference UpdateRealizationRun, UpdateRealizationRunInput.Normalized, DeletedAt, StoredAtLT, SetOrClearDeletedAt and SetStoredAtLt when making the change.openmeter/billing/charges/usagebased/realizationrun.go (1)
361-370: 💤 Low value
GetByLineIDreturns the first match — worth a quick sanity check.
lo.Findreturns the first run whoseLineIDmatches. If invariant-wise aLineIDalways maps to at most one realization run (which seems to be the case given howOnStandardInvoiceCreatedcreates a single current run per line), this is perfect. If there's any chance aLineIDcould be referenced by more than one run (e.g., a corrected/superseded run plus a current one), the caller inlineengine.go#OnMutableStandardLinesDeletedwould silently operate on whichever happens to come first.If the one-run-per-line invariant holds, feel free to ignore — possibly worth a short comment on the function to capture the assumption.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/usagebased/realizationrun.go` around lines 361 - 370, GetByLineID currently returns the first match found which can silently pick between multiple runs for the same LineID; update RealizationRuns.GetByLineID to collect all matches (e.g., via lo.Filter or equivalent), then: if zero matches return the existing "not found" error, if exactly one return it, and if more than one return an explicit error stating multiple realization runs found for the LineID (so callers like OnMutableStandardLinesDeleted must not silently operate on an arbitrary run); reference RealizationRuns.GetByLineID, RealizationRun, OnStandardInvoiceCreated and OnMutableStandardLinesDeleted when making this change (or alternatively add a concise comment above GetByLineID documenting the one-run-per-line invariant if you prefer to keep current behavior).openmeter/billing/charges/invoiceupdater/invoiceupdate.go (1)
136-166: 💤 Low value
isDryRunLoggablePatchsilently handles the new op viadefaultThe new
PatchOpDeleteGatheringLineByChargeIDfalls through todefault: return true, so it'll always be logged in dry-run mode. That's the safe choice, but making it explicit keeps the function honest about what each op does:✨ Suggested explicit case
case PatchOpLineUpdate: updatePatch, err := patch.AsUpdateLinePatch() if err != nil { return true } return isMutableInvoice(updatePatch.TargetState.GetInvoiceID(), invoicesByID) + case PatchOpDeleteGatheringLineByChargeID: + // Always log charge-level deletes in dry-run output. + return true default: return true }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@openmeter/billing/charges/invoiceupdater/invoiceupdate.go` around lines 136 - 166, isDryRunLoggablePatch currently falls into the default branch for the new PatchOpDeleteGatheringLineByChargeID, so add an explicit case for PatchOpDeleteGatheringLineByChargeID inside isDryRunLoggablePatch and return the intended boolean (e.g., true to always log in dry-run like the safe default) to make the behavior explicit; reference the PatchOpDeleteGatheringLineByChargeID symbol and update the switch in isDryRunLoggablePatch accordingly.test/credits/credit_then_invoice_test.go (1)
560-1033: ⚡ Quick winMissing test case: delete a charge mid-way through progressive billing (partial paid + in-progress)
The three scenarios cover gathering-only, mutable-draft, and immutable-approved — great coverage for the single-run cases. But
DeleteChargeiterates over all realization runs and emits aNewDeleteLinePatchfor each one withLineID/InvoiceID. The multi-run progressive billing scenario (e.g., one finalized+paid run making the line immutable, plus a currently-in-progress run making its line mutable) isn't covered yet.That case would exercise both the warning path (immutable line survives) and the deletion path (mutable line gets soft-deleted) in a single
mustRefundChargecall, which is the most realistic "cancelled subscription mid-billing-cycle" scenario.Worth adding to validate that the patch accumulation loop in
DeleteChargehandles the mix correctly.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@test/credits/credit_then_invoice_test.go` around lines 560 - 1033, Add a new test that covers a progressive multi-run scenario where one realization run is finalized/approved (immutable) and another run is in-progress/draft (mutable); use the same helpers as other tests (createMockChargeIntent, MockStreamingConnector.AddSimpleEvent, BillingService.InvoicePendingLines, AdvanceInvoice, ApproveInvoice) to produce two runs for the same usage-based charge, then call mustRefundCharge to trigger DeleteCharge; assert that the immutable run's line remains undeleted and produces a ValidationIssue warning (as checked in TestUsageBasedCreditThenInvoiceDeletePatchKeepsImmutableStandardLineAndLedgerBookings) while the mutable run's line is soft-deleted and its realization run DeletedAt is set (as in TestUsageBasedCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsCredits), and finally verify ledger snapshots only reverse the mutable run's credit allocations using the existing snapshot/assert helpers.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test/credits/suite_test.go`:
- Around line 45-101: In SetupSuite replace the non-fatal assertions with fatal
ones so setup stops on error: for each call where you currently use
s.NoError(err) after ledgertestutils.InitDeps, lineageadapter.New,
lineageservice.New, recognizer.NewService, and chargestestutils.NewServices,
change to s.Require().NoError(err) to immediately abort the suite on setup
failures and avoid dereferencing partially-initialized state (refer to the
SetupSuite method and those function calls).
---
Nitpick comments:
In `@openmeter/billing/charges/invoiceupdater/invoiceupdate.go`:
- Around line 136-166: isDryRunLoggablePatch currently falls into the default
branch for the new PatchOpDeleteGatheringLineByChargeID, so add an explicit case
for PatchOpDeleteGatheringLineByChargeID inside isDryRunLoggablePatch and return
the intended boolean (e.g., true to always log in dry-run like the safe default)
to make the behavior explicit; reference the
PatchOpDeleteGatheringLineByChargeID symbol and update the switch in
isDryRunLoggablePatch accordingly.
In `@openmeter/billing/charges/usagebased/adapter/realizationrun.go`:
- Around line 49-66: UpdateRealizationRun moves input = input.Normalized() which
only normalizes StoredAtLT, so DeletedAt may be stored with caller precision;
fix by normalizing DeletedAt as well — either update
UpdateRealizationRunInput.Normalized() to normalize DeletedAt (preferred) or
call meta.NormalizeTimestamp/appropriate normalizer on input.DeletedAt before
calling SetOrClearDeletedAt in UpdateRealizationRun; reference
UpdateRealizationRun, UpdateRealizationRunInput.Normalized, DeletedAt,
StoredAtLT, SetOrClearDeletedAt and SetStoredAtLt when making the change.
In `@openmeter/billing/charges/usagebased/realizationrun_test.go`:
- Around line 93-118: Add a third test case entry in
TestRealizationRuns_GetByLineID: insert a RealizationRun whose
RealizationRunBase has LineID set to nil (explicitly omit or set to nil) into
the runs slice before calling runs.GetByLineID; this will exercise the nil-guard
inside RealizationRuns.GetByLineID and you should keep the same assertions
(finding "run-2" for line-1 and the "realization run not found" error for
"missing-line") to ensure the nil LineID does not cause a panic or change
behavior.
In `@openmeter/billing/charges/usagebased/realizationrun.go`:
- Around line 361-370: GetByLineID currently returns the first match found which
can silently pick between multiple runs for the same LineID; update
RealizationRuns.GetByLineID to collect all matches (e.g., via lo.Filter or
equivalent), then: if zero matches return the existing "not found" error, if
exactly one return it, and if more than one return an explicit error stating
multiple realization runs found for the LineID (so callers like
OnMutableStandardLinesDeleted must not silently operate on an arbitrary run);
reference RealizationRuns.GetByLineID, RealizationRun, OnStandardInvoiceCreated
and OnMutableStandardLinesDeleted when making this change (or alternatively add
a concise comment above GetByLineID documenting the one-run-per-line invariant
if you prefer to keep current behavior).
In `@openmeter/billing/charges/usagebased/service/lineengine.go`:
- Around line 343-353: The call to e.service.GetByIDs in lineengine.go is
over-fetching by including meta.ExpandDetailedLines even though the deletion
logic only uses charge.Realizations; remove meta.ExpandDetailedLines from the
Expands slice in the usagebased.GetByIDsInput so only meta.ExpandRealizations is
requested (keep the Namespace and IDs as-is) to avoid the extra per-realization
queries and large materialized rows during deletion.
- Around line 322-358: The function getChargesForMutableStandardLineDelete
currently builds both seenChargeIDs and a parallel chargeIDs slice; remove the
redundant chargeIDs accumulation and instead derive the ID list from
seenChargeIDs before calling e.service.GetByIDs (e.g., use
lo.Keys(seenChargeIDs) or an equivalent to produce the []string), keeping the
same Namespace and Expands passed to GetByIDs and preserving any ordering choice
if required; update references to chargeIDs accordingly so GetByIDs receives the
derived slice.
- Around line 234-290: The loop in OnMutableStandardLinesDeleted calls
clock.Now() twice causing AllocateAt and DeletedAt to differ; fix by capturing a
single timestamp (e.g., now := clock.Now()) at the start of each iteration (or
once before the loop) and use that single now value for
usagebasedrun.CorrectAllCredits's AllocateAt and for
markMutableStandardLineRunDeleted's DeletedAt, replacing both clock.Now() calls
so both operations share the same timestamp.
In `@test/credits/credit_then_invoice_test.go`:
- Around line 560-1033: Add a new test that covers a progressive multi-run
scenario where one realization run is finalized/approved (immutable) and another
run is in-progress/draft (mutable); use the same helpers as other tests
(createMockChargeIntent, MockStreamingConnector.AddSimpleEvent,
BillingService.InvoicePendingLines, AdvanceInvoice, ApproveInvoice) to produce
two runs for the same usage-based charge, then call mustRefundCharge to trigger
DeleteCharge; assert that the immutable run's line remains undeleted and
produces a ValidationIssue warning (as checked in
TestUsageBasedCreditThenInvoiceDeletePatchKeepsImmutableStandardLineAndLedgerBookings)
while the mutable run's line is soft-deleted and its realization run DeletedAt
is set (as in
TestUsageBasedCreditThenInvoiceDeletePatchDeletesMutableStandardLineAndCorrectsCredits),
and finally verify ledger snapshots only reverse the mutable run's credit
allocations using the existing snapshot/assert helpers.
In `@test/credits/suite_test.go`:
- Around line 68-99: Extract the repeated transactions.ResolverDependencies
literal into a local variable (e.g., resolverDeps) and use it when constructing
recognizer.NewService, ledgercollector.NewService, and the
ledgerchargeadapter.NewFlatFeeHandler / NewUsageBasedHandler calls; replace each
inline transactions.ResolverDependencies{AccountService: deps.ResolversService,
AccountCatalog: deps.AccountService, BalanceQuerier: deps.HistoricalLedger} with
resolverDeps so future signature changes are one-line and the calls in
recognizer.NewService, ledgercollector.NewService, and the ledgerchargeadapter
constructors are shorter and consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 089c4330-7d36-46db-8bc3-71e8d768eec9
📒 Files selected for processing (24)
app/common/charges.goopenmeter/billing/charges/flatfee/service.goopenmeter/billing/charges/flatfee/service/triggers.goopenmeter/billing/charges/invoiceupdater/invoiceupdate.goopenmeter/billing/charges/invoiceupdater/patch.goopenmeter/billing/charges/meta/patch.goopenmeter/billing/charges/service/base_test.goopenmeter/billing/charges/service/helpers.goopenmeter/billing/charges/service/patch.goopenmeter/billing/charges/service/service.goopenmeter/billing/charges/statemachine/machine.goopenmeter/billing/charges/testutils/service.goopenmeter/billing/charges/usagebased/adapter/charge.goopenmeter/billing/charges/usagebased/adapter/detailedline_test.goopenmeter/billing/charges/usagebased/adapter/realizationrun.goopenmeter/billing/charges/usagebased/realizationrun.goopenmeter/billing/charges/usagebased/realizationrun_test.goopenmeter/billing/charges/usagebased/service.goopenmeter/billing/charges/usagebased/service/creditheninvoice.goopenmeter/billing/charges/usagebased/service/lineengine.goopenmeter/billing/charges/usagebased/service/triggers.gotest/credits/credit_then_invoice_test.gotest/credits/sanity_test.gotest/credits/suite_test.go
💤 Files with no reviewable changes (1)
- test/credits/sanity_test.go
Overview
Add support for deleting charges via the charge delete hook.
Notes for reviewer
Summary by CodeRabbit
New Features
Behavior Changes
Tests
Documentation