Skip to content

chore: fix method naming#3984

Merged
turip merged 1 commit into
mainfrom
chore/fix-metod-naming
Mar 20, 2026
Merged

chore: fix method naming#3984
turip merged 1 commit into
mainfrom
chore/fix-metod-naming

Conversation

@turip
Copy link
Copy Markdown
Member

@turip turip commented Mar 20, 2026

Overview

Fix missleading getter method name.

Notes for reviewer

Summary by CodeRabbit

  • Refactor
    • Standardized charge retrieval API naming across billing services (flat-fee, usage-based, and credit purchase charges) to improve internal consistency.

@turip turip requested a review from a team as a code owner March 20, 2026 12:10
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 20, 2026

Caution

Review failed

Pull request was closed or merged during review

📝 Walkthrough

Walkthrough

This PR systematically renames charge retrieval API methods from GetByIDs to GetByMetas across the flatfee, usagebased, and creditpurchase billing modules, including corresponding input type and validation method renames.

Changes

Cohort / File(s) Summary
CreditPurchase Adapter & Service
openmeter/billing/charges/creditpurchase/adapter.go, openmeter/billing/charges/creditpurchase/adapter/charge.go, openmeter/billing/charges/creditpurchase/service.go, openmeter/billing/charges/creditpurchase/service/get.go
Renamed GetByIDs method to GetByMetas and input type GetByIDsInput to GetByMetasInput across interfaces, implementations, and service methods. Validation logic and internal control flow unchanged.
FlatFee Adapter & Service
openmeter/billing/charges/flatfee/adapter.go, openmeter/billing/charges/flatfee/adapter/charge.go, openmeter/billing/charges/flatfee/service.go, openmeter/billing/charges/flatfee/service/get.go
Renamed GetByIDs method to GetByMetas and input type GetByIDsInput to GetByMetasInput across interfaces, implementations, and service methods. Validation logic and internal control flow unchanged.
UsageBased Adapter & Service
openmeter/billing/charges/usagebased/adapter.go, openmeter/billing/charges/usagebased/adapter/charge.go, openmeter/billing/charges/usagebased/service.go, openmeter/billing/charges/usagebased/service/get.go
Renamed GetByIDs method to GetByMetas and input type GetByIDsInput to GetByMetasInput across interfaces, implementations, and service methods. Validation logic and internal control flow unchanged.
Main Service Integration
openmeter/billing/charges/service/get.go
Updated service method calls to use GetByMetas with corresponding input types (GetByMetasInput) for flatfee, usagebased, and creditpurchase services.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • #3943: Introduced the per-type adapters and services with the original GetByIDs methods that are being renamed in this PR
  • #3952: Contains overlapping changes renaming charge retrieval APIs from GetByIDs to GetByMetas across the same modules

Suggested labels

release-note/misc, area/billing

Suggested reviewers

  • tothandras
  • GAlexIHU
🚥 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 accurately describes the main change: renaming GetByIDs methods to GetByMetas across multiple charge service modules for improved semantic clarity.
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/fix-metod-naming
📝 Coding Plan
  • Generate coding plan for human review comments

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 added release-note/misc Miscellaneous changes area/billing labels Mar 20, 2026
@turip turip merged commit baec116 into main Mar 20, 2026
26 of 30 checks passed
@turip turip deleted the chore/fix-metod-naming branch March 20, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants