Move rate-related package concerns to a RateEstimate/Shipment model #470
Description
Discussion came up during #469, and a bit IRL:
Some concerns on the existing Package are not generic enough to be on the Package data model. For example, export reasons such as gift?
or sale?
are more intimately tied to the Shipment itself, which should be concerned with the actual shipment of a package from an origin to a destination with all the packages contained.
Similarly, information such as oversized?
and dimensional_weight
requires the knowledge of a carrier to determine - what constitutes oversized
for UPS might not be oversized for USPS, for example. These can't live on the generic Package
model.
I'm proposing a new model - a Shipment
model, that represents the physical act of sending Package(s) from an origin to a destination with all the shipping options that may be included. Within a Shipment
model will be one or more Packages, which each have a 1-1 relationship with a RateEstimate
, since a RateEstimate
is calculated by taking in the attributes of the Shipment as well as the Package.
Still a little amorphous in my head as to the exact implementation but just throwing these thoughts out there for discussion.