2021-06-01 12:20:20 +00:00
|
|
|
# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
|
|
|
|
|
2018-01-08 15:29:34 +00:00
|
|
|
class Sequencer
|
|
|
|
class Unit
|
|
|
|
module Import
|
|
|
|
module Zendesk
|
|
|
|
module ObjectAttribute
|
|
|
|
class Add < Sequencer::Unit::Base
|
2020-11-30 16:34:04 +00:00
|
|
|
prepend ::Sequencer::Unit::Import::Common::Model::Mixin::Skip::Action
|
2018-01-08 15:29:34 +00:00
|
|
|
|
2020-11-30 16:34:04 +00:00
|
|
|
skip_action :skipped, :failed
|
|
|
|
|
|
|
|
uses :model_class, :sanitized_name, :resource, :backend_class
|
2018-01-08 15:29:34 +00:00
|
|
|
provides :instance
|
|
|
|
|
|
|
|
def process
|
|
|
|
state.provide(:instance) do
|
|
|
|
backend_class.new(model_class, sanitized_name, resource)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|