Sha256: 8688ab4667fe31fdf84ea86f586fd3eb4fdd2f10b6930955f9b7dbb3344796d8

Contents?: true

Size: 535 Bytes

Versions: 3

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

# This handler accepts webhooks from our integration tests. This webhook gets dispatched
# if a banking provider test fails, indicating that the bank might be having an incident

class WebhookTestHandler < Munster::BaseHandler
  def valid?(request) = true

  def process(webhook)
    return unless webhook.received?
    webhook.update!(status: "processing")
    webhook.update!(status: "processed")
  rescue
    webhook.update!(status: "error")
    raise
  end

  def expose_errors_to_sender? = true
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
munster-0.3.1 example/app/webhooks/webhook_test_handler.rb
munster-0.3.0 example/app/webhooks/webhook_test_handler.rb
munster-0.2.0 example/app/webhooks/webhook_test_handler.rb