internetee-registry/app/interactions/domains/force_delete/base.rb
oleghasjanov 2ec545b3aa feat: add status notes to force delete notifications
- Add notes parameter to force delete interactions to provide more context
- Include company registry status in force delete notifications
- Add status mapping constants for better readability
- Move status note assignment before save in force delete process

Technical details:
- Add notes field to Domains::ForceDelete::Base interaction
- Update force delete notifications to include status notes
- Add REGISTRY_STATUSES mapping in CompanyRegisterStatusJob
- Update tests to verify new notification format
2025-02-03 14:08:50 +02:00

26 lines
878 B
Ruby

module Domains
module ForceDelete
class Base < ActiveInteraction::Base
object :domain,
class: Domain,
description: 'Domain to set ForceDelete on'
symbol :type,
default: :fast_track,
description: 'Force delete type, might be :fast_track or :soft'
boolean :notify_by_email,
default: false,
description: 'Do we need to send email notification'
string :reason,
default: nil,
description: 'Which mail template to use explicitly'
string :email,
default: nil,
description: 'Possible invalid email to notify on'
string :notes,
default: nil,
description: 'Notes to add reason to the force delete'
validates :type, inclusion: { in: %i[fast_track soft] }
end
end
end