post.rb 704 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 Post < Sequencer::Unit::Import::Kayako::Request::Generic
  4. attr_reader :ticket
  5. def initialize(...)
  6. super
  7. @ticket = request_params.delete(:ticket)
  8. end
  9. def api_path
  10. "cases/#{ticket['id']}/posts"
  11. end
  12. def params
  13. super.merge(
  14. include: 'mailbox,message_recipient,channel,attachment,case_message,note,chat_message,identity_email,identity_twitter,identity_facebook,facebook_message,facebook_post,facebook_post_comment,twitter_message,twitter_tweet',
  15. )
  16. end
  17. end
  18. end