Migrate subscription create API to new module
What does this MR do and why?
Issue: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/9773+
Migrate subscription create API to new module
This endpoint is being extracted out to its own module to make it easier to group all the subscription endpoints in one place, and then migrate to the new CustomersDot authentication method later.
The endpoint's path and behaviour should be unchanged as a result of this MR, this is just changing where this code lives.
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.
How to set up and validate locally
Start the GDK and CustomersDot.
-
GitLab: find or create a top level namespace that does not have an existing GitLabSubscription
namespace.gitlab_subscription => nil
-
CustomersDot: make the API request to create a GitLab subscription for that namespace
Client::GitlabApp.post("/api/v4/namespaces/<NAMESPACE-ID>/gitlab_subscription", { token: Client::GitlabApp::ADMIN_API_TOKEN, body: { start_date: Date.current, seats: 10, plan_code: 'premium' } })
Repeat the above steps on master
and this branch. There should be no difference.
Edited by Josianne Hyson