Class: Fuik::WebhookEvent
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- Fuik::WebhookEvent
- Includes:
- Filterable
- Defined in:
- app/models/fuik/webhook_event.rb,
app/models/fuik/webhook_event/filterable.rb
Defined Under Namespace
Modules: Filterable
Instance Method Summary collapse
Instance Method Details
#failed!(error) ⇒ Object
24 25 26 |
# File 'app/models/fuik/webhook_event.rb', line 24 def failed!(error) update!(status: "failed", error: error.to_s) end |
#payload ⇒ Object
14 15 16 17 18 |
# File 'app/models/fuik/webhook_event.rb', line 14 def payload @payload ||= JSON.parse(body) rescue JSON::ParserError {} end |
#processed! ⇒ Object
20 21 22 |
# File 'app/models/fuik/webhook_event.rb', line 20 def processed! update!(status: "processed") end |