Module: SendGrid4r::Factory::EventFactory

Defined in:
lib/sendgrid4r/factory/event_factory.rb

Overview

SendGrid Web API v3 Event Factory Class implementation

Class Method Summary collapse

Class Method Details

.create(enabled:, url: nil, group_resubscribe: nil, delivered: nil, group_unsubscribe: nil, spam_report: nil, bounce: nil, deferred: nil, unsubscribe: nil, processed: nil, open: nil, click: nil, dropped: nil) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/sendgrid4r/factory/event_factory.rb', line 9

def self.create(enabled:, url: nil, group_resubscribe: nil,
  delivered: nil, group_unsubscribe: nil, spam_report: nil,
  bounce: nil, deferred: nil, unsubscribe: nil, processed: nil,
  open: nil, click: nil, dropped: nil)
  REST::Webhooks::Event::EventNotification.new(
    enabled, url, group_resubscribe, delivered,
    group_unsubscribe, spam_report, bounce, deferred,
    unsubscribe, processed, open, click, dropped
  )
end