Skip to content

CONV-260: Create CreditPackRepository#229

Merged
menvil merged 1 commit into
developfrom
feature/CONV-260-create-credit-pack-repository
Jun 2, 2026
Merged

CONV-260: Create CreditPackRepository#229
menvil merged 1 commit into
developfrom
feature/CONV-260-create-credit-pack-repository

Conversation

@menvil

@menvil menvil commented Jun 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds App\Services\Billing\CreditPackRepository reading from config('billing.credit_packs')
  • Methods: all(), find(), findOrFail(), findByStripePriceId()
  • findOrFail() throws InvalidArgumentException for unknown keys
  • Makes CreditPackDto::stripePriceId nullable (matches BillingPlanDto pattern; env not set in tests)

Test plan

  • tests/Unit/Billing/CreditPackRepositoryTest.php — all(), findOrFail(), unknown key, findByStripePriceId(), null for unknown price id
  • composer test passes (468 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Implements CreditPackRepository to list and look up credit packs from config('billing.credit_packs'), including lookup by Stripe price ID. Fulfills CONV-260 by providing a simple API for one-off credit purchases.

  • New Features
    • Added App\Services\Billing\CreditPackRepository with all(), find(), findOrFail() (throws InvalidArgumentException), and findByStripePriceId().
    • Updated App\Data\Billing\CreditPackDto to make stripePriceId nullable.

Written for commit 1eb7434. Summary will update on new commits.

Review in cubic

@coderabbitai

coderabbitai Bot commented Jun 2, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: c4322e01-a221-4d82-b5e9-f301e28abaab

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-260-create-credit-pack-repository

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.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil force-pushed the feature/CONV-260-create-credit-pack-repository branch from d2e50b5 to 1eb7434 Compare June 2, 2026 18:30
@menvil menvil merged commit 3bbb434 into develop Jun 2, 2026
1 of 2 checks passed
@menvil menvil deleted the feature/CONV-260-create-credit-pack-repository branch June 2, 2026 18:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant