record_payload.rb 331 B

123456789101112
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. class TriggerWebhookJob::RecordPayload
  3. def self.generate(record)
  4. return {} if record.blank?
  5. backend = "TriggerWebhookJob::RecordPayload::#{record.class.name}".constantize
  6. generator = backend.new(record)
  7. generator.generate
  8. end
  9. end