Sha256: 36f35d2a163e35cc1d11cae364ca60bdbb06aeb6e31a25bc05530074c8f804b8

Contents?: true

Size: 407 Bytes

Versions: 2

Compression:

Stored size: 407 Bytes

Contents

# frozen_string_literal: true

module SolidusSubscriptions
  module OrderSubscriber
    include ::Spree::Event::Subscriber
    include ::SolidusSupport::LegacyEventCompat::Subscriber

    event_action :create_subscription, event_name: 'order_finalized'

    private

    def create_subscription(event)
      SolidusSubscriptions::CreateSubscriptionJob.perform_later(event.payload[:order])
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_subscriptions-1.1.0 app/subscribers/solidus_subscriptions/order_subscriber.rb
solidus_subscriptions-1.0.1 app/subscribers/solidus_subscriptions/order_subscriber.rb