feat(ent): Add credit purchase changes#3973
feat(ent): Add credit purchase changes#3973mark-vass-konghq merged 1 commit intofeat/credit-purchase-invoicefrom
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (43)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR extends the credit purchase billing flow to support invoice settlement, adding an Changes
Sequence DiagramsequenceDiagram
participant Test as Test Suite
participant Service as Credit Purchase Service
participant BillingService as Billing Service
participant CustomInvoicing as Custom Invoicing Service
participant Database as Database
Test->>Service: Create credit purchase<br/>(InvoiceSettlement intent)
Service->>Database: Insert ChargeCreditPurchase<br/>with invoiced_payment
Service-->>Test: onCreditPurchaseInitiated callback<br/>(SettlementTypeExternal)
Test->>BillingService: ApproveInvoice
BillingService->>Database: Update invoice status<br/>to approved
BillingService-->>Test: Invoice approved
Service-->>Test: onCreditPurchasePaymentAuthorized<br/>(CreditGrantRealization set)
Test->>CustomInvoicing: HandlePaymentTrigger<br/>(TriggerPaid)
CustomInvoicing->>Database: Record payment settlement
CustomInvoicing-->>Test: Payment processed
Service-->>Test: onCreditPurchasePaymentSettled<br/>(ExternalPaymentSettlement set,<br/>ChargeStatusFinal)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
📝 Coding Plan
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 |
482b94c to
13e8abf
Compare
13e8abf to
52a6e97
Compare
52a6e97 to
7b4ef79
Compare
5cafbf2
into
feat/credit-purchase-invoice
Co-authored-by: Peter Turi <peter.turi@openmeter.io>
Add schema related changes to credit purchase invoicing
Summary by CodeRabbit
Release Notes
New Features
Tests