2022-01-01 13:38:12 +00:00
|
|
|
# Copyright (C) 2012-2022 Zammad Foundation, https://zammad-foundation.org/
|
2021-06-01 12:20:20 +00:00
|
|
|
|
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
|