Method: Castle::Core::ProcessWebhook.call
- Defined in:
- lib/castle/core/process_webhook.rb
.call(webhook, config = nil) ⇒ String
Checks if webhook is valid
12 13 14 15 16 17 18 |
# File 'lib/castle/core/process_webhook.rb', line 12 def call(webhook, config = nil) webhook.body.read.tap do |result| raise Castle::ApiError, 'Invalid webhook from Castle API' if result.blank? Castle::Logger.call('webhook:', result.to_s, config) end end |