mirror of
https://github.com/internetee/registry.git
synced 2025-06-08 13:44:47 +02:00
Improve DomainCreate wrapper for EPP
This commit is contained in:
parent
ccef1053d9
commit
ad2ccdba7d
7 changed files with 53 additions and 124 deletions
|
@ -15,7 +15,7 @@ module Deserializers
|
|||
registrar_id: registrar,
|
||||
registrant_id: if_present('registrant'),
|
||||
reserved_pw: if_present('reserved > pw'),
|
||||
period: Integer(frame.css('period').text) || 1,
|
||||
period: frame.css('period').text.present? ? Integer(frame.css('period').text) : 1,
|
||||
period_unit: frame.css('period').first ? frame.css('period').first[:unit] : 'y',
|
||||
}
|
||||
|
||||
|
|
|
@ -32,11 +32,11 @@ module Deserializers
|
|||
end
|
||||
|
||||
def admin_contacts
|
||||
frame.css('contact').map { |c| c.text if c['type'] == 'admin' }
|
||||
frame.css('contact').select { |c| c['type'] == 'admin' }.map(&:text)
|
||||
end
|
||||
|
||||
def tech_contacts
|
||||
frame.css('contact').map { |c| c.text if c['type'] == 'tech' }
|
||||
frame.css('contact').select { |c| c['type'] == 'tech' }.map(&:text)
|
||||
end
|
||||
|
||||
def dns_keys
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue