shippex v0.4.0 Shippex.Package
Defines the struct for storing a Package
, which is then passed along with
an origin and destination address for shipping estimates. A description
is
optional, as it may or may not be used with various carriers. The
monetary_value
might be required depending on the origin/destination
countries of the shipment.
For USPS, a package has a container
string which can be one of the
pre-defined USPS containers.
%Shippex.Package{length: 8
width: 8,
height: 8,
weight: 5.5,
monetary_value: 100}
Link to this section Summary
Functions
Returns a map of predefined containers for use with USPS. These can be
passed to package.container
for fetching rates
Returns a map of flat rate USPS containers, along with their string description and flat shipping rate (in cents)
Link to this section Types
t() :: %Shippex.Package{container: term, description: term, girth: term, height: term, length: term, monetary_value: term, weight: term, width: term}
Link to this section Functions
Returns a map of predefined containers for use with USPS. These can be
passed to package.container
for fetching rates.
usps_flat_rate_containers() :: %{optional(atom) => flat_rate_container}
Returns a map of flat rate USPS containers, along with their string description and flat shipping rate (in cents).