Contact refactor to new epp errors

This commit is contained in:
Martin Lensment 2014-08-07 14:29:20 +03:00
parent 6b86af3048
commit 55decf3dd4
5 changed files with 29 additions and 19 deletions

View file

@ -2,6 +2,16 @@ class Contact < ActiveRecord::Base
#TODO Foreign contact will get email with activation link/username/temp password
#TODO Phone number validation, in first phase very minimam in order to support current registries
include EppErrors
EPP_CODE_MAP = {
'2302' => ['Contact id already exists'],
'2303' => [:not_found, :epp_obj_does_not_exist],
'2005' => ['Phone nr is invalid', 'Email is invalid']
}
EPP_OBJ = 'contact'
has_one :address
has_many :domain_contacts
has_many :domains, through: :domain_contacts