Sha256: 353ab42316d4732fd8edaccb8c9e6aa5b21bd9968071817e6e769fc65ea64593

Contents?: true

Size: 554 Bytes

Versions: 2

Compression:

Stored size: 554 Bytes

Contents

module Spree
  module Calculator::Shipping
    module Correios
      class Overweight < Spree::Calculator::Shipping::Correios::Base

        def self.description
          "Acima de 30kg"
        end

        def available?(package)
          max_weight = (Spree::CorreiosShipping::Config[:max_shipping_weight] || 30.0).to_f
          package_weight(package) >= max_weight ? true : false
        end

        def compute_package(package)
          0.00
        end

        def timing_info(package)
          nil
        end

      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
spree_correios_shipping-1.1.4 app/models/spree/calculator/shipping/correios/overweight.rb
spree_correios_shipping-1.1.3 app/models/spree/calculator/shipping/correios/overweight.rb