resources.rb 462 B

123456789101112131415161718
  1. # Copyright (C) 2012-2023 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::Resources < Sequencer::Unit::Common::Provider::Named
  3. include ::Sequencer::Unit::Import::Common::Model::Mixin::HandleFailure
  4. uses :response
  5. private
  6. def resources
  7. body = JSON.parse(response.body)
  8. body['data']
  9. rescue => e
  10. logger.error "Won't be continued, because no response is available."
  11. handle_failure(e)
  12. end
  13. end