trabajo-afectivo/lib/sequencer/unit/import/kayako/post/mapping.rb

30 lines
839 B
Ruby
Raw Normal View History

2022-01-01 13:38:12 +00:00
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
class Sequencer
class Unit
module Import
module Kayako
module Post
class Mapping < Sequencer::Unit::Base
include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
uses :instance, :resource, :created_by_id, :article_sender_id, :article_source_channel
provides :mapped
def process
provide_mapped do
{
ticket_id: instance.id,
sender_id: article_sender_id,
created_by_id: created_by_id,
updated_by_id: created_by_id,
}.merge(article_source_channel.mapping)
end
end
end
end
end
end
end
end