internetee/registry

View on GitHub
app/services/registrant_change.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
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