Implemented functionality to update a user's subscription plan using Stripe.
Added the service function update_user_plan to handle plan updates and manage user subscriptions.
Fetch User Plans in Organization:
Added an endpoint to fetch all organizations with their associated users and subscription plans.
Implemented the fetch_all_organisations_with_users_and_plans service function to retrieve this data.
The integration with Stripe ensures that users can be subscribed to different plans, while the new endpoint provides a comprehensive view of users and their plans within an organization.
Related Issue (Link to issue ticket)
Motivation and Context
The addition of Stripe payment integration and the endpoint for fetching user plans solves the following problems:
Stripe Payment: Users can now be subscribed to different billing plans through Stripe, ensuring that their subscriptions are accurately managed and updated.
Fetch User Plans: Admins can retrieve a detailed view of all users and their plans within an organization, enhancing administrative capabilities and visibility.
How Has This Been Tested?
Implemented tests for update_user_plan to ensure correct subscription updates and plan changes.
Tested the fetch_all_organisations_with_users_and_plans endpoint to verify that it correctly returns all relevant data for organizations and users.
Screenshots (if appropriate - Postman, etc):
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
This PR introduces two key features:
Stripe Payment Integration:
Implemented functionality to update a user's subscription plan using Stripe.
Added an endpoint to fetch all organizations with their associated users and subscription plans.
The integration with Stripe ensures that users can be subscribed to different plans, while the new endpoint provides a comprehensive view of users and their plans within an organization.
Related Issue (Link to issue ticket)
Motivation and Context
The addition of Stripe payment integration and the endpoint for fetching user plans solves the following problems:
How Has This Been Tested?
Screenshots (if appropriate - Postman, etc):
Types of changes
Checklist: