Module: Fuik::Notifications

Defined in:
lib/fuik/notifications.rb

Class Method Summary collapse

Class Method Details

.failed(webhook_event:, event_class:, error:) ⇒ Object



23
24
25
26
27
28
29
30
31
# File 'lib/fuik/notifications.rb', line 23

def failed(webhook_event:, event_class:, error:)
  publish("webhook_failed",
    provider: webhook_event.provider,
    event_id: webhook_event.event_id,
    event_type: webhook_event.event_type,
    event_class: event_class,
    error: error,
    webhook_event: webhook_event)
end

.processed(webhook_event:, event_class:) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/fuik/notifications.rb', line 14

def processed(webhook_event:, event_class:)
  publish("webhook_processed",
    provider: webhook_event.provider,
    event_id: webhook_event.event_id,
    event_type: webhook_event.event_type,
    event_class: event_class,
    webhook_event: webhook_event)
end

.receive_error(provider:, error:) ⇒ Object



37
38
39
# File 'lib/fuik/notifications.rb', line 37

def receive_error(provider:, error:)
  publish("webhook_receive_error", provider: provider, error: error)
end

.received(provider:, event_id:, event_type:, webhook_event:) ⇒ Object



6
7
8
9
10
11
12
# File 'lib/fuik/notifications.rb', line 6

def received(provider:, event_id:, event_type:, webhook_event:)
  publish("webhook_received",
    provider: provider,
    event_id: event_id,
    event_type: event_type,
    webhook_event: webhook_event)
end

.signature_invalid(provider:, event_id:) ⇒ Object



33
34
35
# File 'lib/fuik/notifications.rb', line 33

def signature_invalid(provider:, event_id:)
  publish("webhook_signature_invalid", provider: provider, event_id: event_id)
end