Sha256: 90892b54655e1fdeaa8f2da99915511ff5efd4eac3d5ca53537cc3030e645d2a

Contents?: true

Size: 575 Bytes

Versions: 52

Compression:

Stored size: 575 Bytes

Contents

# frozen_string_literal: true

require_dependency 'spree/calculator'

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

52 entries across 52 versions & 2 rubygems

Version Path
solidus_core-2.10.5 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.3 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.10.3 app/models/spree/calculator/free_shipping.rb
solidus_core-2.11.0 app/models/spree/calculator/free_shipping.rb
solidus_core-2.10.2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.6 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.6 app/models/spree/calculator/free_shipping.rb
solidus_core-2.10.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.5 app/models/spree/calculator/free_shipping.rb
solidus_core-2.10.0 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.4 app/models/spree/calculator/free_shipping.rb
solidus_core-2.6.6 app/models/spree/calculator/free_shipping.rb
solidus_core-2.7.4 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.5 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.3 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.10.0.beta1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.7.3 app/models/spree/calculator/free_shipping.rb