summaryrefslogtreecommitdiff
path: root/app/services/solidus_subscriptions/dispatcher.rb
blob: 0472f7925a8ed18088e48b66654582d12a293ca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# frozen_string_literal: true

module SolidusSubscriptions
  class Dispatcher
    attr_reader :installments, :order

    # Returns a new instance of this dispatcher.
    #
    # @param installments [Array<SolidusSubscriptions::Installment>] The installments to process
    #   with this dispatcher
    # @param order [Spree::Order] The order that was generated as a result of these installments
    #
    # @return [SolidusSubscriptions::Dispatcher]
    def initialize(installments, order = nil)
      @installments = installments
      @order = order
    end

    def dispatch
      raise NotImplementedError
    end
  end
end