generic.rb 530 B

12345678910111213141516171819202122
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class Sequencer::Unit::Import::Kayako::Request < Sequencer::Unit::Common::Provider::Attribute
  3. class Generic
  4. attr_reader :object, :request_params
  5. def initialize(object:, request_params:)
  6. @object = object
  7. @request_params = request_params
  8. end
  9. def api_path
  10. object.underscore.split('_').map(&:pluralize).join('/')
  11. end
  12. def params
  13. request_params.merge(
  14. limit: 100,
  15. )
  16. end
  17. end
  18. end