2020-10-13 02:09:09 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module Gitlab
|
|
|
|
module SubscriptionPortal
|
|
|
|
def self.default_subscriptions_url
|
2021-10-12 11:12:08 -04:00
|
|
|
if ::Gitlab.dev_or_test_env?
|
2021-11-04 05:12:56 -04:00
|
|
|
'https://customers.staging.gitlab.com'
|
2021-10-12 11:12:08 -04:00
|
|
|
else
|
|
|
|
'https://customers.gitlab.com'
|
|
|
|
end
|
2020-10-13 02:09:09 -04:00
|
|
|
end
|
|
|
|
|
2021-04-13 14:11:28 -04:00
|
|
|
def self.subscriptions_url
|
|
|
|
ENV.fetch('CUSTOMER_PORTAL_URL', default_subscriptions_url)
|
|
|
|
end
|
2021-05-07 08:10:27 -04:00
|
|
|
|
|
|
|
def self.payment_form_url
|
|
|
|
"#{self.subscriptions_url}/payment_forms/cc_validation"
|
|
|
|
end
|
2021-09-17 14:11:44 -04:00
|
|
|
|
2022-04-25 11:08:44 -04:00
|
|
|
def self.payment_validation_form_id
|
|
|
|
"payment_method_validation"
|
|
|
|
end
|
|
|
|
|
2022-09-14 05:12:58 -04:00
|
|
|
def self.registration_validation_form_id
|
|
|
|
"cc_registration_validation"
|
|
|
|
end
|
|
|
|
|
2021-12-17 07:16:21 -05:00
|
|
|
def self.registration_validation_form_url
|
|
|
|
"#{self.subscriptions_url}/payment_forms/cc_registration_validation"
|
|
|
|
end
|
|
|
|
|
2021-09-17 14:11:44 -04:00
|
|
|
def self.subscriptions_comparison_url
|
|
|
|
'https://about.gitlab.com/pricing/gitlab-com/feature-comparison'
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.subscriptions_graphql_url
|
|
|
|
"#{self.subscriptions_url}/graphql"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.subscriptions_more_minutes_url
|
|
|
|
"#{self.subscriptions_url}/buy_pipeline_minutes"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.subscriptions_more_storage_url
|
|
|
|
"#{self.subscriptions_url}/buy_storage"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.subscriptions_manage_url
|
|
|
|
"#{self.subscriptions_url}/subscriptions"
|
|
|
|
end
|
|
|
|
|
2021-10-05 11:12:53 -04:00
|
|
|
def self.subscriptions_gitlab_plans_url
|
|
|
|
"#{self.subscriptions_url}/gitlab_plans"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.subscriptions_instance_review_url
|
|
|
|
"#{self.subscriptions_url}/instance_review"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.add_extra_seats_url(group_id)
|
|
|
|
"#{self.subscriptions_url}/gitlab/namespaces/#{group_id}/extra_seats"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.upgrade_subscription_url(group_id, plan_id)
|
|
|
|
"#{self.subscriptions_url}/gitlab/namespaces/#{group_id}/upgrade/#{plan_id}"
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.renew_subscription_url(group_id)
|
|
|
|
"#{self.subscriptions_url}/gitlab/namespaces/#{group_id}/renew"
|
|
|
|
end
|
|
|
|
|
2021-12-14 13:11:35 -05:00
|
|
|
def self.edit_account_url
|
|
|
|
"#{self.subscriptions_url}/customers/edit"
|
|
|
|
end
|
|
|
|
|
2021-09-17 14:11:44 -04:00
|
|
|
def self.subscription_portal_admin_email
|
|
|
|
ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_EMAIL', 'gl_com_api@gitlab.com')
|
|
|
|
end
|
|
|
|
|
|
|
|
def self.subscription_portal_admin_token
|
|
|
|
ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_TOKEN', 'customer_admin_token')
|
|
|
|
end
|
2021-12-14 13:11:35 -05:00
|
|
|
|
|
|
|
def self.renewal_service_email
|
2022-05-16 14:09:11 -04:00
|
|
|
'renewals-service@customers.gitlab.com'
|
2021-12-14 13:11:35 -05:00
|
|
|
end
|
2020-10-13 02:09:09 -04:00
|
|
|
end
|
|
|
|
end
|
2021-04-13 14:11:28 -04:00
|
|
|
|
2021-05-05 08:10:33 -04:00
|
|
|
Gitlab::SubscriptionPortal.prepend_mod
|
2021-04-13 14:11:28 -04:00
|
|
|
Gitlab::SubscriptionPortal::SUBSCRIPTIONS_URL = Gitlab::SubscriptionPortal.subscriptions_url.freeze
|
2021-05-07 08:10:27 -04:00
|
|
|
Gitlab::SubscriptionPortal::PAYMENT_FORM_URL = Gitlab::SubscriptionPortal.payment_form_url.freeze
|
2022-04-25 11:08:44 -04:00
|
|
|
Gitlab::SubscriptionPortal::PAYMENT_VALIDATION_FORM_ID = Gitlab::SubscriptionPortal.payment_validation_form_id.freeze
|
2021-12-14 13:11:35 -05:00
|
|
|
Gitlab::SubscriptionPortal::RENEWAL_SERVICE_EMAIL = Gitlab::SubscriptionPortal.renewal_service_email.freeze
|
2021-12-17 07:16:21 -05:00
|
|
|
Gitlab::SubscriptionPortal::REGISTRATION_VALIDATION_FORM_URL = Gitlab::SubscriptionPortal.registration_validation_form_url.freeze
|
2022-09-14 05:12:58 -04:00
|
|
|
Gitlab::SubscriptionPortal::REGISTRATION_VALIDATION_FORM_ID = Gitlab::SubscriptionPortal.registration_validation_form_id.freeze
|