summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions/dispatcher/success_dispatcher.rb
blob: 0ae71dc7a5e661190f71cbdf2b879ec55069ba9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module SolidusSubscriptions
  module Dispatcher
    class SuccessDispatcher < Base
      def dispatch
        installment.success!(order)

        ::Spree::Event.fire(
          'solidus_subscriptions.installment_succeeded',
          installment: installment,
          order: order,
        )
      end
    end
  end
end