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

38 lines
1.2 KiB
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 Case
class Mapping < Sequencer::Unit::Base
include ::Sequencer::Unit::Import::Common::Mapping::Mixin::ProvideMapped
uses :resource, :customer_id, :owner_id, :group_id, :organization_id, :priority_id, :state_id,
:created_by_id, :updated_by_id, :type
def process
provide_mapped do
{
id: resource['id'],
number: resource['id'],
title: resource['subject'],
owner_id: owner_id,
group_id: group_id,
customer_id: customer_id,
organization_id: organization_id,
priority_id: priority_id,
state_id: state_id,
type: type,
updated_by_id: updated_by_id,
created_by_id: created_by_id,
}
end
end
end
end
end
end
end
end