class PaymentType < Activerecord::Base
  has_many :orders

  VISA = PaymentType.find_by_type('Visa')
  MASTER_CARD = PaymentType.find_by_type('MasterCard')
  AMEX = PaymentType.find_by_type('AmericanExpress')

  def validate_card_number(card_number, expiry)
    raise "T metod naley przedefiniowa w podklasie"
  end

  def process_order(name, address, amount)
    raise "T metod naley przedefiniowa w podklasie"
  end
