Class: Spree::ShippingCalculator Private
- Inherits:
-
Calculator
- Object
- ActiveRecord::Base
- Base
- Calculator
- Spree::ShippingCalculator
- Defined in:
- app/models/spree/shipping_calculator.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Direct Known Subclasses
Calculator::Shipping::FlatPercentItemTotal, Calculator::Shipping::FlatRate, Calculator::Shipping::FlexiRate, Calculator::Shipping::PerItem, Calculator::Shipping::PriceSack
Instance Method Summary collapse
- #available?(_package) ⇒ Boolean private
- #compute_package(_package) ⇒ Object private
- #compute_shipment(_shipment) ⇒ Object private
Methods inherited from Calculator
calculators, #compute, description, #description, register, #to_s
Methods inherited from Base
display_includes, #initialize_preference_defaults, page, preference
Methods included from Preferences::Preferable
#default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference
Instance Method Details
#available?(_package) ⇒ Boolean
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'app/models/spree/shipping_calculator.rb', line 11 def available?(_package) true end |
#compute_package(_package) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
7 8 9 |
# File 'app/models/spree/shipping_calculator.rb', line 7 def compute_package(_package) raise NotImplementedError, "Please implement 'compute_package(package)' in your calculator: #{self.class.name}" end |
#compute_shipment(_shipment) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
3 4 5 |
# File 'app/models/spree/shipping_calculator.rb', line 3 def compute_shipment(_shipment) raise NotImplementedError, "Please implement 'compute_shipment(shipment)' in your calculator: #{self.class.name}" end |