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.6.5 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.0 app/models/spree/calculator/free_shipping.rb
solidus_core-2.9.0.rc.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.4 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.3 app/models/spree/calculator/free_shipping.rb
solidus_core-2.7.2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.6.4 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.2 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.6.3 app/models/spree/calculator/free_shipping.rb
solidus_core-2.8.0 app/models/spree/calculator/free_shipping.rb
solidus_core-2.7.1 app/models/spree/calculator/free_shipping.rb
solidus_core-2.6.2 app/models/spree/calculator/free_shipping.rb
solidus_core_devise_token_auth-2.8.0.alpha.14 app/models/spree/calculator/free_shipping.rb
solidus_core_devise_token_auth-2.8.0.alpha.13 app/models/spree/calculator/free_shipping.rb
solidus_core_devise_token_auth-2.8.0.alpha.12 app/models/spree/calculator/free_shipping.rb
solidus_core_devise_token_auth-2.8.0.alpha.11 app/models/spree/calculator/free_shipping.rb
solidus_core_devise_token_auth-2.8.0.alpha.10 app/models/spree/calculator/free_shipping.rb
solidus_core_devise_token_auth-2.8.0.alpha.9 app/models/spree/calculator/free_shipping.rb