Sha256: 5514af61072dac875885c06f4949b225755ecb1a75e35e1be559915ee572530d

Contents?: true

Size: 309 Bytes

Versions: 24

Compression:

Stored size: 309 Bytes

Contents

# frozen_string_literal: true

module SolidusNexio
  class Webhook < ApplicationRecord
    def self.process(event_type, data)
      record = create(data: data) if SolidusNexio.config.save_webhooks

      SolidusNexio.config.webhooks.each { |service| service.call(event_type, data, record) }
    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
solidus_nexio-1.0.1 app/models/solidus_nexio/webhook.rb
solidus_nexio-1.0.0 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.12 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.11 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.10 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.9 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.8 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.7 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.6 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.5 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.4 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.3 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.1 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.7.0 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.6.9 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.6.8 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.6.7 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.6.6 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.6.5 app/models/solidus_nexio/webhook.rb
solidus_nexio-0.6.4 app/models/solidus_nexio/webhook.rb