Skip to content
This repository was archived by the owner on Jun 13, 2018. It is now read-only.
This repository was archived by the owner on Jun 13, 2018. It is now read-only.

Move rate-related package concerns to a RateEstimate/Shipment model #470

Open
@jonathankwok

Description

@jonathankwok

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions