Class: WebhookInbox::Providers::Base
- Inherits:
-
Object
- Object
- WebhookInbox::Providers::Base
- Defined in:
- lib/webhook_inbox/providers/base.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#event_id(raw_body, request) ⇒ String
Extract the unique event ID from the raw body and request.
-
#event_type(raw_body, request) ⇒ String
Extract the event type string (e.g. “customer.subscription.created”).
-
#verify!(raw_body, request, secret:) ⇒ Object
Verify the provider signature.
Instance Method Details
#event_id(raw_body, request) ⇒ String
Extract the unique event ID from the raw body and request.
10 11 12 |
# File 'lib/webhook_inbox/providers/base.rb', line 10 def event_id(raw_body, request) raise NotImplementedError, "#{self.class}#event_id not implemented" end |
#event_type(raw_body, request) ⇒ String
Extract the event type string (e.g. “customer.subscription.created”).
18 19 20 |
# File 'lib/webhook_inbox/providers/base.rb', line 18 def event_type(raw_body, request) raise NotImplementedError, "#{self.class}#event_type not implemented" end |
#verify!(raw_body, request, secret:) ⇒ Object
Verify the provider signature. Raise WebhookInbox::SignatureError on failure.
26 27 28 |
# File 'lib/webhook_inbox/providers/base.rb', line 26 def verify!(raw_body, request, secret:) raise NotImplementedError, "#{self.class}#verify! not implemented" end |