Sha256: f0dab6d6e1a56a730b3be792405f8eb015b7114304c6d0675ddd60be1949cd11

Contents?: true

Size: 403 Bytes

Versions: 4

Compression:

Stored size: 403 Bytes

Contents

# This service class is intented to provide callback behaviour to handle
# an installment successfully being processed
module SolidusSubscriptions
  class SuccessDispatcher < Dispatcher
    def dispatch
      installments.each { |i| i.success!(order) }
      super
    end

    private

    def message
      "Successfully processed installments: #{installments.map(&:id).join(', ')}"
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
solidus_subscriptions-alpha-0.0.5 app/models/solidus_subscriptions/success_dispatcher.rb
solidus_subscriptions-alpha-0.0.3 app/models/solidus_subscriptions/success_dispatcher.rb
solidus_subscriptions-alpha-0.0.2 app/models/solidus_subscriptions/success_dispatcher.rb
solidus_subscriptions-alpha-0.0.1 app/models/solidus_subscriptions/success_dispatcher.rb