Sha256: c99309c210967b04c00f0eb67c02f60109a90c0cfec0d1b3df20259f8d5969bc

Contents?: true

Size: 384 Bytes

Versions: 3

Compression:

Stored size: 384 Bytes

Contents

# frozen_string_literal: true

module SolidusAfterpay
  module Spree
    module OrderDecorator
      def available_payment_methods
        @available_payment_methods ||= super.select do |payment_method|
          !payment_method.respond_to?(:available_for_order?) || payment_method.available_for_order?(self)
        end
      end

      ::Spree::Order.prepend self
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
solidus_afterpay-0.3.0 app/decorators/models/solidus_afterpay/spree/order_decorator.rb
solidus_afterpay-0.2.0 app/decorators/models/solidus_afterpay/spree/order_decorator.rb
solidus_afterpay-0.1.0 app/decorators/models/solidus_afterpay/spree/order_decorator.rb