Add subscription group creation endpoints
What does this MR do and why?
Issue: https://gitlab.com/gitlab-org/gitlab/-/issues/468097+
Add subscription group creation endpoints new
and create
.
We need to be able to create a group in the GitLab purchase flow, before the customer is sent to CustomersDot for the purchase. Add two new actions to the Subscriptions::GroupsController to facilitate the creation of a new group for subscription purchase.
This will be followed up by https://gitlab.com/gitlab-org/gitlab/-/issues/460774+ which adds the frontend component.
Currently, this is behind a disabled feature flag.
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Screenshots
Scenario | FF disabled | FF enabled |
---|---|---|
Navigate to new
|
||
Missing plan_id
|
||
Signed out |
How to set up and validate locally
Start CustomersDot and the GDK.
-
GitLab: enable the
migrate_purchase_flows_for_existing_customers
feature flag -
GitLab: navigate to
http://localhost:3000/-/subscriptions/groups/new?plan_id=2c92a00d76f0d5060176f2fb0a5029ff
- a blank page should be rendered
-
GitLab: navigate to
http://localhost:3000/-/subscriptions/groups/new
- a
404
should be rendered
- a
-
GitLab: sign out and navigate to
http://localhost:3000/-/subscriptions/groups/new?plan_id=2c92a00d76f0d5060176f2fb0a5029ff
- you should be redirected to sign in
Edited by Josianne Hyson