Sha256: e5b1ffd518e7e6049e32bda55f9f3e19620833f4b3b1ee59d46eec63722681f9

Contents?: true

Size: 408 Bytes

Versions: 5

Compression:

Stored size: 408 Bytes

Contents

module Spree
  class Calculator::SEDEX < Calculator::CorreiosBaseCalculator
    def self.description
      "SEDEX"
    end
    
    def shipping_method
      if preferred_token.present? && preferred_password.present?
        :sedex_com_contrato_1
      else
        :sedex
      end
    end
    
    def shipping_code
      if has_contract?
        40096
      else
        40010
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spree_correios-1.0.4 app/models/spree/calculator/sedex.rb
spree_correios-1.0.3 app/models/spree/calculator/sedex.rb
spree_correios-1.0.2 app/models/spree/calculator/sedex.rb
spree_correios-1.0.1 app/models/spree/calculator/sedex.rb
spree_correios-1.0.0 app/models/spree/calculator/sedex.rb