Module: Gitlab::SubscriptionPortal

Defined in:
lib/gitlab/subscription_portal.rb

Constant Summary collapse

SUBSCRIPTIONS_URL =
Gitlab::SubscriptionPortal.subscriptions_url.freeze
PAYMENT_FORM_URL =
Gitlab::SubscriptionPortal.payment_form_url.freeze
PAYMENT_VALIDATION_FORM_ID =
Gitlab::SubscriptionPortal.payment_validation_form_id.freeze
RENEWAL_SERVICE_EMAIL =
Gitlab::SubscriptionPortal.renewal_service_email.freeze
REGISTRATION_VALIDATION_FORM_URL =
Gitlab::SubscriptionPortal.registration_validation_form_url.freeze

Class Method Summary collapse

Class Method Details

.add_extra_seats_url(group_id) ⇒ Object


57
58
59
# File 'lib/gitlab/subscription_portal.rb', line 57

def self.add_extra_seats_url(group_id)
  "#{self.subscriptions_url}/gitlab/namespaces/#{group_id}/extra_seats"
end

.default_subscriptions_urlObject


5
6
7
8
9
10
11
# File 'lib/gitlab/subscription_portal.rb', line 5

def self.default_subscriptions_url
  if ::Gitlab.dev_or_test_env?
    'https://customers.staging.gitlab.com'
  else
    'https://customers.gitlab.com'
  end
end

.edit_account_urlObject


69
70
71
# File 'lib/gitlab/subscription_portal.rb', line 69

def self.
  "#{self.subscriptions_url}/customers/edit"
end

.payment_form_urlObject


17
18
19
# File 'lib/gitlab/subscription_portal.rb', line 17

def self.payment_form_url
  "#{self.subscriptions_url}/payment_forms/cc_validation"
end

.payment_validation_form_idObject


21
22
23
# File 'lib/gitlab/subscription_portal.rb', line 21

def self.payment_validation_form_id
  "payment_method_validation"
end

.registration_validation_form_urlObject


25
26
27
# File 'lib/gitlab/subscription_portal.rb', line 25

def self.registration_validation_form_url
  "#{self.subscriptions_url}/payment_forms/cc_registration_validation"
end

.renew_subscription_url(group_id) ⇒ Object


65
66
67
# File 'lib/gitlab/subscription_portal.rb', line 65

def self.renew_subscription_url(group_id)
  "#{self.subscriptions_url}/gitlab/namespaces/#{group_id}/renew"
end

.renewal_service_emailObject


81
82
83
# File 'lib/gitlab/subscription_portal.rb', line 81

def self.renewal_service_email
  '[email protected]'
end

.subscription_portal_admin_emailObject


73
74
75
# File 'lib/gitlab/subscription_portal.rb', line 73

def self.subscription_portal_admin_email
  ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_EMAIL', '[email protected]')
end

.subscription_portal_admin_tokenObject


77
78
79
# File 'lib/gitlab/subscription_portal.rb', line 77

def self.subscription_portal_admin_token
  ENV.fetch('SUBSCRIPTION_PORTAL_ADMIN_TOKEN', 'customer_admin_token')
end

.subscriptions_comparison_urlObject


29
30
31
# File 'lib/gitlab/subscription_portal.rb', line 29

def self.subscriptions_comparison_url
  'https://about.gitlab.com/pricing/gitlab-com/feature-comparison'
end

.subscriptions_gitlab_plans_urlObject


49
50
51
# File 'lib/gitlab/subscription_portal.rb', line 49

def self.subscriptions_gitlab_plans_url
  "#{self.subscriptions_url}/gitlab_plans"
end

.subscriptions_graphql_urlObject


33
34
35
# File 'lib/gitlab/subscription_portal.rb', line 33

def self.subscriptions_graphql_url
  "#{self.subscriptions_url}/graphql"
end

.subscriptions_instance_review_urlObject


53
54
55
# File 'lib/gitlab/subscription_portal.rb', line 53

def self.subscriptions_instance_review_url
  "#{self.subscriptions_url}/instance_review"
end

.subscriptions_manage_urlObject


45
46
47
# File 'lib/gitlab/subscription_portal.rb', line 45

def self.subscriptions_manage_url
  "#{self.subscriptions_url}/subscriptions"
end

.subscriptions_more_minutes_urlObject


37
38
39
# File 'lib/gitlab/subscription_portal.rb', line 37

def self.subscriptions_more_minutes_url
  "#{self.subscriptions_url}/buy_pipeline_minutes"
end

.subscriptions_more_storage_urlObject


41
42
43
# File 'lib/gitlab/subscription_portal.rb', line 41

def self.subscriptions_more_storage_url
  "#{self.subscriptions_url}/buy_storage"
end

.subscriptions_urlObject


13
14
15
# File 'lib/gitlab/subscription_portal.rb', line 13

def self.subscriptions_url
  ENV.fetch('CUSTOMER_PORTAL_URL', default_subscriptions_url)
end

.upgrade_subscription_url(group_id, plan_id) ⇒ Object


61
62
63
# File 'lib/gitlab/subscription_portal.rb', line 61

def self.upgrade_subscription_url(group_id, plan_id)
  "#{self.subscriptions_url}/gitlab/namespaces/#{group_id}/upgrade/#{plan_id}"
end