Refactor domain create xml builder, add dnskey model

This commit is contained in:
Martin Lensment 2014-10-01 16:53:42 +03:00
parent b85420a598
commit 7d7a399ead
8 changed files with 102 additions and 45 deletions

View file

@ -42,6 +42,7 @@ class Epp::EppDomain < Domain
attach_contacts(self.class.parse_contacts_from_frame(parsed_frame))
attach_nameservers(self.class.parse_nameservers_from_frame(parsed_frame))
attach_statuses(self.class.parse_statuses_from_frame(parsed_frame))
attach_dnskeys(self.class.parse_dnskeys_from_frame(parsed_frame))
errors.empty?
end
@ -166,6 +167,12 @@ class Epp::EppDomain < Domain
domain_statuses.delete(to_delete)
end
def attach_dnskeys(dnskey_list)
dnskey_list.each do |dnskey_attrs|
dnskeys.build(dnskey_attrs)
end
end
### RENEW ###
def renew(cur_exp_date, period, unit = 'y')
@ -329,6 +336,12 @@ class Epp::EppDomain < Domain
res
end
def parse_dnskeys_from_frame(parsed_frame)
res = []
end
def check_availability(domains)
domains = [domains] if domains.is_a?(String)