trabajo-afectivo/lib/sequencer/unit/import/freshdesk/resources.rb

25 lines
589 B
Ruby
Raw Normal View History

# Copyright (C) 2012-2021 Zammad Foundation, http://zammad-foundation.org/
2021-05-25 12:30:12 +00:00
class Sequencer
class Unit
module Import
module Freshdesk
class Resources < Sequencer::Unit::Common::Provider::Named
include ::Sequencer::Unit::Import::Common::Model::Mixin::HandleFailure
2021-05-25 12:30:12 +00:00
uses :response
private
def resources
JSON.parse(response.body)
rescue => e
logger.error "Won't be continued, because no response is available."
handle_failure(e)
2021-05-25 12:30:12 +00:00
end
end
end
end
end
end