article_source_channel.rb 449 B

12345678910111213141516
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::Common::ArticleSourceChannel < Sequencer::Unit::Common::Provider::Named
  3. uses :resource, :id_map
  4. private
  5. def article_source_channel
  6. channel = resource['source_channel']&.fetch('type')
  7. return if !channel
  8. "Sequencer::Unit::Import::Kayako::Post::Channel::#{channel.capitalize}".constantize.new(resource)
  9. end
  10. end