mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-11 18:26:50 +00:00
10 lines
307 B
Ruby
10 lines
307 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Records a webhook url to send notifications to
|
|
class WebhookEndpoint < ApplicationRecord
|
|
WEBHOOK_TYPES = %w(order_cycle_opened payment_status_changed).freeze
|
|
|
|
validates :url, presence: true
|
|
validates :webhook_type, presence: true, inclusion: { in: WEBHOOK_TYPES }
|
|
end
|