summaryrefslogtreecommitdiff
path: root/app/models/sim_card_provider.rb
blob: 854c61a7fd4a64578208bb54d954d2c6b0fba88d (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
class SimCardProvider < ActiveRecord::Base
  attr_accessible :name, :homepage_url, :docu_url, :api_server_url, :api_username, :api_password, :ref, :sip_server, :include_order_card_function

  # Validations
  #
  validates :name,
      :presence => true,
      :uniqueness => true

  validates :api_username,
      :presence => true
      
  validates :api_password,
      :presence => true

  validates :api_server_url,
      :presence => true

  validates :sip_server,
      :presence => true

  has_many :sim_cards, :dependent => :destroy

  def to_s
    name.to_s
  end

end