Shipment#

A Shipment model represents the top-level model that you work with from start to end.

A shipment is assigned a origin and destination Address and one or more Package models. You also assign it one or more Carriers to fetch rates for.

Once rates have been fetched, you can also generate labels for a shipment, which would be lodged with the carrier for pickup and dispatch.

Properties#

Properties are protected and can be accessed with their getPropertyName() getter method or set via setPropertyName(value) setter method.

PropertyTypeDescription
fromAddressThe Address model for the origin sender.
toAddressThe Address model for the destination receiver.
currencystringThe currency the shipment should be using.
packagesarrayA collection of Package models for the shipment.
carriersarrayA collection of Carriers to fetch rates for.