mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 22:54:47 +02:00
23 lines
678 B
Ruby
23 lines
678 B
Ruby
module Whois
|
|
class Record < Whois::Server
|
|
self.table_name = 'whois_records'
|
|
|
|
def self.disclaimer
|
|
Setting.registry_whois_disclaimer
|
|
end
|
|
|
|
def update_from_auction(auction)
|
|
if auction.started?
|
|
update!(json: { name: auction.domain,
|
|
status: ['AtAuction'],
|
|
disclaimer: self.class.disclaimer })
|
|
elsif auction.no_bids?
|
|
destroy!
|
|
elsif auction.awaiting_payment? || auction.payment_received?
|
|
update!(json: { name: auction.domain,
|
|
status: ['PendingRegistration'],
|
|
disclaimer: self.class.disclaimer })
|
|
end
|
|
end
|
|
end
|
|
end
|