summaryrefslogtreecommitdiff
path: root/users/app/models/service_level.rb
blob: ac5244f75dbdccd2703e21a498d04064aef2063a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class ServiceLevel

  def initialize(attributes = {})
    @level = attributes[:level] || APP_CONFIG[:default_service_level]
  end

  def level
    @level
  end

  def name
    APP_CONFIG[:service_levels][@level][:name]
  end

  def cert_prefix
    APP_CONFIG[:service_levels][@level][:cert_prefix]
  end

  def description
    APP_CONFIG[:service_levels][@level][:description]
  end

  def cost
    APP_CONFIG[:service_levels][@level][:cost]
  end

  def quota
    APP_CONFIG[:service_levels][@level][:quota]
  end

end