Class: Mammoth::Destinations::WebhookAdapter
- Defined in:
- lib/mammoth/destinations/webhook_adapter.rb
Overview
Built-in webhook destination adapter.
Class Method Summary collapse
-
.adapter_type ⇒ String
Adapter type name.
-
.build(destination, label:) ⇒ Mammoth::WebhookSink
Build a webhook sink from destination configuration.
-
.capabilities ⇒ Hash
JSON-friendly capabilities.
Class Method Details
.adapter_type ⇒ String
Returns adapter type name.
9 10 11 |
# File 'lib/mammoth/destinations/webhook_adapter.rb', line 9 def adapter_type "webhook" end |
.build(destination, label:) ⇒ Mammoth::WebhookSink
Build a webhook sink from destination configuration.
18 19 20 |
# File 'lib/mammoth/destinations/webhook_adapter.rb', line 18 def build(destination, label:) WebhookSink.from_destination_config(destination, label: label) end |
.capabilities ⇒ Hash
Returns JSON-friendly capabilities.
23 24 25 |
# File 'lib/mammoth/destinations/webhook_adapter.rb', line 23 def capabilities { type: adapter_type, delivery_units: %w[event transaction], signing: true, header_env: true } end |