Sha256: be90783e2fefef2c0bce53d99c5034a1d0139b4d5698fefc571092d438b1a170

Contents?: true

Size: 468 Bytes

Versions: 4

Compression:

Stored size: 468 Bytes

Contents

module Spree
  module Webhooks
    module Subscribers
      class QueueRequests
        prepend Spree::ServiceModule::Base

        def call(event_name:, webhook_payload_body:)
          Spree::Webhooks::Subscriber.active.with_urls_for(event_name).each do |subscriber|
            Spree::Webhooks::Subscribers::MakeRequestJob.perform_later(
              webhook_payload_body, event_name, subscriber
            )
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
spree_api-4.4.1 app/services/spree/webhooks/subscribers/queue_requests.rb
spree_api-4.4.0 app/services/spree/webhooks/subscribers/queue_requests.rb
spree_api-4.4.0.rc2 app/services/spree/webhooks/subscribers/queue_requests.rb
spree_api-4.4.0.rc1 app/services/spree/webhooks/subscribers/queue_requests.rb