Sha256: 992bb1e5499eda1fcbef0ad9bdfe071aab6494e5959f8ef007cf256761d4443f

Contents?: true

Size: 386 Bytes

Versions: 58

Compression:

Stored size: 386 Bytes

Contents

module Spree
  class Promotion
    module Actions
      class FreeShipping < Spree::PromotionAction
        include Spree::AdjustmentSource

        def perform(payload={})
          order = payload[:order]
          create_unique_adjustments(order, order.shipments)
        end

        def compute_amount(shipment)
          shipment.cost * -1
        end
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
spree_core-3.2.9 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.14 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.6 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.2.8 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.13 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.5 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.4 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.2.7 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.12 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.3 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.2.6 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.11 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.10 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.2 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.2.5 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.9 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.1 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.2.4 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.1.8 app/models/spree/promotion/actions/free_shipping.rb
spree_core-3.3.0 app/models/spree/promotion/actions/free_shipping.rb