internetee-registry/app/services/registrant_change.rb
2021-09-09 09:19:09 +03:00

19 lines
418 B
Ruby

class RegistrantChange
def initialize(domain:, old_registrant:)
@domain = domain
@old_registrant = old_registrant
end
def confirm
Dispute.close_by_domain(@domain.name) if @domain.disputed?
notify_registrant
end
private
def notify_registrant
RegistrantChangeMailer.accepted(domain: domain, old_registrant: old_registrant).deliver_now
end
attr_reader :domain, :old_registrant
end