mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 03:06:14 +02:00
Contact refactor to new epp errors
This commit is contained in:
parent
6b86af3048
commit
55decf3dd4
5 changed files with 29 additions and 19 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue