Skip to content

Move subscription update API to new module

Josianne Hyson requested to merge jh/migrate_subscription_put into master

What does this MR do and why?

Issue: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/9773+

Move subscription update API to new module

Rather than keeping this API endpoint on the public namespaces API, move it directly into the new subscriptions API module.

This makes it easier to change the authentication mechanism later on, in isolation.

The remaining subscription API endpoints are being migrated in: https://gitlab.com/gitlab-org/customers-gitlab-com/-/issues/9773+

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.

  1. GitLab: find or create a top level namespace that has an existing GitLabSubscription
    namespace.gitlab_subscription
    => #<GitlabSubscription:0x0000000156770928 ...
  2. CustomersDot: make the API request to create a GitLab subscription for that namespace
    Client::GitlabApp.put("/api/v4/namespaces/<NAMESPACE-ID>/gitlab_subscription", { token: Client::GitlabApp::ADMIN_API_TOKEN, body: { seats: 10 } })

Repeat the above steps on master and this branch. There should be no difference.

Edited by Josianne Hyson

Merge request reports

Loading