Sha256: a8e2f614d2d12e71a033e106e1e58e7c7a5531593a6101ca410ba76a09068bdf

Contents?: true

Size: 330 Bytes

Versions: 28

Compression:

Stored size: 330 Bytes

Contents

module Spree
  class Calculator::FreeShipping < Calculator
    def self.description
      Spree.t(:free_shipping)
    end

    def compute(object)
      if object.is_a?(Array)
        return if object.empty?
        order = object.first.order
      else
        order = object
      end

      order.ship_total
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
spree_core-2.1.12 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.11 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.10 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.13 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.9 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.8 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.12 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.7 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.11 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.10 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.6 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.5 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.9 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.4 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.8 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.3 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.7 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.2 app/models/spree/calculator/free_shipping.rb
spree_core-2.0.6 app/models/spree/calculator/free_shipping.rb
spree_core-2.1.1 app/models/spree/calculator/free_shipping.rb