Skip to content

chore: support effective at on stdinvoice#4071

Merged
turip merged 1 commit into
mainfrom
chore/support-effective-at-on-stdinvoice
Apr 2, 2026
Merged

chore: support effective at on stdinvoice#4071
turip merged 1 commit into
mainfrom
chore/support-effective-at-on-stdinvoice

Conversation

@turip
Copy link
Copy Markdown
Member

@turip turip commented Apr 2, 2026

support effective_at on stdinvoice

Summary by CodeRabbit

  • Bug Fixes
    • Corrected credit purchase invoice settlement timing calculation to align with the intent's effective computation, improving billing accuracy.

@turip turip requested a review from a team as a code owner April 2, 2026 15:26
@turip turip added the release-note/misc Miscellaneous changes label Apr 2, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 074dd717-158e-487d-b02c-7a28903f75bf

📥 Commits

Reviewing files that changed from the base of the PR and between 7282388 and 5f9ad62.

📒 Files selected for processing (1)
  • openmeter/billing/charges/creditpurchase/service/create.go

📝 Walkthrough

Walkthrough

Updated the invoice scheduling timestamp calculation in credit purchase gathering line creation to use CalculateEffectiveAt() instead of the raw service period start timestamp, shifting from unadjusted to computed effective timing for invoice settlement.

Changes

Cohort / File(s) Summary
Credit Purchase Invoice Timing
openmeter/billing/charges/creditpurchase/service/create.go
Modified buildInvoiceCreditPurchaseGatheringLine to use computed effective timestamp (intent.CalculateEffectiveAt()) instead of raw service period start (intent.ServicePeriod.From) for the InvoiceAt field.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title mentions 'effective at on stdinvoice' which aligns with the code change that updates invoice scheduling to use intent.CalculateEffectiveAt(), making it relevant to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/support-effective-at-on-stdinvoice

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@turip turip enabled auto-merge (squash) April 2, 2026 15:27
@turip turip merged commit 2725fda into main Apr 2, 2026
25 of 27 checks passed
@turip turip deleted the chore/support-effective-at-on-stdinvoice branch April 2, 2026 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release-note/misc Miscellaneous changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants