Sha256: 819b1449848efe5e0a6258f1e1454845eede83fe9374c99ce23ba0a4e4548a0e

Contents?: true

Size: 444 Bytes

Versions: 23

Compression:

Stored size: 444 Bytes

Contents

require_dependency 'spree/shipping_calculator'

module Spree
  module Calculator::Shipping
    class FlatRate < ShippingCalculator
      preference :amount, :decimal, default: 0
      preference :currency, :string, default: -> { Spree::Store.default.default_currency }

      def self.description
        Spree.t(:shipping_flat_rate_per_order)
      end

      def compute_package(_package)
        preferred_amount
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
spree_core-4.8.3 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.8.2 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.7.3 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.6 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.5.5 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.4.1 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.5.4 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.5 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.7.2 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.7.1 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.4 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.7.0 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.3 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.2 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.1 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.6.0 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.5.3 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.5.2 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.5.1 app/models/spree/calculator/shipping/flat_rate.rb
spree_core-4.5.0 app/models/spree/calculator/shipping/flat_rate.rb