Class: Calculator::SEDEX
- Inherits:
-
CorreiosBaseCalculator
- Object
- CorreiosBaseCalculator
- Calculator::SEDEX
- Defined in:
- app/models/spree/calculator/sedex.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.description ⇒ Object
3 4 5 |
# File 'app/models/spree/calculator/sedex.rb', line 3 def self.description "SEDEX" end |
Instance Method Details
#shipping_code ⇒ Object
15 16 17 18 19 20 21 |
# File 'app/models/spree/calculator/sedex.rb', line 15 def shipping_code if has_contract? 40096 else 40010 end end |
#shipping_method ⇒ Object
7 8 9 10 11 12 13 |
# File 'app/models/spree/calculator/sedex.rb', line 7 def shipping_method if preferred_token.present? && preferred_password.present? :sedex_com_contrato_1 else :sedex end end |