Integrate auction

Closes #874
This commit is contained in:
Artur Beljajev 2018-11-29 15:08:22 +02:00
parent 640faaadb9
commit 42e8f86dae
51 changed files with 1619 additions and 53 deletions

View file

@ -1,5 +1,23 @@
module Whois
class Record < Whois::Server
self.table_name = 'whois_records'
def self.disclaimer
Setting.registry_whois_disclaimer
end
def self.refresh(domain_name)
if domain_name.at_auction?
create!(name: domain_name, json: { name: domain_name.to_s,
status: 'AtAuction',
disclaimer: disclaimer })
elsif domain_name.awaiting_payment? || domain_name.pending_registration?
find_by(name: domain_name.to_s).update!(json: { name: domain_name.to_s,
status: 'PendingRegistration',
disclaimer: disclaimer })
else
find_by(name: domain_name.to_s).destroy!
end
end
end
end