Create domain works with nested attributes

This commit is contained in:
Martin Lensment 2015-02-16 11:45:27 +02:00
parent 037cb57e00
commit 27d19ad237
4 changed files with 124 additions and 6 deletions

View file

@ -2,6 +2,8 @@
class Epp::EppDomain < Domain
include EppErrors
accepts_nested_attributes_for :nameservers
def epp_code_map # rubocop:disable Metrics/MethodLength
{
'2002' => [
@ -58,6 +60,21 @@ class Epp::EppDomain < Domain
}
end
def self.new_from_epp(domain_params)
new(domain_params)
end
def parse_and_attach_domain_dependencies(parsed_frame)
attach_owner_contact(self.class.parse_owner_contact_from_frame(parsed_frame))
attach_contacts(self.class.parse_contacts_from_frame(parsed_frame))