Sha256: 8ed46b365cbdf4327785d562f75ba00b29e4643371c9302e5389d0d479e42beb

Contents?: true

Size: 754 Bytes

Versions: 1

Compression:

Stored size: 754 Bytes

Contents

module SolidusSubscriptions
  class Dispatcher
    attr_reader :installments, :order

    # Get a new instance of the FailureDispatcher
    #
    # @param installments [Array<SolidusSubscriptions::Installment>] The
    #   installments which have failed to be fulfilled
    #
    # @return [SolidusSubscriptions::FailureDispatcher]
    def initialize(installments, order = nil)
      @installments = installments
      @order = order
    end

    def dispatch
      notify
    end

    private

    def notify
      Rails.logger.tagged('Event') do
        Rails.logger.info message.squish.tr("\n", ' ')
      end
    end

    def message
      raise 'A message should be set in subclasses of Dispatcher'
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
solidus_subscriptions-alpha-0.0.4 app/models/solidus_subscriptions/dispatcher.rb