Add monetized subscription support gateway#1715
Add monetized subscription support gateway#1715nisan-abeywickrama wants to merge 1 commit intowso2:mainfrom
Conversation
|
Warning Rate limit exceeded
Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 58 minutes and 48 seconds. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (22)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Purpose
This pull request introduces support for tracking billing customer and subscription identifiers across the gateway subscription lifecycle. The changes span API definitions, database schema, models, storage, event handling, and analytics, ensuring that billing information is consistently captured, stored, and surfaced for analytics and operational needs. Additionally, the schema version for both SQLite and Postgres is bumped to accommodate these new fields.
Approach
Billing Information Support
billingCustomerIdandbillingSubscriptionIdfields to the OpenAPI spec for subscriptions, with descriptions indicating their use for analytics tracking. [1] [2]Subscriptionmodel, event payloads, and handlers to include these new billing fields, ensuring they are populated and returned in API responses. [1] [2] [3] [4] [5]Database Schema and Storage Updates
billing_customer_idandbilling_subscription_idcolumns to thesubscriptionstable, and incremented the schema version to 2. All relevant SQL queries and storage logic are updated to handle these new fields. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11]Event Propagation and xDS Snapshot
Analytics and Metadata
Dependency Updates
github.com/wso2/api-platform/sdk/coredependency to v0.2.12 in both controller and runtime to ensure compatibility with the new fields. [1] [2]Test and Versioning Adjustments