Sha256: c0eb395c09488a058c60beffa3574937a55a2600aca4968ca3b63c455392f7d3
Contents?: true
Size: 567 Bytes
Versions: 48
Compression:
Stored size: 567 Bytes
Contents
module Wbase class MailEventBatch def initialize(params) @params = params end def save @params["_json"].each do |ev| ev.permit! Wbase::MailEvent.create( email: ev[:email], sg_message_id: ev[:sg_message_id], timestamp: ev[:timestamp], smtp_id: ev['smtp-id'], event: ev[:event], mail_eventable_id: ev.fetch(:mail_eventable_id, nil), mail_eventable_type: ev.fetch(:mail_eventable_type, nil), data: ev.to_json ) end end end end
Version data entries
48 entries across 48 versions & 1 rubygems