Sha256: 380c56750744b09a82c61d48ab593815a8940a1453eb7b5c81bb3030fd56bb48

Contents?: true

Size: 418 Bytes

Versions: 9

Compression:

Stored size: 418 Bytes

Contents

require_dependency 'spree/calculator'

module Spree
  class Calculator::FlatRate < Calculator
    preference :amount, :decimal, :default => 0
    preference :currency, :string, :default => Spree::Config[:currency]

    attr_accessible :preferred_amount, :preferred_currency

    def self.description
      I18n.t(:flat_rate_per_order)
    end

    def compute(object=nil)
      self.preferred_amount
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_core-1.3.5 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.4 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.3 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.2 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.1 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.0 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.0.rc2 app/models/spree/calculator/flat_rate.rb
dup_spree_core-1.3.0.rc1 app/models/spree/calculator/flat_rate.rb
spree_core-1.3.0.rc1 app/models/spree/calculator/flat_rate.rb