mirror of
https://github.com/internetee/registry.git
synced 2025-06-06 04:37:30 +02:00
24 lines
712 B
Ruby
24 lines
712 B
Ruby
module Domains
|
|
module DeleteConfirmEmail
|
|
class SendRequest < ActiveInteraction::Base
|
|
object :domain,
|
|
class: Domain,
|
|
description: 'Domain to send delete confirmation'
|
|
|
|
def execute
|
|
log
|
|
DomainDeleteMailer.confirmation_request(domain: domain,
|
|
registrar: domain.registrar,
|
|
registrant: domain.registrant).deliver_later
|
|
end
|
|
|
|
private
|
|
|
|
def log
|
|
message = "Send DomainDeleteMailer#confirm email for domain #{domain.name} (##{domain.id})"\
|
|
" to #{domain.registrant.email}"
|
|
Rails.logger.info(message)
|
|
end
|
|
end
|
|
end
|
|
end
|