connected.rb 411 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Freshdesk::Connected < Sequencer::Unit::Common::Provider::Named
  3. extend ::Sequencer::Unit::Import::Freshdesk::Requester
  4. private
  5. def connected
  6. response = self.class.perform_request(
  7. api_path: 'agents/me',
  8. )
  9. response.is_a?(Net::HTTPOK)
  10. rescue => e
  11. logger.error e
  12. nil
  13. end
  14. end