Info request for domain

This commit is contained in:
Martin Lensment 2014-08-14 12:54:19 +03:00
parent ed73278620
commit c34f01aeb3
6 changed files with 116 additions and 0 deletions

View file

@ -26,6 +26,12 @@ module Epp::DomainsHelper
render '/epp/domains/renew'
end
def info_domain
@domain = find_domain
render '/epp/domains/info'
end
### HELPER METHODS ###
private
@ -58,6 +64,13 @@ module Epp::DomainsHelper
xml_attrs_present?(@ph, [['name'], ['curExpDate'], ['period']])
end
## INFO
def validate_domain_info_request
@ph = params_hash['epp']['command']['info']['info']
xml_attrs_present?(@ph, [['name']])
end
## SHARED
def find_domain
domain = Domain.find_by(name: @ph[:name])