feat(subscriptions): Add Subscription confirm handler#9353
Merged
Gnanasundari24 merged 145 commits intomainfrom Sep 25, 2025
Merged
feat(subscriptions): Add Subscription confirm handler#9353Gnanasundari24 merged 145 commits intomainfrom
Gnanasundari24 merged 145 commits intomainfrom
Conversation
…to subscription_cruds
…to subscription_cruds
…to subscription_cruds
…n-confirm-handler
jarnura
requested changes
Sep 24, 2025
jarnura
previously approved these changes
Sep 24, 2025
jagan-jaya
previously approved these changes
Sep 24, 2025
…n-confirm-handler
f73add1
jagan-jaya
approved these changes
Sep 25, 2025
jarnura
approved these changes
Sep 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a new subscription feature to the codebase, adding comprehensive support for subscription management via new API models, endpoints, and supporting logic. The changes include new data models, API routes, core business logic for creating and confirming subscriptions, and integration with customer management. The implementation is gated behind the
v1andolapfeature flags.New Subscription Feature
subscriptionmodule toapi_models, including request and response types, core data structures (Subscription,Invoice), and helper functions for mapping customer data.Subscriptionresource to the globalResourceenum for system-wide referencing.Core Logic and Utilities
core/subscription.rsfor creating and confirming subscriptions, including customer handling, client secret generation, and placeholder billing processor integration.core/subscription/utils.rsfor customer retrieval/creation and extracting customer details from subscription requests.Database and Model Changes
SubscriptionNewmodel indiesel_models, supporting secure subscription creation. [1] [2]API Routing and Integration
/subscriptionand/subscription/{subscription_id}/confirmendpoints for managing subscriptions. [1] [2] [3] [4] [5]Subscriptionfor locking and routing utilities.] New featureDescription
Additional Changes
Motivation and Context
How did you test it?
response -
Response -
Checklist
cargo +nightly fmt --allcargo clippy