mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
parent
8733389f5d
commit
7cadf66920
1 changed files with 9 additions and 3 deletions
|
@ -54,10 +54,13 @@ module Depp
|
|||
keys = Domain.create_dnskeys_hash(domain_params)
|
||||
dns_hash[:_anonymus] = keys if keys.any?
|
||||
|
||||
period = domain_params[:period].to_i.to_s
|
||||
period_unit = domain_params[:period][-1].to_s
|
||||
|
||||
if domain_params[:nameservers_attributes].select { |key, value| value['hostname'].present? }.any?
|
||||
xml = epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
||||
period: { value: period, attrs: { unit: period_unit } },
|
||||
ns: Domain.create_nameservers_hash(domain_params),
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
|
@ -65,7 +68,7 @@ module Depp
|
|||
else
|
||||
xml = epp_xml.create({
|
||||
name: { value: domain_params[:name] },
|
||||
period: { value: domain_params[:period].to_s[0], attrs: { unit: domain_params[:period].to_s[1] } },
|
||||
period: { value: period, attrs: { unit: period_unit } },
|
||||
registrant: { value: domain_params[:registrant] },
|
||||
_anonymus: Domain.create_contacts_hash(domain_params)
|
||||
}, dns_hash, Domain.construct_custom_params_hash(domain_params))
|
||||
|
@ -97,10 +100,13 @@ module Depp
|
|||
end
|
||||
|
||||
def renew(params)
|
||||
period = params[:period].to_i.to_s
|
||||
period_unit = params[:period][-1].to_s
|
||||
|
||||
current_user.request(epp_xml.renew(
|
||||
name: { value: params[:domain_name] },
|
||||
curExpDate: { value: params[:cur_exp_date] },
|
||||
period: { value: params[:period].to_s[0], attrs: { unit: params[:period].to_s[1] } }
|
||||
period: { value: period, attrs: { unit: period_unit } }
|
||||
))
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue