This PR makes the extension easier to configure and extend by making a number of changes to its design and functionality:
A shipping_rate_calculator_class option has been added. This is a class that is responsible for calculating the end-customer cost of an EasyPost rate. It's useful in situations where a store wants to generate and buy labels from EasyPost, but still offer free shipping to its users (or just different shipping rates than the ones from EP).
A shipping_method_selector_class option has been added. This is a class responsible for generating the shipping method associated to an EasyPost rate. It's useful in situations where a store wants to make all EP shipping rates automatically visible to their customers, change the default names of the rates, etc.
A generator and default initializer have been added for easier configuration.
The Spree::Stock::Estimator decorator has been removed. Solidus already exposes an estimator_class, there's no reason to also override the default implementation.
There's a few other misc enhancements and adjustments, isolated to their own commits.
This PR makes the extension easier to configure and extend by making a number of changes to its design and functionality:
shipping_rate_calculator_class
option has been added. This is a class that is responsible for calculating the end-customer cost of an EasyPost rate. It's useful in situations where a store wants to generate and buy labels from EasyPost, but still offer free shipping to its users (or just different shipping rates than the ones from EP).shipping_method_selector_class
option has been added. This is a class responsible for generating the shipping method associated to an EasyPost rate. It's useful in situations where a store wants to make all EP shipping rates automatically visible to their customers, change the default names of the rates, etc.Spree::Stock::Estimator
decorator has been removed. Solidus already exposes anestimator_class
, there's no reason to also override the default implementation.There's a few other misc enhancements and adjustments, isolated to their own commits.