Sha256: 0373b979bd1402eda118426aebadb9d7de3a079300689d9714a98bf475790984

Contents?: true

Size: 505 Bytes

Versions: 11

Compression:

Stored size: 505 Bytes

Contents

module Spree
  # @deprecated This calculator will be removed in future versions of Spree.
  #   The only case where it was used was for Free Shipping Promotions.  There is
  #   now a Promotion Action which deals with these types of promotions instead.
  class Calculator::FreeShipping < Calculator
    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

11 entries across 11 versions & 1 rubygems

Version Path
solidus_core-2.4.2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.3.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.4.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.4.0 app/models/spree/calculator/free_shipping.rb
solidus_core-2.4.0.rc1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.4.0.beta1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.3.0 app/models/spree/calculator/free_shipping.rb
solidus_core-2.3.0.rc3 app/models/spree/calculator/free_shipping.rb
solidus_core-2.3.0.rc2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.3.0.rc1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.3.0.beta1 app/models/spree/calculator/free_shipping.rb